ARTICLE AD BOX
I am building a sequencer in Swift using AudioKit and testing several sampler engines, including:
DunneAudioKit Sampler MIDISampler AppleSamplerI noticed that when triggering two notes of the same pitch in quick succession, the second note appears to steal the voice from the first one instead of playing simultaneously.
For example, if MIDI note 69 is triggered twice with overlapping durations:
0.0s -> note 69 velocity 127
0.5s -> note 69 velocity 30
the second note causes the first note to drop in volume or stop, rather than both voices overlapping.
However, if I trigger different pitches (e.g. 69 and 70), they overlap normally, which suggests polyphony exists but may be limited to one voice per note number.
Minimal sequencing example:
addNote(velocity: 127, position: Duration(beats: 0.0)) addNote(velocity: 30, position: Duration(beats: 0.5))The sampler is loaded from a very simple SFZ file containing a single sine wave sample.
Do any of the samplers available in AudioKit (DunneSampler, MIDISampler, AppleSampler, etc.) support overlapping voices for the same MIDI note number, or do they intentionally enforce one active voice per note?
If the latter is expected behaviour, what is the recommended way to implement same-note polyphony in AudioKit?
