# Creative Coding in Julia (packages for audio and graphics processing)

**URL:** https://discourse.julialang.org/t/creative-coding-in-julia-packages-for-audio-and-graphics-processing/72005
**Category:** New to Julia
**Tags:** question
**Created:** [November 24, 2021, 12:53pm UTC](https://discourse.julialang.org/t/creative-coding-in-julia-packages-for-audio-and-graphics-processing/72005 "2021-11-24T12:53:05Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![woodwindblues](https://avatars.discourse-cdn.com/v4/letter/w/ba8739/32.png) [@woodwindblues](https://discourse.julialang.org/u/woodwindblues)
#### Post date: [November 24, 2021, 12:53pm UTC](https://discourse.julialang.org/t/creative-coding-in-julia-packages-for-audio-and-graphics-processing/72005/1 "2021-11-24T12:53:05Z")

</div>

Hello,

I am coming from a musician backround and am lookng for a programming language to code interactive audio-visual installations. I have some experience in coding with Java (a year of computer engineering many years ago) and C++ (openFrameworks recently, but only scratiching the surface). I am working a lot with Max Msp (visual programming enviroment for music and visuals) but find myself looking for a text based language. The readability, ease of use and “feels like a scripting language, but performs like a compiled language” of Julia make it an ideal candidate. What I would be looking for now are packages/libraries that abstract away some of the low-level stuff for audio/video programming and offer tools for audio-synthesis (especially granular audio-synthesis) and realtime 2D/3D graphics.

Regarding synthesis I found [Juilacollider](https://github.com/vitreo12/JuliaCollider), a Julia implementation of Supercollider, a popular audio synthesis framework/server-application, but since it is based on a fork of Julia I am not sure if an how it can be integrated in regular julia code/programs (I am also still trying to get it to build correctly…).  
There seem to be more packages available that deal with graphics, albeit mostly for scientific data visualitisation whereas I am looking to visualize data and sound by way of particle systems, 2D/3D animations (though in some case combined with FFT-spectograms).

TL;DR  
Ist there any creative coding done in Julia? Are there libraries/packages to help with creative coding?

---

<div class="post-metadata">

### Author: ![lmiq](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lmiq/32/18314_2.png) [@lmiq](https://discourse.julialang.org/u/lmiq)
#### Post date: [November 24, 2021, 2:29pm UTC](https://discourse.julialang.org/t/creative-coding-in-julia-packages-for-audio-and-graphics-processing/72005/2 "2021-11-24T14:29:05Z")

</div>

I’m completely outside the field, but have you taken a look at: [https://github.com/JuliaMusic](https://github.com/JuliaMusic) ?

---

<div class="post-metadata">

### Author: ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://discourse.julialang.org/u/jules)
#### Post date: [November 24, 2021, 2:40pm UTC](https://discourse.julialang.org/t/creative-coding-in-julia-packages-for-audio-and-graphics-processing/72005/3 "2021-11-24T14:40:53Z")

</div>

You can definitely try Makie.jl for creative visualizations, of course it has lots of functionality for making plots, but the underlying graphics primitives should be good for your purposes as well, and animating things with observables is quite nice.

I have used Max as well in the past, and dabbled a bit with audio in Julia. So far I haven’t really gotten anything real-time to work. Julia is fast, but it is a garbage-collected language, so realtime stuff could suffer from the garbage collector pauses. I tried very haphazardly to get some dynamically computed sounds out of [https://github.com/JuliaAudio/PortAudio.jl](https://github.com/JuliaAudio/PortAudio.jl) and it kind of worked, but there’s almost no infrastructure for that.

That’s not supposed to discourage you, it would be very cool if you got something to work, there’s just not a lot of things that already exist in the real time audio space.

---

<div class="post-metadata">

### Author: ![mauro3](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mauro3/32/292_2.png) [@mauro3](https://discourse.julialang.org/u/mauro3)
#### Post date: [November 24, 2021, 3:12pm UTC](https://discourse.julialang.org/t/creative-coding-in-julia-packages-for-audio-and-graphics-processing/72005/4 "2021-11-24T15:12:35Z")

</div>

For visual things have a look at [https://cormullion.github.io/](https://cormullion.github.io/)

---

<div class="post-metadata">

### Author: ![sashmit](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sashmit/32/18791_2.png) [@sashmit](https://discourse.julialang.org/u/sashmit)
#### Post date: [November 24, 2021, 3:40pm UTC](https://discourse.julialang.org/t/creative-coding-in-julia-packages-for-audio-and-graphics-processing/72005/5 "2021-11-24T15:40:48Z")

</div>

you can try Faust for real time audio processing;  
[https://faustdoc.grame.fr/tutorials/julia/](https://faustdoc.grame.fr/tutorials/julia/)

> [@\[WIP\] Using Faust in Julia](https://discourse.julialang.org/t/wip-using-faust-in-julia/66271):
>
> [Faust](https://faust.grame.fr) (Functional Audio Stream) is a functional programming language for sound synthesis and audio processing with a strong focus on the design of synthesizers, musical instruments, audio effects, etc. Faust targets high-performance signal processing applications and audio plug-ins for a variety of platforms and standards. The core component of Faust is [its compiler](https://github.com). It allows to “translate” any Faust digital signal processing (DSP) specification to a wide range of non-domain specific languages…

---

<div class="post-metadata">

### Author: ![lmiq](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lmiq/32/18314_2.png) [@lmiq](https://discourse.julialang.org/u/lmiq)
#### Post date: [November 24, 2021, 4:26pm UTC](https://discourse.julialang.org/t/creative-coding-in-julia-packages-for-audio-and-graphics-processing/72005/6 "2021-11-24T16:26:20Z")

</div>

This is one cool blog!

---

<div class="post-metadata">

### Author: ![lawless-m](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lawless-m/32/30869_2.png) [@lawless-m](https://discourse.julialang.org/u/lawless-m)
#### Post date: [November 24, 2021, 4:44pm UTC](https://discourse.julialang.org/t/creative-coding-in-julia-packages-for-audio-and-graphics-processing/72005/7 "2021-11-24T16:44:07Z")

</div>

What do you mean by

> [@woodwindblues](#):
>
> creative coding

is it a specific term?

We can make videos with VideoIO  
All sorts of Image things with Images  
3D Meshes for 3dprinting

etc.

But perhaps like most creative stuff, spending time making the _tools_ takes away from producing the output.

It makes no sense to make packages out of my 3d print models or generated images or svgs, I hack away until I have something groovy, show it somewhere, and then move on.

---

<div class="post-metadata">

### Author: ![woodwindblues](https://avatars.discourse-cdn.com/v4/letter/w/ba8739/32.png) [@woodwindblues](https://discourse.julialang.org/u/woodwindblues)
#### Post date: [November 24, 2021, 5:56pm UTC](https://discourse.julialang.org/t/creative-coding-in-julia-packages-for-audio-and-graphics-processing/72005/8 "2021-11-24T17:56:04Z")

</div>

Thank you for all the quick answers.

First off, regarding the term “creative coding”: I think it’s mostly used to describe coding to prduce art algorithmically. And as you stated, spending time making the tools takes time away from producing the output, which is why frameworks like openFrameworks (C++), Cinder (C++), Nannou (Rust) Processing (Java), p5.js (Javascript) … apstract away lots of the lowlevel (rendering, dsp, ect.) mechanics. For example getting a object/function/struct that acts as a sine-wave oscillator and can be “connected” to other audio nodes instead of having to fill an array with values to generate a wavetable, iterate over it ect.

I’ve used Faust before and like it, but since the Faust programs would need to be translated/compiled to Julia and then compiled again, it seems like a suboptimal worflow in a case where parameters have to be tweaked often and have to be linked to parameters in Julia.  
I’ve looked at PortAudio.jl, seems like it might be possible, but I’m probably not good enough at actual dsp coding get anything out of it. Especially considering the performance issues with garbage collected languages you mentioned.  
Music.jl could work if I rely on external software-instruments for the actual sound generation.

Luxor.jl looks promising for 2D graphics and the blog is great!  
Makie,jl also seems very promising!

---

<div class="post-metadata">

### Author: ![arsh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/arsh/32/9073_2.png) [@arsh](https://discourse.julialang.org/u/arsh)
#### Post date: [November 24, 2021, 5:58pm UTC](https://discourse.julialang.org/t/creative-coding-in-julia-packages-for-audio-and-graphics-processing/72005/9 "2021-11-24T17:58:22Z")

</div>

There’s also [Javis.jl](https://github.com/Wikunia/Javis.jl/) which relies on Luxor, but has a more p5.js type(animation based) approach.

---

<div class="post-metadata">

### Author: ![tomerarnon](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tomerarnon/32/3170_2.png) [@tomerarnon](https://discourse.julialang.org/u/tomerarnon)
#### Post date: [November 26, 2021, 8:43am UTC](https://discourse.julialang.org/t/creative-coding-in-julia-packages-for-audio-and-graphics-processing/72005/10 "2021-11-26T08:43:43Z")

</div>

[Luxor.jl with the `@play` macro](https://juliagraphics.github.io/Luxor.jl/stable/howto/livegraphics/) feels a lot like Processing!

---

<div class="post-metadata">

### Author: ![sletz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sletz/32/18675_2.png) [@sletz](https://discourse.julialang.org/u/sletz)
#### Post date: [November 27, 2021, 4:55pm UTC](https://discourse.julialang.org/t/creative-coding-in-julia-packages-for-audio-and-graphics-processing/72005/11 "2021-11-27T16:55:09Z")

</div>

> [@woodwindblues](#):
>
> but since the Faust programs would need to be translated/compiled to Julia and then compiled again,

A more direct integration of te Faust compiler here: [GitHub - corajr/Faust.jl: Julia wrapper around the Faust DSP compiler.](https://github.com/corajr/Faust.jl)

---

<div class="post-metadata">

### Author: ![tp2750](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tp2750/32/207806_2.png) [@tp2750](https://discourse.julialang.org/u/tp2750)
#### Post date: [November 10, 2024, 1:07pm UTC](https://discourse.julialang.org/t/creative-coding-in-julia-packages-for-audio-and-graphics-processing/72005/12 "2024-11-10T13:07:46Z")

</div>

Did you ever end up doing anything in this direction?
