Using AudioUnitSetParameter() to change pitch bend and pitch bend range?
Using AudioUnitSetParameter() to change pitch bend and pitch bend range?
- Subject: Using AudioUnitSetParameter() to change pitch bend and pitch bend range?
- From: Patrick Beard <email@hidden>
- Date: Tue, 31 May 2005 08:16:29 -0700
Here's how I'm setting pitch bend for the DLS synth:
err = AudioUnitSetParameter(mSynth,
kAUGroupParameterID_PitchBend, kAudioUnitScope_Group, groupID, value,
0);
FYI, the value for the flattest pitch bend is 0.0, and for the
sharpest pitch bend is 16383.0. The documentation says the values
should be between -8192 and 8191, which 0 being the middle point. Of
course, this documentation is merely the comment in <AudioUnit/
AudioUnitParameters.h>:
kAUGroupParameterID_PitchBend = 0xE0, // value
-8192 - 8191
I have been able to change the pitch bend range of the DLS synth
using the following code:
UInt32 status = 0xB0 | groupID;
err = MusicDeviceMIDIEvent(mSynth, status, 0x64, 0x00, 0); //
RPN pitch bend range.
err = MusicDeviceMIDIEvent(mSynth, status, 0x65, 0x00, 0);
err = MusicDeviceMIDIEvent(mSynth, status, 0x06, (UInt32)value,
0); // Data entry MSB
err = MusicDeviceMIDIEvent(mSynth, status, 0x26, 0x00,
0); // Data entry LSB (optional)
err = MusicDeviceMIDIEvent(mSynth, status, 0x64, 0x7F, 0); //
RPN reset
err = MusicDeviceMIDIEvent(mSynth, status, 0x65, 0x7F, 0);
If value is between 0 and 24. This appears to be the number of half-
steps (semitones) the pitch bend range will control. I would LIKE to
be able to change this for an arbitrary groupID, but
MusicDeviceMIDIEvent() is channel based. Is there a way to do this
with AudioUnitSetParameter()?
- Patrick
_______________________________________________
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