Generates audio and visual data from the solution of the Kuramoto-Sivashinsky (KS) partial differential equation
The visual component is a heatmap plot of the solution function
The sonification process is implemented as follows: At each time step, from the KS solution vector u
a collection of values is picked via an index vector freqidx
with corresponding frequencies freqs
. The solution values determine the sine wave amplitudes at the respective frequencies. Here, much of the sound characteristics and creative freedom resides in the choice of freqs
. Additionally, we apply a mapping ampmap
that further modifies the amplitudes of the produced sine waves; we often times use monomials of odd order, e.g., ampmap = a -> a^5
to sharpen the features of the produced frequency spectrum and still retain negative values (
buf = zeros(buflen)
for (i, ν) in zip(freqidx, freqs)
buf .+= ampmap(u[freqidx[i]]) .* sin.(2pi * buflen * ν)
end
In order to create an interesting stereo image, the KS solution is translated to a stereo buffer by mapping all negative and positive values of u
to the left and right channel, respectively.
For more details, check the notes in the introductory notebook as well as the provided examples.
L128_1.mp4
L256_1.mp4
L128_2.mp4
L128_2.mp4
L32_1.mp4
The idea for this project was sparked by a blog post series by John Carlos Baez [1] on the Kuramoto-Sivashinsky equation. The CNAB2 Julia implementation was largely inspired by Mathab Lak's code [2], which is also used in Ref. [1].
[1] John Carlos Baez, The Kuramoto–Sivashinsky Equation
[2] Mathab Lak, Test case for PDEs: Kuramoto-Sivashinsky
- add interactive elements
- fix button: fixes
U[x,t]
slice and halts evolution - restart button
- fix button: fixes
- generate audio buffer via IFFT for improved performance
- investigate divergence of CNAB2 stepping for certain wave number orderings