'From Squeak2.9alpha of 23 June 2000 [latest update: #2774] on 1 November 2000 at 1:46 am'!

!MIDIPlugin methodsFor: 'primitives' stamp: 'hh 11/1/2000 01:44'!
primitiveMIDIReadControllers: portNum from: low to: high into: array

	| arrayLength bytesRead |
	self primitive: 'primitiveMIDIReadControllers'
		parameters: #(SmallInteger SmallInteger SmallInteger ByteArray).
	arrayLength _ interpreterProxy byteSizeOf: array cPtrAsOop.
	bytesRead _ self sqMIDIPort: portNum
			ReadControllersFrom: low
			To: high
			In: arrayLength
			to: array asInteger.
	^bytesRead asSmallIntegerObj! !


!MIDIPlugin class methodsFor: 'translation' stamp: 'hh 11/1/2000 00:40'!
headerFile
^'/* MIDI primitives */

/* module initialization/shutdown */
int midiInit(void);
int midiShutdown(void);

int sqMIDIGetClock(void);
int sqMIDIGetPortCount(void);
int sqMIDIGetPortDirectionality(int portNum);
int sqMIDIGetPortName(int portNum, int namePtr, int length);
int sqMIDIClosePort(int portNum);
int sqMIDIOpenPort(int portNum, int readSemaIndex, int interfaceClockRate);
int sqMIDIParameterSet(int whichParameter, int newValue);
int sqMIDIParameterGet(int whichParameter);
int sqMIDIPortReadInto(int portNum, int count, int bufferPtr);
int sqMIDIPortWriteFromAt(int portNum, int count, int bufferPtr, int time);
int sqMIDIPortReadControllersFromToInto(int portNum, int low, int high, int count, int bufferPtr);
'! !

