Format
8 nodes
On this page 8
Change Speed
FunctionPlays a clip faster or slower, the way a tape or a record does - pitch and tempo change together.
ChangeSpeed(audio: AudioBuffer, factor: Number) -> AudioBuffer
AudioBuffer ChangeSpeed(AudioBuffer audio, double factor = 1.5)
Parameters
| name | type | default | description |
|---|---|---|---|
| audio | AudioBuffer | — | The clip to change. |
| factor | Number | 1.5 | How much faster: above 1 speeds up, below 1 slows down. |
Returns
| Audio | AudioBuffer |
Remarks
A factor of 2 is twice as fast and an octave higher; 0.5 is half speed and an octave lower.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Format
- Package
- Audio Processing
From Samples
FunctionA one-channel clip made from an array of numbers from -1 to 1, one per sample.
FromSamples -> AudioBuffer
samples: Number Array
sampleRate: IntegerAudioBuffer FromSamples(
double[] samples,
int sampleRate = 44100)Parameters
| name | type | default | description |
|---|---|---|---|
| samples | Number Array | — | The samples, in order. |
| sampleRate | Integer | 44100 | How many of them make a second. |
Returns
| Audio | AudioBuffer |
Remarks
Values beyond -1 and 1 are clipped when the clip is stored.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Format
- Package
- Audio Processing
Pan
FunctionPlaces a clip between the left and right speakers.
Pan(audio: AudioBuffer, position: Number) -> AudioBuffer
AudioBuffer Pan(AudioBuffer audio, double position = 0)
Parameters
| name | type | default | description |
|---|---|---|---|
| audio | AudioBuffer | — | The clip to place. |
| position | Number | 0 | -1 is fully left, 0 the centre, 1 fully right. |
Returns
| Audio | AudioBuffer |
Remarks
A mono clip is panned at constant power - at the centre each side is 3 dB down, so it sounds as loud wherever it is placed. A stereo clip is balanced instead: the side it moves away from is turned down and the near side is left alone, so at the centre it passes through unchanged.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Format
- Package
- Audio Processing
Resample
FunctionConverts a clip to another sample rate without changing how it sounds.
Resample(audio: AudioBuffer, sampleRate: Integer) -> AudioBuffer
AudioBuffer Resample(AudioBuffer audio, int sampleRate = 48000)
Parameters
| name | type | default | description |
|---|---|---|---|
| audio | AudioBuffer | — | The clip to convert. |
| sampleRate | Integer | 48000 | The new number of samples per second. |
Returns
| Audio | AudioBuffer |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Format
- Package
- Audio Processing
To Mono
FunctionMixes every channel of a clip down to one.
ToMono(audio: AudioBuffer) -> AudioBuffer
AudioBuffer ToMono(AudioBuffer audio)
Parameters
| name | type | default | description |
|---|---|---|---|
| audio | AudioBuffer | — | The clip to mix down. |
Returns
| Audio | AudioBuffer |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Format
- Package
- Audio Processing
To Samples
FunctionOne channel of a clip as an array of numbers from -1 to 1, one per sample - for arithmetic the toolbox has no node for.
ToSamples(audio: AudioBuffer, channel: Integer) -> Number Array
double[] ToSamples(AudioBuffer audio, int channel = 0)
Parameters
| name | type | default | description |
|---|---|---|---|
| audio | AudioBuffer | — | The clip to read. |
| channel | Integer | 0 | Which channel, counting from 0; 0 is the left of a stereo clip. |
Returns
| Samples | Number Array |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Format
- Package
- Audio Processing
To Standard
FunctionConverts a clip to the platform's standard 44.1 kHz stereo segment, which some other toolboxes ask for.
ToStandard(audio: AudioBuffer) -> StandardAudioSegment
StandardAudioSegment ToStandard(AudioBuffer audio)
Parameters
| name | type | default | description |
|---|---|---|---|
| audio | AudioBuffer | — | The clip to convert. |
Returns
| Audio | StandardAudioSegment |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Format
- Package
- Audio Processing
To Stereo
FunctionGives a clip two channels: a mono clip is heard equally on both sides, and a clip with more than two keeps its first two.
ToStereo(audio: AudioBuffer) -> AudioBuffer
AudioBuffer ToStereo(AudioBuffer audio)
Parameters
| name | type | default | description |
|---|---|---|---|
| audio | AudioBuffer | — | The clip to convert. |
Returns
| Audio | AudioBuffer |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Format
- Package
- Audio Processing