Divooka Reference

Live Input

8 nodes

On this page 8

Default Recording Device

Function

The recording device the system uses when none is named.

Signature
DefaultRecordingDevice() -> Text
string DefaultRecordingDevice()

Returns

DeviceText
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Live Input
Package
Audio Processing

Listen Live

Function

Plays 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.

Signature
Listen -> Text
    stereo: Stereo Signal
    seconds: Number
    blockFrames: Integer
string Listen(
    StereoSignal stereo,
    double seconds = 10,
    int blockFrames = 256)

Parameters

nametypedefaultdescription
stereoStereo Signal—What is played.
secondsNumber10How long, 0 to 3600.
blockFramesInteger256Frames the device renders at a time, 32 to 16384.

Returns

ReportText

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

Function

Measures 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.

Signature
MeasureLatency -> Live Latency
    device: Text
    clicks: Integer
    blockFrames: Integer
    cushion: Number
LiveLatency MeasureLatency(
    string device = "",
    int clicks = 10,
    int blockFrames = 256,
    double cushion = 0.01)

Parameters

nametypedefaultdescription
deviceText—A name from Recording Devices; empty for the default.
clicksInteger10How many clicks, half a second apart, 1 to 1000.
blockFramesInteger256The output's block, as Start Live Signal would use it.
cushionNumber0.01Microphone's cushion, as a live signal would use it.

Returns

LatencyLive 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

Function

What 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.

Signature
Microphone(device: Text, cushion: Number) -> Signal
Signal Microphone(string device = "", double cushion = 0.01)

Parameters

nametypedefaultdescription
deviceText—A name from Recording Devices; empty for the default.
cushionNumber0.01Seconds kept waiting, 0 to 0.5.

Returns

SignalSignal

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

Function

The 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.

Signature
RecordingDevices() -> Text Array
string[] RecordingDevices()

Returns

DevicesText Array
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Live Input
Package
Audio Processing

Start Live Signal

Function

Plays a signal live on the audio device, opening the recording device of every Microphone in it, until Stop Live Signal.

Signature
Start -> Live Signal Session
    signal: Signal
    blockFrames: Integer
    record: Truth
    sampleRate: Integer
LiveSignalSession Start(
    Signal signal,
    int blockFrames = 256,
    bool record = false,
    int sampleRate = 44100)

Parameters

nametypedefaultdescription
signalSignal—What is played, on both sides.
blockFramesInteger256Frames 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.
recordTruthFalseWhether to keep what is played, for Stop Live Signal to hand back.
sampleRateInteger44100The rate to run at.

Returns

SessionLive 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

Function

Plays a stereo signal live on the audio device - a panned voice, a stereo reverb or chorus - until Stop Live Signal.

Signature
StartStereo -> Live Signal Session
    stereo: Stereo Signal
    blockFrames: Integer
    record: Truth
    sampleRate: Integer
LiveSignalSession StartStereo(
    StereoSignal stereo,
    int blockFrames = 256,
    bool record = false,
    int sampleRate = 44100)

Parameters

nametypedefaultdescription
stereoStereo Signal—What is played.
blockFramesInteger256Frames the device renders at a time, 32 to 16384.
recordTruthFalseWhether to keep what is played, for Stop Live Signal to hand back.
sampleRateInteger44100The rate to run at.

Returns

SessionLive 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

Function

Stops a live signal and closes its devices.

Signature
Stop(session: Live Signal Session) -> AudioBuffer
AudioBuffer Stop(LiveSignalSession session)

Parameters

nametypedefaultdescription
sessionLive Signal Session—The session.

Returns

AudioAudioBuffer
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Live Input
Package
Audio Processing