Page 1 of 1
PortMIDI for AmigaOS 4 - using CAMD?
Posted: Mon Nov 04, 2013 1:18 pm
by Spirantho
Hi everybody,
I've been trying to port MAME 0.150 but they've introduced two new dependencies, Mongoose and portmidi. I think I can do Mongoose, but PortMIDI may be more difficult.
Can anyone help with this? I believe Lyle Haze is the best person to ask - is that correct? And if Lyle reads this, any help would be gratefully received.
Thanks!
Re: PortMIDI for AmigaOS 4 - using CAMD?
Posted: Mon Nov 04, 2013 3:15 pm
by LyleHaze
I just had a quick look at PortMIDI.
It is similar to CAMD in purpose and moving an app from PortMIDI to CAMD
would probably be fairly straightforward.
Of course there are some differences, I can list a few here based on my
quick look at the PortMIDI WIKI, along with some similarities...
Both are for connecting midi streams. though PortMIDI seems to focus
on interfaces, and CAMD also includes inter-app streaming.
CAMD had many authors, the first on the list being Roger Dannenberg.
He also was a contributor to PortMIDI from 2001 to 2006.
PortMIDI includes timing information with each event, CAMD does not. In
CAMD everything happens in real time.
PortMIDI identifies ports by a numbered list, CAMD uses a named list.
PortMIDI expects the user has already chosen default ports, CAMD does not.
Based on what I have found so far, CAMD has much more complete docs
than PortMIDI.
The names vs Numbers and default port stuff is easy to get around. There is
example code for a "choose a port" requester in CAMD, and you can ask
every time or save it off with SetVar().
The bigger problem might be the timing, IF the app dumps all the data in
advance and is expecting PortMIDI/CAMD to clock it out according to the
time stamp. This is not a show stopper by any means, but it might require
your code to queue the notes until each one becomes ready to play.
If I were in your position I would add code to pass MIDI events in real time
and then run your app and see whether the clock information is used often
enough to matter.
I have code in front of me right now that will open a CAMD port, push MIDI
events out to that port, and shut it down when finished. Anyone who wants
this code should write me : lylehaze at gmail dot com, and I'll send it back.
The code for a port name requester is used in many of my camdtools, and
can be found at OS4Depot, or from me directly.
I have too many projects to commit to this one too, but I would be very happy
to answer questions and offer support.
LyleHaze