Methods list
Sound.SoundSound.get_default_input_deviceSound.get_default_output_deviceSound.pick_outputSound.recordSound.soundSound.soundSound.soundSound.soundSound.soundSound.soundscSound.soundsc
Methods usage
Sound.Sound — ModuleSoundModule that exports wrappers around audio methods in PortAudio.
soundandsoundsc: methods for audio playback.record: method for audio recording.
Sound.get_default_input_device — Methodget_default_input_device()Determine current system-wide default input audio device.
Sound.get_default_output_device — Methodget_default_output_device()Determine current system-wide default output audio device.
Sound.pick_output — Methodpick_output( ; io_in::IO = stdin, io_out::IO = stdout)Show available audio devices and prompt user to select output device.
Sound.record — Functiondata, S = record(time::Real = 5; input_device, args=(1,0), chat::Bool=true)Record time seconds of audio data using input_device (typically defaults to the built-in microphone).
Input
time: duration; 5 seconds by default
Option
input_device::PortAudioDevice = get_default_input_device()system defaultargs: arguments to PortAudioStream;(1,0)for single-channel input by defaultchat: show begin/end message?trueby default
Output
data: Vector of lengthtime * SS:sample_rateof input stream
Sound.sound — Functionsound(x::AbstractVector, S::Real = framerate(x), args...; kwargs...)Play monophonic audio signal x at sampling rate S samples per second through default audio output device using the PortAudio package. Caller must specify S unless a framerate method is defined for x.
Sound.sound — Functionsound(output_device_index::Int, x, S::Real = framerate(x); kwargs...)Play sound in x using devices()[output_device_index].
Sound.sound — Functionsound(x::AbstractMatrix, S::Real = framerate(x) [, output_device])Play stereo audio signal x at sampling rate S samples per second through default audio output device using the PortAudio package. Caller must specify S unless a framerate method is defined for x.
Sound.sound — Functionsound(:pick, x, S::Real = framerate(x); kwargs...)Prompt user to pick output device, then play sound in x.
Sound.sound — Methodsound(sb::SampleBuf)Play audio signal sb of type SampleBuf through default audio output device using the PortAudio package.
Sound.soundsc — Functionsoundsc(x, S::Real = framerate(x), args...; kwargs...)Call sound after scaling x to have values in (-1,1).
Sound.soundsc — Methodsoundsc(sb::SampleBuf)Play audio signal sb of type SampleBuf through default audio output device using the PortAudio package, after scaling the data to have values in (-1,1).