Table of Contents

Class Voice

Namespace
Sigil.Sound
Assembly
Sigil.Sound.Notes.dll

The note a voice is playing, as signals you build a sound from. Each one follows the note that triggered the voice, so Saw(v.Frequency) plays the right pitch for every note, and the voice is reused without being rebuilt. See Sigil.Sound.Patterns.Play(Sigil.Sound.Pattern,System.Func{Sigil.Sound.Voice,Sigil.Sound.Sound},System.Nullable{System.Double},System.Int32).

public sealed class Voice

Inheritance

Inherited Members

Properties

Bend

How far the player has moved the note's pitch, in semitones, as a signal (it glides over about 10 ms). 0 for a note nobody is shaping, which is every note of a pattern. Sigil.Sound.Voice.Frequency already includes it; use this to do something else with the gesture, such as opening a filter on a bend. See Sigil.Sound.PlayingNote.

public Sound Bend { get; }

Property Value

Sound

Examples

// A bent note also gets brighter: the filter opens by 300 Hz for every semitone of bend.
var keys = new NoteInput();
var synth = keys.Play(v => Saw(v.Frequency).LowPass(800 + v.Bend * 300).Adsr(0.01, 0.1, 0.9, 0.3));
keys.Start(55).Bend = 3;
synth * 0.3

Frequency

The pitch in Hz, as a signal: Saw(v.Frequency), or Saw(v.Frequency * 2) an octave up. It follows the note's Sigil.Sound.Voice.Bend, so a sound written with it answers to a bending player without any change.

public Sound Frequency { get; }

Property Value

Sound

Gate

1 while the note is held and 0 once it ends, as a signal. Adsr inside a voice already releases with the note; use this for anything custom, such as Noise() * v.Gate.

public Sound Gate { get; }

Property Value

Sound

Pitch

The MIDI pitch, 0 to 127, as a signal, plus the note's Sigil.Sound.Voice.Bend in semitones.

public Sound Pitch { get; }

Property Value

Sound

Pressure

How hard the player presses the note after it started, from 0 to 1, as a signal (it glides over about 10 ms). 0 for a note nobody is shaping. See Sigil.Sound.PlayingNote.

public Sound Pressure { get; }

Property Value

Sound

Examples

// Pressing harder swells the note: its volume follows the pressure, from a quiet floor up.
var keys = new NoteInput();
var synth = keys.Play(v => Saw(v.Frequency).LowPass(1500) * (0.2 + v.Pressure * 0.8));
keys.Start(48).Pressure = 1;
synth * 0.3

Slide

The third dimension of a note, from 0 to 1, as a signal (it glides over about 10 ms): on an MPE keyboard, the finger moving up and down the key. What it means is up to the sound; brightness is the usual choice. 0 for a note nobody is shaping. See Sigil.Sound.PlayingNote.

public Sound Slide { get; }

Property Value

Sound

Examples

// Sliding up the key opens the filter from 400 Hz to 4 kHz.
var keys = new NoteInput();
var synth = keys.Play(v => Saw(v.Frequency).LowPass(400 + v.Slide * 3600, q: 2).Adsr(0.01, 0.1, 0.9, 0.3));
keys.Start(52).Slide = 0.7;
synth * 0.3

Velocity

How hard the note is played, from 0 to 1, as a signal. Sigil.Sound.Patterns.Play(Sigil.Sound.Pattern,System.Func{Sigil.Sound.Voice,Sigil.Sound.Sound},System.Nullable{System.Double},System.Int32) already scales the voice by it; use this to shape the sound as well, for example to open a filter on harder notes.

public Sound Velocity { get; }

Property Value

Sound