Re: Audio Unit synth how-to
Re: Audio Unit synth how-to
- Subject: Re: Audio Unit synth how-to
- From: h <email@hidden>
- Date: Sun, 8 May 2005 14:59:20 -0700 (PDT)
- Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys
Thanks again, your replies are most helpful.
I just want to check - given that I have to call GetParameter() during
Render() - I take it that if the parameter cannot change partway
through my Render() call? (Or else some kind of mutex would be needed)?
In other words, if the user changes a parameter during a render()
operation, that parameter change cannot be visible until the next
render()?
--- Chris Rogers <email@hidden> wrote:
> You'll "poll" these during your Render() function by calling
> GetParameter()...
>
> Chris Rogers
> Core Audio
> Apple Computer
>
> On May 8, 2005, at 2:44 PM, h wrote:
>
> > Thanks, I have managed to get my synth sort-of up and running.
> > What about parameter changes? (e.g. attack is changed on the au's
> > gui)?
> > Do I need to poll these during my Render() function? Or is there
> some
> > callback or something that I am missing here?
> >
> > Thanks,
> > Hamish
> >
> >
> > --- William Stewart <email@hidden> wrote:
> >
> >> Oh, and there's nothing you can do as an AU to change this - the
> >> scheduling is the responsibility of the caller - you as an AU,
> just
> >> need to make sure you honour the sample offsets if they are
> provided
> >>
> >> to you.
> >>
> >> Bill
> >>
> >> On 06/05/2005, at 3:26 PM, Chris Rogers wrote:
> >>
> >>
> >>> Have a look at the inStartFrame argument to the HandleNoteOn()
> >>>
> >> method.
> >>
> >>> This gives a sample-frame offset where the note should start
> during
> >>>
> >>
> >>
> >>> the
> >>> current render buffer. It is normal and correct that you should
> >>>
> >> see
> >>
> >>> HandleNoteOn() and Render() being called in the same thread.
> >>> At the start of every render cycle, notes and parameter changes
> are
> >>>
> >>
> >>
> >>> scheduled,
> >>> then your Render() method is called to synthesize the results for
> >>> that time slice....
> >>>
> >>> Chris Rogers
> >>> Core Audio
> >>> Apple Computer
> >>>
> >>>
> >>>
> >>> On May 6, 2005, at 3:18 PM, h wrote:
> >>>
> >>>
> >>>> I am writing an Audio Unit synth based on the MusicDeviceBase
> >>>> class in
> >>>> the CoreAudio examples.
> >>>>
> >>>> What I am finding is that HandleNoteOn() and Render() are being
> >>>> called
> >>>> on the same thread (checked using pthread_self()). Obviously,
> this
> >>>> causes note on/off events to be made only between calls to
> >>>>
> >> Render().
> >>
> >>>> This allows accuracy of only +/- 1024 or 512 samples, depending
> on
> >>>>
> >>
> >>
> >>>> the
> >>>> number of frames requested.
> >>>>
> >>>> How do I make the calls to HandleNoteOn/HandleNoteOff come in on
> >>>>
> >> the
> >>
> >>>> appropriate thread, and how do I make sure that the notes are
> >>>>
> >> turned
> >>
> >>>> on/off in a sample-accurate matter (presumably I need to check
> >>>>
> >> before
> >>
> >>>> processing each sample in Render())? Is it something to do with
> >>>>
> >> the
> >>
> >>>> inStartFrame parameter to HandleNoteOn/Off?
> >>>>
> >>>> Is there an example of a sample-accurate midi synth audio unit?
> >>>>
> >>>> Thanks,
> >>>> Hamish
> >>>>
> >>>>
> >>>>
> >>>> __________________________________
> >>>> Do you Yahoo!?
> >>>> Make Yahoo! your home page
> >>>> http://www.yahoo.com/r/hs
> >>>> _______________________________________________
> >>>> Do not post admin requests to the list. They will be ignored.
> >>>> Coreaudio-api mailing list (email@hidden)
> >>>> Help/Unsubscribe/Update your Subscription:
> >>>> 40apple.com
> >>>>
> >>>> 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
> >>>
> >>
> >> --
> >> mailto:email@hidden
> >> tel: +1 408 974 4056
> >>
> >>
> >
>
______________________________________________________________________
>
> > __
> >
> >>
> >> __
> >> "Much human ingenuity has gone into finding the ultimate Before.
> >> The current state of knowledge can be summarized thus:
> >> In the beginning, there was nothing, which exploded" - Terry
> >> Pratchett
> >>
> >>
> >
>
______________________________________________________________________
>
> > __
> >
> >>
> >> __
> >>
> >>
> >>
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam? Yahoo! Mail has the best spam protection around
> > http://mail.yahoo.com
> > _______________________________________________
> > Do not post admin requests to the list. They will be ignored.
> > Coreaudio-api mailing list (email@hidden)
> > Help/Unsubscribe/Update your Subscription:
> > 40apple.com
> >
> > This email sent to email@hidden
> >
>
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
_______________________________________________
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