Re: Get events from MyReadProc
Re: Get events from MyReadProc
- Subject: Re: Get events from MyReadProc
- From: john <email@hidden>
- Date: Mon, 12 May 2003 21:56:01 -0400
Hi Pascal,
It's ok to use a static function in your ObjC file for the read proc
like the echo.cpp file. Just declare it outside of the ObjC object
interface(.h) or implementation(.m). You might be able to use one of
the parameters of the read proc to pass a reference to your ObjC object
so the function can access your object. I'm sure someone else can
comment more helpfully on that.
Now I don't know anything about MIDI packets, but I presume you can
determine what note it represents in some way, then you can use this
information to make your graphic object display the appropriate note.
Maybe the link Pete Gontier gave you might help in determining what
note is being pressed.
Hope this helps!
-- John
Hello!
I would like to build a cocoa application that gets events
from a digital instruments (piano).
How can I link my, say, ControllerObject with the midi instrument
read procedure?
There is a sample code (echo.cpp) that explains how to tell
the system to call MyReadProc function everytime a piano
key is pressed, but what should I do if I want to display this
note graphically? I can do the graphics, but the missing piece
is how to get the MyReadProc to send the proper data to my
graphic object?
Ideally, I would like a function like [MyObj NoteReceived] to
be called with the notes passed as parameters...
Thanks,
Pascal
_______________________________________________
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.