MIDIFilt perl scripts for working with MIDI files These scripts make use of the Midi-Perl module, which you can get at www.cpan.org For the perl newbies out there, make sure the first line of each script is the same as what you get from typing 'which perl' at the command line. Just say 'chmod +x script.pl' and fire away at the command line. Good Luck! Drew Krause drkrause@mindspring.com http://www.wordecho.com/DrewKrause.html ##### DFILT.PL written by Drew Krause ##### takes a midi file and returns all notes with duration over cutoff ##### writes to 'dfilt.mid' ##### use as "$> dfilt.pl mymidi.mid 50" ##### MIXMID.PL written by Drew Krause ##### mixes two midi files together ##### writes to 'mix.mid' ##### use as "$> mixmid.pl file1.mid file2.mid" ##### PITFILT.PL written by Drew Krause ##### Takes a MIDI file and returns file 'pitfilt.mid' with ##### all pitches between & including min and max ##### use as "$> pitfilt.pl mymidi.mid 40 80" ##### PITSIFT.PL written by Drew Krause ##### takes a midi file and returns all instances in it of ##### notenumbers in array @vip ##### writes to 'pitsift.mid' ##### use as "$> pitsift.pl mymidi.mid" ##### PITSIFTOUT.PL written by Drew Krause ##### takes a midi file and returns all notes EXCEPT ##### notenumbers in array @vip ##### writes to 'pitsiftout.mid' ##### use as "$> pitsiftout.pl mymidi.mid" ##### SHIFT.PL written by Drew Krause ##### takes a midi file and returns shifts later by a # of clicks ##### writes to 'shift.mid' ##### use as "$> shift.pl mymidi.mid 500" ##### SIEVE.PL written by Drew Krause ##### takes a midi file and returns file 'sieve.mid' with all ##### attacks within 'forgiveness' distance away from multiples ##### of 'quantlevel' clicks (speed) ##### use as "$> sieve.pl mymidi.pl 15 2" ##### SIEVEATK.PL written by Drew Krause ##### takes a midi file and returns file 'sieveatk.mid' with all ##### attacks within 'forgiveness' distance away from multiples ##### of attack index (number of attacks in the file) ##### use as "$> sieveatk.pl mymidi.pl 15 2" ##### TAKEMID.PL written by Drew Krause ##### a simple script which takes a midifile and writes a score to STDOUT ##### use as "$> takemid.pl file.mid" ##### TSCALE.PL written by Drew Krause ##### takes a midi file and returns the file 'tscale.mid' ##### with speed scaled by a factor ##### (both attack points and durations are modified) ##### use as "$> tscale.pl mymidi.mid 4.5" ##### TSCALETACT.PL written by Drew Krause ##### takes a midi file, computes the tactus as the gcd of atk points ##### then scales the file's tempo to your choice ##### (e.g. 1 = quarter-note, 1.5 = dotted quarter, etc) ##### returns the file 'tscaletact.mid' ##### use as "$> tscaletact.pl mymidi.mid 3.25" ##### NOTE: fractions for scaling such as 7/5 are ALLOWED! ##### VFILT.PL written by Drew Krause ##### takes a midi file and returns the file 'vfilt.mid' ##### of all attacks between and including velocities min & max ##### use as "$> vfilt.pl mymidi.mid 15 60"