Rendering

Rendering a signal to samples, saving to a file and reading raw float32 from a file. For more support, use FileIO, WAV and such modules.

render renders to a buffer in memory, Synth.write writes to a raw audio file and read_rawaudio reads in a raw float32 sample file into a buffer for playback.

Synth.renderFunction
render(s :: Signal, dur_secs; samplingrate=48000, normalize=false, maxamp=0.5)
render(s :: Stereo{L,R}, dur_secs; samplingrate=48000) where {L <: Signal, R <: Signal}

Renders the given signal to a flat Vector{Float32}, over the given dur_secs. If the signal terminates before the duration is up, the result is truncated accordingly. These functions return SampleBuf from SampledSignals package.

source
Synth.writeFunction
write(filename :: AbstractString, model::Signal, duration_secs :: AbstractFloat; samplingrate=48000, maxamp=0.5)

Renders and writes raw Float32 values to the given file.

source
Synth.read_rawaudioFunction
read_rawaudio(filename :: AbstractString)

Reads raw Float32 values from the given file into a Vector{Float32} that can then be used with sample or wavetable.

source