diff --git a/docs/PatchFormat/main.md b/docs/PatchFormat/main.md index 48c5d2ef..e4fcab2c 100644 --- a/docs/PatchFormat/main.md +++ b/docs/PatchFormat/main.md @@ -389,14 +389,29 @@ The value should be the path to a javascript file that will be executed. This sc # Exporting patches -### Building a native VST or AudioUnit from a patch +### Building a native CLAP from a patch + +The `cmaj` tool supports code-generation of a [CLAP](https://github.com/free-audio/clap) C++ project from a Cmajor patch. The project created is a pure static C++ project that doesn't perform any JIT compilation when it runs. + +To use this feature, run the command line app in `generate` mode, e.g. + +``` +% cmaj generate --target=clap + --output=[path to a target folder for the project] + --clapIncludePath=[path to your CLAP include folder] + MyAmazingPatch.cmajorpatch +``` + +It will create a folder containing some source files and a cmake project. + +### Building a native JUCE VST or AudioUnit from a patch The `cmaj` tool supports code-generation of a JUCE C++ project that can be used to natively compile a VST/AudioUnit/AAX plugin for a patch. The resulting code doesn't do any JIT compilation, it simply translates the Cmajor code to pure C++ so that it can be built statically. To use this feature, run the command line app in `generate` mode, e.g. ``` -% cmaj generate --target=plugin +% cmaj generate --target=juce --output=[path to a target folder for the project] --jucePath=[path to your JUCE folder] MyAmazingPatch.cmajorpatch diff --git a/docs/PatchFormat/patch-guis/building-a-native-clap-from-a-patch.md b/docs/PatchFormat/patch-guis/building-a-native-clap-from-a-patch.md new file mode 100644 index 00000000..a26b5c93 --- /dev/null +++ b/docs/PatchFormat/patch-guis/building-a-native-clap-from-a-patch.md @@ -0,0 +1,8 @@ +--- +layout: default +title: Building a native CLAP from a patch +permalink: /docs/PatchFormat#building-a-native-clap-from-a-patch +parent: Patch GUIs +grand_parent: Patch Format +nav_order: 5 +--- diff --git a/docs/PatchFormat/patch-guis/building-a-native-juce-vst-or-audiounit-from-a-patch.md b/docs/PatchFormat/patch-guis/building-a-native-juce-vst-or-audiounit-from-a-patch.md new file mode 100644 index 00000000..21e6b332 --- /dev/null +++ b/docs/PatchFormat/patch-guis/building-a-native-juce-vst-or-audiounit-from-a-patch.md @@ -0,0 +1,8 @@ +--- +layout: default +title: Building a native JUCE VST or AudioUnit from a patch +permalink: /docs/PatchFormat#building-a-native-juce-vst-or-audiounit-from-a-patch +parent: Patch GUIs +grand_parent: Patch Format +nav_order: 6 +--- diff --git a/docs/PatchFormat/patch-guis/building-a-native-vst-or-audiounit-from-a-patch.md b/docs/PatchFormat/patch-guis/building-a-native-vst-or-audiounit-from-a-patch.md deleted file mode 100644 index 2ce4fb37..00000000 --- a/docs/PatchFormat/patch-guis/building-a-native-vst-or-audiounit-from-a-patch.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -layout: default -title: Building a native VST or AudioUnit from a patch -permalink: /docs/PatchFormat#building-a-native-vst-or-audiounit-from-a-patch -parent: Patch GUIs -grand_parent: Patch Format -nav_order: 5 ---- diff --git a/docs/PatchFormat/patch-guis/building-a-web-audio-audioworkletnode-from-a-patch.md b/docs/PatchFormat/patch-guis/building-a-web-audio-audioworkletnode-from-a-patch.md index 2b8caa14..21ae40ef 100644 --- a/docs/PatchFormat/patch-guis/building-a-web-audio-audioworkletnode-from-a-patch.md +++ b/docs/PatchFormat/patch-guis/building-a-web-audio-audioworkletnode-from-a-patch.md @@ -4,5 +4,5 @@ title: Building a Web Audio `AudioWorkletNode` from a patch permalink: /docs/PatchFormat#building-a-web-audio-audioworkletnode-from-a-patch parent: Patch GUIs grand_parent: Patch Format -nav_order: 6 +nav_order: 7 --- diff --git a/docs/StandardLibrary/main.html b/docs/StandardLibrary/main.html index 8f807332..057b7e9e 100644 --- a/docs/StandardLibrary/main.html +++ b/docs/StandardLibrary/main.html @@ -22,29 +22,18 @@

std.audio_data

namespace std

-

The std namespace is the root for all the built-in Cmajor library code. -
It contains various child namespaces that group tasks into various sub-categories. -
+

The std namespace is the root for all the built-in Cmajor library code.
It contains various child namespaces that group tasks into various sub-categories.

namespace std::audio_datacode

-

These structures are useful for representing chunks of audio data with a - known sample-rate. They're useful types when you're declaring an external - variable which is going to hold audio file data or generated waveform data. -
Note that duck-typing is used for the types of externals which contain audio - data, so you can use your own classes as long as they contain a couple of - fields which can hold the frame data and a sample rate. If you need a struct - for audio data with more than 2 channels, you can just declare your own type - using an appropriately-sized vector for the frames. -
+

These structures are useful for representing chunks of audio data with a known sample-rate. They're useful types when you're declaring an external variable which is going to hold audio file data or generated waveform data.
Note that duck-typing is used for the types of externals which contain audio data, so you can use your own classes as long as they contain a couple of fields which can hold the frame data and a sample rate. If you need a struct for audio data with more than 2 channels, you can just declare your own type using an appropriately-sized vector for the frames.

Structs

struct Mono -
Represents a chunk of mono floating-point audio data. -
+
Represents a chunk of mono floating-point audio data.
@@ -67,8 +56,7 @@

Structs

struct Stereo -
Represents a chunk of stereo, interleaved floating-point audio data. -
+
Represents a chunk of stereo, interleaved floating-point audio data.
Type
@@ -98,13 +86,7 @@

processor std::audio_data::SamplePlayer

processor std::audio_data::SamplePlayer (using SampleContent)
-

This processor will play chunks of audio sample data with a speed ratio applied. -
It provides input events to set the audio data, speed ratio and other properties - to control playback. -
The SampleContent type must be a struct containing a 'frames' member, which - is an array of audio frames, and a 'sampleRate' member with the original rate - of the audio data. -
+

This processor will play chunks of audio sample data with a speed ratio applied.
It provides input events to set the audio data, speed ratio and other properties to control playback.
The SampleContent type must be a struct containing a 'frames' member, which is an array of audio frames, and a 'sampleRate' member with the original rate of the audio data.

