Deep control of music?

hi there!

first off, lovin' pulp, babe. having tons off fun. i was curious if it'd be possible to turn a single instrument onhere, and off based on whatever triggers i set, as a song plays? i am probably using the wrong words but i hope that makes sense-- i'd like to be able to drop out the noise etc for ambience possibly

or let's say you walk out into the rain, and i then want the sine to play-- when you walk back, it's off. or on a certain carpet, you here a melody, whatever. but obviously this needs to avoid desyncing and sound continuous,.wasn't sure if it was possible, and realized i could ACTUALLY just make an account and ask. ;9

thank you! :sparkling_heart:

1 Like

There's a lot you can do with Events, did you dive into PulpScript yet with that stuff ??

I don't think it's currently possible, but maybe someone can surprise me!

There aren't many Pulpscript features for music. Using "once" will play a song once, "loop" will loop a song, "stop" will stop the current song, and "bpm" will change the tempo. Those are all that exists currently, there's no way to control the volume (or mute) individual instruments. If you duplicated a song and deleted one of the instrument tracks, then you could tell that copy to play/loop in response to some event trigger. But as you mention, it would start playing from the beginning of the song, no smooth transition.

Don't think you can do any of the features you would like with music using Pulp.
That's probably more advanced of a feature than they would want to add to Pulp.
So for that level of control the only workaround I think is to switch to the SDK.

Hmm, in terms of the syncing...could you use loop and frame to sync the music, so a new song only starts when another song is at the end of a bar (or at the end of a four-bar segment)?

Basically you would set a music variable using the normal function (like when you walk onto grass, musicvar="grasssong"). Then you would tell the game to, on loop, loop "{musicvar}" if event.frame is a multiple of say, 80 (all music starting on the same 4 second cycle, which equals 1 bar at 60bpm).

Sidenote: is there no hidden event.song or event.sound read-only variable?