Thanks a lots Lan!
I couldn’t find out the function named GetParameterInfo(),
then I used AudioUnitGetParameter() with kAUGroupParameterID_KeyPressure_FirstKey as parameter, it returns " -10878 " (kAudioUnitErr_InvalidParameter)
is it because that I was using *.SF2 sound bank ? (componentSubType = kAudioUnitSubType_Sampler)
when I use kAudioUnitSubType_DLSSynth , AudioUnitGetParameter() will returns " 0 " (no error)
so, is that means I have to use a DLS sound bank if I need to use after touch message?
by the way, How to make a DLS bank ? is there any tools recommended ?
Thanks Tin
On 2014年10月11日, at 上午3:42, Ian Kemmish < email@hidden> wrote: On 10 Oct 2014, at 15:30, tin <email@hidden> wrote:
I’m trying to use MusicDeviceMIDIEvent to send after-touch message (or named poly-pressure , 0xA..) to a synth audioUnit. in my Mac app.
it seems doesn’t works. is it unsupported in CoreMIDI or AUSampler ?
It's definitely supported by CoreAudio, as my homebrew synth uses it. I think it's safe to say that CoreMIDI supports it too (after all, they're just standard MIDI commands requiring no special processing until you want to do something with them).
Unfortunately, since 1) supporting polypressure in a synth requires adding code, and 2) very few MIDI keyboards have ever generated polypressure commands, I suspect that the vast majority of synths will simply ignore them.
So, my guess would be that polypressure is supported by CoreMIDI, but not by AUSampler.
You could try GetParameterInfo() with kAUGroupParameterID_KeyPressure_FirstKey, and see if AUSampler returns useful information or an error.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Ian Kemmish 18 Durham Close, Biggleswade, Beds SG18 8HZ email@hidden Tel: +44 1767 601361 Mob: +44 7952 854387 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|