Devola2 is an open source real-time audio visualizer app. Specifically designed for live-music performance of B.L.M.D and Even Tide.
Thanks to blasphemous javascript, specially fucking eval() function.
Create a new directory and script inside the scenes directory. Example: src/scenes/new_dir/your_script.js
Inside your script you will create p5js instance like this.
const variable_name = function(sketch) {
let ww;
let hh;
sketch.preload = function() {
ww = localStorage.getItem('reso_width'); // <-- Get width from conf
hh = localStorage.getItem('reso_height'); // <-- Get height from conf
...
}
sketch.setup = function() {
// localStorage stores object as string, so you have to parse it to number
sketch.createCanvas(Number(ww), Number(hh), sketch.WEBGL);
...
}
sketch.draw = function() { ... }
}
Then register your visual in data.js
. id should not be duplicated.
const VISUAL_DATA = {
"scenes": [
...
{
"id": "41",
"name": "hello_visual",
"path": "new_dir/your_script.js",
"variable": "variable_name",
},
],
...
}
Finally run the project. Then you'll see your script on visuals section. Rest of the process do not require changes in source code, so fire up the configuration and blast the screen!
To Run:
yarn start / npm start
To package:
npx electron-packager . --icon=./d2logo.icns --overwrite
more about packaging electron-packager
Enkh-Amar. G (vonqo). Released under the Mozilla Public License Version 2.0