RealTimeAudioDiffEq.jl

A Julia package for real-time audification of ODEs and SDEs
Author antonioortegabrook
Popularity
7 Stars
Updated Last
2 Months Ago
Started In
June 2024

RealTimeAudioDiffEq

Build Status

A simple Julia package for real-time audification of ODEs and SDEs

Install:

import Pkg
Pkg.add("https://github.com/antonioortegabrook/RealTimeAudioDiffEq.jl")

Usage example:

function duffing!(du, u, p, t)
    du[1] = u[2]
    du[2] = -p[1] * u[2] + u[1] * (p[2] - u[1] * u[1]) + p[3] * cos(p[4] * t)
end

u0 = [0.1, 0.]
p = [0.15, 1.0, 2.5, 0.5]

source = DESource(duffing!, u0, p; channel_map = [1, 2])
set_ts!(source, 1600.)

output_device = get_default_output_device()

Start audio:

start_DESource(source, output_device)

Change system's parameters in real-time:

# set parameter 1 to 0.75
set_param!(source, 1, 0.75)

Stop audio:

stop_DESource(source)

Used By Packages

No packages found.