Skip to content
This repository has been archived by the owner on Jan 1, 2023. It is now read-only.
/ jambeez-server Public archive

Server of the JamBeez cross-platform collaborative drum machine

Notifications You must be signed in to change notification settings

JamBeez/jambeez-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jambeez-server

Apache Config

<VirtualHost *:443>
        ServerName FQDN

        ProxyPreserveHost On
        ProxyRequests Off
        RewriteEngine On
        RewriteCond %{HTTP:Upgrade} =websocket [NC]
        RewriteRule ^/jambeez/(.*)    wss://localhost:8080/jambeez/$1 [P,L]
        ProxyPass "/jambeez" "ws://127.0.0.1:8080/jambeez"
        ProxyPass "/" "http://127.0.0.1:8080/"
</VirtualHost>

How to start

Start your own server with:

docker pull ghcr.io/jambeez/jambeez-server:latest
docker run -it --rm -p 8080:8080 ghcr.io/jambeez/jambeez-server:latest

Define your endpoint with: ws://localhost:8080/jambeez

Websocket Communication

Intents

Intent Description Payload to Server Response From Server
lobby:create Creates a new lobby - Lobby
lobby:join User joins to an existing lobby JoinRequest To joined user: Lobby and to other members: User with intent: user:joined
lobby:update_parts Updates the parts of the lobby Parts Overwrites all parts of the lobby with updated parts. To others: Parts
lobby:add_part Adds a part from a lobby Adds new default part to the sessions. Part
lobby:remove_part Removes a part from a lobby PartID Deletes the part from in all sessions. To others: PartId
part:change_bpm Sets the bpm of a part PartChange Overwrites the bpm of the part and sends the update to all: PartChange
part:change_bars Sets the bars of a part PartChange Overwrites the bars of a part and sends the update to all: PartChange
part:add_track Adds a track to a part PartChange Adds the track to the part: NewTrackResponse
part:remove_track Removes a track from a part PartChange Removes the track from the part in all sessions to all: PartChange
part:change_sig_lower Sets the sig_lower of a part PartChange Overwrites the sig_lower of the part and sends the update to all: PartChange
part:change_sig_upper Sets the sig_upper of a part PartChange Overwrites the sig_upper of the part and sends the update to all: PartChange
track:toggle_mute Mutes/ Unmutes the track TrackChange Sends the toggled mute to all: TrackChange
track:set_sample Sets the sample to the track TrackChange Overwrites the sample of the track and sends the update to all: TrackChange
track:change_volume Sets the volume of the track TrackChange Overwrites the volume of the track and sends the update to all: TrackChange
track:set_beats Sets the beats to the track TrackChange Overwrites the beats of the track and sends the update to all: TrackChange
user:joined Message that another user joined to the lobby - User
user:change_alias Message that another user changed its alias -