John Richards 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.
John
Hi John, just fired up my Windows partition to try again.
I evaluated MIDISynth>>example
This pops a menu, in which my device is listed: USB Audio Device (in)
When I select that, the keyboard plays.
Here's the example code:
example
"Here's one way to run the MIDI synth. It will get a nice Morphic UI later. Click the mouse to stop running it. (Mac users note: be sure you have MIDI interface adaptor plugged in, or Squeak will hang waiting for the external clock signal.)."
"MIDISynth example"
| portNum synth |
portNum := SimpleMIDIPort inputPortNumFromUser.
portNum ifNil: [^ self].
SoundPlayer useShortBuffer.
synth := MIDISynth new
midiPort: (SimpleMIDIPort openOnPortNumber: portNum).
synth midiParser ignoreCommand: 224. "filter out pitch bends"
1 to: 16 do: [:i |
(synth channel: i) instrument:
(AbstractSound soundNamed: 'oboe1')].
1 to: 16 do: [:ch | synth volumeForChannel: ch put: 0.2].
synth processMIDIUntilMouseDown.
SoundPlayer shutDown; initialize. "revert to normal buffer size"
Hope this helps, ...Stan