"Our sound isn't hardcore, breakcore or speedcore - it's multi-core and fully hyper-threaded."
arr = my_synth_alg()::Array{Float32} play(arr)
arr = my_synth_alg()::Array{Int16} play(arr)
function play{T <: Signed}(arr::Array{T}, args...) arr = arr / typemax(T) play(arr, args...) end
function play(arr::AudioBuf, args...) player = ArrayPlayer(arr) play(player, args...) end
function play(node::AudioNode) global _stream if _stream == nothing _stream = PortAudioStream() end play(node, _stream) end
function play(node::AudioNode, stream::AudioStream) push!(stream.root, node) return node end
play(SinOsc(440))
play(WhiteNoise())
type AudioNode{T<:AudioRenderer} active::Bool end_cond::Condition renderer::T AudioNode(renderer::AudioRenderer) = new(true, Condition(), renderer) AudioNode(args...) = AudioNode{T}(T(args...)) end
type AudioNode{T<:AudioRenderer}
active::Bool end_cond::Condition
renderer::T AudioNode(renderer::AudioRenderer) = new(true, Condition(), renderer) AudioNode(args...) = AudioNode{T}(T(args...)) end
type AudioNode{T<:AudioRenderer} active::Bool end_cond::Condition
renderer::T
AudioNode(renderer::AudioRenderer) = new(true, Condition(), renderer) AudioNode(args...) = AudioNode{T}(T(args...)) end
type AudioNode{T<:AudioRenderer} active::Bool end_cond::Condition renderer::T
AudioNode(renderer::AudioRenderer) = new(true, Condition(), renderer)
AudioNode(args...) = AudioNode{T}(T(args...)) end
type AudioNode{T<:AudioRenderer} active::Bool end_cond::Condition renderer::T AudioNode(renderer::AudioRenderer) = new(true, Condition(), renderer)
AudioNode(args...) = AudioNode{T}(T(args...))
end
type MixRenderer <: AudioRenderer inputs::Vector{AudioNode} buf::AudioBuf MixRenderer(inputs) = new(inputs, AudioSample[]) MixRenderer() = MixRenderer(AudioNode[]) end typealias AudioMixer AudioNode{MixRenderer} export AudioMixer function render(node::MixRenderer, device_input::AudioBuf, info::DeviceInfo) ...
type MixRenderer <: AudioRenderer
inputs::Vector{AudioNode} buf::AudioBuf
_ MixRenderer(inputs) = new(inputs, AudioSample[]) MixRenderer() = MixRenderer(AudioNode[]) end typealias AudioMixer AudioNode{MixRenderer} export AudioMixer function render(node::MixRenderer, device_input::AudioBuf, info::DeviceInfo) ...
type MixRenderer <: AudioRenderer inputs::Vector{AudioNode} buf::AudioBuf _
MixRenderer(inputs) = new(inputs, AudioSample[]) MixRenderer() = MixRenderer(AudioNode[])
end typealias AudioMixer AudioNode{MixRenderer} export AudioMixer function render(node::MixRenderer, device_input::AudioBuf, info::DeviceInfo) ...
type MixRenderer <: AudioRenderer inputs::Vector{AudioNode} buf::AudioBuf MixRenderer(inputs) = new(inputs, AudioSample[]) MixRenderer() = MixRenderer(AudioNode[]) end _
typealias AudioMixer AudioNode{MixRenderer} export AudioMixer
_ function render(node::MixRenderer, device_input::AudioBuf, info::DeviceInfo) ...
type MixRenderer <: AudioRenderer inputs::Vector{AudioNode} buf::AudioBuf MixRenderer(inputs) = new(inputs, AudioSample[]) MixRenderer() = MixRenderer(AudioNode[]) end typealias AudioMixer AudioNode{MixRenderer} export AudioMixer _
function render(node::MixRenderer, device_input::AudioBuf, info::DeviceInfo) ...
SinOsc(440)
SinOsc(SinOsc(2))
SinOsc(SinOsc(2) * 10 + 440)
type SinOscRenderer{ T<:Union(Float32, AudioNode)} <: AudioRenderer freq::T phase::Float32 buf::AudioBuf end
function render(node::SinOscRenderer{Float32}, device_input::AudioBuf, info::DeviceInfo)
function render(node::SinOscRenderer{AudioNode}, device_input::AudioBuf, info::DeviceInfo)