Using Voicer:
Filter:
Guides (extension) | Guides > Voicer

Using Voicer
ExtensionExtension

An introduction to the DDW Voicer class
 

Description

This Guide contains information about using DDW Voicer, treating each successive target type in turn. For a complete description of Voicer’s features, Class and Instance methods, along with addition example code, please refer to the Voicer Class entry.

Playing synths

For MIDI velocity support, this SynthDef receives amplitude on the gate parameter. gate is normally set to 0 at the end of the note, so we Latch it when applying to the amplitude.

For pattern usage: SynthDesc determines which arguments are transmitted in OSC messages. Normally this excludes gate, so we have to change a setting.

The \voicerArtic event type uses notes with infinite sustain to slur to the next note. When you stop the pattern, these may continue to sustain, so you should release them with a separate instruction.

The \voicerArticOverlap event type supports polyphonic layers, distinguished by the \layerID event key.

Global controls appear in the built-in GUI (depends on crucial library).

When using non-gated synths (Env.perc, or naturally decaying sounds, such as the ringing filters in the example below), a useful technique is to implement a cutoff envelope generator with a slightly offset gate value. If release is called on that node, the gate will be set to 0, and the offset will prevent the cutoff EG from releasing. However, if all the VoicerNodes are busy and a new node is played, the gate on the oldest node will be set to a value < -1. The offset is too small to prevent this from taking effect, so the note will be terminated immediately.

Watch the server's count of synths in this example. At high note density, server activity remains bounded. At low density, notes decay naturally, and activity reduces without any artificial cutoffs.

Playing SynthDefs with hot-patching

Using the ddwPlug quark, we can remove the filter frequency envelope from the main SynthDef.

Note the syntax to use Syn instead of Synth.

Patterns integrate global controls with Plug modulation using the Syn: Three-point modulation technique described in the Syn help file.

Playing MIDI or VSTs

MIDI/VST usage cannot be 100% feature compatible. Where SC synths give you full access to all parameters, most MIDI hardware synthesizers or VST instruments expose only some parameters to MIDI control. Voicer attempts to make note playing and basic MIDI CC usage more or less similar to SC-synth Voicers, however.

MIDI output uses my ddwMIDIMessageSend quark. You are responsible for configuring the MIDI connection, including VSTPlugin instance(s), outside of the Voicer. See examples.

MIDI configuration args

Use these "args" in Voicer.new to configure. Note that these should be set once, at the time of creating the Voicer, and should not be changed thereafter.

General:

chan
The MIDI channel on which to play, using SC's numbering scheme 0-15. The channel selected on the device may need to add one.
int
True: Round note numbers to the nearest integer. False: Work internally with fractional note numbers. Default is false. Set to true if you're not using MPE microtuning and you're experiencing stuck or wrong notes.
accAmt
A factor by which to increase velocity for notes whose parameter list includes \acc, 1.
overlap
True: The instrument or device support overlapping the same note number in multiple voices. False: The instrument cuts off older notes when a note-on with a previous note at the same pitch. Default is false. If notes get stuck when overlapping, consider setting this to true.

MPE options

MIDI Polyphonic Expression, for those devices or VSTis that support it, brings MIDI note performance a bit closer to the kinds of control that are possible with SC synths. In MPE, each note is performed on its own channel. Pitch bend and MIDI CCs directed to a note's channel affect only that note. Of particular interest to myself is the performance of fractional note numbers, using per-channel pitch bend.

Quick summary of the MPE standard: One MIDI channel is reserved as the master, for pitch bend or CC messages that should apply to all notes simultaneously. Within a single MIDI cable, two MPE zones can be activated: a lower zone, whose master channel is 0, and an upper zone, whose master channel is 15. Voicer's default settings assume you will use only the lower zone, and assign all 15 remaining channels to it. Master channel pitch bend defaults to +/- 2 semitones, while pitch bend on note channels defaults to +/- 48 semitones (to support wider glissandi).

I've tried to follow the MPE specification as much as possible. If some of these design decisions seem strange at first, check the spec: https://midi.org/mpe-midi-polyphonic-expression.

mpe
True: Use MPE features. False: Normal MIDI mode. (Note: Also sets overlap to true.)
mpeChannel
By default, setting mpe to true assigns channels 1-n to subsequent MIDIVoicerNodes, where n is the voice limit for the Voicer. mpeChannel overrides. See the "Dual MPE layers" example below.
mpeBendNoteScale
Default = 8192/48 = 170.6666667. If you want to use a different pitch bend range, specify 8192 / semitones here. Make sure the device is configured to match.
mpeMonoBendTime
Determines what happens if a note on one of the note channels needs to slide to a different pitch. If the instrument supports fingered portamento within a channel, that's probably better; in that case, set mpeMonoBendTime to 0 (default). If this is set to a positive number, then gliding to the next pitch will be implemented by a pitchbend ramp, over the given time. Wide-ranging pitchbend portamento is likely to sound strange in sampled instruments.

Examples

Hardware MIDI output

Basic VSTPlugin output

Basic MPE usage

Using the same VST as above. Use the instrument's interface to enable MPE before continuing.

MPE polyphonic glides

The "poly glide" example above, using the \voicerArticOverlap event type, works transparently with MPE output! To use per-channel pitchbend for the gliding notes, enable mpeMonoBendTime.

Dual MPE layers

I don't have a device with which to test this feature. In principle, if you want two MPE zones, you could configure two voicers as shown.

The MIDI channel layout will be as follows. Consult the MPE specification for more details.

You can distribute the 14 note channels as you like. (If you're using only one MPE zone, then it's 0 = master, 1-15 = notes. For two zones, 0 and 15 are reserved as master channels, leaving 14 available for notes.)

So the channel indices are properly divided between the two zones. It's up to you to configure the device to match.