Skip to main content
Discovery of Strudel.cc

Discovery of Strudel.cc

Strudel.cc
#

strudel.cc. What a wonderful discovery this thing is.

For whom, for what
#

For developers, Strudel is a REPL (READ-EVAL-PRINT LOOP) coded in JavaScript dedicated to music with an integrated sample library.

For musicians, it is a looper where each pattern is described via text.

For everyone, Strudel, which can be used in any browser, is open-source and free under the GNU license. Perfect.

Here is the official presentation:

Strudel is a JavaScript version of TidalCycles, which is a popular live coding language for music, written in Haskell. Strudel is free software and open source: you can redistribute and/or modify it under the terms of the GNU Affero General Public License. You can find the source code on Codeberg. Strudel also allows you to apply visuals in addition to sounds on events to create nice effects.

So who is it for? Anyone with a browser and ears, ultimately.

Some examples
#

Au clair de la lune

$: note(`<
        C C C D E@2 D@2 C E D D C@4
        C C C D E@2 D@2 C E D D C@4
        D D D D A2@2 A2@2 D C B2 A2
        G2@3 ~
        C C C D E@2 D@2 C E D D C@4
        ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
        ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
        ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
        ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
        ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
        >`).sound("piano").cpm(120)

It will play one note per beat, with the piano sound, at 120bpm.

Of course, there are several types of sounds, including a percussion module. For example, we can define a basic kick pattern:

let kik = stack(
  sound(`
    <sd> <cp> [ - sd ] <cp>
  `)
);
  • sd -> snare
  • cp -> cymbal

And there you go.

To play it, we just need to invoke it

let kik = stack(
  sound(`
    <sd> <cp> [ - sd ] <cp>
  `)
);
stack(
  kik,
).cpm(40);

But what’s interesting is to combine patterns, so we add a bass line

let poinpoin = cat(
  "- - - -",
  "<c2> <db2> <d2> <d#2>",
).note()
  .n(3).sound("gm_synth_bass_1")
  // use effects to modify a sound
  // low pass filter allows low frequencies to pass through
  .lpf(200).lpenv(5).lpa(.5).lps(.8).lpd(.1);
let kik = stack(
  sound(`
    <sd> <cp> [ - sd ] <cp>
  `)
);
stack(
  kik,
  poinpoin,
).cpm(40);

…then a melodic line

let tuputu = cat(
  "<c4> <c5> <c4> <c5> <c4> <c5> <c4> <c5>",
  "- - - -",
  "<c4> <c5> <c4> <a4> <c4> <g4> <c4> <e4>",
  "- - - -",
  "<c4> <c5> <c4> <c5> <c4> <c5> <c4> <c5>",
  "- - - -",
  "<c4> <c5> <c4> <a5> <c4> <g5> <c4> <c5>",
  "- - - -",
).note()
  .n(3)
  .sound("sine")
  .lpf(200).lpenv(5).lpa(.5).lps(.8).lpd(.1);
let poinpoin = cat(
  "- - - -",
  "<c2> <db2> <d2> <d#2>",
).note()
  .n(3).sound("gm_synth_bass_1")
  // use effects to modify a sound
  // low pass filter allows low frequencies to pass through
  .lpf(200).lpenv(5).lpa(.5).lps(.8).lpd(.1);
let kik = stack(
  sound(`
    <sd> <cp> [ - sd ] <cp>
  `)
);
stack(
  tuputu,
  kik,
  poinpoin,
).cpm(40);

And there you go.

I leave you with this cover of Charlie XCX - 360, which also shows the visual effects of Strudel.

What now?
#

Honestly, it’s so fun. The documentation is enormous and the possibilities are too.

The big point is, this is a tool that allows you to write music and share it. To modify it and reshare later. That’s the spirit of open source meeting music, and that is magical.

It allows people to write funny things, some genuinely good things, and publish their work so that others can get inspired. We used to pass around sheet music; it has become more complicated to share a FL Studio project, since almost all DAWs are proprietary and fucking expensive.

We have now people mixing live, with their code on a video projector, and it creates a movement: the Algorave. Sharing, freedom, music.

Everything we love.

However, i is somewhat tedious to create large projects in the browser. It would now be necessary to integrate Strudel into a slightly more practical workflow (input/output). Or move to TidalCycles written in Haskell, which Strudel is the JavaScript port of. That being said, I’m the one who knows nothing and has everything to discover. I’m just saying that the UX isn’t very pleasant after the first hour. To explore further…

Some links #