The above uses the shader "Tunnel of Lights" from nocrex. Hydra sample by Olivia Jack.
Patchies is a tool to build audio-visual patches on the web. Try it out at patchies.app.
You can use audio-visual tools that you know and love: P5.js (Processing in JavaScript), Hydra (Video Synth), Strudel (TidalCycles in JavaScript), as well as write JavaScript and GLSL fragment shaders directly.
It has support for Message Passing and Video Chaining, which allows you to create complex audio-visual patches that are more powerful than what you can do with a single object.
"What I cannot create, I do not understand. Know how to solve every problem that has been solved." - Richard Feynman
n
to create a new object.shift+enter
while in a code editor to re-run the code.delete
to delete an object.You can use send()
and onMessage()
functions to send and receive messages between objects. This allows you to create complex interactions between different parts of your patch. This is very similar to messages in Max/MSP.
Here is how to use send
and onMessage
in JavaScript objects:
// Object A
send('Hello from Object A')
// Object B
onMessage((message) => {
console.log('Received message:', message.data)
})
You can use the send
and onMessage
function in all JavaScript-based objects, such as js
, p5
, and hydra
.
Note that strudel
object does not support message passing yet, as it runs in a separate StrudelMirror
environment.
You can chain video objects together to create complex video effects, by using the output of a video object as an input to another. For example: P5 -> Hydra -> GLSL. This is similar to shader graphs in TouchDesigner.
To leverage video chaining, use the leftmost orange inlets and outlets on the patch. You can connect the orange video outlet of a p5
to an orange video inlet of a hydra
object, and then connect the hydra
object to a glsl
.
This allows you to create video patches that are more powerful than what you can do with a single object. Have fun!
Here are the list of objects that we have in Patchies. You can also hit n
on your keyboard to see list of objects to create, as well as drag in the objects from the bottom bar.
js
: A JavaScript code blockconsole.log()
to log messages to the virtual console.setInterval(callback, ms)
to run a callback every ms
milliseconds.setInterval
that automatically cleans up the interval on unmount. Do not use window.setInterval
from the window scope as that will not clean up.send()
and onMessage()
to send and receive messages between objects. This also works in other JS-based objects. See the Message Passing section below.strudel
: creates a Strudel music environmentp5
: creates a P5.js sketchhydra
: creates a Hydra video synthesizerglsl
: creates a GLSL fragment shaderp5
, hydra
, or canvas
to glsl
to the four video inputs. These are exposed as iChannel0
, iChannel1
, iChannel2
, and iChannel3
in the GLSL code.glsl
, as they accept the same uniforms.canvas
: creates a JavaScript canvascanvas
in the JavaScript code, so you can use methods like canvas.fill()
to draw on the canvas.butterchurn
: render the Winamp Milkdrop visualizerhydra
and glsl
) to derive more visual effects.