ObjC Midi Input prob. (Was Re: Developing Tool for Audio program)
ObjC Midi Input prob. (Was Re: Developing Tool for Audio program)
- Subject: ObjC Midi Input prob. (Was Re: Developing Tool for Audio program)
- From: Iain Wood <email@hidden>
- Date: Wed, 31 Dec 2003 02:16:46 +0000
On 29 Dec 2003, at 21:36, Brian Willoughby wrote:
Pick the language, and seek help from the community if you seem to be
coming
up against a barrier.
Ok, here goes... I'm writing a program to control a synth via midi. I
choose ObjC, partly because it seems to be the easiest way to take
advantage of all the nice stuff in cocoa and interface builder, partly
because I like it better than C or C++.
In order to read midi I need to define a function to pass to
MIDIInputPortCreate. This would appear to have to be a C function, I
don't seem to be able to persuade MIDIInputPortCreate to accept an ObjC
method, either class or instance.
As far as I can tell, it won't be possible to set an ObjC class's
instance variables from within this C function. I will need to store
data in C global variables. This means that it wont be so easy to
update onscreen values that relate to incoming midi values. It would be
nice to have a midi message fed directly in to an NSSlider (and
vice-versa).
Anyone know of a neat way of integrating the C midi input stuff with
ObjC? I can't seem to find any sample code that does this. There are
plenty of C midi in/out programs, and the occasional ObjC midi output,
but no ObjC midiIn as far as I can see.
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.