Re: [LAU] Converting SMF 1 MIDI file to text?

From: Ken Restivo <ken@email-addr-hidden>
Date: Tue Apr 22 2008 - 06:06:23 EEST

On Mon, Apr 21, 2008 at 09:11:51PM +0100, James Stone wrote:
> On Mon, Apr 21, 2008 at 11:56:15AM -0700, Ken Restivo wrote:
> > I'm trying to convert a standard MIDI file, format 1 (from seq24) to text. I need to grab the note numbers for a drum track, and compare that to a tapeutape XML file, so that I can figure out which Freesound samples I actually used in this track, so I can credit them appropriately as required by the CC Sampling license.
> >
> > I looked at midi.el, which seemed like it'd be perfect, but it won't open SMF 1 format files from seq24 at all (says it's not a valid MIDI file). It also has trouble with SMF 1 files from arecordmidi, though it reads SMF 0 files from arecordmidi with no problems.
> >
> > I also looked around at some Python MIDI libraries, but didn't find the documentation too accessible.
> >
> > Any quick one-liner in some command-line tool or language to give me a printout of all the MIDI notes used in each track of a SMF 1 MIDI file from seq24?
> >
>
> midicomp seems to do the job:
>
> http://midicomp.opensrc.org/
>

Thanks! That did it!

midicomp the-point-seq24.mid | cut -d' ' -f 4 | sort | uniq

-ken
_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@email-addr-hidden
http://lists.linuxaudio.org/mailman/listinfo/linux-audio-user
Received on Tue Apr 22 08:15:03 2008

This archive was generated by hypermail 2.1.8 : Tue Apr 22 2008 - 08:15:03 EEST