Following up on my post of a few days ago, I took that as an opportunity to clean up MPE support in my ddwVoicer quark, document the new features and remove some outdated material from the help at the same time.
Why implement MPE in Voicer? Because in MPE, the note source is responsible for assigning notes to MIDI channels – basically, node tracking. Voicer already has all the objects to keep track of notes’ state, and to reuse and steal notes when necessary – it was 90% the way there. It just needed some cleanup and testing.
Why bother? We have a great synth; do we need this?
A: Sampled instruments. There’s a lot of power under scsynth’s hood, but we don’t have a good soundfont or sfz player. That would take a large engineering effort, which isn’t worth it when there are really solid plugins like sfizz (which, if you build it yourself, now has MPE).
E.g., Ligeti-style micropolyphony, using Virtual Playing Orchestra’s first violin section. I (for one) really like the sound of microtuning in familiar instrument sounds – violins here are not that far-fetched, but I like it even more in piano or vibraphone, where you really don’t expect anything other than 12ET. That was tough in SC before. Now it’s as easy as making a voicer and dropping a fractional \ctranspose into a pattern.
// micropolyphony -- hjh
(
SynthDef(\vst, { |out = 0|
Out.ar(out, VSTPlugin.ar(numOut: 2));
}).add;
)
a = Synth(\vst);
c = VSTPluginController(a);
c.open("sfizz.vst3");
m = VSTPluginMIDISender(c);
v = Voicer(15, \midi -> m, [mpe: true]);
r = {
var sig = In.ar(0, 2) * 15.dbamp;
ReplaceOut.ar(0, FreeVerb2.ar(sig[0], sig[1], 0.4, 0.98, 0.2));
}.play(target: a, addAction: \addAfter);
(
p = Ppar(
Array.fill(5, { |i|
Pbind(
\type, \voicerNote,
\voicer, v,
\midinote, Pdup(
Pwhite(5, 11, inf),
Pn(Pshuf((58..63), 1), inf)
),
\dur, Pexprand(1.2, 2.8, inf),
\gate, Pwhite(0.1, 0.3, inf),
\legato, 1.2,
\ctranspose, Pwhite(-2, 2, inf) * 0.25
)
})
).play;
)
p.stop;
hjh