powerful class for sequencing. Function executed a given code with a rate defined by timing variable and by pdsp::Engine sequencer tempo. Into the executed assignable lambda you can send out triggers or value messages to the pdsp::Function outputs
More...
#include <Function.h>
|
pdsp::SequencerGateOutput & | out_trig (std::string name) |
| get a trigger output for the given name. More...
|
|
pdsp::SequencerGateOutput & | out_trig (int number) |
| get a trigger output for the given name. More...
|
|
pdsp::SequencerValueOutput & | out_value (std::string name) |
| get a value output for the given name. More...
|
|
pdsp::SequencerValueOutput & | out_value (int number) |
| get a value output for the given name. More...
|
|
void | send (std::string name, float value) noexcept |
| use this method inside the assigned code to send a value to a given output name More...
|
|
void | send (int number, float value) noexcept |
| use this method inside the assigned code to send a value to a given output number id More...
|
|
int | frame () |
| returns the playback timepoint in bars, multiplied by the timing, as integer.
|
|
float | urand () |
| internal random, returns a value from 0.0f to 1.0f ( included ).
|
|
float | brand () |
| internal random, returns a value from -1.0f to 1.0f ( included ).
|
|
int | dice (int max) |
| internal random, returns value from 0 to max-1 More...
|
|
bool | chance (float probablility) |
| randomly returns true of false, with the argument setting the chance of being "true". More...
|
|
|
std::function< void()> | code |
| this lambda function is executed each step, at the timing assigned to the class. Assign your own functions to it. The step number is passed to the function as int value. Remember that this function will be executed into the audio-thread so the access to some variable used also into the main thread could cause race conditions.
|
|
std::atomic< int > | timing |
| timing for the function frames, defaults to 16 ( 1/16th of a bar ). Thread-safe to set.
|
|
std::atomic< bool > | active |
| enable / disable exectution of lambda, true by default, Thread-safe to set.
|
|
powerful class for sequencing. Function executed a given code with a rate defined by timing variable and by pdsp::Engine sequencer tempo. Into the executed assignable lambda you can send out triggers or value messages to the pdsp::Function outputs
◆ chance()
bool pdsp::Function::chance |
( |
float |
probablility | ) |
|
randomly returns true of false, with the argument setting the chance of being "true".
- Parameters
-
[in] | probablility | chance of output being true |
◆ dice()
int pdsp::Function::dice |
( |
int |
max | ) |
|
internal random, returns value from 0 to max-1
- Parameters
-
◆ out_trig() [1/2]
get a trigger output for the given name.
- Parameters
-
◆ out_trig() [2/2]
get a trigger output for the given name.
- Parameters
-
[in] | number | output number id |
◆ out_value() [1/2]
get a value output for the given name.
- Parameters
-
◆ out_value() [2/2]
get a value output for the given name.
- Parameters
-
[in] | number | output number id |
◆ send() [1/2]
void pdsp::Function::send |
( |
std::string |
name, |
|
|
float |
value |
|
) |
| |
|
noexcept |
use this method inside the assigned code to send a value to a given output name
- Parameters
-
[in] | name | output name |
[in] | value | value to send |
◆ send() [2/2]
void pdsp::Function::send |
( |
int |
number, |
|
|
float |
value |
|
) |
| |
|
noexcept |
use this method inside the assigned code to send a value to a given output number id
- Parameters
-
[in] | name | output name |
[in] | value | value to send |
The documentation for this class was generated from the following files: