miditurtle - turtle-sound for manipulating MIDI data
miditurtle in.mid - <<EOT | aplaymidi - playto 30.7 jump -3.2 c3cc74=30 play 3.2 jump -3.2 c3cc74=70 pause 1.6 pitch -200 play 1.6 pitch 0 jump 3.5 filter -cha9 playto 320 tempo 1.5 play 342 end EOT perldoc miditurtle # read the manual (even though it's in Lua!)
Remember turtle-graphics ? This script walks a turtle through a input-midi-file, generating an output-midi-file. It reads its turtle-commands from STDIN; the input-midi-file and output-midi-file are the two arguments. If the output-midi-file is - then the output is written to STDOUT, but the input-file must be specified by name, because STDIN is reserved for the turtle-commands.
All times and delta-times are in seconds. All times refer to the input-file, in seconds after the start. The turtle's default behaviour is always to advance steadily through the input, copying events to the end of the output.
The current version of miditurtle is available by http at
To install miditurtle, save it to disc, move it into your $PATH, make it executable, and if necessary edit the first line to reflect where lua is installed on your system.
It is a Lua script, so you'll need to install Lua e.g.
aptitude install lua luarocks
and you'll also need the MIDI module e.g.
luarocks install MIDI
20110804 1.0 tempo command seems to work 20110804 output file can be - (stdout) 20110803 add marker and cNccNN=NN 20110801 use jumpto, jump, playto and play 20110801 suppresses useless patch_changes 20110731 first usefulness 20110731 are play and jump working ? 20110730 like 1D turtle-graphics through a MIDI file
Peter J Billam http://www.pjb.com.au/comp/contact.html
Based on the MIDI.lua Lua module.