Live data from Hacker News

Strudel REPL – a music live coding environment living in the browser

strudel.cc

31–40 of 56 posts

Re: Strudel REPL – a music live coding environment living in the browser

#31
Strudel did something many other approaches to live coding have failed to do imho. No hosting needed. Just open the web based REPL and go. Great entry to live coding, but you quickly run into limitations.

Here is a piece inspired by Dawn of Midi and my attempt at taking a piano synth and trying to make it sound like a lof of different things.

Copy, paste, modify.

const bpm = 138; setcps(bpm/60/4);

// Pattern 1: lower melodic pulse

const bass_pulse = note("") .s("piano") .slow(4) .gain(rand.range(0.45, 0.65)) .attack(0.005) .decay(0.8) .sustain(1.2) .release(1.2) .lpf(800) .room(0.3) .delay(0.15) .delaytime(0.375) .delayfeedback(0.25) .pan(0.5);

// Pattern 1.5 (?): layered base

const bass_pulse_2 = note("") .s("piano") .slow(4) .gain(rand.range(0.45, 0.65)) .add(note(12)) .attack(0.005) .decay(0.8) .sustain(1.2) .release(1.2) .lpf(800) .room(0.3) .delay(0.15) .delaytime(0.375) .delayfeedback(0.25) .pan(0.5);

// Pattern 2: Mid-range polyrhythm

const mid_pattern = note("") .s("piano") .struct("x(5,8)") .gain(rand.range(0.25, 0.45)) .attack(0.008) .decay(0.4) .sustain(0.05) .release(0.6) .lpf(perlin.range(1200, 2200).slow(8)) .room(0.5) .pan(rand.range(0.3, 0.7));

// Pattern 3: repetitive pulse

const high_pulse = note("d5 [~ d5] d5 ~") .s("piano") .fast(2) .gain(rand.range(0.18, 0.35)) .attack(0.01) .decay(0.3) .sustain(0) .release(0.4) .lpf(2800) .room(0.6) .delay(0.25) .delaytime(0.1875) .delayfeedback(0.3) .pan(0.7);

// Pattern 4: Sparse accent notes (3 over 4 polyrhythm)

const accents = note("a4 ~ f4") .s("piano") .slow(2) .gain(rand.range(0.35, 0.55)) .attack(0.5) .decay(0.6) .sustain(0.9) .release(0.9) .lpf(1800) .room(0.45) .pan(0.2) .sometimes(x => x.delay(0.3).delayfeedback(0.4));

// Pattern 5: Extended mid-range polyrhythm (13 over 16 - cello thingie)

const mid_long = note("") .s("piano") .struct("x(13,16)") .gain(rand.range(0.32, 0.48)) .attack(0.06) .decay(0.9) .sustain(0.25) .release(1.1) .lpf(perlin.range(800, 1400).slow(12)) .lpq(4) .room(0.55) .delay(0.18) .delaytime(0.25) .delayfeedback(0.3) .pan(rand.range(0.35, 0.65));

const high_long = note("") .s("piano") .struct("x(7,8)") .gain(rand.range(0.28, 0.42)) .attack(0.05) .decay(0.8) .sustain(0.3) .release(1.0) .lpf(sine.range(1000, 1600).slow(8)) .lpq(3.5) .room(0.6) .delay(0.22) .delaytime(0.1875) .delayfeedback(0.35) .pan(0.7);

stack( bass_pulse, bass_pulse_2, mid_long, high_long, mid_pattern, high_pulse, accents );

Re: Strudel REPL – a music live coding environment living in the browser

#32
post #14

Can it make music like e.g. Extempore (see https://www.youtube.com/playlist?list=PL_eJ0XdLbWzzq_03wTIMV... )? All examples I've heard from Strudel so far are pretty boring (constant beat/chord machine music). Are there examples in other styles?

Strudel can use custom samples in addition to the built in synths and samples. The language is really expressive. I’ve not gone too far into playing with it but from what I’ve seen it’s pretty flexible. That said I’ve only seen people making house/techno/drum-n-bass kinda stuff with it.

I added an example of some music other than what you describe in comments above (below? in some direction)?

Re: Strudel REPL – a music live coding environment living in the browser

#34
post #12

Earlier quoted context omitted.

Switch Angel is awesome. She also has some Instagram tutorials.

So random seeing her mentioned here today. I just discovered her yesterday, saw a Youtube short where she's operating a Eurorack synth at Switched On in Austin, TX. It's a cool little synth shop that's worth checking out if you're ever in town. Looks like they've moved locations recently though.

> So random seeing her mentioned here today. I just discovered her yesterday

I literally came across her on my youtube feed an hour back, and thought it'd be something HN would love.

Still distracted, I opened HN's default news page. Aaaand I saw this thread and your comment. So, no free karma for me lol, but still hope to see good discussions about the software. It feels very hacker-ey in an old-skool kinda fun way!

Re: Strudel REPL – a music live coding environment living in the browser

#35

Awesome! Tide Cycles doesn't work on Fedora, so I might use this instead. Anyway to get it running as a node js script so I use it locally?

It will run locally in a web browser, it’s open source and if I recall correctly the authors provide a downloadable way to serve it from your local machine.

Re: Strudel REPL – a music live coding environment living in the browser

#37
post #4

Earlier quoted context omitted.

Switch Angel is awesome. She also has some Instagram tutorials.

Dj Dave is the other creator I've found doing strudel content. https://youtu.be/E1K6Sv-oIb0

Yea, Switch Angel and DJ Dave have a collab together somewhere. Probably on their Instagram, they are pretty active there.

Re: Strudel REPL – a music live coding environment living in the browser

#38

  Uncaught (in promise) ReferenceError: AudioContext is not defined
    ln https://strudel.cc/_astro/spectrum.Bf7jMx6O.js:1
    W https://strudel.cc/_astro/spectrum.Bf7jMx6O.js:1
    un https://strudel.cc/_astro/spectrum.Bf7jMx6O.js:1
    c https://strudel.cc/_astro/spectrum.Bf7jMx6O.js:1
What would I need to change in my security settings for this?

Re: Strudel REPL – a music live coding environment living in the browser

#39

Strudel is a JavaScript port of TidalCycles (Haskell). While TC uses SuperCollider for the synthesis, Strudel uses superdough which seems to be a custom implementation. I'm currently learning SuperCollider sclang and waiting for a version upgrade to have a reason to submit it here - usually some of the discussion is quite insightful. Anyway sclang is the PHP of music - just uglier and less consistent. But it's also p…

sclang came across to me as something like a hybrid of Smalltalk and Ruby. It's indeed very "inconsistent" and weirdly familiar-yet-alien, but I would consider it a lot more elegant than PHP.

Re: Strudel REPL – a music live coding environment living in the browser

#40
post #30

This being text based makes it really easy to have AI generate the music. Now waiting for Strudel agent that will transcribe music into strudel notation.

I like doing my own composition, but AI being able to just do sound design from a prompt ("hey can you make a synth that sounds like the lead from XYZ song but buzzier, add parameters to control ABC") would be revolutionary.
Post reply on HN