Parameter scope quandry
Parameter scope quandry
- Subject: Parameter scope quandry
- From: AJ <email@hidden>
- Date: Tue, 29 Jul 2003 13:42:08 -0700
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...
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.