Re: Parameter scope quandry
Re: Parameter scope quandry
- Subject: Re: Parameter scope quandry
- From: Bill Stewart <email@hidden>
- Date: Tue, 29 Jul 2003 15:33:17 -0700
First off, lets try to clarify what it is you are doing.
On Tuesday, July 29, 2003, at 01:42 PM, AJ wrote:
Greetings,
I am trying to implement an oscillator bank for basic additive
synthesis as an AU plug-in and I want to determine what scope to put
oscillator parameters under. After almost two days of off and on
research I've decided I've studied enough to ask for some assistance.
;)
I appreciate the way AU scopes in combination with elements provide a
nice way of having the same settings for different instances of
something inside an AU. Using that concept...my hope is that I will
be able to eventually do something like...
The idea of scopes and elements can probably be best understood by
thinking about a mixer...
A Mixer can have say up to 8 inputs.
Each input can have its own volume
A Mixer can have say 2 outputs, each output can have its own volume
You want a "global" volume that determines the entire volume of the
whole mixer...
So, in this case you'd set volumes on either:
Input Scope - where element ID is the input that you want to set the
volume on
Output Scope - where element ID is the output
Global Scope - where element ID is always zero.
OK?
So, now your point confuses me:
"Same settings for different instances of something inside an AU"
If you *aren't* doing a multi-timbral synth, then I am confused by your
question and you need to restate it - I could hazard a guess, but I'd
rather have a clearer idea of what it is you are trying to do (because
to my mind, the confusion is that you really have 3 parameters, not 1,
but I maybe being too simplistic?)
You cannot use group scope as you described - it is indeed intended to
be used as a "control" scope with "NON"-persistent state.
Bill
int i = 0;
int hz = 220;
// set three oscillators to A each an octave above the previous
while( i++ < 3) {
AudioUnitSetParameter(au_osc_bank, kMyAUHzParam, scope_TBD, i, hz,
0);
hz *= 2;
}
So as the name scope_TBD implies, I'm undecided on what the approriate
scope would be.
1. Global is obviously out as there can only be a single element in
global scope.
2. Output seems the wrong choice since this will cause rendering on
multiple outupt buses when I only need one bus. I specifically want
to mix the oscillators onto a single output bus.
3. Input scope seems like it would work but that would involve an
AUIOElement getting allocated and I don't need/want a buffer for each
oscillator as I stated in 2.
4. Group scope seems dedicated to representing MIDI channels so...
that's right out. Allthough, I do find it interesting that both
Global and Group scope are both implemented using the AUElement class
which acts as a container for parameters without the buffer that
appears in AUIOElement. I wish I had a scope that would support
multiple elements without requiring buffers but wasn't dedicated to
MIDI, etc. After poring through the recent discussions on group scope
and MIDI, I debated going ahead and using Group scope and just having
the element IDs for my oscillators be greater than the maximum number
of MIDI channels I would support.
AudioUnitSetParameter(au_osc_bank, kMyAUHzParam, scope_TBD, i +
OSC_ELEM_OFFSET, hz, 0);
This feels a bit klunky to me. ;(
If anyone out there could provide any insight it would be greatly
appreciated.
cheers
--aj
_______________________________________________
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.
--
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
________________________________________________________________________
__
_______________________________________________
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.