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: Scott Burgess <email@hidden>
- Date: Mon, 22 Feb 2010 08:42:09 -0800
CoreAudio includes Audio Units, and we are all using Apple's AU base classes
for our UI, note handling, event handling, and so on, so it is a valid issue to
ask this list.
The base classes for synth units have a intricate setup for progressing notes
through attack, release, and note end cycles.
Questions include: Is it safe to call PropertyChanged from Attacked()? Is the
note state even set to attacked at this point? Or after Attacked() has exited?
Are there side effects from setting property listener to have a 0.0 notification
interval (the examples use 0.05)? And so forth...
Scott Burgess
Bitnotic
On Feb 22, 2010, at 3:58 AM, Paul Davis wrote:
> 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
_______________________________________________
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