Re: Questions about multiple DLS synth instantiations
Re: Questions about multiple DLS synth instantiations
- Subject: Re: Questions about multiple DLS synth instantiations
- From: Robert Grant <email@hidden>
- Date: Fri, 5 Dec 2003 19:57:42 -0500
I guess not - as the SoundFont is a property not a parameter. OK so it
should work - so you'll need to go through your code with a fine tooth
comb.
In Rax, switching SoundFonts is done after the graph is up and running,
so I would suggest trying it afterwards, but you've probably got a bug
somewhere else.
Robert.
On Dec 5, 2003, at 6:08 PM, William Stewart wrote:
On 05/12/2003, at 2:30 PM, Robert Grant wrote:
Hi Michael,
I think Cristopher nailed it with the dual init problem.
AUGraphInitialize will init all the AUs in the graph - thus wiping
out your attempt to set the SoundFont on the DLSSynth.
No - this does NOT reset the sound bank
Bill
My rambling was just a distraction - shouldn't answer tech questions
after a couple of glasses of wine! :-(
Robert.
On Dec 5, 2003, at 4:32 PM, Michael Norris wrote:
On 5/12/2003, at 4:23 PM, Robert Grant wrote:
Hi Michael,
Well what you're trying to do is perfectly fine and should work, so
you've probably got something messed up somewhere :-) (The bit in
PROBLEM 1 about setting it equal to the first is kind of confusing).
Yeah sorry. Because I'm only sending program changes to the DLSNode,
and not the SoundFontNode, as a test I tried not loading in the sound
font, but simply setting the DLSNode variable equal to SoundFontNode
variable, which meant that there was just one DLS Synth using the
internal DLS sounds. I just wanted to check that the program changes
were actually operational in the first place, which they were. It's
when I split the two that it seems my program changes aren't getting
through. But of course, it's more likely that my MIDI notes are being
routed to the wrong synth, as you guessed below:
A brief scan through your code snippets (and imagining no blunders
in
the missing code) doesn't show any immediate errors, but your
AUGraphUpdates are unnecessary as you don't need to worry about
those
until at least you've initialized the graph and probably not until
you've got the graph running.
You're sure you're MIDI note routing code is sending MIDI to the
right
synth?
Well, that's what I'm wondering. If it wasn't then certainly the
result
would be what I'm getting... thought I can't see anything immediately
wrong.
I wonder, though, if you know of any gotchas with using the
MusicTrackSetDestNode callback... if that wasn't working correctly,
then it would explain why I'm getting the odd results.
Here's the method I'm using (I shouldn't need the AUGraphUpdate in
there, but I just put it in for fun anyway). The instance variables
used in this method are: track (a MusicTrack) and myNode (an AUNode).
gAUGraph is of course a global.
- (void)setNode:(AUNode)node {
OSStatus status;
BOOL b;
myNode = node;
status = MusicTrackSetDestNode(track,node);
if (status != 0) NSLog (@"MusicTrackSetDestNode: %d",status);
AUGraphUpdate(gAUGraph,&b);
}
Anyway, thanks for the moral support. It's good to know that at least
there's nothing wrong with my approach conceptually. Now I just have
to
find the human error!
_______________________________________________
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.
_______________________________________________
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.
_______________________________________________
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.