RPG.DJ

The tool is currently running at RPG.DJ

I started took over as DM for a DnD campaign with some of my friends. I had an idea that it could be fun to employ a soundboard during play, but I was unable to find one that satisfied my goals.

This is what I wanted:

  • to have a list of sfx playable on Button press
  • each sfx can randomize which sound file is chosen as well as pitch each time it’s played
  • volume controls for each sfx (as well as each sound file individually)
  • looping option for ambient sfx
  • a networked button panel so I could have a tablet with control
  • a networked player-vlient that’s easy to open for my friends
  • easy sound uploading from various sources

I was able to find a number soundboard and dnd sound web tools, but most were either playing music or playing static sound files, and almost none had a networked player-client.

So I made a webapp with NodeJS and React. React made development very quick, and it was a no-brainer choice given most of the front-end would be procedurally data driven.

A user’s entire workspace was kept in the browser storage, including uploaded files. This presented some challenges at first as I hit size limits fast. However, I later discovered modern browsers have an indexeddb, whose limit is much higher. This of course pressed the need for a way to download an upload a workspace for backups, which was just foe

I used a socketio server to connect the clients. One would serve as the host with the files and configuration. There were two types of clients, one remote and one player. Both would connect with a generated key string and would find the host with the help of peerjs, which was a free service to connect to peers across the internet without having to set up your own coordinator service. Connecting by key also meant that I could distribute links to the

I also integrated freesound.org using its api. I made a search function that would let a user drag results onto a sfx.

The tool works pretty well. It was my first exploration into the world of audio, and I’ve learned there’s a lot of nuance that I was not aware of.

Written on September 5, 2023