AVAudioUnitSampler ignoring new notes when an unknown limit is reached

Originator:josipcavar04
Number:rdar://FB9835828 Date Originated:Jan 7, 2022
Status:Open Resolved:
Product:iOS and macOS Product Version:
Classification: Reproducible:
 
Basic information
Please provide a descriptive title for your feedback:
AVAudioUnitSampler ignoring new notes when an unknown limit is reached
Which area are you seeing an issue with?
‌Something else not on this list
What type of feedback are you reporting?
Incorrect/Unexpected Behavior
Description
Please describe the issue:
We are using multiple instances of AVAudioUnitSampler to load different instruments from aupreset files. Some of our instruments are more complex and one note can trigger more than one sample.

However, we are reaching a limit in the number of samples that can be active at the same time (voice count). This limit seems to be 256 samples on macOS and 128 samples on iOS, after which new notes are ignored.

We are able to easily reproduce this issue in AU Lab's AUSampler. One example is:

Add 19 samples (they can be the same one)
Update each zone's key range to 1-127
Increase the release to make note stick
So each note will trigger all 19 samples
With this setup, AUSampler ignores any note pressed after the 14th active note.

Some notes:

- CPU, memory, and disk usage seem to be ok.
- Sample file size doesn't make any effect
- Buffer size doesn't make any effect
- Please note that this is different from polyphony. Polyphony is set to 64 in our case, and Sampler stops responding at 14.
- This doesn't seem to be related to the sampler itself. When connecting more samplers to Mixer the total limit stays the same.
- The issue looks like the one in this video - https://www.youtube.com/watch?v=69KkpKk0OlQ
- The issue is not reproducible in Logic Pro and MainStage samplers
Please list the steps you took to reproduce the issue:
iOS
1. Open the attached sample project
2. Run it on iOS
3. Play 7 notes
4. Play 8th note
5. 8th and any consecutive notes are ignored

macOS
1. Open the attached sample project
2. Run it on macOS
3. Play 14 notes
4. Play 15th note
5. 15th and any consecutive notes are ignored
What did you expect to happen?
1. Maximum sample limit to be documented
2. Maximum sample limit to be configurable (maybe)
3. When the maximum limit is reached, the sampler should start note stealing instead of ignoring new notes
What actually happened?
1. We couldn't find any documented limit
2. We couldn't configure the limit
3. New notes were ignored by the sampler

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!