Web-Multi-Media / multi-web-audio-sequencer

Web collaborative step sequencer
https://labs.freesound.org/sequencer
GNU General Public License v3.0
10 stars 2 forks source link

Sequencer state should load when a new user connect #1

Closed DerouineauNicolas closed 6 years ago

DerouineauNicolas commented 6 years ago

Whenever a new user connects, pads should be activated with the actions already activated on other clients.

Should actions be stored on the server ?

xavierfav commented 6 years ago

I think we should store the state of the sequencer. Because you never know, you could have a lot of actions that are then cancelled. You cannot store all of them after months.

So I propose to create a state sequencer json which stores: tempo, tracks, activated steps.

valou5940 commented 6 years ago

I tried to store the state of the sequencer (tempo and selected pads) in a json object into the function toggleSelectedListener().

The state is updated whenever a client click on a pad.

This is meant to send the exact real-time state of the sequencer to the server, which then broadcast it to every new client.

The problem is when you deselect a pad previously selected, the pad "selected" in the json object must be erased.

xavierfav commented 6 years ago

In the future, we will add other fields. For instance about the audio sources (when we will browse sounds from freesound).

valou5940 commented 6 years ago