diff --git a/docs/soul_library.html b/docs/soul_library.html index 72e26f43..248fd7f8 100644 --- a/docs/soul_library.html +++ b/docs/soul_library.html @@ -312,8 +312,10 @@
This namespace contains some handy stuctures to use when declaring external
variables which are going to be loaded with data from audio files.
-
An external
variable declared with the type soul::audio_samples::Mono
can be loaded with monoised data from an audio file.
struct Mono
{
float32[] frames;
float64 sampleRate;
}
-
An external
variable declared with the type soul::audio_samples::Stereo
can be loaded with stereo data from an audio file.
struct Stereo
{
float32<2>[] frames;
float64 sampleRate;
}
An external
variable declared with the type soul::audio_samples::Mono
can be loaded with monoised data from an audio file.
struct Mono
{
}
+
An external
variable declared with the type soul::audio_samples::Stereo
can be loaded with stereo data from an audio file.
struct Stereo
{
}
This namespace contains various pan-related helper functions
This namespace contains some types which are handy for representing synthesiser note events. They do a similar job to MIDI events, but as strongly-typed structs instead of a group of bytes. Things like the midi::MPEParser class generate them.
The events do contain a channel number, in the same way that MIDI does, but there are no restrictions on its range.
-
Represents a note-on (key-down) event.
struct NoteOn
{
int32 channel;
float32 note;
float32 velocity;
}
-
Represents a note-off (key-up) event.
struct NoteOff
{
int32 channel;
float32 note;
float32 velocity;
}
-
Represents a change to the pitch that should be applied to any notes being played on the channel specified.
struct PitchBend
{
int32 channel;
float32 bendSemitones;
}
-
Represents a change to the pressure that should be applied to any notes being played on the channel specified.
struct Pressure
{
int32 channel;
float32 pressure;
}
-
Represents a change to the Y-axis parameter that should be applied to any notes being played on the channel specified.
struct Slide
{
int32 channel;
float32 slide;
}
-
Represents a change to a user-defined control parameter that should be applied to any notes being played on the channel specified.
struct Control
{
int32 channel;
int32 control;
float32 value;
}
Represents a note-on (key-down) event.
struct NoteOn
{
}
+
Represents a note-off (key-up) event.
struct NoteOff
{
}
+
Represents a change to the pitch that should be applied to any notes being played on the channel specified.
struct PitchBend
{
}
+
Represents a change to the pressure that should be applied to any notes being played on the channel specified.
struct Pressure
{
}
+
Represents a change to the Y-axis parameter that should be applied to any notes being played on the channel specified.
struct Slide
{
}
+
Represents a change to a user-defined control parameter that should be applied to any notes being played on the channel specified.
struct Control
{
}
Simple voice allocation helpers, which take a single stream of input events, and redirect them to an array of target voice processors.
struct VoiceInfoInputs
-
+ Outputs
Structures
{
bool active;
int32 channel;
float32 note;
int32 voiceAge;
}
struct VoiceInfo
{
}
int32 nextAllocatedVoiceAge = 1000000000
Inputs
-
Simple processor which adds two sources together using streams to control the gains to apply to each source.
Inputs
-
Simple processor which mixes together two sources, using a stream of values to indicate the ratio.
The mixRange constant allows you to set the range of values that will be passed in the mix stream, so e.g. mixRange = 1.0 means that mix will be in the range 0 to 1, and mixRange = 100 means the values will be 0 to 100. The mix stream is expected to contain values between 0 and mixRange, where mix = 0 produces 100% in1, and mix = mixRange produces 100% in2.
Inputs
-
Utility processors for common tasks like applying gain in various ways.
Inputs
-
+ Outputs
-
Simple processor which applies a changeable gain level to a signal.
Inputs
-
Converts an input event parameter in decibels to a smoothed stream of raw gain levels.
Inputs
-
float32 targetGain
Inputs
-
bool active = false
This namespace contains some random number generation helpers. We're assuming that nobody's going to be using these RNGs for security-critical cryptographic applications. All the algorithms here are chosen to be fast, and definitely not cryptographically strong!
-
State for a Park-Miller random number generator.
struct RandomNumberState
{
int64 seed;
}
State for a Park-Miller random number generator.
struct RandomNumberState
{
The current seed. Top tip: when generating a seed, you might want to use the processor.id
constant, to make sure that each instance of a processor has a differently-seeded RNG. If you want the RNG to be different each time the program runs, you could also throw the processor.session
constant into the mix too.
}
reset
@@ -483,27 +494,33 @@Brown noise generator
Pink noise generator
The timeline
namespace contains various structs and functions which are used when dealing with positions and tempos along a timeline.
The timeline
namespace contains various structs and functions which are used when dealing with positions and tempos along a timeline.
The timeline
namespace contains various structs and functions which are used when dealing with positions and tempos along a timeline.
-
Represents a simple time-signature.
struct TimeSignature
{
int32 numerator;
int32 denominator;
}
-
Represents a tempo in BPM.
struct Tempo
{
float32 bpm;
}
-
Represents the state of a host which can play timeline-based material.
struct TransportState
{
int32 state;
}
-
Represents a position along a timeline, in terms of frames and also (where appropriate) quarter notes.
struct Position
{
int64 currentFrame;
float64 currentQuarterNote;
float64 lastBarStartQuarterNote;
}
Represents a simple time-signature.
struct TimeSignature
{
}
+
Represents a tempo in BPM.
struct Tempo
{
}
+
Represents the state of a host which can play timeline-based material.
struct TransportState
{
In the absence of enums, the valid values for the state are: 0 = stopped, 1 = playing, 2 = recording.
}
+
Represents a position along a timeline, in terms of frames and also (where appropriate) quarter notes.
struct Position
{
A number of frames from the start of the timeline.
The number of quarter-notes since the beginning of the timeline. A host may not have a meaningful value for this, so it may just be 0. Bear in mind that a timeline may contain multiple changes of tempo and time-signature, so this value will not necessarily keep increasing at a constant rate.
The number of quarter-notes from the beginning of the timeline to the start of the current bar. A host may not have a meaningful value for this, so it may just be 0. You can subtract this from currentQuarterNote to find out how which quarter-note the position represents within the current bar.
}
quarterNotesPerBeat
float32 quarterNotesPerBeat (TimeSignature timeSig)
A unipolar ramp (phasor) oscillator. This is a non-bandlimited oscillator that will cause aliasing!
struct State
{
}
reset
@@ -543,11 +563,11 @@
@@ -559,11 +579,11 @@
float32 phaseIncrement = float (initialFrequency * twoPi * processor.period)
@@ -612,7 +632,11 @@ namespace soul::oscillators::quadrature (int32 updateInterval = 16) struct State struct Coeffs struct State } struct Coeffs } reset
float32 frequency = initialFrequency Functions for applying a smoothing filter on a changing value. struct State struct State } reset
@@ -753,8 +778,12 @@
- Holds a set of filter coefficients.
- Holds the filter state. struct State Holds a set of filter coefficients. struct Coeffs }
+ Holds the filter state. struct State } reset
Biquadratic (two-pole-two-zero) IIR filter building block. Direct Form I (DFI):
- Holds a set of filter coefficients. struct Coeffs
- Holds the filter state. struct State Holds a set of filter coefficients. struct Coeffs }
+ Holds the filter state. struct State } set
float32 frequency = initialFrequency int32 notch = 6 int32 allpass = 7 processor soul::filters::rbj_eq::Processor (int32 initialMode = 0, float32 initialFrequency = defaultFreqHz, float32 initialQuality = defaultQuality, float32 initialGain = defaultGain) float32 frequency = initialFrequency
numSOS = size (coeffs) / 6
float32 frequency = initialFrequency
- Holds the filter state. struct State Holds the filter state. struct State } update Polyphase IIR Designer. Based on HIIR http://ldesoras.free.fr/prod.html#src_hiir
- Holds a set of filter coefficients. struct Coeffs struct TransitionParams Holds a set of filter coefficients. struct Coeffs } struct TransitionParams } compute
@@ -970,22 +1007,23 @@
- Holds the filter state. struct State Holds the filter state. struct State } process
SampleType[2] process (State& s,
@@ -994,8 +1032,11 @@ Complex Resonator filter. See https://ccrma.stanford.edu/~jos/smac03maxjos/smac03maxjos.pdf This filter is suitable for modulation
- Holds the filter state. struct State
- Holds a set of filter coefficients. struct Coeffs Holds the filter state. struct State }
+ Holds a set of filter coefficients. struct Coeffs } update process
SampleType[2] process (State& s, processor soul::filters::complex_resonator::Processor (float32 initialFrequency = defaultFreqHz, float32 initialDecay = 1.0f, float32 initialGain = 1.0f) float32 frequency = initialFrequency float32 decay = initialFrequency float32 gain = initialFrequency float32 decay = initialDecay float32 gain = initialGain bool recalc = true This namespace contains a set of "Topology preserving transform" filters. "Topology preserving transform" one-pole filter. Derived from work by Zavalishin and Pirkle. This filter is suitable for modulation.
- Holds a set of filter coefficients. struct Coeffs
- Holds the filter state. struct State Holds a set of filter coefficients. struct Coeffs }
+ Holds the filter state. struct State } clear int32 highpass = 1 int32 allpass = 2 processor soul::filters::tpt::onepole::Processor (int32 initialMode = 0, float32 initialFrequency = defaultFreqHz) float32 frequency = initialFrequency "Topology preserving transform" multi-mode state variable filter (SVF). Derived from work by Zavalishin and Pirkle. This filter is suitable for modulation.
- Holds a set of filter coefficients. struct Coeffs
- Holds the filter state. struct State Holds a set of filter coefficients. struct Coeffs }
+ Holds the filter state. struct State } reset int32 highpass = 1 int32 bandpass = 2 processor soul::filters::tpt::svf::Processor (float32 initialFrequency = defaultFreqHz, float32 initialQuality = defaultQuality) float32 frequency = initialFrequency float32 quality = initialFrequency float32 quality = initialQuality bool recalc = true N-th order Butterworth filter, made by cascading TPT filters. This filter is suitable for modulation
float32 frequency = initialFrequency 4th-order Linkwitz-Riley crossover filter, which outputs two bands of audio. The channels should sum together to produce a flat response. This filter is suitable for modulation.
- Holds the filter state. struct State
- Holds a set of filter coefficients. struct Coeffs Holds the filter state. struct State }
+ Holds a set of filter coefficients. struct Coeffs } processor soul::filters::tpt::crossover::Processor (float32 initialFrequency = defaultFreqHz) update SVF EQ. Based on the work of Andy Simper: https://cytomic.com/files/dsp/SvfLinearTrapOptimised2.pdf This filter is suitable for modulation.
- Holds a set of filter coefficients. struct Coeffs
- Holds the filter state. struct State Holds a set of filter coefficients. struct Coeffs }
+ Holds the filter state. struct State } reset int32 allpass = 7 int32 bell = 8 processor soul::filters::tpt::simper_eq::Processor (int32 initialMode = 0, float32 initialFrequency = defaultFreqHz, float32 initialQuality = defaultQuality, float32 initialGain = defaultGain) float32 frequency = initialFrequency float32 quality = initialFrequency float32 gain = initialFrequency float32 quality = initialQuality float32 gain = initialGain int32 mode = initialMode bool recalc = true In general, the SOUL policy towards MIDI is to avoid it as much as is humanly possible, so most of these helper functions are concerned with converting MIDI messages to Various MIDI-related types and functions.
- This type is used to represent a packed short MIDI message. When you create an input event endpoint and would like it to receive MIDI, this is the type that you should use for it. struct Message This type is used to represent a packed short MIDI message. When you create an input event endpoint and would like it to receive MIDI, this is the type that you should use for it. struct Message } getByte1 int32 MPESlideControllerID = 74Inputs
-
+ Outputs
-
Variables
Specialisation Parameters
Inputs
-
+ Outputs
-
Variables
Specialisation Parameters
Inputs
-
+ Outputs
-
Variables
namespace
Specialisation Parameters
Structures
{
SampleType u;
SampleType v;
}
{
SampleType k1;
SampleType k2;
}Structures
{
{Functions
Specialisation Parameters
Inputs
-
+ Outputs
-
Variables
Variables
namespace soul::oscillators::lfo::smoother
Structures
{
float32 currentValue;
float32 targetValue;
float32 increment;
int32 steps;
}Structures
{
float32 targetValue;
float32 increment;
int32 steps;Functions
Specialisation Parameters
Inputs
-
+ Outputs
-
Variables
namespace https://ccrma.stanford.edu/~jos/fp/DC_Blocker.html
Structures
{
SampleType[1] x;
SampleType[1] y;
}
{
{Functions
Specialisation Parameters
Inputs
-
+ Outputs
-
namespace soul::filters::biquad
y[n] = b0 * x[n] + b1 * x[n-1] + b2 * x[n-2] - a1 * y[n-1] - a2 * y[n-2]
@@ -781,8 +810,13 @@
namespace
Structures
{
CoeffType<3> b;
CoeffType<3> a;
}
{
SampleType[2] x;
SampleType[2] y;
}
{
{Functions
Specialisation Parameters
Inputs
-
+ Outputs
-
Variables
Variables
processor soul::filters::rbj_eq::Processor
- Specialisation Parameters
Inputs
-
Outputs
-
Variables
Specialisation Parameters
Inputs
-
Outputs
-
Variables
Specialisation Parameters
Inputs
-
Outputs
-
Variables
namespace namespace soul::filters::analytic (int32 numFilters = 6, float32 transitionBandwidthHz = 20.0f)
Structures
{
dual_apf::State[numFilters] apfs;
SampleType[1] x;
}
{Functions
namespace
Structures
{
float64[numCoefficients] coeffs;
}
{
float64 k;
float64 q;
}
{
{
float64 q;Functions
namespace
Structures
{
SampleType[2] x1;
SampleType[2] y1;
SampleType[2] x2;
SampleType[2] y2;
CoeffType[2] c;
}
{Functions
SampleType[2] x)processor soul::filters::analytic::Processor
- Inputs
-
Outputs
-
Variables
namespace
Structures
{
SampleType yReal;
SampleType yImag;
}
{
complex64 v;
}
{
{Functions
Functions
Coeffs& c,
SampleType x)processor soul::filters::complex_resonator::Processor
- Specialisation Parameters
Inputs
-
Outputs
-
Variables
namespace soul::filters::tpt
namespace
Structures
{
CoeffType b;
}
{
SampleType z1;
}
{
{Functions
Variables
processor soul::filters::tpt::onepole::Processor
- Specialisation Parameters
Inputs
-
Outputs
-
Variables
namespace
Structures
{
CoeffType a0;
CoeffType a;
CoeffType p;
}
{
SampleType[2] z;
}
{
{Functions
Variables
processor soul::filters::tpt::svf::Processor
- Specialisation Parameters
Inputs
-
Outputs
-
Variables
namespace soul::filters::tpt::butterworth
Specialisation Parameters
Inputs
-
+ Outputs
-
Variables
namespace
Structures
{
SVF::State svf1;
SVF::State svf2;
}
{
SVF::Coeffs svf1;
SVF::Coeffs svf2;
}
{
SVF::State svf2;
{
SVF::Coeffs svf2;processor soul::filters::tpt::crossover::Processor
- Specialisation Parameters
Inputs
-
Outputs
-
Functions
namespace
Structures
{
CoeffType a1;
CoeffType a2;
CoeffType a3;
CoeffType m0;
CoeffType m1;
CoeffType m2;
}
{
SampleType ic1eq;
SampleType ic2eq;
}
{
{Functions
Variables
processor soul::filters::tpt::simper_eq::Processor
- Specialisation Parameters
Inputs
-
Outputs
-
Variables
MIDI utilities
soul::note_events
types, and then the other libraries use these strongly-typed events to model note actions, rather than dealing with raw MIDI events.namespace soul::midi
Structures
{
int32 midiBytes;
}
{Functions
processor
Inputs
-
+ Outputs
Variables
Frequency-domain utilities