VST3 plug-ins
Load instruments and effects, recall patches, and shape orchestral phrases
Available in Sanic Boom 1.5 for macOS. Live VST3 playback currently requires a 44.1 kHz audio device. Install the plug-in separately in the system or user Library/Audio/Plug-Ins/VST3 folder.
Source builds on macOS enable VST3 and fetch the pinned SDK headers automatically. To use a local SDK instead, point CMake at the include root containing pluginterfaces:
cmake -S . -B build -DSANIC_VST3_INCLUDE_DIR=/path/to/vst3-sdk-include
cmake --build build --target sanic-boomLoad an instrument
Use the installed bundle name. The editor suggests installed names as you type.
let piano = vst3("BBC Symphony Orchestra")
play [C4 E4 G4 C5] |> piano |> gain(0.5)Evaluate the script. Open piano from the Plug-ins sidebar, or right-click vst3 in the editor and choose Open plug-in editor. Select a patch in the plug-in and let its samples finish loading.
With playback stopped or paused, preset previews and virtual keyboards in the focused instrument editor remain audible while the score playhead stays still. Auditioning uses the global output volume and bypasses the score's track effects, level automation, mute, and solo settings. Closing the editor ends its audition path. During score playback, an instrument used by the score keeps its normal track mix.
Each named instrument binding has its own instance. Reusing a binding sends notes to the same instance. The first playing track using that binding supplies its track effects and routing. Use separate bindings for different patches or independently mixed parts.
Recorded legato and overlapping notes
Some sampled instruments need overlapping note-on/off times to trigger their
recorded connections. In Sanic Boom 1.5, !20ms holds the selected
note 20 ms into the next step without moving the next attack:
let violin = vst3("BBC Symphony Orchestra")
let legato = articulation(0) // Verify the keyswitch in your loaded patch.
play [@legato Ab4@0.75!20ms G4@0.75!20ms Ab4:2@0.75 _]
|> violin |> cc(1, 0.65) |> cc(11, 0.85)Attach ms, s, b, or a note fraction: !20ms, !0.02s, !1b, !1/64.
Seconds stay absolute through subdivision; beat durations follow the tempo.
Overlap also works on chord groups, but BBCSO's recorded Legato is for a
single melodic line. Use a polyphonic technique for backing chords.
!time changes note-off timing. It does not bend pitch, select Legato, or
guarantee a particular transition. In BBCSO, velocity also influences the
transition type. Keep real phrase breaks and calibrate the overlap for the
loaded technique. ~ and > below are pitch controls.
Glide and slide
In Sanic Boom 1.5, glide(time), per-note ~, and > can drive VST3 pitch
control in playback and audio export.
let lead = vst3("Vital")
play [C4 D4~0.1 E4 F4~0.2] |> leadSanic uses continuous per-note tuning when the plug-in exposes it. Otherwise, it uses the plug-in's mapped pitch wheel. BBC Symphony Orchestra uses its Global Tune automation because its advertised pitch-wheel mapping is ignored by the processor. Sanic reads the BBC tuning range and retains the saved base tuning when a glide ends.
A channel pitch control moves all sounding voices together. Chords must slide by the same interval on every voice, for example C major to D major. Voicings whose voices need different bends require per-note tuning support. Give each track its own VST variable when using channel glide. Unsupported controls, intervals, and conflicting chord bends produce an error before playback.
For example, C–E–G can slide to D–F♯–A because every voice moves up two semitones. Moving to D–F–A needs separate movements of two, one, and two semitones. A channel control has one pitch setting for the whole instrument. BBCSO can play either chord normally, but this control can only slide the voices together.
For the standard pitch-wheel fallback, the default range is two semitones.
Match bendRange to the range configured inside your plug-in for larger slides.
This option describes that existing configuration.
let lead = vst3("Vital", bendRange: 12)
play [C4 G4~0.25 E4 C5~0.25] |> leadThe first note starts normally, repeated pitches retain their attacks, and rests break the glide connection. Tied continuations retain it. MIDI file export currently writes the notes without these VST pitch-control curves.
Add an effect
let pianoEQ = vst3fx("EQ SITRAL-295")
play [C4 E4 G4 C5] |> piano |> gain(0.5) |> pianoEQEvaluate the declaration, then right-click vst3fx or open the named insert from Plug-ins. Give each named insert its own slot. A named insert keeps its saved settings when you move it to a different position in the chain. See Mixing and export for chains, return buses, and sidechains.
Save plug-in settings
On macOS, BBC Symphony Orchestra uses one editor window at a time as a compatibility workaround. Opening another BBCSO instance's editor closes the previous editor; both instruments keep playing and retain their settings. Other plug-ins can keep their editors open alongside BBCSO.
Save the script after changing the plug-in. Sanic stores patch and plug-in settings in a companion file named after the script, such as song.sanic.vst3.json. Keep both files together when copying or sharing the project. The destination computer needs the same plug-ins and any sample content their patches use.
Shape an orchestral phrase
let violin = vst3("BBC Symphony Orchestra")
let long = articulation(1)
let spiccato = articulation(4)
let question = [@long A4:2 G4 F4]
|> dynamics(0.35, 0.65, 0.28)
|> expression(0.75, 0.90, 0.55)
let answer = [@spiccato E4 G4 A4 _]
|> dynamics(0.40, 0.55, 0.35)
play cat(question, answer) |> violinSelect Violins 1 Leader to try the example with the tested keyswitch mapping. Other patches can assign different MIDI note numbers. An articulation marker sets the keyswitch for the next event and takes up no time.
For BBC Symphony Orchestra, dynamics() targets CC1 and expression() targets CC11. Each takes three values from zero to one for the start, midpoint, and end of the phrase. The curves follow the phrase through cat() and continue during held notes. For explicit beat positions, use cc(1, env(0: 0.35, 2: 0.65, 4: 0.28)). Use one source of automation per controller on a part.
Score for the phrased recording
tempo 84, 4/4
let violin = vst3("BBC Symphony Orchestra")
let question = [A4:2 G4 F4]
|> dynamics(0.35, 0.65, 0.28)
|> expression(0.75, 0.90, 0.55)
let answer = [E4 G4 A4:2]
|> dynamics(0.30, 0.50, 0.25)
|> expression(0.60, 0.80, 0.45)
play cat(question, answer) |> violinFor explicit keyswitch positions, keyswitch(0: 1, 2: 4) sends MIDI
note 1 at beat zero and MIDI note 4 at beat two. The keys depend on the
selected patch. Use inline markers when you want the switch to move with
a note as you edit the pattern.
For an ensemble slowdown, use tempoCurve(). humanize() varies note velocity only.
Small tuning movements
tuning() offsets a VST instrument's channel pitch in cents (100 cents = one semitone), relative to its saved tuning:
tempo 120
let violin = vst3("BBC Symphony Orchestra")
play [C4 D4] |> violin |> tuning(env(0: -4, 0.32: 0, 2: 3, 2.4: 0, 4: 0))This example starts C4 four cents flat and settles to centre, then starts D4 three cents sharp and settles back. Envelope positions are beats on the composed pattern's clock. Use tuning(2) for a constant two-cent offset; allowed values are -100 to 100 cents, subject to the plug-in's range. Write zero keyframes where the offset should end.
The plug-in must expose channel pitch control; BBCSO uses its Global Tune parameter. This affects every sounding voice and release tail in that VST instance, including other tracks sharing the binding. It does not detune individual ensemble players. Use separate instrument variables for independent lines. Do not combine tuning() with glide() or note glide suffixes on the same track. Playback, seeking, and audio exports follow the curve; MIDI export does not encode this automation.
Select a sustained violin patch in the plug-in before trying this example. At 120 BPM, beat 0.32 is 160 ms after the first attack. The second note starts at beat 2. Positive values are sharp, negative values are flat, and zero returns to the saved tuning. For a phrase inside a longer cat(), put the keyframes at that phrase's beat positions in the combined pattern. Envelopes follow the tempo; their positions are not milliseconds.
Make a string part less mechanical
These controls address different aspects of a performance:
| Goal | Control | What it changes |
|---|---|---|
| Grow and relax within a sustained note | cc(1, env(...)) or phrase-local dynamics() | BBCSO's sampled dynamic layers: intensity, timbre, and level |
| Shape volume without changing the dynamic layer | cc(11, env(...)) or expression() | Level within the plug-in |
| Develop recorded vibrato | cc(21, env(...)) | BBCSO's Vibrato control, where the selected technique supports it |
| Introduce small pitch corrections | tuning(env(...)) | Channel tuning relative to the saved base pitch |
| Connect a slurred melody | A recorded Legato technique and selected !time overlaps | Note-off timing and the plug-in's recorded transitions |
| Move attacks or releases | Authored pattern durations using cat(), stack(), and over() | Written timing; humanize() does not move notes |
For example, a separate vibrato curve can accompany a sustained part:
let violin = vst3("BBC Symphony Orchestra")
play [C4 D4] |> violin
|> cc(1, env(0: 0.60, 1: 0.70, 2: 0.64, 3: 0.72, 4: 0.60))
|> cc(11, env(0: 0.80, 2: 0.88, 4: 0.78))
|> cc(21, env(0: 0.45, 1.5: 0.80, 2: 0.50, 3.5: 0.85, 4: 0.65))Sanic sends the CC envelopes during held notes. It maps BBCSO's CC1, CC11, and CC21 to the named Dynamics, Expression, and Vibrato automation parameters. Vibrato here uses the library's recordings; it is not a pitch oscillator, and its character depends on the patch. These values are an example to audition, not a preset for every phrase.
Give independent parts their own timing and curves while retaining clear shared beats. A backing chord can use a polyphonic Long technique; it does not need the lead melody's legato treatment. Keep deliberate phrase breaks. humanize() currently changes velocity only, and BBCSO's sustained-note dynamics normally follow CC1 rather than note velocity. The timing and tuning in these examples are authored explicitly; Sanic does not generate them automatically.
Output gain after master plug-ins
Use gain() after a master or return-bus VST3 insert to adjust its output.
Gains between inserts run at that position; a final gain runs after the whole chain.
Other built-in bus effects must still precede the VST3 chain.
master |> gain(1) |> comp |> eq |> valhalla |> gain(2)Here the last gain doubles the final amplitude (about +6 dB), without driving the compressor harder. Gain values are linear multipliers, not decibels. Live playback and WAV mix exports use the same order; individual track stems remain before master processing. Leave enough headroom to avoid clipping.
Open editors from variable names
After evaluating, right-click a VST instrument or effect variable—either in
its let declaration or where you use it—and choose Open plug-in editor.
Aliases resolve to the original plug-in instance. The existing shortcut on
vst3(), vst(), and vst3fx() calls still works.