Endpoints

    @@ -249,8 +231,7 @@

    std.envelopes

    namespace std::envelopescode

-

Utilities for calculating and applying static and dynamic gain levels. -
+

Utilities for calculating and applying static and dynamic gain levels.

processor std::envelopes::FixedASR

@@ -258,11 +239,7 @@

processor std::envelopes::FixedASR

processor std::envelopes::FixedASR (float32 attackSeconds,
float32 releaseSeconds)
-
A very minimal, fixed-length, attack-sustain-release envelope generator. -
This has fixed-length attach and release times. Given input events of NoteOn - and NoteOff objects, it will emit a stream of output gain levels that can - be used to attenuate a voice. -
+
A very minimal, fixed-length, attack-sustain-release envelope generator.
This has fixed-length attach and release times. Given input events of NoteOn and NoteOff objects, it will emit a stream of output gain levels that can be used to attenuate a voice.
-

The std::filters namespace is parameterised, allowing both the FrameType and the - CoefficientType to be modified. By default the filters are float32, and hence use - 32 bit precision, and filter frames of a single channel. FrameType can be specified as - a vector to support more channels (e.g. float<2> for a stereo filter). -
For efficiency reasons, modulated parameters are not applied every frame, and the - framesPerParameterUpdate parameter can be used to tune the frequency of updates. -
Each filter type is provided as both a Processor, which can be included in graphs, and - as an Implementation structure, suitable for being composed into a user processor. -
The filter processors are parameterised with these parameters setting the initial state of - the filter. Parameter modulation is provided by input events. -
The filter Implementation structure provides the following functions: -
    -
  • create() functions which construct an Implementation with the specified initial - properties - this is the typical way that the structs are constructed -
  • -
  • process() which generates an output frame from an input frame -
  • -
  • setFrequency()/setMode() functions for filter parameters to allow the filter to be - modified post construction. -
  • -
  • reset() which clears out any internal state, returning it to the state post creation -
+

The std::filters namespace is parameterised, allowing both the FrameType and the CoefficientType to be modified. By default the filters are float32, and hence use 32 bit precision, and filter frames of a single channel. FrameType can be specified as a vector to support more channels (e.g. float<2> for a stereo filter).
For efficiency reasons, modulated parameters are not applied every frame, and the framesPerParameterUpdate parameter can be used to tune the frequency of updates.
Each filter type is provided as both a Processor, which can be included in graphs, and as an Implementation structure, suitable for being composed into a user processor.
The filter processors are parameterised with these parameters setting the initial state of the filter. Parameter modulation is provided by input events.
The filter Implementation structure provides the following functions:
    +
  • create() functions which construct an Implementation with the specified initial properties - this is the typical way that the structs are constructed
  • +
  • process() which generates an output frame from an input frame
  • +
  • setFrequency()/setMode() functions for filter parameters to allow the filter to be modified post construction.
  • +
  • reset() which clears out any internal state, returning it to the state post creation

Constants

@@ -385,8 +345,7 @@

Constants

-
Default values if not specified -
+
Default values if not specified
@@ -435,23 +394,13 @@

Constants

namespace std::filters::tpt

-

These filters are based on the designs outlined in The Art of VA Filter Design - by Vadim Zavalishin, with help from Will Pirkle in Virtual Analog Filter Implementation. - The topology-preserving transform approach leads to designs where parameter - modulation can be applied with minimal instability. -
Parameter changes are applied at a lower rate than processor.frequency to reduce - computational cost, and the frames between updates can be altered using the - framesPerParameterUpdate, smaller numbers causing more frequent updates. -
+

These filters are based on the designs outlined in The Art of VA Filter Design by Vadim Zavalishin, with help from Will Pirkle in Virtual Analog Filter Implementation. The topology-preserving transform approach leads to designs where parameter modulation can be applied with minimal instability.
Parameter changes are applied at a lower rate than processor.frequency to reduce computational cost, and the frames between updates can be altered using the framesPerParameterUpdate, smaller numbers causing more frequent updates.

namespace std::filters::tpt::onepole

-
One pole filter implementation providing low and high pass options. - The frequency and mode can be updated at a frequency determined by - framesPerParameterUpdate. -
+
One pole filter implementation providing low and high pass options. The frequency and mode can be updated at a frequency determined by framesPerParameterUpdate.

Structs

struct Implementation @@ -675,8 +624,7 @@

Constants

namespace std::filters::tpt::svf

-
State variable filter implementation, suitable for modulation. -
+
State variable filter implementation, suitable for modulation.

Structs

struct Implementation @@ -1074,12 +1022,7 @@

Constants

namespace std::filters::dcblocker

-

Highpass filter for blocking DC. - An implementation of
https://ccrma.stanford.edu/~jos/fp/DC_Blocker.html -
The DC blocker is a small recursive filter specified by the difference equation: -
y(n) = x(n) - x(n-1) + Ry(n-1)
- 
..where R is a parameter that is typically somewhere between 0.9 and 1 -
+

Highpass filter for blocking DC. An implementation of https://ccrma.stanford.edu/~jos/fp/DC_Blocker.html
The DC blocker is a small recursive filter specified by the difference equation:
y(n) = x(n) - x(n-1) + Ry(n-1) 
..where R is a parameter that is typically somewhere between 0.9 and 1

Structs

struct Implementation @@ -1180,10 +1123,7 @@

namespace std::filters::butterworth

namespace std::filters::butterworth (int32 order = 2)
-

Butterworth filter, built from cascaded tpt filters. -
The order is set at compile time, but the type and frequency can be modulated - at runtime. -
+

Butterworth filter, built from cascaded tpt filters.
The order is set at compile time, but the type and frequency can be modulated at runtime.

Structs

struct Implementation @@ -1400,11 +1340,7 @@

Constants

namespace std::filters::crossover

-

4th Order two band crossover filter -
This filter is implemented using the StateVariableFilter and outputs two - streams which can be summed to produce a flat response. The crossover frequency - can be modulated. -
+

4th Order two band crossover filter
This filter is implemented using the StateVariableFilter and outputs two streams which can be summed to produce a flat response. The crossover frequency can be modulated.

Structs

struct Implementation @@ -1547,12 +1483,7 @@

Functions

namespace std::filters::simper

-

Simper filter -
This filter is based on the design by Andy Simper, and is an implementation - of the State Variable filter providing many different operational modes. - It is documented here: - https://cytomic.com/files/dsp/SvfLinearTrapOptimised2.pdf -
+

Simper filter
This filter is based on the design by Andy Simper, and is an implementation of the State Variable filter providing many different operational modes. It is documented here: https://cytomic.com/files/dsp/SvfLinearTrapOptimised2.pdf

Structs

struct Implementation @@ -1973,43 +1904,32 @@

