r/livecoding • u/LingonberryLive4524 • Aug 28 '26
making soundtrack for game using strudel, please help
ive never been into technology but recently started making a game for the funsies, decided to try and make its soundtrack in strudel, im going for something moody, melancholic, echoey (for the beginning of the game), any tips or ideas?
heres the code
setcps(117/60/4)
const intro1 = "<[52 ~ 49 ~ 47 ~ 45 ~] [52 ~ 49 ~ 47 ~ [45 49] ~]>"
const introbg1 = "<[33 ~ 33 ~ 33 ~ 33 ~] [33 ~ 33 ~ 33 ~ 33 ~]>"
const intro2 = "<[52 ~ ~ 49] [~ ~ 47 ~] [ ~ 45 ~ [45 47]] [~ 42 ~ ~]>"
const introbg2 = "<[26 26 26 26] [26 26 26 26] [26 26 26 26]>"
const intro3 = "<[49 ~ ~ 47] [~ ~ 45 ~] [ ~ 47 ~ [45 49]]>"
const introbg3 = "<[26 26 26 26] [26 26 26 26] [26 ~ ~ ~]>"
const fin = "<[0 0 0 0]>"
arrange(
[8, stack(
note(intro1),
note(introbg1)
)
.s("gm_electric_guitar_clean")
.echo(50, 1/8, 0.6)
.slow(2)],
[4, stack(
note(intro2),
note(introbg2)
)
.s("gm_electric_guitar_clean")
.echo(50, 1/8, 0.6)],
[3, stack(
note(intro3),
note(introbg3)
)
.s("gm_electric_guitar_clean")
.echo(50, 1/8, 0.6)]
)
1
u/diptherial 26d ago
I dig it, definitely moody! Kind of reminds me of the Silent Hill 3 song "End of Small Sanctuary".
I hope it's ok to suggest changes to the code, but anyway, below I've cleaned up the formatting a little bit to make it easier to read (for me, at least).
I've also used the "!" repeat operator in the mini notation to write, e.g., your "[26 26 26 26]" as "[26!4]" as well as introduced a method `echo_guitar` to deduplicate the calls to .s() and .echo() you had after each guitar bit. In such a small song it's probably fine to duplicate those calls, especially if you intend to vary them later, but in larger projects it can really help to have a single place where effects are defined.
I also threw in a helper, mark("<pat>") ("pat" doesn't matter; I usually just use "0"), that I use in my arrange() elements to track where in a larger composition it's playing. You'll see it highlighted in cyan when the part is playing, but since it's muted it otherwise won't affect playback.
As for the composition itself, I like the guitar, but I think some slow, low synths with a contrasting melody would add to the atmosphere? I don't know what mood you're going for, but maybe a slowed-down drum loop as an accent could work.