Skip to content

antonioortegabrook/RealTimeAudioDiffEq.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages