Rendering
14 nodes
On this page 14
Default Sample Rate
FunctionThe rate everything renders at unless asked otherwise.
DefaultSampleRate() -> Integer
int DefaultSampleRate()
Returns
| result | Integer |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Rendering
- Package
- Music
Music Styles
FunctionThe styles Render Generated Music composes in.
MusicStyles() -> Text Array
string[] MusicStyles()
Returns
| Styles | Text Array |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Rendering
- Package
- Music
Render Generated Music
FunctionComposes a piece in a style and renders it through a SoundFont.
RenderGeneratedMusic -> AudioBuffer
style: Text
length: MusicLength
seed: Integer
seconds: Number
soundFont: Sound Font Bank
sampleRate: IntegerAudioBuffer RenderGeneratedMusic(
string style = "Cinematic",
MusicLength length = MusicLength.Short,
int seed = 1,
double seconds = 0,
SoundFontBank soundFont,
int sampleRate = 44100)Parameters
| name | type | default | description |
|---|---|---|---|
| style | Text | Cinematic | A style from Music Styles, such as Cinematic, BattleDrive or Ambient. |
| length | MusicLength | Short | The shape: a stinger, a short piece, a full song, or a seamless loop. |
| seed | Integer | 1 | Which piece; the same seed always composes the same one. |
| seconds | Number | 0 | About how long it should run; zero lets the style decide. |
| soundFont | Sound Font Bank | — | The font; the default General MIDI one when not connected. |
| sampleRate | Integer | 44100 | Output rate. |
Returns
| Audio | AudioBuffer |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Rendering
- Package
- Music
Render MIDI
FunctionRenders a MIDI document built in the graph through a SoundFont.
RenderMidi -> AudioBuffer
MIDI: MidiDocument
soundFont: Sound Font Bank
tail: Number
sampleRate: IntegerAudioBuffer RenderMidi(
MidiDocument midi,
SoundFontBank soundFont,
double tail = 2,
int sampleRate = 44100)Parameters
| name | type | default | description |
|---|---|---|---|
| MIDI | MidiDocument | — | The document. |
| soundFont | Sound Font Bank | — | The font; the default General MIDI one when not connected. |
| tail | Number | 2 | Seconds rendered after the last event. |
| sampleRate | Integer | 44100 | Output rate. |
Returns
| Audio | AudioBuffer |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Rendering
- Package
- Music
Render MIDI Bytes
FunctionRenders a Standard MIDI File already in memory through a SoundFont.
RenderMidiBytes -> AudioBuffer
bytes: Byte Array
soundFont: Sound Font Bank
tail: Number
sampleRate: IntegerAudioBuffer RenderMidiBytes(
byte[] bytes,
SoundFontBank soundFont,
double tail = 2,
int sampleRate = 44100)Parameters
| name | type | default | description |
|---|---|---|---|
| bytes | Byte Array | — | The whole .mid file. |
| soundFont | Sound Font Bank | — | The font; the default General MIDI one when not connected. |
| tail | Number | 2 | Seconds rendered after the last event. |
| sampleRate | Integer | 44100 | Output rate. |
Returns
| Audio | AudioBuffer |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Rendering
- Package
- Music
Render MIDI On FM Chip
FunctionRenders a MIDI document built in the graph on an emulated OPL FM chip.
RenderMidiDocumentOnFm -> AudioBuffer
MIDI: MidiDocument
chip: OplChipType
sampleRate: IntegerAudioBuffer RenderMidiDocumentOnFm(
MidiDocument midi,
OplChipType chip = OplChipType.Opl3,
int sampleRate = 44100)Parameters
| name | type | default | description |
|---|---|---|---|
| MIDI | MidiDocument | — | The document. |
| chip | OplChipType | Opl3 | OPL2 (mono) or OPL3 (stereo). |
| sampleRate | Integer | 44100 | Output rate. |
Returns
| Audio | AudioBuffer |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Rendering
- Package
- Music
Render MIDI File
FunctionRenders a Standard MIDI File through a SoundFont.
RenderMidiFile -> AudioBuffer
path: Text
soundFont: Sound Font Bank
tail: Number
sampleRate: IntegerAudioBuffer RenderMidiFile(
string path,
SoundFontBank soundFont,
double tail = 2,
int sampleRate = 44100)Parameters
| name | type | default | description |
|---|---|---|---|
| path | Text | — | A .mid file. |
| soundFont | Sound Font Bank | — | The font; the default General MIDI one when not connected. |
| tail | Number | 2 | Seconds rendered after the last event, so the last notes ring out. |
| sampleRate | Integer | 44100 | Output rate. |
Returns
| Audio | AudioBuffer |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Rendering
- Package
- Music
Render MIDI On FM
FunctionRenders a Standard MIDI File on an emulated Yamaha OPL FM chip - the sound of 1990s PC games - with its General MIDI instrument bank. Nothing is sampled: every note is two sine-wave operators, one modulating the other.
RenderMidiOnFm -> AudioBuffer
bytes: Byte Array
chip: OplChipType
sampleRate: IntegerAudioBuffer RenderMidiOnFm(
byte[] bytes,
OplChipType chip = OplChipType.Opl3,
int sampleRate = 44100)Parameters
| name | type | default | description |
|---|---|---|---|
| bytes | Byte Array | — | The whole .mid file. |
| chip | OplChipType | Opl3 | OPL2 (nine voices, mono) or OPL3 (eighteen voices, stereo). |
| sampleRate | Integer | 44100 | Output rate. |
Returns
| Audio | AudioBuffer |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Rendering
- Package
- Music
Render Music
FunctionRenders music written with the Euterpea nodes through a SoundFont: every instrument it names, drums on the General MIDI kit.
RenderMusic -> AudioBuffer
music: Music
soundFont: Sound Font Bank
beatsPerMinute: Number
tail: Number
sampleRate: IntegerAudioBuffer RenderMusic(
Music music,
SoundFontBank soundFont,
double beatsPerMinute = 120,
double tail = 2,
int sampleRate = 44100)Parameters
| name | type | default | description |
|---|---|---|---|
| music | Music | — | The music. |
| soundFont | Sound Font Bank | — | The font; the default General MIDI one when not connected. |
| beatsPerMinute | Number | 120 | Quarter notes a minute; a Tempo node inside the music speeds its part further. |
| tail | Number | 2 | Seconds rendered after the last note, so it rings out. |
| sampleRate | Integer | 44100 | Output rate. |
Returns
| Audio | AudioBuffer |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Rendering
- Package
- Music
Render Music On FM
FunctionRenders music written with the Euterpea nodes on an emulated OPL FM chip.
RenderMusicOnFm -> AudioBuffer
music: Music
beatsPerMinute: Number
chip: OplChipType
sampleRate: IntegerAudioBuffer RenderMusicOnFm(
Music music,
double beatsPerMinute = 120,
OplChipType chip = OplChipType.Opl3,
int sampleRate = 44100)Parameters
| name | type | default | description |
|---|---|---|---|
| music | Music | — | The music. |
| beatsPerMinute | Number | 120 | Quarter notes a minute. |
| chip | OplChipType | Opl3 | OPL2 (mono) or OPL3 (stereo). |
| sampleRate | Integer | 44100 | Output rate. |
Returns
| Audio | AudioBuffer |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Rendering
- Package
- Music
Render Note
FunctionOne note played on one SoundFont preset: pressed, held, then released and left to ring.
RenderNote -> AudioBuffer
soundFont: Sound Font Bank
program: Integer
key: Integer
velocity: Integer
duration: Number
release: Number
bank: Integer
sampleRate: IntegerAudioBuffer RenderNote(
SoundFontBank soundFont,
int program = 0,
int key = 60,
int velocity = 100,
double duration = 1,
double release = 1,
int bank = 0,
int sampleRate = 44100)Parameters
| name | type | default | description |
|---|---|---|---|
| soundFont | Sound Font Bank | — | The font; the default General MIDI one when not connected. |
| program | Integer | 0 | The instrument: 0 is the piano, 24 nylon guitar, 40 violin, 56 trumpet, 73 flute in General MIDI. For a drum kit, the kit. |
| key | Integer | 60 | MIDI key: 60 is middle C, 69 the A above it. For a drum kit the key is the drum: 36 kick, 38 snare, 42 closed hi-hat. |
| velocity | Integer | 100 | How hard the key is struck, 1 to 127. |
| duration | Number | 1 | Seconds the key is held. |
| release | Number | 1 | Seconds rendered after it is let go. |
| bank | Integer | 0 | 0 for melodic sounds, 128 for drum kits. |
| sampleRate | Integer | 44100 | Output rate. |
Returns
| Audio | AudioBuffer |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Rendering
- Package
- Music
Render Preset Note
FunctionOne note played on a preset found with Find Preset or Presets.
RenderPresetNote -> AudioBuffer
preset: Sound Font Preset
soundFont: Sound Font Bank
key: Integer
velocity: Integer
duration: Number
release: NumberAudioBuffer RenderPresetNote(
SoundFontPreset preset,
SoundFontBank soundFont,
int key = 60,
int velocity = 100,
double duration = 1,
double release = 1)Parameters
| name | type | default | description |
|---|---|---|---|
| preset | Sound Font Preset | — | The preset to play. |
| soundFont | Sound Font Bank | — | The font the preset belongs to; the default one when not connected. |
| key | Integer | 60 | MIDI key, 60 is middle C. |
| velocity | Integer | 100 | How hard the key is struck, 1 to 127. |
| duration | Number | 1 | Seconds the key is held. |
| release | Number | 1 | Seconds rendered after it is let go. |
Returns
| Audio | AudioBuffer |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Rendering
- Package
- Music
Render Score
FunctionRenders a score sheet through a SoundFont: every part on its instrument, drums on the drum channel, vocal samples mixed in where the score places them.
RenderScore -> AudioBuffer
score: Musical Score
soundFont: Sound Font Bank
sampleRate: IntegerAudioBuffer RenderScore(
FScoreSheet score,
SoundFontBank soundFont,
int sampleRate = 44100)Parameters
| name | type | default | description |
|---|---|---|---|
| score | Musical Score | — | The score, from Parse. |
| soundFont | Sound Font Bank | — | The font; the default General MIDI one when not connected. |
| sampleRate | Integer | 44100 | Output rate. |
Returns
| Audio | AudioBuffer |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Rendering
- Package
- Music
Render Score Text
FunctionRenders a score written in Cantus numbered notation, such as [C C G G] [A A G/2], through a SoundFont.
RenderScoreText -> AudioBuffer
score: Text
soundFont: Sound Font Bank
sampleRate: IntegerAudioBuffer RenderScoreText(
string score = "[C C G G] [A A G/2] [F F E E] [D D C/2]",
SoundFontBank soundFont,
int sampleRate = 44100)Parameters
| name | type | default | description |
|---|---|---|---|
| score | Text | [C C G G] [A A G/2] [F F E E] [D D C/2] | The score text. |
| soundFont | Sound Font Bank | — | The font; the default General MIDI one when not connected. |
| sampleRate | Integer | 44100 | Output rate. |
Returns
| Audio | AudioBuffer |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Rendering
- Package
- Music