API Enhancement: play with volume

I’m using the API to start/stop sounds on the online player.

Some oneshots are recorded at perhaps too loud a base volume for users, while other oneshots are too quiet for the same user.

It would be nice if the play api could take an optional argument of vol=1-200 and the oneshot sound (or mood?) would play at that level, while other requests to /play would remain or start at the current global volume or oneshot volume.

Heya @coop

THANKS so much for the work you’ve been doing on this = looks fun!

Sorry it took a little while to discuss, I’ve been grabbing a dev or two. :slight_smile:

Soooo… there is no current “play with volume” thing, BUT you should be able to:

  1. first set the element volume for that OneShot
  2. then trigger playback

Is that something you had actually noticed already?

Does that work for you?

And then, yes, implementing something that does that in a single step IS something our API could do…

Though: the ‘work around’ I described in my first response fits more conceptually with the way a use is normally using a Syrinscape

Hmmm… we’ll think about this.

I had thought of the idea of just calling the set volume before calling play, but here’s the difficulty: the number of API calls and the total added latency.

It would have to go something like this:

  1. make a call to get the current one-shot volume
  2. await the response & store it.
  3. make a call to set the current one-shot volume
  4. make a call to play the one shot
  5. make a call to set the one-shot volume back to the original value.

We can continue the conversation on the developer message thread you started with me. Thanks for that!