std.frequency

namespace std::frequencycode

-

Contains DFT implementations for complex and real numbers -
The buffers can be either float32 or float64 (or complex32/complex64). - Buffer sizes must be a power of 2. -
+

Contains DFT implementations for complex and real numbers
The buffers can be either float32 or float64 (or complex32/complex64). Buffer sizes must be a power of 2.

Functions

realOnlyForwardFFT -
Performs a forward DFT. - The parameters must be power-of-2 sized arrays of floats. The input parameter takes the real - components, and the output array receives the real and imaginary components. -
+
Performs a forward DFT. The parameters must be power-of-2 sized arrays of floats. The input parameter takes the real components, and the output array receives the real and imaginary components.
void realOnlyForwardFFT<FloatArray> (const FloatArray& inputData, FloatArray& outputData)
realOnlyInverseFFT -
Performs an inverse FFT. - The parameters must be power-of-2 sized arrays of floats. The input parameter takes the real - and imaginary components, and the output array receives the real components. -
+
Performs an inverse FFT. The parameters must be power-of-2 sized arrays of floats. The input parameter takes the real and imaginary components, and the output array receives the real components.
void realOnlyInverseFFT<FloatArray> (const FloatArray& inputData, FloatArray& outputData)
complexFFT -

Performs an in-place forward FFT on complex data. -
+

Performs an in-place forward FFT on complex data.
void complexFFT<ComplexArray> (ComplexArray& data)
complexIFFT -
Performs an in-place inverse FFT on complex data. -
+
Performs an in-place inverse FFT on complex data.
void complexIFFT<ComplexArray> (ComplexArray& data) @@ -2027,419 +1947,354 @@

std.intrinsics

namespace std::intrinsicscode

-

This namespace contains placeholders and reference implementations of basic functions. -
The compiler treats the intrinsics namespace as a special-case, allowing its - functions to act as if they're in the global namespace. -
When running code, the JIT engines are free to replace the implementation of intrinsic - functions with optimised alternatives if possible, although many of the functions in here - also provide reference implementations to be used as a fallback when no native version - is available. -
+

This namespace contains placeholders and reference implementations of basic functions.
The compiler treats the intrinsics namespace as a special-case, allowing its functions to act as if they're in the global namespace.
When running code, the JIT engines are free to replace the implementation of intrinsic functions with optimised alternatives if possible, although many of the functions in here also provide reference implementations to be used as a fallback when no native version is available.

Functions

max -
Compares two scalar or vector values and returns the maximum. For vector operands, this returns a vector of results for each element. -
+
Compares two scalar or vector values and returns the maximum. For vector operands, this returns a vector of results for each element.
T max<T> (T v1, T v2)
min -
Compares two scalar or vector values and returns the minimum. For vector operands, this returns a vector of results for each element. -
+
Compares two scalar or vector values and returns the minimum. For vector operands, this returns a vector of results for each element.
T min<T> (T v1, T v2)
select -
Uses a boolean vector to determine which elements from two other vectors should be combined into the result. -
+
Uses a boolean vector to determine which elements from two other vectors should be combined into the result.
T select<T> (bool<T.size> mask, T trueValues, T falseValues)
clamp -

Returns a value which has been clamped to fit within the given range (inclusive of the top). -
+

Returns a value which has been clamped to fit within the given range (inclusive of the top).
T clamp<T> (T value, T minimum, T maximum)
wrap -
Wraps a value to fit within a range, using a negative-aware modulo operation, and returning zero if the size is zero. -
+
Wraps a value to fit within a range, using a negative-aware modulo operation, and returning zero if the size is zero.
T wrap<T> (T value, T size)
wrap -
Wraps a value to fit within a range, using a negative-aware modulo operation, and returning zero if the size is zero. -
+
Wraps a value to fit within a range, using a negative-aware modulo operation, and returning zero if the size is zero.
int32 wrap (int32 value, int32 size)
addModulo2Pi -
Adds two floating-point values together, returning the result modulo 2*Pi. - This is a common operation for tasks like incrementing the phase of an oscillator. -
+
Adds two floating-point values together, returning the result modulo 2*Pi. This is a common operation for tasks like incrementing the phase of an oscillator.
T addModulo2Pi<T> (T startValue, T valueToAdd)
abs -

Returns the absolute value of a scalar or vector value. -
+

Returns the absolute value of a scalar or vector value.
T abs<T> (T n)
floor -
Returns the largest integer not greater than the argument. This follows the same rules as the standard C/C++ std::floor() function. -
+
Returns the largest integer not greater than the argument. This follows the same rules as the standard C/C++ std::floor() function.
T floor<T> (T n)
ceil -
Returns the smallest integer not less than the argument. This follows the same rules as the standard C/C++ std::ceil() function. -
+
Returns the smallest integer not less than the argument. This follows the same rules as the standard C/C++ std::ceil() function.
T ceil<T> (T n)
rint -
Rounds the argument to an integer value. This follows the same rules as the standard C/C++ std::rint() function. -
+
Rounds the argument to an integer value. This follows the same rules as the standard C/C++ std::rint() function.
T rint<T> (T n)
fmod -
Returns the floating point modulo operation of its arguments. This follows the same rules as the standard C/C++ std::fmod() function. -
+
Returns the floating point modulo operation of its arguments. This follows the same rules as the standard C/C++ std::fmod() function.
T fmod<T> (T x, T y)
remainder -
Returns the floating remainder of its arguments. This follows the same rules as the standard C/C++ std::remainder() function. -
+
Returns the floating remainder of its arguments. This follows the same rules as the standard C/C++ std::remainder() function.
T remainder<T> (T x, T y)
lerp -
Performs a linear-interpolation between a pair of scalar values. -
+
Performs a linear-interpolation between a pair of scalar values.
T lerp<T> (T value1, T value2, float32 proportion)
roundToInt -
Returns the nearest integer to a floating point value. -
+
Returns the nearest integer to a floating point value.
int32 roundToInt (float32 value)
roundToInt -
Returns the nearest integer to a floating point value. -
+
Returns the nearest integer to a floating point value.
int64 roundToInt (float64 value)
sqrt -

Returns the square root of its argument. -
+

Returns the square root of its argument.
T sqrt<T> (T n)
pow -
Raises a value to the given power. -
+
Raises a value to the given power.
T pow<T> (T a, T b)
exp -
Returns the exponent of a scalar floating-point argument. -
+
Returns the exponent of a scalar floating-point argument.
T exp<T> (T n)
exp -
Returns the exponent of a complex number. -
+
Returns the exponent of a complex number.
complex32 exp (complex32 n)
exp -
Returns the exponent of a complex number. -
+
Returns the exponent of a complex number.
complex64 exp (complex64 n)
log -
Returns the natural log of a scalar floating point argument. -
+
Returns the natural log of a scalar floating point argument.
T log<T> (T n)
log10 -
Returns the base-10 log of a scalar floating point argument. -
+
Returns the base-10 log of a scalar floating point argument.
T log10<T> (T n)
isinf -

