Skip to main content

Module synth

Module synth 

Source
Expand description

The target synth: the Synth enum, the shared --synth argument and the structure each synth offers, SynthCapabilities.

Two synths are equal targets, Vital and Serum 2. Only the synths in Synth::READY have an adapter. A command resolves its target with SynthArg::resolve: the flag, the extension of a preset path on the command line, or Vital when neither names one.

use std::path::Path;
use sound_to_patch::synth::{Synth, SynthArg};

let arg = SynthArg::default();
assert_eq!(arg.resolve(None)?, Synth::Vital);
assert_eq!(arg.resolve(Some(Path::new("bass.vital")))?, Synth::Vital);
assert_eq!("serum2".parse::<Synth>()?, Synth::Serum2);

Structs§

GlideRule
The portamento time span.
OscillatorLayout
The oscillator sources of a synth.
SynthArg
The shared --synth option. A command flattens it when it needs a target synth.
SynthCapabilities
What a synth offers in structure: the sources, filters, modulation, effects and voicing rules that a mapper chooses from.
VelocityRule
How velocity reaches the audio level.

Enums§

EffectFamily
An effect family by its neutral name. A report never uses a synth’s own menu text.
GlideScaling
How the glide time relates to the interval.
LfoSync
A way to set an LFO rate.
Synth
A target synth.
SynthError
Why a target synth cannot be used.

Functions§

capabilities
The structure of synth: oscillators, filters, modulation sources, effects and voicing rules.