I'm trying to open a midi port to receive incoming midi commands and am completely stuck (after a week of trying everything I can think of). I've confirmed that the MIDIPlugin is loaded. I've tried on both Windows XP and MacOS. The only port I have available is this: MIDI Ports: 0: QuickTime MIDI (out) Everything I have tried to create a new one has failed in the midi open primitive. I suspect I'm just being dumb and there is an obvious incantation (hope so anyway). Thanks so much for any advice you can provide. John |
----- Original message ----- From: John Richards <[hidden email]> To: [hidden email] Sent: Thu, 29 May 2008, 12:09:20 BST Subject: [squeak-dev] Creating/using MIDI ports with external device, how to start? I'm trying to open a midi port to receive incoming midi commands and am completely stuck (after a week of trying everything I can think of). I've confirmed that the MIDIPlugin is loaded. I've tried on both Windows XP and MacOS. The only port I have available is this: MIDI Ports: 0: QuickTime MIDI (out) Everything I have tried to create a new one has failed in the midi open primitive. I suspect I'm just being dumb and there is an obvious incantation (hope so anyway). Thanks so much for any advice you can provide. John <Attachment:> |
Agreed...that's why I've been trying to create a new one. For what it's worth. I can't output on the existing port either since it seems bound to the internal Mac sound generator. Oh well. I'm on the verge of deciding this is impossible (is it really true that no one has made this work?). If so I'll try to build a primitive to access the portMidi open source code. I would REALLY like to avoid this path but no one seems to know how to do this seemingly simple thing. John
If the only port you have is for output only, trying for input seems futile perhaps? ----- Original message ----- From: John Richards <ajtr@...> To: [hidden email] Sent: Thu, 29 May 2008, 12:09:20 BST Subject: [squeak-dev] Creating/using MIDI ports with external device, how to start? I'm trying to open a midi port to receive incoming midi commands and am completely stuck (after a week of trying everything I can think of). I've confirmed that the MIDIPlugin is loaded. I've tried on both Windows XP and MacOS. The only port I have available is this: MIDI Ports: 0: QuickTime MIDI (out) Everything I have tried to create a new one has failed in the midi open primitive. I suspect I'm just being dumb and there is an obvious incantation (hope so anyway). Thanks so much for any advice you can provide. John <Attachment:> |
On May 29, 2008, at 7:00 PM, John Richards wrote: > > Agreed...that's why I've been trying to create a new one. For what > it's worth. I can't output on the existing port either since it > seems bound to the internal Mac sound generator. Oh well. > > I'm on the verge of deciding this is impossible (is it really true > that no one has made this work?). If so I'll try to build a > primitive to access the portMidi open source code. I would REALLY > like to avoid this path but no one seems to know how to do this > seemingly simple thing. > > John You might look at the macintosh C code in http://squeakvm.org/cgi-bin/viewcvs.cgi/trunk/platforms/Mac%20OS/plugins/MIDIPlugin/sqMacMIDI.c?rev=1708&view=auto I think MIDI ports are tied to devices, if the device doesn't exist you can't create out of air... = = = ======================================================================== John M. McIntosh <[hidden email]> Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com = = = ======================================================================== |
also ask Craig Latta, he uses a Mac and has his MIDI ports working.
On Thu, May 29, 2008 at 8:35 PM, John M McIntosh <[hidden email]> wrote: > > On May 29, 2008, at 7:00 PM, John Richards wrote: > >> >> Agreed...that's why I've been trying to create a new one. For what it's >> worth. I can't output on the existing port either since it seems bound to >> the internal Mac sound generator. Oh well. >> >> I'm on the verge of deciding this is impossible (is it really true that no >> one has made this work?). If so I'll try to build a primitive to access the >> portMidi open source code. I would REALLY like to avoid this path but no >> one seems to know how to do this seemingly simple thing. >> >> John > > You might look at the macintosh C code in > > http://squeakvm.org/cgi-bin/viewcvs.cgi/trunk/platforms/Mac%20OS/plugins/MIDIPlugin/sqMacMIDI.c?rev=1708&view=auto > > > I think MIDI ports are tied to devices, if the device doesn't exist you > can't create out of air... > > > =========================================================================== > John M. McIntosh <[hidden email]> > Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com > =========================================================================== > > > > -- Brad Fuller www.bradfuller.com |
In reply to this post by John Richards
Quoting John Richards <[hidden email]>:
> I'm trying to open a midi port to receive incoming midi commands and am > completely stuck (after a week of trying everything I can think of). I've > confirmed that the MIDIPlugin is loaded. I've tried on both Windows XP > and MacOS. The only port I have available is this: > > MIDI Ports: > 0: QuickTime MIDI (out) > > > John Hi John, I am not an expert in this area, but I did get MIDI-in working on Windows. I think you'll need a physical MIDI input device, e.g. if you can borrow a USB (piano) keyboard, or something like a MIDISport box. Squeak just sees what the system sees. I don't believe you'll be able to automagically conjure up a port. If you evaluate SimpleMIDIPort midiIsSupported, you should get true on Windows, and false on OSX and Linux. So you'll only be able to do MIDI-in on Windows, for the moment. Craig Latta was planning to port to these OSs- see this thread: http://www.nabble.com/MIDI-support-td13476203.html#a15745241 Craig, any news? Cheers, ...Stan |
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
Quoting John Richards <[hidden email]>: > I'm trying to open a midi port to receive incoming midi commands and am > completely stuck (after a week of trying everything I can think of). I've > confirmed that the MIDIPlugin is loaded. I've tried on both Windows XP > and MacOS. The only port I have available is this: > > MIDI Ports: > 0: QuickTime MIDI (out) > > > John Hi John, I am not an expert in this area, but I did get MIDI-in working on Windows. I think you'll need a physical MIDI input device, e.g. if you can borrow a USB (piano) keyboard, or something like a MIDISport box. Squeak just sees what the system sees. I don't believe you'll be able to automagically conjure up a port. If you evaluate SimpleMIDIPort midiIsSupported, you should get true on Windows, and false on OSX and Linux. So you'll only be able to do MIDI-in on Windows, for the moment. Craig Latta was planning to port to these OSs- see this thread: http://www.nabble.com/MIDI-support-td13476203.html#a15745241 Craig, any news? Cheers, ...Stan _______________________________________________ SqueakAudio mailing list [hidden email] http://lists.create.ucsb.edu/mailman/listinfo/squeakaudio |
On Fri, 30 May 2008 08:21:04 -0400, in
gmane.comp.lang.smalltalk.squeak.general you 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. > Hi John. It's been a while since I've played with MIDI in Squeak, but I just gave it a whirl on Windows XP with a 3.8 image, and it seemed ok. What do you get when you run: SimpleMIDIPort inputPortNumFromUser It should pop up a menu listing all the MIDI inputs that the OS knows about. When you choose a port from the menu, that expression will then return a number, representing the MIDI port you chose. If Squeak isn't aware of any MIDI input ports, the menu won't appear, and the return value will be nil. The same holds for the method outputPortNumFromUser. If the menu appears ok, then you ought to be able to create an instance of SimpleMIDIPort something like this: midiIn := SimpleMIDIPort openOnPortNumber: (SimpleMIDIPort inputPortNumFromUser). It may be you've already tried all of this to no avail, in which case I'd say this would need to be looked at by someone who knows rather more than me about how MIDI is handled at a low level. HTH -Nick |
In reply to this post by Stan Shepherd
> Craig Latta was planning to port to these OSs- see this thread: > http://www.nabble.com/MIDI-support-td13476203.html#a15745241 > > Craig, any news? I'm planning a 2008-06-20 (solstice) release of Spoon[1], featuring a module system, and a 2008-09-22 (equinox) release of Quoth[2], which I plan to deploy using that module system and which includes my MIDI work. Sooner if I win the lottery... that would free up another 40 hours a week. :) thanks, -C [1] http://netjam.org/spoon [2] http://netjam.org/quoth -- Craig Latta improvisational musical informaticist www.netjam.org Smalltalkers do: [:it | All with: Class, (And love: it)] |
Free forum by Nabble | Edit this page |