Checks whether the supplied argument is a floating point INF. -
+

Checks whether the supplied argument is a floating point INF.
bool isinf<FloatType> (FloatType value)
isnan -
Checks whether the supplied argument is a floating point NaN. -
+
Checks whether the supplied argument is a floating point NaN.
bool isnan<FloatType> (FloatType value)
reinterpretFloatToInt -
Reinterprets the raw bits of a 32-bit float as an integer. -
+
Reinterprets the raw bits of a 32-bit float as an integer.
int32 reinterpretFloatToInt (float32 value)
reinterpretFloatToInt -
Reinterprets the raw bits of a 64-bit float as an integer. -
+
Reinterprets the raw bits of a 64-bit float as an integer.
int64 reinterpretFloatToInt (float64 value)
reinterpretIntToFloat -
Reinterprets the bits of a 32-bit integer as a float32. -
+
Reinterprets the bits of a 32-bit integer as a float32.
float32 reinterpretIntToFloat (int32 value)
reinterpretIntToFloat -
Reinterprets the bits of a 64-bit integer as a float64. -
+
Reinterprets the bits of a 64-bit integer as a float64.
float64 reinterpretIntToFloat (int64 value)
sum -

Calculates the sum of the elements in a vector or array. -
+

Calculates the sum of the elements in a vector or array.
ArrayType.elementType sum<ArrayType> (ArrayType array)
product -
Multiplies all the elements of an array or vector of scalar values. -
+
Multiplies all the elements of an array or vector of scalar values.
ArrayType.elementType product<ArrayType> (ArrayType array)
read -
Returns an element from an array. - The index is a generic parameter, and can be either an integer or a float value. If you - provide a float index, then it'll round it down to the nearest integer and use that. - If the index lies beyond the range of the array, it will be wrapped. -
+
Returns an element from an array. The index is a generic parameter, and can be either an integer or a float value. If you provide a float index, then it'll round it down to the nearest integer and use that. If the index lies beyond the range of the array, it will be wrapped.
Array.elementType read<Array, IndexType> (const Array& array, IndexType index)
readLinearInterpolated -
Linearly-interpolates a value at a position in an array. - The first argument must be an array of floating point (or vector float) values, and the - index provided should be a floating point value. This will interpolate between adjacent - elements in the array to calculate the return value. - If the index lies beyond the range of the array, it will be wrapped. -
+
Linearly-interpolates a value at a position in an array. The first argument must be an array of floating point (or vector float) values, and the index provided should be a floating point value. This will interpolate between adjacent elements in the array to calculate the return value. If the index lies beyond the range of the array, it will be wrapped.
Array.elementType readLinearInterpolated<Array, IndexType> (const Array& array, IndexType index)
anyTrue -

Takes a vector or array of bools, and returns true if any of its elements are true. -
+

Takes a vector or array of bools, and returns true if any of its elements are true.
bool anyTrue<BoolArray> (BoolArray boolArray)
allTrue -
Takes a vector or array of bools, and returns true if all of its elements are true. -
+
Takes a vector or array of bools, and returns true if all of its elements are true.
bool allTrue<BoolArray> (BoolArray boolArray)
allEqual -
Takes two array or vector arguments, and returns true if all of their corresponding elements are equal. -
+
Takes two array or vector arguments, and returns true if all of their corresponding elements are equal.
bool allEqual<Array1, Array2> (const Array1& array1, const Array2& array2)
swap -

Swaps the contents of two assignable values. -
+

Swaps the contents of two assignable values.
void swap<Type> (Type& value1, Type& value2)
sin -

Sine of an angle. -
+

Sine of an angle.
T sin<T> (T n)
cos -
Cosine of an angle. -
+
Cosine of an angle.
T cos<T> (T n)
tan -
Tangent of an angle. -
+
Tangent of an angle.
T tan<T> (T n)
atan -
Arc tangent (inverse tangent) of x. -
+
Arc tangent (inverse tangent) of x.
T atan<T> (T n)
sinh -
Hyperbolic sine of an angle. -
+
Hyperbolic sine of an angle.
T sinh<T> (T n)
cosh -
Hyperbolic cosine of an angle. -
+
Hyperbolic cosine of an angle.
T cosh<T> (T n)
tanh -
Hyperbolic tangent of an angle. -
+
Hyperbolic tangent of an angle.
T tanh<T> (T n)
atanh -
Arc hyperbolic tangent. -
+
Arc hyperbolic tangent.
T atanh<T> (T n)
asin -
Arc sine (inverse sine) of an angle. -
+
Arc sine (inverse sine) of an angle.
T asin<T> (T n)
acos -
Arc cosine (inverse cosine) of an angle. -
+
Arc cosine (inverse cosine) of an angle.
T acos<T> (T n)
asinh -
Arc hyperbolic sine. -
+
Arc hyperbolic sine.
T asinh<T> (T n)
acosh -
Arc hyperbolic cosine. -
+
Arc hyperbolic cosine.
T acosh<T> (T n)
Type
@@ -2512,8 +2359,7 @@

Structs

Functions

setTarget -
Gives the object a target value and the number of steps it should take - to reach it. -
+
Gives the object a target value and the number of steps it should take to reach it.
void setTarget ( SmoothedValue& this, FrameType targetValue, int32 stepsToReachTarget) @@ -2531,8 +2375,7 @@

Functions

getNext -
Returns the current value and increments it towards the current target. -
+
Returns the current value and increments it towards the current target.
FrameType getNext ( SmoothedValue& this) @@ -2554,10 +2397,7 @@

processor std::smoothing::SmoothedValueStream processor std::smoothing::SmoothedValueStream (float32 smoothingTimeSeconds = 0.2f,
FrameType initialValue = 0.0f)

-

Takes an input that receives floating point events, and produces a continuous - output stream of floats which are smoothed by a specified amount. - This is handy for smoothing plugin parameters -
+

Takes an input that receives floating point events, and produces a continuous output stream of floats which are smoothed by a specified amount. This is handy for smoothing plugin parameters

Endpoints

Type
@@ -2934,10 +2740,7 @@

Structs

-
+ @@ -3214,8 +3017,7 @@

Functions

createMessage -

Creates a short MIDI message object from the raw bytes -
+

Creates a short MIDI message object from the raw bytes
Message createMessage (int32 byte1, int32 byte2, int32 byte3) @@ -3244,8 +3046,7 @@

Constants

