MIDI timing?

David N. Smith (IBM) dnsmith at watson.ibm.com
Fri Oct 12 18:07:54 UTC 2001


John & David:

I spent quite a bit of time on this some months ago. The Mac version needs much virtual machine work before it has a chance. (I hear of MIDI support for the Mac in System X, which might help.)

On windows, there are some bugs in both the VM and in Smalltalk. Andreas Raab was working on them at one point. But the Windows VM does time stamp when the event is received and maintains a queue of events so that a garbage collect won't loose data. There seems to be an unaddressed problem with outputting MIDI though: the output queue only holds one item.

There is code on the Swici which will write a MIDI Score to disk. I wrote some code to convert raw input to a Score and eventually was able to make noises with the keyboard, and save them to disk as a MIDI file.

The MIDI file can be read in and played with standard Squeak tools.

If Squeak Central (Andreas) wants to fix the support, I'd be happy to pass on what I have.

Dave


At 20:42 -0700 10/11/01, John M McIntosh wrote:
>>Hello:
>>  I'm thinking about writing a midi drum/step sequencer application
>>in squeak, due to the nice user interfaces and ease of coding (I hope?)
>>My question is, how accurate can I expect the timing to be? I know windows
>>isn't so hot with MIDI as it is. Has anyone worked with something like this
>>before?
>>
>>Thanks,
>>David
>
>I think David Smith looked at this. On the mac the timing is set via the system clock at the point when data is read from the serial interface into the buffer, which happens sometimes after the data actually is generated and receive and noticed by the VM. If you have USB, then lets enter yet more milliseconds. Can't speak for windows, but I've been told relying on precise timing on the mac is a dangerous viewpoint. This isn't to say you couldn't get better numbers, but that would require some C code changes.
>--
>--
>===========================================================================
>John M. McIntosh <johnmci at smalltalkconsulting.com> 1-800-477-2659
>Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
>===========================================================================


-- 
_______________________________
David N. Smith
IBM T J Watson Research Center
Hawthorne, NY
dnsmith at watson.ibm.com




More information about the Squeak-dev mailing list