Skip to content

Barnard-PL-Labs/TSLSynthesizer

Repository files navigation

The TSL Synthesis Synthesizer

Try it live!

This is the TSL Synthesis Synthesizer, a keyboard synthesizer that can dynamically apply effects depending on users' specifications.

Recommended usage is through a MIDI controller. Connect your MIDI device to your computer, load the website, and start playing! Note, however, that WebMIDI is only currently supported for Google Chrome, MS Edge and Opera -- it will not work on Firefox and Safari. You can still use the UI keyboard, as WebAudio is supported by all major browsers.

Synthesis uses Temporal Stream Logic, a logic for reactive synthesis that separates control and data.

Tutorial

Demo

Local installation

Dependencies

  1. Node.js
  2. Docker
  3. The haskell tool stack

Node.js and docker are widely available, and on most official repositories, i.e. via apt, snap, pacman.

The haskell tool stack can be installed on most systems with

curl -sSL https://get.haskellstack.org/ | sh

If not, the haskell stack documentation has a variety of other installation methods.

Installation

The build process involves installing node.js packages, and configuring stack, all of which do not interfere with system installations; they are local to this project. The project does, however, pull a docker image, which you may delete after playing with the project.

Simply run:

chmod +x install.sh
./install.sh

Depending on your system, you may need to grant sudo privilege to docker.

Retry with '--allow-different-user'

Depending on your system, you may get the following error:

You are not the owner of '~/.stack/'. Aborting to protect file permissions.
Retry with '--allow-different-user' to disable this precaution.

If you get this error, add the following line in your ~/.stack/config.yaml:

allow-different-user: true

Run the application

To run the application:

node server.js

Then open your favorite browser to localhost:4747, and enjoy!

To refresh the ssl cert

ps aux | grep 'node' kill (node processes) certbot --standalone renew sudo nohup node server.js & sudo nohup node http_redirect.js &

TODO make it a cron job (renews once every three months?)

Acknowledgments

The UI is adopted from qwerty hancock.