[jmsl] Exporting to Midi

jmsl at music.columbia.edu jmsl at music.columbia.edu
Tue Apr 14 11:34:34 EDT 2009


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



More information about the jmsl mailing list