{"id":21402982,"url":"https://github.com/pbrehmer/asasine","last_synced_at":"2026-01-03T07:18:15.880Z","repository":{"id":180811883,"uuid":"479862405","full_name":"pbrehmer/Asasine","owner":"pbrehmer","description":"Audio-visuals from the Kuramoto-Sivashinsky equation","archived":false,"fork":false,"pushed_at":"2023-07-22T21:10:24.000Z","size":14386,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-23T03:27:54.723Z","etag":null,"topics":["audio","creative-coding","partial-differential-equations","sonification"],"latest_commit_sha":null,"homepage":"","language":"Julia","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pbrehmer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-04-09T22:58:20.000Z","updated_at":"2024-11-07T17:40:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"3e675835-a780-4e08-b46c-bb2c4e0dcd68","html_url":"https://github.com/pbrehmer/Asasine","commit_stats":null,"previous_names":["pbrehmer/asasine"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pbrehmer%2FAsasine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pbrehmer%2FAsasine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pbrehmer%2FAsasine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pbrehmer%2FAsasine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pbrehmer","download_url":"https://codeload.github.com/pbrehmer/Asasine/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243896071,"owners_count":20365315,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["audio","creative-coding","partial-differential-equations","sonification"],"created_at":"2024-11-22T15:45:49.008Z","updated_at":"2026-01-03T07:18:15.845Z","avatar_url":"https://github.com/pbrehmer.png","language":"Julia","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Asasine\n\nGenerates audio and visual data from the solution of the Kuramoto-Sivashinsky (KS) partial differential equation\n\n$$\\frac{\\partial u}{\\partial t} + \\frac{\\partial^2 u}{\\partial x^2} + \\frac{\\partial^4 u}{\\partial x^4} + \\frac{1}{2} \\Big(\\frac{\\partial u}{\\partial x}\\Big)^2 = 0 .$$\n\nThe visual component is a heatmap plot of the solution function $u(t, x)$, while the audio component is the solution mapped onto a frequency spectrum that is written to an audio buffer at each time $t$. This audio-visual feed can be streamed in real time or rendered to a file.\n\nThe 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 -\u003e a^5` to sharpen the features of the produced frequency spectrum and still retain negative values ($u(t, x)$ takes on both negative and positive real values). In simplified (code) terms, we generate the audio buffer at each time step via:\n\n```julia\nbuf = zeros(buflen)\nfor (i, ν) in zip(freqidx, freqs)\n    buf .+= ampmap(u[freqidx[i]]) .* sin.(2pi * buflen * ν)\nend\n```\n\nIn 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.\n\nFor more details, check the notes in the [introductory notebook](/examples/introduction.ipynb) as well as the provided [examples](/examples/).\n\n## Sample outputs\n\n![L128_1](https://github.com/pbrehmer/Asasine/assets/62562093/09599fc6-6796-4c74-b1d0-3811c857c73c)\n\nhttps://github.com/pbrehmer/Asasine/assets/62562093/12be5335-50ec-4fb0-9d9c-f89316e291ab\n\n![L256_1](https://github.com/pbrehmer/Asasine/assets/62562093/21b960f9-f210-4dc1-8229-11d72f8af245)\n\nhttps://github.com/pbrehmer/Asasine/assets/62562093/708c931b-094a-43c5-b908-2e7d0a1b55d6\n\n![L128_2](https://github.com/pbrehmer/Asasine/assets/62562093/57fc027b-a93d-4347-85b9-ce4f1a47b704)\n\nhttps://github.com/pbrehmer/Asasine/assets/62562093/fccf0a0d-4552-45a1-af34-3017ef682f7c\n\nhttps://github.com/pbrehmer/Asasine/assets/62562093/8ab0b70b-41a6-4a5b-971f-e21d810e4236\n\n![L32_1](https://github.com/pbrehmer/Asasine/assets/62562093/84388bd7-ad26-4f17-96c9-7602d2187747)\n\nhttps://github.com/pbrehmer/Asasine/assets/62562093/fbcf4d37-eda0-443f-93db-93f712121480\n\n## References\n\nThe 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].\n\n[1] John Carlos Baez, [The Kuramoto–Sivashinsky Equation](https://johncarlosbaez.wordpress.com/2021/10/17/conjectures-on-the-kuramoto-sevashinsky-equation/)\\\n[2] Mathab Lak, [Test case for PDEs: Kuramoto-Sivashinsky](https://online.kitp.ucsb.edu/online/transturb17/gibson/html/5-kuramoto-sivashinksy.html)\n\n## Todo\n\n- add interactive elements\n  - fix button: fixes `U[x,t]` slice and halts evolution\n  - restart button\n- generate audio buffer via IFFT for improved performance\n- investigate divergence of CNAB2 stepping for certain wave number orderings\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpbrehmer%2Fasasine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpbrehmer%2Fasasine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpbrehmer%2Fasasine/lists"}