[Newbies] modules, plugins, primitives, and MIDIPlugin

Andrew Dabrowski dabrowsa at indiana.edu
Fri May 11 16:18:31 UTC 2007


Can someone briefly explain how MIDIPlugin is supposed to work?

In the code for SimpleMIDIPort I see the following method.

> primMIDIOpenPort: portNum readSemaIndex: readSemaIndex
> interfaceClockRate: interfaceClockRate "Open the given MIDI port. If
> non-zero, readSemaIndex specifies the index in the external objects
> array of a semaphore to be signalled when incoming MIDI data is
> available. Not all platforms support signalling the read semaphore.
> InterfaceClockRate specifies the clock rate of the external MIDI
> interface adaptor on Macintosh computers; it is ignored on other
> platforms."
> 
> <primitive: 'primitiveMIDIOpenPort' module: 'MIDIPlugin'> self
> primitiveFailed.

I'm guessing that the line "<primitive: 'primitiveMIDIOpenPort' module: 
'MIDIPlugin'> self" is call to something external to the current squeak 
image.

When I try to execute the primMIDIOpenPort method I get a 
"primitivefailed" error message.  Is this because my current image can't 
find the external resource?

I'm running Ubuntu 7.04, and in the Squeak directory there is file 
called "SqueakPlugin.image".  I tried copying that to same directory 
with my squeak image file, but it doesn't help.  Am I supposed to 
somehow load the plugin into my image before invoking the method?

Or do I have to compile my own VM with the MIDIPlugin source code to get 
this working?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dabrowsa.vcf
Type: text/x-vcard
Size: 162 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/beginners/attachments/20070511/5aeb0af7/dabrowsa.vcf


More information about the Beginners mailing list