Have you tried a simple test case such as adding one new connection in the "Instrument Connections" editor, with the Source set to "Mod Wheel", the Destination set to Oscillator/Pitch, and the Scale set to default (+- 4800 cents)? You should then be able to play a note, and adjust the pitch by changing the mod wheel on an external keyboard. If this works, then the MIDI-to-pitch connection is working, and you should be able to narrow down where the problem is.
-DS Hi Jack,
I am currently facinf the exact same issue. I am trying to control some parameters of an AUSampler with MIDI messages. So far no luck.
Have you tried again ?
Thanks,
Pascal
Le vendredi 21 décembre 2012 01:53:12 UTC+1, Jack Nutting a écrit :Thanks, Doug! Seems like reasonable advice. Maybe I'll pick it up again one day and see where I get.
//jackOn Friday, December 21, 2012, Douglas Scott wrote:
Just for the record, and for future reference, what you want to do is completely possible with the AUSampler.
The easiest way to test what you are doing is to load your AUSampler preset using AU Lab, then send MIDI events (in your case, controller 13) using an external keyboard, and check the results. That will separate AUSampler config problems from MIDI problems. Possible problems I can imagine:
1) The connection you created from MIDI controller 13 to filter cutoff has a zero range -- you have to set the effect amount in cents. A couple of octaves (2400 cents) is useful. 2) That same connection has its range set way too high, so the filter cutoff just slams into the ends of its range.
3) Your filter is disabled in the preset (as it is by default) 4) Your filter resonance was set low, which means the effect is subtle (especially if your sounds do not have a lot of high harmonics)
Hope this helps you or others.
-DS On Dec 20, 2012, at 1:59 PM, Jack Nutting < email@hidden> wrote:
Unfortunately, no! We actually ended up abandoning that idea. Fortunately we had other interesting things we could do with our audio instead. Would have really liked to have this working, though. Given what AULab presents you with, it seems so tantalizingly close, but there's no documentation or examples on this (AFAIK) and in the end I was just grasping at straws, getting no where :(
On Dec 20, 2012, at 10:11 PM, Aran Mulholland < email@hidden> wrote:
Hi Jack,
Did you ever get this working?
Cheers
Aran
On Tue, May 8, 2012 at 8:05 PM, Jack Nutting <email@hidden> wrote:
I'm working on integrating an AUSampler unit in an iOS app. I've
managed to create an aupreset with AULab, and in the app I
successfully load it up and play notes programmatically by sending
midi events. So far so good, but I'd also like to be able to effect
the characteristics of the instrument programmatically just like I
would with a real-world controller, and I'm enough of a MIDI noob that
I just don't see what to do here.
For instance, the sampler created in AULab has some connections set up
in the Connection Editor Pane, which are all defined to create the
basic sound, mapping keys to pitches etc. The Zone/Layer Grid Editing
Page also contains some controls for the envelope, filter, and LFO,
all put there by default when I created the instrument. From the looks
of it, it seems like if I want to control something like the filter's
cutoff frequency, I should add one item in the Connection Editor Pane.
So I tried this. I picked the unused "Ctrl 13" from the Source list,
and Cutoff Freq from the Destination list. In the app, I created this
method:
- (void)setUnit:(MusicDeviceComponent)unit control:(UInt8)control
value:(UInt8)value {
UInt32 midiStatus = 0xB0; // control change message
CheckError(MusicDeviceMIDIEvent(unit,
midiStatus,
control,
value,
0),
"Couldn't send MIDI event");
}
Which I use like this to try to change the cutoff frequency in real time:
[audioController setUnit:anInstrumentUnit control:13
value:aVal]; // aVal is an int between 0 and 127
In the running app, I'm basically varying the value of aVal by
dragging a finger back and forth across the screen. What happens when
I do this doesn't sound anything like adjusting the cutoff frequency
in AULab. Instead, apart from a *very* light click or tick when I
change the value, the sample doesn't audibly change at all.
Anyway, I've clearly misunderstood something. Either I've got the MIDI
messaging wrong, or I've misconfigured something in AULab. Perhaps
both. Does anyone have any ideas?
--
// Jack Nutting
// email@hidden
// http://nuthole.com
// http://learncocoa.org
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden.com)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________ Do not post admin requests to the list. They will be ignored. Coreaudio-api mailing list (Coreaudio-api@lists.apple.com)
This email sent to email@hidden
-- // Jack Nutting // email@hidden // http://nuthole.com // http://learncocoa.org
|