Live Input
8 nodes
On this page 8
Default Recording Device
FunctionThe recording device the system uses when none is named.
DefaultRecordingDevice() -> Text
string DefaultRecordingDevice()
Returns
| Device | Text |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Live Input
- Package
- Audio Processing
Listen Live
FunctionPlays a stereo signal live for some seconds, then stops, and says how it went: how much delay it added, how busy the machine was, and whether the input ever ran dry.
Listen -> Text
stereo: Stereo Signal
seconds: Number
blockFrames: Integerstring Listen(
StereoSignal stereo,
double seconds = 10,
int blockFrames = 256)Parameters
| name | type | default | description |
|---|---|---|---|
| stereo | Stereo Signal | — | What is played. |
| seconds | Number | 10 | How long, 0 to 3600. |
| blockFrames | Integer | 256 | Frames the device renders at a time, 32 to 16384. |
Returns
| Report | Text |
Remarks
Waits until it has finished, so a program can carry on afterwards. 0 seconds plays nothing. Use headphones when a Microphone is in it.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Live Input
- Package
- Audio Processing
Measure Live Latency
FunctionMeasures how late a live input is heard on this machine: plays clicks through the speakers, listens for them through a recording device, and times each round trip.
MeasureLatency -> Live Latency
device: Text
clicks: Integer
blockFrames: Integer
cushion: NumberLiveLatency MeasureLatency(
string device = "",
int clicks = 10,
int blockFrames = 256,
double cushion = 0.01)Parameters
| name | type | default | description |
|---|---|---|---|
| device | Text | — | A name from Recording Devices; empty for the default. |
| clicks | Integer | 10 | How many clicks, half a second apart, 1 to 1000. |
| blockFrames | Integer | 256 | The output's block, as Start Live Signal would use it. |
| cushion | Number | 0.01 | Microphone's cushion, as a live signal would use it. |
Returns
| Latency | Live Latency |
Remarks
The round trip is the delay between speaking into a Microphone and hearing it from Start Live Signal, plus the air between speaker and microphone. Hold the microphone near the speakers, or a headphone against it, and keep the room quiet; the median and range are of the clicks heard back.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Live Input
- Package
- Audio Processing
Microphone
FunctionWhat a recording device hears, as a signal: wire it through effects and into Start Live Signal to hear yourself through them as you speak or play.
Microphone(device: Text, cushion: Number) -> Signal
Signal Microphone(string device = "", double cushion = 0.01)
Parameters
| name | type | default | description |
|---|---|---|---|
| device | Text | — | A name from Recording Devices; empty for the default. |
| cushion | Number | 0.01 | Seconds kept waiting, 0 to 0.5. |
Returns
| Signal | Signal |
Remarks
Silent until a live session opens the device, so a chain rendered offline hears nothing from it. Cushion is the sound kept waiting so the device never runs dry between its chunks: lower is heard sooner, higher survives a busier machine.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Live Input
- Package
- Audio Processing
Recording Devices
FunctionThe recording devices on this machine, by name: a built-in microphone, a headset, an audio interface's inputs. Any of these names goes in Microphone's Device.
RecordingDevices() -> Text Array
string[] RecordingDevices()
Returns
| Devices | Text Array |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Live Input
- Package
- Audio Processing
Start Live Signal
FunctionPlays a signal live on the audio device, opening the recording device of every Microphone in it, until Stop Live Signal.
Start -> Live Signal Session
signal: Signal
blockFrames: Integer
record: Truth
sampleRate: IntegerLiveSignalSession Start(
Signal signal,
int blockFrames = 256,
bool record = false,
int sampleRate = 44100)Parameters
| name | type | default | description |
|---|---|---|---|
| signal | Signal | — | What is played, on both sides. |
| blockFrames | Integer | 256 | Frames the device renders at a time, 32 to 16384; 256 is 5.8 ms at 44.1 kHz, and the device is asked for a buffer the same size. Raise it if the sound breaks up. |
| record | Truth | False | Whether to keep what is played, for Stop Live Signal to hand back. |
| sampleRate | Integer | 44100 | The rate to run at. |
Returns
| Session | Live Signal Session |
Remarks
Use headphones when a Microphone is in it: through speakers, the microphone hears its own sound come back and howls.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Live Input
- Package
- Audio Processing
Start Live Stereo
FunctionPlays a stereo signal live on the audio device - a panned voice, a stereo reverb or chorus - until Stop Live Signal.
StartStereo -> Live Signal Session
stereo: Stereo Signal
blockFrames: Integer
record: Truth
sampleRate: IntegerLiveSignalSession StartStereo(
StereoSignal stereo,
int blockFrames = 256,
bool record = false,
int sampleRate = 44100)Parameters
| name | type | default | description |
|---|---|---|---|
| stereo | Stereo Signal | — | What is played. |
| blockFrames | Integer | 256 | Frames the device renders at a time, 32 to 16384. |
| record | Truth | False | Whether to keep what is played, for Stop Live Signal to hand back. |
| sampleRate | Integer | 44100 | The rate to run at. |
Returns
| Session | Live Signal Session |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Live Input
- Package
- Audio Processing
Stop Live Signal
FunctionStops a live signal and closes its devices.
Stop(session: Live Signal Session) -> AudioBuffer
AudioBuffer Stop(LiveSignalSession session)
Parameters
| name | type | default | description |
|---|---|---|---|
| session | Live Signal Session | — | The session. |
Returns
| Audio | AudioBuffer |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Live Input
- Package
- Audio Processing