[linux-audio-user] MIDI app??

Jaakko Prättälä Jaakko.Prattala at Helsinki.FI
Mon Feb 3 03:00:00 EST 2003


Lainaus Joe Hartley <joe.hartley at ingenta.com>:

> On Sun, 02 Feb 2003 12:05:57 -0800
> Tobiah <toby at tobiah.org> wrote:
> > Joe Hartley wrote:
> > > I can download new models of mics into it via MIDI, but am such a
> > > MIDI novice I have no idea which app would be suitable for this sort
> of
> > > thing.  Any suggestions?  Thanx!
> > > 
> > 
> > I should think that you could use cat.
> > 
> > cat downloaded_midi_file > /dev/midi0
> 
> Well, this seems blindingly obvious, and when I try it I get the MIDI
> out
> LED on the Delta to light up!  Huzzah!
> 
> Course, the AMM-1 doesn't seem to realize anything's happening...  so
> it's into they mystic now.
> 
> I tried /dev/snd/midiC0D0 as well, with the exact same results.
> Trying it to /dev/snd/seq fails, though: "cat write error: Invalid
> argument"
> 
> So much fun!
> 
> -- 
> ======================================================================
>              Joe Hartley - Senior Unix Admin - Ingenta inc.
>       111R Chestnut St., Providence, RI  02903 - cell 401.338.9214
>               Joe.Hartley at ingenta.com - AOL IM: JoeHartley
> Without deviation from the norm, "progress" is not possible. - FZappa
> 
> 

It might be that there should be a SysEx start message and a
manufacturer ID before the data and a SysEx end message after.

For Antares these would be
0xF0 0x00 0x01 0x26 [data here...] 0xF7
 (at least according to
 http://true.chez.tiscali.fr/sysex/sysexformat.htm and
 http://www.borg.com/~jglatt/tech/midispec.htm)

You could try Python (start the interpreter with 'python'
and type in the next):

fp = open ("datafile")
midiport = open("/dev/midiXX", "w", 0)
data = fp.read()
fp.close()
midiport.write(chr(0xF0)+chr(0x00)+chr(0x01)+chr(0x26)+data+chr(0xF7))
midiport.close()

Haven't tested it (I don't have an Antares device
or anything else that wants SysExes for that matter)
but "if everything else fails, use python" :)

--
Jaakko Prättälä
Jaakko.Prattala at Helsinki.FI
http://www.cs.Helsinki.FI/Jaakko.Prattala




More information about the Linux-audio-user mailing list