mutable struct. I'm still supporting earlier Julia versions that only know
type, but don't want the deprecation warnings in newer Julia versions. The comment line above the
eval(Expr(:type, ...is what will eventually replace these hacks once I drop support for Julia older than 0.6.
Note that you have to
using WAV data_in, fs, _ = wavread("/path/to/audiofile.wav") include(Pkg.dir("ACME", "examples", "diodeclipper.jl")) model = diodeclipper(fs=round(Int,fs)) u = 10*transpose(data_in) y = run!(model, u) data_out = transpose(y) wavplay(data_out, fs)
transposeinput and output because
ACMEexpects the second dimension to be the time index, while for
WAV, it's the first. Also, this assumes the input file to be mono. Otherwise, you have to do e.g.
u = 10*transpose(data_in[:,1])to extract the first channel. (The factor 10 here ensures some significant distortion to happen.)
ACME.topomatwhich returns the topology matrices Tᵥ and Tᵢ.