-
standard MPE range of 48 semitones -
+
standard MPE range of 48 semitones
@@ -3265,8 +3066,7 @@

Constants

-
MPE slide controller number -
+
MPE slide controller number
@@ -3278,9 +3078,7 @@

Constants

processor std::midi::MPEConverter

-

Accepts an input stream of raw MIDI MPE events and converts them to a stream - of note event objects which can be more easily used by synthesiser classes. -
+

Accepts an input stream of raw MIDI MPE events and converts them to a stream of note event objects which can be more easily used by synthesiser classes.

Endpoints

    @@ -3316,9 +3114,7 @@

    Functions

    processor std::midi::NoteToMIDI

    -

    Accepts an input of note events, and converts them to a stream of short - midi messages. -
    +

    Accepts an input of note events, and converts them to a stream of short midi messages.

    Endpoints

      @@ -3396,9 +3192,7 @@

      std.mixers

      namespace std::mixerscode

    -

    These processors can be used to mix various combinations of audio streams - together with static or dynamic gains. -
    +

    These processors can be used to mix various combinations of audio streams together with static or dynamic gains.

    processor std::mixers::StereoToMono

    @@ -3406,9 +3200,7 @@

    processor std::mixers::StereoToMono

    processor std::mixers::StereoToMono (using SampleType)
    -

    Simple utility processor that takes a vector size 2 and outputs the sum of - its elements. -
    +

    Simple utility processor that takes a vector size 2 and outputs the sum of its elements.

    Endpoints

      @@ -3439,9 +3231,7 @@

      processor std::mixers::MonoToStereo

      processor std::mixers::MonoToStereo (using SampleType)
      -

      Simple utility processor that takes a scalar input and outputs a vector - size 2 which contains two copies of the input value -
      +

      Simple utility processor that takes a scalar input and outputs a vector size 2 which contains two copies of the input value

      Endpoints

        @@ -3472,10 +3262,7 @@

        processor std::mixers::DynamicSum

        processor std::mixers::DynamicSum (using FrameType)
        -

        Takes two input streams and two gain streams which it uses to attenuate the - inputs. Their result is then emitted. - FrameType can be a float or float vector type. -
        +

        Takes two input streams and two gain streams which it uses to attenuate the inputs. Their result is then emitted. FrameType can be a float or float vector type.

        Endpoints

          @@ -3521,10 +3308,7 @@

          processor std::mixers::ConstantSum

          processor std::mixers::ConstantSum (using FrameType,
          float32 inputGain1 = 1.0f,
          float32 inputGain2 = 1.0f)
          -

          Takes two input streams which it adds together after applying some optional - constant gains. - FrameType can be a float or float vector type. -
          +

          Takes two input streams which it adds together after applying some optional constant gains. FrameType can be a float or float vector type.

          Endpoints

            @@ -3560,15 +3344,7 @@

            processor std::mixers::Interpolator

            processor std::mixers::Interpolator (using FrameType,
            float32 mixRange)
            -

            Takes two input streams and outputs a dynamic mix of their values, using a third - stream to control the mix. -
            mixRange determines the range of values that the mix stream will take. So the - mix input is expected to be between 0 and mixRange, where mix = 0 will cause 100% of - in1 to be emitted, and mix = mixRange will cause 100% of in2 to be emitted. -
            This processor is handy as a wet/dry mixer - for example you could connect a dry - stream to in1, a wet stream to in2, and set mixRange to 100. Then, the mix input - will act as a "percentage wet" control. -
            +

            Takes two input streams and outputs a dynamic mix of their values, using a third stream to control the mix.
            mixRange determines the range of values that the mix stream will take. So the mix input is expected to be between 0 and mixRange, where mix = 0 will cause 100% of in1 to be emitted, and mix = mixRange will cause 100% of in2 to be emitted.
            This processor is handy as a wet/dry mixer - for example you could connect a dry stream to in1, a wet stream to in2, and set mixRange to 100. Then, the mix input will act as a "percentage wet" control.

            Endpoints

              @@ -3613,15 +3389,12 @@

              std.noise

              namespace std::noisecode

            -

            These processors can be used to generate various flavours of noise. -
            +

            These processors can be used to generate various flavours of noise.

            processor std::noise::White

            -
            Simple white noise generator. - See https://en.wikipedia.org/wiki/White_noise - +
            Simple white noise generator. See https://en.wikipedia.org/wiki/White_noise

            Endpoints

            @@ -3670,9 +3443,7 @@

            Functions

            processor std::noise::Brown

            -
            Brown (a.k.a. Brownian) noise generator. - See https://en.wikipedia.org/wiki/Brownian_noise - +
            Brown (a.k.a. Brownian) noise generator. See https://en.wikipedia.org/wiki/Brownian_noise

            Endpoints

            @@ -3763,9 +3534,7 @@

            Functions

            processor std::noise::Pink

            -
            Pink noise generator - See https://en.wikipedia.org/wiki/Pink_noise - +

            Endpoints

            @@ -3854,14 +3623,7 @@

            std.notes

            namespace std::notescode

            -

            These structs are used for events that model the start/stop/control of notes - that are playing in synthesisers. -
            Unlike sending raw MIDI around, these are strongly typed and use floating point - data so are far nicer to work with. -
            The objects include a channel ID field, so that a multi-channel input device can - indicate which events should be applied to each of the active notes that are - being played. -
            +

            These structs are used for events that model the start/stop/control of notes that are playing in synthesisers.
            Unlike sending raw MIDI around, these are strongly typed and use floating point data so are far nicer to work with.
            The objects include a channel ID field, so that a multi-channel input device can indicate which events should be applied to each of the active notes that are being played.

            Structs

            struct NoteOn @@ -3876,11 +3638,7 @@

            Structs

-
+ @@ -3890,9 +3648,7 @@

Structs

-
+ @@ -3902,8 +3658,7 @@

Structs

-
+ @@ -3922,9 +3677,7 @@

Structs

-
+ @@ -3934,9 +3687,7 @@

Structs

-
+ @@ -3946,8 +3697,7 @@

Structs

-
+ @@ -3966,9 +3716,7 @@

Structs

-
+ @@ -3978,8 +3726,7 @@

Structs

-
+ @@ -3998,9 +3745,7 @@

Structs

-
+ @@ -4010,8 +3755,7 @@

Structs

-
+ @@ -4019,9 +3763,7 @@

Structs

struct Slide -
"Slide" refers to a Y-axis controller parameter. - (In MPE input devices, this is a MIDI controller number 74) -
+
"Slide" refers to a Y-axis controller parameter. (In MPE input devices, this is a MIDI controller number 74)
Type
message
This contains 3 packed bytes, arranged as (byte2 | (byte1 << 8) | (byte0 << 16)). - This layout means that when you view the value in hex in your debugger, it reads in - the natural order for a MIDI message. -This contains 3 packed bytes, arranged as (byte2 | (byte1 << 8) | (byte0 << 16)). This layout means that when you view the value in hex in your debugger, it reads in the natural order for a MIDI message.
channel
This channel ID is used to associate events which act on a particular voice. - When a NoteOn object is sent, the sender will create a unique ID, and - use the same ID for any subsequent pitch and control events, and for the - final matching NoteOff event. -This channel ID is used to associate events which act on a particular voice. When a NoteOn object is sent, the sender will create a unique ID, and use the same ID for any subsequent pitch and control events, and for the final matching NoteOff event.
pitch
The pitch uses the same semitone scale as MIDI note numbers, between - 0 and 127, where middle C = 60. -The pitch uses the same semitone scale as MIDI note numbers, between 0 and 127, where middle C = 60.
velocity
Velocity is between 0 and 1 -Velocity is between 0 and 1
channel
This channel ID can be used to associate this NoteOff event with the earlier - NoteOn to which it applies. -This channel ID can be used to associate this NoteOff event with the earlier NoteOn to which it applies.
pitch
You may not care exactly what the pitch is when a note is released, but - in case it's needed, it's included here. -You may not care exactly what the pitch is when a note is released, but in case it's needed, it's included here.
velocity
Indicates how quickly the key was released: range is 0 to 1. -Indicates how quickly the key was released: range is 0 to 1.
channel
This channel ID can be used to associate this event with the earlier - NoteOn to which it applies. -This channel ID can be used to associate this event with the earlier NoteOn to which it applies.
bendSemitones
The number of semitones to bend up from the original note-on pitch. -The number of semitones to bend up from the original note-on pitch.
channel
This channel ID can be used to associate this event with the earlier - NoteOn to which it applies. -This channel ID can be used to associate this event with the earlier NoteOn to which it applies.
pressure
Key pressure is in the range 0 to 1 -Key pressure is in the range 0 to 1
@@ -4033,9 +3775,7 @@

Structs

-
+ @@ -4045,9 +3785,7 @@

Structs

-
+ @@ -4066,9 +3804,7 @@

Structs

-
+ @@ -4078,9 +3814,7 @@

Structs

-
+ @@ -4090,8 +3824,7 @@

Structs

-
+ @@ -4102,62 +3835,42 @@

Structs

Functions

frequencyToNote -

Returns the MIDI note equivalent for a frequency in Hz. - This uses the standard A = 440Hz reference tuning. - See: noteToFrequency -
+

Returns the MIDI note equivalent for a frequency in Hz. This uses the standard A = 440Hz reference tuning. See: noteToFrequency
float32 frequencyToNote (float32 frequency)
frequencyToNote -
Returns the MIDI note equivalent for a frequency in Hz. - The frequencyOfA parameter lets you use non-standard tunings if you need to. - See: noteToFrequency -
+
Returns the MIDI note equivalent for a frequency in Hz. The frequencyOfA parameter lets you use non-standard tunings if you need to. See: noteToFrequency
float32 frequencyToNote (float32 frequency, float32 frequencyOfA)
noteToFrequency -
Returns the frequency in Hz for a MIDI note number. - You can provide either an integer or floating point argument - the MIDI - note scale is in semitone units from 0 to 127, where middle C = 60. - This uses the standard A = 440Hz reference tuning. - See: frequencyToNote -
+
Returns the frequency in Hz for a MIDI note number. You can provide either an integer or floating point argument - the MIDI note scale is in semitone units from 0 to 127, where middle C = 60. This uses the standard A = 440Hz reference tuning. See: frequencyToNote
float32 noteToFrequency<T> (T midiNoteNumber)
noteToFrequency -
Returns the frequency in Hz for a MIDI note number. - You can provide either an integer or floating point argument - the MIDI - note scale is in semitone units from 0 to 127, where middle C = 60. - The frequencyOfA parameter lets you use non-standard tunings if you need to. - See: frequencyToNote -
+
Returns the frequency in Hz for a MIDI note number. You can provide either an integer or floating point argument - the MIDI note scale is in semitone units from 0 to 127, where middle C = 60. The frequencyOfA parameter lets you use non-standard tunings if you need to. See: frequencyToNote
float32 noteToFrequency<T> (T midiNoteNumber, float32 frequencyOfA)
getSpeedRatioBetween -
Calculates the speed ratio by which playback must be changed to re-pitch a given - source note to a target note. -
+
Calculates the speed ratio by which playback must be changed to re-pitch a given source note to a target note.
float32 getSpeedRatioBetween (float32 sourceMIDINote, float32 targetMIDINote)
getSpeedRatioBetween -
Given a source with a known sample rate and pitch, this calculates the ratio at which - it would need to be sped-up in order to achieve a target pitch and sample-rate. -
+
Given a source with a known sample rate and pitch, this calculates the ratio at which it would need to be sped-up in order to achieve a target pitch and sample-rate.
float64 getSpeedRatioBetween (float64 sourceSampleRate, float32 sourceMIDINote, float64 targetSampleRate, float32 targetMIDINote) @@ -4175,14 +3888,11 @@

std.oscillators

namespace std::oscillatorscode

-

These utility functions and processors provide oscillators such as sine, square, - triangle and sawtooth. -
+

These utility functions and processors provide oscillators such as sine, square, triangle and sawtooth.

Structs

struct PhasorState -

A class to manage a phase and increment that loops between 0 and 1. -
+

A class to manage a phase and increment that loops between 0 and 1.
Type
channel
This channel ID can be used to associate this event with the earlier - NoteOn to which it applies. -This channel ID can be used to associate this event with the earlier NoteOn to which it applies.
slide
The slide position ranges from 0 to 1. Exactly what you choose to do - with it depends on the instrument. -The slide position ranges from 0 to 1. Exactly what you choose to do with it depends on the instrument.
channel
This channel ID can be used to associate this event with the earlier - NoteOn to which it applies. -This channel ID can be used to associate this event with the earlier NoteOn to which it applies.
control
This could be used for any kind of controller index, but is probably - best used for MIDI controller numbers. -This could be used for any kind of controller index, but is probably best used for MIDI controller numbers.
value
The normalised value of the controller, between 0 and 1 -The normalised value of the controller, between 0 and 1
@@ -4259,8 +3969,7 @@

Functions

nextSquare -
Returns the sample of a square wave. -
+
Returns the sample of a square wave.
float32 nextSquare ( PolyblepState& this) @@ -4268,8 +3977,7 @@

Functions

nextSawtooth -
Returns the sample of a sawtooth wave. -
+
Returns the sample of a sawtooth wave.
float32 nextSawtooth ( PolyblepState& this) @@ -4291,9 +3999,7 @@

