Skip to content

Instantly share code, notes, and snippets.

@ology
Last active November 4, 2023 05:16
Show Gist options
  • Save ology/60dbd9a537b924c4611b56b2992971fc to your computer and use it in GitHub Desktop.
Save ology/60dbd9a537b924c4611b56b2992971fc to your computer and use it in GitHub Desktop.
Musical transformation output
$ cd ~/sandbox/Music-Chord-Progression-Transform/
$ vim transform-chain
# :!rm -f %.mid ; perl % --r=2 --m=8 --bpm=110 --note=A --o=4 --q=m --t=8 --v; timidity -c ~/timidity.cfg -Od %.mid
Initial: A4 m
Transforms: T7,O,T-7,T-4,O,T1,RP,I
1. T7 (0): [ 76, 79, 83 ]
[ 'E5', 'G5', 'B5' ]
Em
2. I (7): [ 76, 79, 83 ]
[ 'E5', 'G5', 'B5' ]
Em
3. T7 (0): [ 83, 86, 90 ]
[ 'B5', 'D6', 'F#6' ]
Bm
4. O (1): [ 69, 72, 76 ]
[ 'A4', 'C5', 'E5' ]
Am
5. T-7 (2): [ 62, 65, 69 ]
[ 'D4', 'F4', 'A4' ]
Dm
6. O (1): [ 69, 72, 76 ]
[ 'A4', 'C5', 'E5' ]
Am
7. T-7 (2): [ 62, 65, 69 ]
[ 'D4', 'F4', 'A4' ]
Dm
8. T-4 (3): [ 58, 61, 65 ]
[ 'A#3', 'C#4', 'F4' ]
A#m
Playing eg/transform-chain.mid
MIDI file: eg/transform-chain.mid
Format: 0 Tracks: 1 Divisions: 96
Text: eg/transform-chain at Fri Nov 3 21:51:08 2023
Playing time: ~41 seconds
Notes cut: 0
Notes lost totally: 0
$ timidity -c ~/timidity.cfg -Od eg/transform-chain.mid -Ow -o - ffmpeg -i - -acodec libmp3lame -ab 64k ~/Music/transform-chain.mp3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment