Friday, March 03, 2023

Strudel REPL: Live JavaScript Music in the Browser



Strudel REPL: Live JavaScript Music in the Browser

This is a lot of fun. It’s a little online sandbox for putting together small musical experiments written in JavaScript. Use the ‘shuffle’ button at the top right until you find something you like the sound of. There’s a tutorial on building your own, too.






// Twinkle, Twinkle, Little Star
note("C C G G A A G    F F E E D D C    G G F F E E D    G G F F E E D").s("piano").slow(20).clip(1)

// If You’re Happy and You Know It
note("C C F F F F F F E F G    C C G G G G G G F G A   A A Bb Bb Bb Bb D D   Bb Bb A A A G F F   A A G G G F E E D E F    ").s("piano").slow(20).clip(5)

// Mary Had a Little Lamb
note(`[
E D C D E E E ~
D D D E G G ~
E D C D E E E ~
E D D E D C ~
]/10`).s("piano").clip(5)



No comments: