Windows MIDI utilizes software MIDI, not Mac

Mark Guzdial guzdial at
Thu Feb 4 15:39:17 UTC 1999

>NO--NO--the MIDIPort>>primitivePutMIDIOn primitive takes an arbitrary message
>packet, which is typically a note-on or note-off message alone. The low-level
>driver has no automatic-note-off scheduler, so Squeak-level processes are
>*required* to do this. The MIDIPort class has interfaces for note-oriented or
>packet-oriented output. Take a look at the on-line doc. at

My sincere apologies for getting it wrong, Stephen -- I didn't read
carefully enough. MANY thanks for the pointer!

Using your pointer, I've been able to play MIDI files from within Siren by
modifying ScorePlayer, ScorePlayerMorph, and MIDIPort only very little.
I'm including these below.  With these loaded, you choose "Play via MIDI"
on the ScorePlayerMorph menu.  You don't get prompted for the external
MIDIPort, and instead, everything gets played through Siren's MIDIPort.  It
was only a two method addition to MIDIPort to get it to respond to
everything that the ScorePlayer wanted from John's SimpleMIDIPort.

Thanks again, Stephen!

'From Squeak 2.2 of Sept 23, 1998 on 04 February 1999 at 10:17:28 am'!

!MIDIPort methodsFor: 'primitives' stamp: 'mjg 02/04/1999 10:13'!
	"Assume open"
	^true! !

!MIDIPort methodsFor: 'primitives' stamp: 'mjg 02/04/1999 10:13'!
midiCmd: cmd channel: channel byte: dataByte1 byte: dataByte2
	"Immediately output the given MIDI command with the given channel
and argument bytes to this MIDI port. Assume that the port is open."
		| data |
		data := (ByteArray
					with: (cmd bitOr: channel)
					with: dataByte1
					with: dataByte2).
		self primPut:
			data size: (data size) on: 0.! !

!ScorePlayer methodsFor: 'midi output' stamp: 'mjg 02/04/1999 10:08'!
openMIDIPort: portNum
	"Open the given MIDI port. Music will be played as MIDI commands to
the given MIDI port."

	midiPort _ "SimpleMIDIPort openOnPortNumber: portNum" MIDIPort default.
! !

!ScorePlayerMorph methodsFor: 'all' stamp: 'mjg 02/04/1999 10:15'!

	| portNum |
	portNum _ "SimpleMIDIPort outputPortNumFromUser" MIDIPort default.
	portNum ifNil: [^ self].
	scorePlayer openMIDIPort: portNum.
	LastMIDIPort _ portNum.
]style[(12 170)f1bcblue;,f1! !

Mark Guzdial : Georgia Tech : College of Computing : Atlanta, GA 30332-0280
(404) 894-5618 : Fax (404) 894-0673 : guzdial at

More information about the Squeak-dev mailing list