Recorder Node
Records the audio arriving on its input bus. While recording, audio is buffered to a temporary file; the stop action writes it to outputFilePath as a Wav file.
Configuration
numberOfRecordedChannels
Type: Int
Default: 2
Minimum: 1
Number of channels to record. Must match the channel count of the input bus, otherwise the bus format is rejected.
recordingSampleRate
Type: Int
Default: 0
Minimum: 0
The sample rate of the saved file. Incoming audio is resampled when it arrives at a different rate. 0 uses the sample rate of the input bus.
Properties
Inherits properties from its parents, Node, SwitchboardObject.
isRealTime
Type: Boolean
Default: true
When true, recorded audio is written to the temporary file on a background thread about once a second, keeping file access off the audio thread. When false, it is written on the audio thread as it arrives. Only change it while not recording.
isRecording (Read only)
Type: Boolean
Whether a recording is in progress, from the start action until the stop action.
outputFilePath
Type: String
Default: "@output/recording.wav"
The path the recording is written to when stop is called. The file is always encoded as Wav, whatever its extension. Path aliases such as @output are resolved.
Actions
Inherits actions from its parent, SwitchboardObject.
start
Starts recording the incoming audio. Does nothing if a recording is already in progress.
Parameters
None.
Return Value
Boolean — true on success.
stop
Stops the recording and writes it to outputFilePath as a Wav file.
Parameters
None.
Return Value
Boolean — Always true, even if the file could not be written; save errors are only logged.
Events
This object does not provide any events.