processor std::oscillators::Phasor

processor std::oscillators::Phasor (using FrameType,
float32 initialFrequency = 1000)
-

A processor which generates a unipolar ramp, and has an input to control its frequency. - The FrameType parameter could be a float or a float vector. -
+

A processor which generates a unipolar ramp, and has an input to control its frequency. The FrameType parameter could be a float or a float vector.

Endpoints

    @@ -4354,9 +4060,7 @@

    processor std::oscillators::Sine

    processor std::oscillators::Sine (using FrameType,
    float32 initialFrequency = 440.0f)
    -

    A basic sinewave generation processor with an input to control its frequency. - The FrameType parameter could be a float or a float vector. -
    +

    A basic sinewave generation processor with an input to control its frequency. The FrameType parameter could be a float or a float vector.

    Endpoints

      @@ -4417,8 +4121,7 @@

      processor std::oscillators::PolyblepOscillator<
      processor std::oscillators::PolyblepOscillator (using FrameType,
      Shape initialShape = Shape::sawtoothUp,
      float32 initialFrequency = 440.0f)
      -

      Uses a polyblep algorithm to generate a wave, with inputs to control its shape and frequency. -
      +

      Uses a polyblep algorithm to generate a wave, with inputs to control its shape and frequency.

      Endpoints

        @@ -4502,8 +4205,7 @@

        processor std::oscillators::LFO

        processor std::oscillators::LFO (Shape initialShape = Shape::sine,
        float32 initialFrequency = 1.0f,
        float32 initialAmplitude = 1.0f,
        float32 initialOffset = 0.0f)
        -

        A LFO processor with event inputs to control its parameters. -
        +

        A LFO processor with event inputs to control its parameters.

        Endpoints

          @@ -4848,120 +4550,105 @@

          namespace std::oscillators::waveshape

          Functions

          sine -

          Returns a sine wave, where phase is in the range 0 to 1 -
          +

          Returns a sine wave, where phase is in the range 0 to 1
          SampleType sine<T> (T phase)
          sine -
          Returns a sine wave with a given amplitude, where phase is in the range 0 to 1 -
          +
          Returns a sine wave with a given amplitude, where phase is in the range 0 to 1
          SampleType sine<T> (T phase, SampleType amplitude)
          sine -
          Returns a sine wave with a given amplitude and offset, where phase is in the range 0 to 1 -
          +
          Returns a sine wave with a given amplitude and offset, where phase is in the range 0 to 1
          SampleType sine<T> (T phase, SampleType amplitude, SampleType offset)
          square -

          Returns a bipolar square wave, where phase is in the range 0 to 1 -
          +

          Returns a bipolar square wave, where phase is in the range 0 to 1
          SampleType square<T> (T phase)
          square -
          Returns a square wave with a given amplitude, where phase is in the range 0 to 1 -
          +
          Returns a square wave with a given amplitude, where phase is in the range 0 to 1
          SampleType square<T> (T phase, SampleType amplitude)
          square -
          Returns a square wave with a given amplitude and offset, where phase is in the range 0 to 1 -
          +
          Returns a square wave with a given amplitude and offset, where phase is in the range 0 to 1
          SampleType square<T> (T phase, SampleType amplitude, SampleType offset)
          triangle -

          Returns a bipolar triangle wave, where phase is in the range 0 to 1 -
          +

          Returns a bipolar triangle wave, where phase is in the range 0 to 1
          SampleType triangle<T> (T phase)
          triangle -
          Returns a triangle wave with a given amplitude, where phase is in the range 0 to 1 -
          +
          Returns a triangle wave with a given amplitude, where phase is in the range 0 to 1
          SampleType triangle<T> (T phase, SampleType amplitude)
          triangle -
          Returns a triangle wave with a given amplitude and offset, where phase is in the range 0 to 1 -
          +
          Returns a triangle wave with a given amplitude and offset, where phase is in the range 0 to 1
          SampleType triangle<T> (T phase, SampleType amplitude, SampleType offset)
          sawtoothUp -

          Returns a bipolar upwards sawtooth wave, where phase is in the range 0 to 1 -
          +

          Returns a bipolar upwards sawtooth wave, where phase is in the range 0 to 1
          SampleType sawtoothUp<T> (T phase)
          sawtoothUp -
          Returns an upwards sawtooth wave with a given amplitude, where phase is in the range 0 to 1 -
          +
          Returns an upwards sawtooth wave with a given amplitude, where phase is in the range 0 to 1
          SampleType sawtoothUp<T> (T phase, SampleType amplitude)
          sawtoothUp -
          Returns an upwards sawtooth wave with a given amplitude and offset, where phase is in the range 0 to 1 -
          +
          Returns an upwards sawtooth wave with a given amplitude and offset, where phase is in the range 0 to 1
          SampleType sawtoothUp<T> (T phase, SampleType amplitude, SampleType offset)
          sawtoothDown -

          Returns a bipolar downwards sawtooth wave, where phase is in the range 0 to 1 -
          +

          Returns a bipolar downwards sawtooth wave, where phase is in the range 0 to 1
          SampleType sawtoothDown<T> (T phase)
          sawtoothDown -
          Returns an downwards sawtooth wave with a given amplitude, where phase is in the range 0 to 1 -
          +
          Returns an downwards sawtooth wave with a given amplitude, where phase is in the range 0 to 1
          SampleType sawtoothDown<T> (T phase, SampleType amplitude)
          sawtoothDown -
          Returns an downwards sawtooth wave with a given amplitude and offset, where phase is in the range 0 to 1 -
          +
          Returns an downwards sawtooth wave with a given amplitude and offset, where phase is in the range 0 to 1
          SampleType sawtoothDown<T> (T phase, SampleType amplitude, SampleType offset) @@ -4986,16 +4673,14 @@

          Functions

          generate -

          Returns a wave of the shape type passed in as an argument, where phase is in the range 0 to 1 -
          +

          Returns a wave of the shape type passed in as an argument, where phase is in the range 0 to 1
          SampleType generate<T> (Shape waveShapeType, T phase)
          generate -
          Returns a wave of the shape type passed in as an argument, where phase is in the range 0 to 1 -
          +
          Returns a wave of the shape type passed in as an argument, where phase is in the range 0 to 1
          SampleType generate<T> (Shape waveShapeType, T phase, SampleType amplitude, SampleType offset) @@ -5013,31 +4698,16 @@

          std.random

          namespace std::randomcode

          -

          If you're writing code that needs to be cryptographically secure, then this is not the - random number generation library that you want. The target audience for these classes - are those who need quick-and-dirty RNGs for noise generation and similar non-critical - tasks. -
          When seeding RNGs, the processor.id and processor.session values are very useful: -
            -
          • processor.id is different for each instance of a processor, but the same for each - run of the program. If you have multiple instances of a processor node which each - have an RNG, then if you seed them with a value based on processor.id, they'll - each use a different stream of values, but the sequences will be the same each time - the program runs. -
          +

          If you're writing code that needs to be cryptographically secure, then this is not the random number generation library that you want. The target audience for these classes are those who need quick-and-dirty RNGs for noise generation and similar non-critical tasks.
          When seeding RNGs, the processor.id and processor.session values are very useful:
            +
          • processor.id is different for each instance of a processor, but the same for each run of the program. If you have multiple instances of a processor node which each have an RNG, then if you seed them with a value based on processor.id, they'll each use a different stream of values, but the sequences will be the same each time the program runs.
            -
          • processor.session is the same for all processors, but different each time the - program runs, so if you use it as part of your seed, it'll make the program - behave differently each time. -
          • +
          • processor.session is the same for all processors, but different each time the program runs, so if you use it as part of your seed, it'll make the program behave differently each time.

          Structs

          struct RNG -
          This default RNG is a basic linear congruential generator. - See https://en.wikipedia.org/wiki/Lehmer_random_number_generator -
          +
          This default RNG is a basic linear congruential generator. See https://en.wikipedia.org/wiki/Lehmer_random_number_generator

