museumsvictoria / spatial_audio_server

An audio backend for the multi-layered soundscape of Beyond Perception: Seeing the Unseen, a permanent exhibition at Scienceworks in Melbourne, Australia.
81 stars 14 forks source link

Add support for source volume control via OSC #130

Closed mitchmindtree closed 6 years ago

mitchmindtree commented 6 years ago

This is necessary for the Fluid Dynamics BP installation.

We might also be able to make use of this same API to control volume via Nodel.

Have to ensure that when volume is received all sources and sounds spawned from those sources are immediately updated across all threads.

mitchmindtree commented 6 years ago

Message Layout

The audio server will expect the following OSC address and value type when receiving the source volume:

where <source_name> is the name of the source specified within the source editor GUI. 0.0 is silence and 1.0 is maximum volume. It may be worth noting that the default volume for a source within the audio server is 0.6 (just in case you need to set some starting default value within live/max).

The audio server will listen for all messages on port 9001 (this can be changed via the project's config.toml file).

Example

E.g. in order to set the volume of a source named "Awesome Sound" to 0.5:

cc @MitchAllen1 does this look OK to you? Hopefully it's simple enough - just let me know if a different message layout would suit your workflow better as I'm happy to change it to suit :+1:

cc @BlueJayLouche @cbfry

cc @freesig I'll add a similar OSC message type for master volume, with the "/bp/master_volume" address instead - maybe this way Nodel could just send OSC messages for the volume controls? Not sure what's easier in this case, but at least it's an option.