Squeak 2.2 Sound and MIDI Features

Andreas Raab raab at isgnw.cs.uni-magdeburg.de
Mon Oct 5 16:34:35 UTC 1998


> 1. The score player can now output MIDI on Macs and Win95/NT.

I just love it! Here is a small change set that allows you to see the name
of the MIDI device in the ScorePlayer rather than "port XYZ" and expands
the number of devices to four (I have three on my machine -- the MIDI
mapper the *awful* SB16 MIDI port and the GM midi port). 

  Andreas

'From Squeak 2.2 of Sept 23, 1998 on 5 October 1998 at 6:26:32 pm'!

!ScorePlayerMorph methodsFor: 'all' stamp: 'ar 10/5/1998 18:23'!
invokeMenu
	"Invoke a menu of additonal functions for this WaveEditor."

	| aMenu list maxPorts |
	aMenu _ CustomMenu new.
	aMenu addList:	#(
		('reload instruments'		updateInstrumentsFromLibrary)
		('play via built in synth'	closeMIDI)).
	list _ OrderedCollection new.
	maxPorts _ SimpleMIDIPort portCount min: 4.
	(0 to: maxPorts) do:[:portNum|
		(SimpleMIDIPort portDirectionalityOf: portNum) >= 2 ifTrue:[
			list add:(Array with:'play via ', (SimpleMIDIPort portNameOf: portNum)
						with: ('openMIDIPort', portNum printString) asSymbol)]].
	list isEmpty ifFalse:[aMenu addList: list].
	aMenu invokeOn: self defaultSelection: nil.
! !

!ScorePlayerMorph methodsFor: 'all' stamp: 'ar 10/5/1998 18:19'!
openMIDIPort2

	scorePlayer openMIDIPort: 2.! !

!ScorePlayerMorph methodsFor: 'all' stamp: 'ar 10/5/1998 18:19'!
openMIDIPort3

	scorePlayer openMIDIPort: 3.! !

!SimpleMIDIPort class methodsFor: 'accessing' stamp: 'ar 10/5/1998 18:21'!
portCount
	<primitive: 523>
	^0! !

!SimpleMIDIPort class methodsFor: 'accessing' stamp: 'ar 10/5/1998 18:22'!
portDirectionalityOf: portNum
	<primitive: 524>
	^0! !

!SimpleMIDIPort class methodsFor: 'accessing' stamp: 'ar 10/5/1998 18:25'!
portNameOf: portNum
	<primitive: 525>
	^'MIDI port ', portNum printString! !

-- 
Linear algebra is your friend - Trigonometry is your enemy.
+===== Andreas Raab ============= (raab at isg.cs.uni-magdeburg.de) =====+
I Department of Simulation and Graphics      Phone: +49 391 671 8065  I
I University of Magdeburg, Germany           Fax:   +49 391 671 1164  I
+=============< http://isgwww.cs.uni-magdeburg.de/~raab >=============+





More information about the Squeak-dev mailing list