Live data from Hacker News

Sporth: A small stack-based audio programming language

paulbatchelor.github.io

1–10 of 34 posts

Re: Sporth: A small stack-based audio programming language

#3
In a similar vein I present: http://nexuist.github.io/brainsynth/

I want to eventually rewrite it in Svelte because React is too slow (probably my own fault) to play notes and update the UI at the same time. I think I should have used PureComponents or something.

Re: Sporth: A small stack-based audio programming language

#5
If you're thinking of compiling this to webassembly and making an online Sporth playground... It's already done! Works pretty well, too. You can browse a bunch of Sporth scripts and play with them here: https://audiomasher.org/browse

I found the stack-based, Forth style syntax works like magic for a lot of creative audio DSP tasks. Blocks of code are like little signal chains, but denser and easier to manage than traditional spaghetti graphs (like in Reaktor, PureData, etc.) though I believe spaghetti graphs are more approachable at first.

Re: Sporth: A small stack-based audio programming language

#6
post #3

In a similar vein I present: http://nexuist.github.io/brainsynth/ I want to eventually rewrite it in Svelte because React is too slow (probably my own fault) to play notes and update the UI at the same time. I think I should have used PureComponents or something.

Thank you for sharing. It's always fun to see the ways BF can be used to make music.

I really like the way the editor visually shows where you are. It would be really neat to get it controlling some synths in an Ableton live session or something. You'll get the notation system AND the great sounds that way.

At one point, I wrote a little BF sequencer for Sporth [0]. The nice thing about it was it just output a signal which could be mapped to literally any sound parameter at audio-rate. If the project still builds [1], there's a single demo that I made of it.

0: http://paulbatchelor.github.io/proj/spigot/

1: https://github.com/paulbatchelor/spigot

Re: Sporth: A small stack-based audio programming language

#7
post #5

If you're thinking of compiling this to webassembly and making an online Sporth playground... It's already done! Works pretty well, too. You can browse a bunch of Sporth scripts and play with them here: https://audiomasher.org/browse I found the stack-based, Forth style syntax works like magic for a lot of creative audio DSP tasks. Blocks of code are like little signal chains, but denser and easier to manage than tra…

+1 on this.

the author also wrote an interactive tutorial here:

https://audiomasher.org/learn

this is based on the sporth cookbook, found here:

http://paulbatchelor.github.io/proj/cook/

Re: Sporth: A small stack-based audio programming language

#8
post #7
post #5

If you're thinking of compiling this to webassembly and making an online Sporth playground... It's already done! Works pretty well, too. You can browse a bunch of Sporth scripts and play with them here: https://audiomasher.org/browse I found the stack-based, Forth style syntax works like magic for a lot of creative audio DSP tasks. Blocks of code are like little signal chains, but denser and easier to manage than tra…

+1 on this. the author also wrote an interactive tutorial here: https://audiomasher.org/learn this is based on the sporth cookbook, found here: http://paulbatchelor.github.io/proj/cook/

Thanks :D

Since you're here, I would love to know what you think of adding function definition as a language feature to Sporth (in the style of Forth, or even better, Joy). As you know I've used Sporth a lot, and I think it would be pretty useful to have this kind of feature, but perhaps implementation would be a bit challenging right now.

Re: Sporth: A small stack-based audio programming language

#9
post #8
post #7

Earlier quoted context omitted.

+1 on this. the author also wrote an interactive tutorial here: https://audiomasher.org/learn this is based on the sporth cookbook, found here: http://paulbatchelor.github.io/proj/cook/

Thanks :D Since you're here, I would love to know what you think of adding function definition as a language feature to Sporth (in the style of Forth, or even better, Joy). As you know I've used Sporth a lot, and I think it would be pretty useful to have this kind of feature, but perhaps implementation would be a bit challenging right now.

I agree it would be a cool feature. Unfortunately, you'd have to basically rewrite everything in order to do it.

I actually kind of did that. Soundpipe[0], Patchwerk[1], and Runt[2] used together builds something that syntactically resembles Sporth, sounds virtually identical, and is usually way faster. In Runt, you can add new words and build abstractions that way. In practice, I tend to avoid doing this and will tend to generate Runt code using higher level languages like Scheme.

0: http://paulbatchelor.github.io/proj/soundpipe.html

1: http://paulbatchelor.github.io/proj/patchwerk/

2: http://paulbatchelor.github.io/proj/runt/

Re: Sporth: A small stack-based audio programming language

#10
post #4
post #2

Things like this seem to me to be putting a language where what you really want is just a focused IDE.

Could you elaborate on what you mean by that?

I don't think there is anything that a different language here is going to accomplish that a library couldn't, it seems like the main advantage is the environment that allows for more fluid iteration combined with functions for audio.
Post reply on HN