[squeak-dev] Re: [SqueakAudio] Creating/using MIDI ports with external device, how to start?

Nick Brown maillist at bredon-gill.demon.co.uk
Fri May 30 16:31:56 UTC 2008


On Fri, 30 May 2008 08:21:04 -0400, in
gmane.comp.lang.smalltalk.squeak.general you wrote:

>The physical device and midi/usb interface are present and working 
>(verified by other software on the system which sees them).  So my problem 
>seems to be not knowing how to bind them to a new midi port so it can be 
>used by Squeak.
>
Hi John.

It's been a while since I've played with MIDI in Squeak, but I just
gave it a whirl on Windows XP with a 3.8 image, and it seemed ok. 

What do you get when you run:

SimpleMIDIPort inputPortNumFromUser

It should pop up a menu listing all the MIDI inputs that the OS knows
about. When you choose a port from the menu, that expression will then
return a number, representing the MIDI port you chose. If Squeak isn't
aware of any MIDI input ports, the menu won't appear, and the return
value will be nil.

The same holds for the method outputPortNumFromUser.

If the menu appears ok, then you ought to be able to create an
instance of SimpleMIDIPort something like this:

midiIn := SimpleMIDIPort openOnPortNumber: 
	(SimpleMIDIPort inputPortNumFromUser).

It may be you've already tried all of this to no avail, in which case
I'd say this would need to be looked at by someone who knows rather
more than me about how MIDI is handled at a low level.

HTH
-Nick




More information about the Squeak-dev mailing list