8 years ago I partially started going back to my roots to begin working on a number of #Forth based DSLs & REPLs for livecoding... not just for audio/music, but also #GenerativeArt, #shaders, #geometry and GUI/layout generation. Even today, I still think Forth-like #concatenative languages have unique potential & freedoms and are severely under-explored in all of those domains mentioned. Even though all of the examples in this thread are early, pretty rough prototypes, I'd like to share some videos/screenrecs of my previous research, maybe also to inspire others exploring this approach of programming more...
First off, a #WebAudio prototype from 2015, made in the browser REPL at http://forth.thi.ng (audio starts at ~2:15)
There's only a single audio buffer used here (boilerplate setup for that in the first 2 mins of the video) and all subsequent operations just write to that buffer or manipulate its contents...
1/4
First off, a #WebAudio prototype from 2015, made in the browser REPL at http://forth.thi.ng (audio starts at ~2:15)
There's only a single audio buffer used here (boilerplate setup for that in the first 2 mins of the video) and all subsequent operations just write to that buffer or manipulate its contents...
1/4
Karsten Schmidt
in reply to Karsten Schmidt • • •The attached image shows some Forth source code defining an 2-oscillator DSP stack for a bass synth (with FX) and a semi-randomized sequencer...
Project repo:
https://github.com/thi-ng/synstack
6mins live performance (using a polyphonic graph based version of the synth running on an STM32F746 board, with the Korg Nanocontrol used as sequencer and for param/effect control):
https://www.youtube.com/watch?v=41FKE3PYjnE
2/4
GitHub - thi-ng/synstack: Modular soft synth & Forth based VM for audio DSL experiments
GitHubKarsten Schmidt
in reply to Karsten Schmidt • • •Btw. More examples and the full source code for the VM, the REPL & transpiler and demos can all be found here:
https://github.com/thi-ng/charlie
3/4
GitHub - thi-ng/charlie: TypeScript based Forth-like VM w/ online REPL and extensive kernel (incl. WebGL/WebAudio support)
GitHubKarsten Schmidt
in reply to Karsten Schmidt • • •https://thi.ng/pointfree
https://thi.ng/pointfree-lang
(Btw. Both packages have pretty extensive readmes...)
This setup then made it very easy to create new syntax additions & language extensions, both harnessing other JS/TS packages. The example shown in the video (from 2020) is a short #livecoding session demonstrating a custom vocab to generate complex 2D geometries, using https://thi.ng/geom under the hood...
4/4