Skip to content

Instantly share code, notes, and snippets.

View cpmpercussion's full-sized avatar
🏠
Working from home

Charles Martin cpmpercussion

🏠
Working from home
View GitHub Profile
@cpmpercussion
cpmpercussion / intel-galileo-pd-howto.md
Last active September 9, 2020 21:01
HOWTO setup Pd on Intel Galileo

Putting Pd on the Intel Galileo

The Intel Galileo is a great little development/experiments board with an Intel Quark 32-bit x86 processor. We had some of these hanging around our office and I was inspired to make some computer music with it - so here's my process for getting Pure Data up and running.

Here's the things I needed:

@cpmpercussion
cpmpercussion / midi_parse_script.py
Last active January 14, 2021 08:42
A script to parse lots of MIDI files into a simple melody-only 16th-note-only NumPy array format. Generates worker processes to use all available CPU power.
from music21 import converter, instrument, note, chord, stream, midi
import numpy as np
import pandas as pd
import os
import time
import h5py
import argparse
import multiprocessing
parser = argparse.ArgumentParser()
@cpmpercussion
cpmpercussion / charles-thesis-template.tex
Created January 21, 2016 06:26
Charles' Fairly Vanilla LaTeX Thesis Template Using Memoir
\documentclass[a4paper,12pt,oldfontcommands]{memoir}
\PassOptionsToPackage{hyphens}{url}
\usepackage{url}
\usepackage{hyperref}
\usepackage{doi}
\usepackage{graphicx}
\usepackage{amssymb}
\usepackage{epstopdf}
\usepackage{wrapfig}
\usepackage{natbib}
@cpmpercussion
cpmpercussion / examiner_meeting_data.py
Last active November 21, 2023 08:59
FAIS minus: a script for handling for_SAS data exported from Gradebook
#!/usr/bin/env python3
"""FAIS Minus --- a script for handling final marks exported from Wattle Gradebook
OVERVIEW:
This script helps process the final mark output from Gradebook, including:
- generating stats per cohort
- recording and updating special grades (e.g., DA/RP/WD)
- exporting CSV files that are _actually_ SAS-ready.
@cpmpercussion
cpmpercussion / loop_pi_video.sh
Created July 15, 2016 08:31
omxplayer command to loop a video forever for use in video art exhibitions
#!/bin/bash
# This one-liner script plays a video in an infinite loop on a raspberry pi
# for a video-art exhibition.
# It was written for a video in portrait orientation so the video is rotated 270
# to use up the whole screen (which was also rotated).
# Charles Martin, July 2016
omxplayer -o local --loop /home/pi/video.mp4 --orientation 270
@cpmpercussion
cpmpercussion / short_report.tex
Created January 15, 2020 23:57
A LaTeX template for short student reports
% LaTeX Template for short student reports.
% Citations should be in bibtex format and go in references.bib
\documentclass[a4paper, 11pt]{article}
\usepackage[top=3cm, bottom=3cm, left = 2cm, right = 2cm]{geometry}
\geometry{a4paper}
\usepackage[utf8]{inputenc}
\usepackage{textcomp}
\usepackage{graphicx}
\usepackage{amsmath,amssymb}
\usepackage{bm}