Re: best way to track note on/off in UI ?
Re: best way to track note on/off in UI ?
- Subject: Re: best way to track note on/off in UI ?
- From: Paul Davis <email@hidden>
- Date: Mon, 22 Feb 2010 06:58:05 -0500
On Mon, Feb 22, 2010 at 1:15 AM, NickMtl <email@hidden> wrote:
> Actually, I have a similar problem. I've implemented a virtual piano
> like GarageBand but in the main view which is an NSOpenGLView. When
> using the keyboard as input, passed a certain speed, I can no longer
> match keyDown with keyUps, resulting in stuck midi notes.
>
> If only there was a way to find the status of all keyboard keys at any
> given time. Anyone know how to do this?
this is just a very basic program design issue. it doesn't have
anything to do with CoreAudio. you need to separate the idea of state
*tracking* from state *display*. tracking the note on/off events, as
noted, takes very little time, and should be done independently of any
screen updates. similarly, screen updating should be independent of
note on/off events, and merely uses the state that you maintain in
your tracking code. this is just fundamental model-view-controller
programming, or perhaps even just fundamental GUI event driven
programming, and is a design aspect needed by thousands or millions of
bits of software in many different niches.
--p
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden