[jmsl] Exporting to Midi

jmsl at music.columbia.edu jmsl at music.columbia.edu
Wed Apr 22 05:12:31 EDT 2009


Yes, I'm trying to upload the raw midi file data through DataOutputStream 
and HttpURLConnection. I need to get hold of ByteArray of the midi file 
since applet doesn't have the security right to files.

Chi
----- Original Message ----- 
From: <jmsl at music.columbia.edu>
To: <jmsl at music.columbia.edu>
Sent: Tuesday, April 14, 2009 11:34 AM
Subject: Re: [jmsl] Exporting to Midi


> You might look at this method in File:
> File.createTempFile(String prefix, String suffix)
>
> thanks,
> Peter McCulloch
>
>
>> I see MidiLogger.writeMidiFile() uses MIDIFileOutput, which is a  class 
>> was written by Phil Burk.
>> MIDIFileOutput extends RandomAccessFile which supports a seek()  method 
>> that lets you sort of jump around the file as you are writing  it. This 
>> is necessary so that after writing a track you can "rewind"  to the track 
>> header, write the length of the track into the track  header, then seek() 
>> forward to the end of track again for continued  writing of output.
>> I don't know offhand if there would be a simple way to either make a 
>> virtual RandomAccessFile in memory that you could write to, or  create a 
>> subclass of RandomAccessFile that supports writing to a 
>> DataOutputStream... maybe there's a trivial solution but I don't see  it 
>> at this moment.
>> Maybe someone can chime in?
>> Thanks
>> Nick
>
> _______________________________________________
> jmsl mailing list
> jmsl at music.columbia.edu
> http://music.columbia.edu/mailman/listinfo/jmsl
> 



More information about the jmsl mailing list