If I wanted to write a little script to algorithmically generate MIDI clips from the command line with a couple of simple arguments as input, and I wanted it to run with the smallest number of dependencies using a language most people already have installed, what would you recommend for language/library choice?
This looked intriguing at first glance, but I’m wide open for any/all suggestions.
Aha, I think this is what I was looking for:
Geert Bevin made this cool utility: https://github.com/gbevin/SendMIDI
Yeah, that’s really cool for interactive testing.
I’m wanting to do algorithmic generation. So, to do that with Geert’s utility, I’d be shell scripting. I’m quite a bit more comfortable in Python, I’m thinking, but I’ll definitely keep Geert’s stuff in the back of my mind.
Ah I see, I assumed “command line” meant something that could be run from a shell.
A python script can be run from a shell.
@willbenton had a good suggestion of checking out abc or other MIDI DSLs to make generation of simple phrases/melodies quicker/easier. Options are good!
Ari Russo’s Ruby midi stuff is pretty good and cross platform iirc https://github.com/arirusso
Looks primarily oriented to realtime though? I wasn’t seeing a MIDI file writer…
a toolkit developed at MIT for computational musicology, music theory, and generative composition. Provides expandable objects and methods for most common theoretical problems. Supports music import via MusicXML, Humdrum/Kern, Musedata, ABC, and MIDI, output via MusicXML, Lilypond, and MIDI, and can easily integrate with notation editors (Finale, Sibelius, or MuseScore) and other audio and DAW software (via MIDI).
Whoah. Where has this been hiding?