Skip to content

Instantly share code, notes, and snippets.

View matthewh806's full-sized avatar

Matthew Harris matthewh806

View GitHub Profile
@matthewh806
matthewh806 / note_ordering.py
Created April 12, 2025 10:55
This script was used to generate the output for https://llllllll.co/t/disquiet-junto-project-0693-melody-sorted/71471/16?u=mdh it uses f0 detection to sort a bunch of audio samples in terms of increasing pitch
import librosa
import numpy as np
from pydub import AudioSegment
from pathlib import Path
import pretty_midi
import argparse
'''
Given a directory of samples will generate a concatenated output
containing each sample in order of increasing pitch
'''
Tool for tagging my music collection for tracks of my own that
I have exported. The tool expects a directory structure as follows:
- Artist
- Album Name
- song_name.mp3
If there is a nested structcxscure e.g.
@matthewh806
matthewh806 / Terminate process running on port
Last active January 12, 2017 08:57
Terminate process running on specific port
lsof -i TCP:8086 | awk '/LISTEN/{print $2}' | xargs kill -9
@matthewh806
matthewh806 / com.matthew.homebrewupdate.plist
Created August 31, 2016 20:57
Automatically update, upgrade and clean brew on OSX
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.matthew.homebrewupdate.plist</string>
<key>ProgramArguments</key>
<array>
<string>/Users/matthew/bin/homebrewupdate.sh</string>