Re: Coreaudio-api Digest, Vol 13, Issue 148
Re: Coreaudio-api Digest, Vol 13, Issue 148
- Subject: Re: Coreaudio-api Digest, Vol 13, Issue 148
- From: Jonatan Liljedahl <email@hidden>
- Date: Thu, 03 Nov 2016 11:00:09 +0100
For AUSampler, one can set the polyphony in software like this when
loading aupreset files:
NSMutableDictionary *dict = [NSMutableDictionary
dictionaryWithContentsOfURL:presetURL];
NSMutableDictionary *instr = dict[@"Instrument"];
instr[@"voice count"] = @(16);
return AudioUnitSetProperty(unit,
kAudioUnitProperty_ClassInfo,
kAudioUnitScope_Global,
0,
&dict,
sizeof(dict));
Perhaps something similar can be done when loading SF2 files, by first
using kAUSamplerProperty_LoadPresetFromBank to read the patch from SF2
file, then reading ClassInfo, changing "voice count" key and writing
it back to ClassInfo.
On Wed, Nov 2, 2016 at 8:00 PM, <email@hidden> wrote:
> Send Coreaudio-api mailing list submissions to
> email@hidden
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://lists.apple.com/mailman/listinfo/coreaudio-api
> or, via email, send a message with subject or body 'help' to
> email@hidden
>
> You can reach the person managing the list at
> email@hidden
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Coreaudio-api digest..."
>
>
> Today's Topics:
>
> 1. AUMIDISynth + AUSampler: notes stop sounding past 14
> simultaneous voices. Can I tweak the polyphony settings? (Archagon)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Tue, 01 Nov 2016 13:36:41 -0700
> From: Archagon <email@hidden>
> To: email@hidden
> Subject: AUMIDISynth + AUSampler: notes stop sounding past 14
> simultaneous voices. Can I tweak the polyphony settings?
> Message-ID:
> <CAHqQ67FnydsV_hb-MzDj+=TpaBkUQHOG=email@hidden>
> Content-Type: text/plain; charset=UTF-8
>
> I've run into a pretty major issue with AUMIDISynth
> (kAudioUnitSubType_MIDISynth) that I can also replicate in AUSampler.
> In brief, I have an SF2 with some samples that play for several
> seconds after touch-up, and if I play too many notes in succession,
> new notes will simply fail to sound until at least one of the previous
> notes has finished attenuating. My understanding is that standard MIDI
> polyphony is supposed to "steal" an already-playing note when you go
> past the polyphony limit. In AU Lab, using AUSampler, this works
> correctly when the polyphony is set to 8. However, if you set the
> polyphony to something like 32, the number of "voices" appears to be
> capped at 14 and prevents any new keys from sounding past 14
> simultaneously playing notes.
>
> Here's a demo YouTube video: https://www.youtube.com/watch?v=69KkpKk0OlQ
>
> Unfortunately, I can't find a way to adjust the polyphony or voice
> count when using kAudioUnitSubType_MIDISynth in software, which means
> there's no good way to prevent notes from failing to play past the
> voice limit. Sending a Sound Off command does reset the voices and
> allow me to start playing notes again, but this is a channel command,
> so I can only use it as a crude bludgeon to turn off every note
> simultaneously. I've considered several approaches to fix the problem
> — creating a separate synth for each instrument and putting each note
> in its own channel, creating a "double buffer" out of every two
> channels and only sending Sound Off to a buffer when they switch, or
> maybe just automatically sending Sound Off every 14 notes — but these
> feel like hacks. Surely there's a way to get around the issue in a
> more conventional way? It would be a shame if I had to code up a
> complex meta-synth just because I couldn't tweak a symple polyphony
> setting!
>
>
>
> ------------------------------
>
> _______________________________________________
> Coreaudio-api mailing list
> email@hidden
> https://lists.apple.com/mailman/listinfo/coreaudio-api
>
> End of Coreaudio-api Digest, Vol 13, Issue 148
> **********************************************
--
/Jonatan
http://kymatica.com
_______________________________________________
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