Type
@@ -5049,8 +4719,7 @@

Structs

-
+ @@ -5061,8 +4730,7 @@

Structs

Functions

seed -
Resets the generator with a given seed. -
+
Resets the generator with a given seed.
void seed ( RNG& this, int64 newSeed) @@ -5070,8 +4738,7 @@

Functions

getInt32 -
Returns a positive int32 between 0 and 0x7fffffff -
+
Returns a positive int32 between 0 and 0x7fffffff
int32 getInt32 ( RNG& this) @@ -5079,8 +4746,7 @@

Functions

getUnipolar -
Returns a value between 0 and 1. -
+
Returns a value between 0 and 1.
float32 getUnipolar ( RNG& this) @@ -5088,8 +4754,7 @@

Functions

getBipolar -
Returns a value between -1 and 1. -
+
Returns a value between -1 and 1.
float32 getBipolar ( RNG& this) @@ -5097,8 +4762,7 @@

Functions

getFloat -
Returns a floating point value between 0 and maximumValue -
+
Returns a floating point value between 0 and maximumValue
float32 getFloat ( RNG& this, float32 maximumValue) @@ -5117,9 +4781,7 @@

std.timeline

namespace std::timelinecode

-

This namespace contains various types and functions for dealing with tempos, - positions and events that describe DAW-style timelines. -
+

This namespace contains various types and functions for dealing with tempos, positions and events that describe DAW-style timelines.

Structs

struct Tempo @@ -5134,8 +4796,7 @@

Structs

-
+ @@ -5165,10 +4826,7 @@

Structs

struct TransportState -

Indicates whether a host is currently playing or recording. - This struct is intended for purposes like sending as an event into a plugin - to tell it when the host's playback state changes. -
+

Indicates whether a host is currently playing or recording. This struct is intended for purposes like sending as an event into a plugin to tell it when the host's playback state changes.
Type
state
The Lehmer algorithm uses a simple 64-bit state which mutates each time a number is generated. -The Lehmer algorithm uses a simple 64-bit state which mutates each time a number is generated.
bpm
BPM = beats per minute :) -BPM = beats per minute :)
@@ -5180,11 +4838,7 @@

Structs

-
+ @@ -5192,9 +4846,7 @@

Structs

struct Position -

This struct holds data that a host may want to send as an event to a plugin to - update it with various measurements of positions along its timeline. -
+

This struct holds data that a host may want to send as an event to a plugin to update it with various measurements of positions along its timeline.
Type
flags
This is used as a bit-field, where - bit 0 = playing - bit 1 = recording - bit 2 = looping -This is used as a bit-field, where bit 0 = playing bit 1 = recording bit 2 = looping
@@ -5206,8 +4858,7 @@

Structs

-
+ @@ -5217,9 +4868,7 @@

Structs

-
+ @@ -5229,12 +4878,7 @@

Structs

-
+ @@ -5328,14 +4972,7 @@

std.voices

namespace std::voicescode

-

This module demonstrates a simple voice-allocation algorithm. -
The way it's structured is that you pass an incoming stream of note events to - the voice allocator processor, and it redirects them to an array of destination - processors which each handle a single voice. -
The voice allocators use the channel property of the incoming events to group - them together, and take care of ensuring that each target voice only receives - the events from one channel at a time. -
+

This module demonstrates a simple voice-allocation algorithm.
The way it's structured is that you pass an incoming stream of note events to the voice allocator processor, and it redirects them to an array of destination processors which each handle a single voice.
The voice allocators use the channel property of the incoming events to group them together, and take care of ensuring that each target voice only receives the events from one channel at a time.

processor std::voices::VoiceAllocator

@@ -5343,12 +4980,7 @@

processor std::voices::VoiceAllocator

processor std::voices::VoiceAllocator (int32 numVoices,
int32 MPEMasterChannel = 0)
-
A basic least-recently-used voice allocator. -
If there's an inactive voice, then a new note will be assigned to it, - otherwise it will steal the least-recently-used active voice. For more - fancy note-stealing algorithms, you can use this as an example and add - your own logic! -
+
A basic least-recently-used voice allocator.
If there's an inactive voice, then a new note will be assigned to it, otherwise it will steal the least-recently-used active voice. For more fancy note-stealing algorithms, you can use this as an example and add your own logic!

Endpoints

    @@ -5532,8 +5164,7 @@

    Functions

isSustainActive -
one per bit (assumes that channel IDs are <64, and could be made more general) -
+
one per bit (assumes that channel IDs are <64, and could be made more general)
bool isSustainActive (int32 channel)
Type
frameIndex
The frame index, from the start of the host's timeline. -The frame index, from the start of the host's timeline.
quarterNote
A floating-point count of quarter-notes from the start of the host's timeline. - If a host doesn't count time in terms of beats, then this could be left as 0. -A floating-point count of quarter-notes from the start of the host's timeline. If a host doesn't count time in terms of beats, then this could be left as 0.
barStartQuarterNote
The position of the start of the current bar, measured as the number of - quarter-notes from the start of the host's timeline. - If a host doesn't count time in terms of beats, then this could be left as 0. - This is useful in conjunction with quarterNote if you need to know e.g. how many - beats you are into the current bar. -The position of the start of the current bar, measured as the number of quarter-notes from the start of the host's timeline. If a host doesn't count time in terms of beats, then this could be left as 0. This is useful in conjunction with quarterNote if you need to know e.g. how many beats you are into the current bar.