scripts / norns
nornsvae
ML-powered drum sequencer for Norns
install
In maiden's REPL (the >> prompt at the bottom of the editor), run:
;install https://github.com/jacbz/NornsVAEOr add the splines catalog to maiden and install it from the project manager. Restart norns if the script ships a new engine.
readme from jacbz/nornsvae
NornsVAE

NornsVAE is a machine-learning-powered drum sequencer for the Norns platform. It uses Google's MusicVAE model to generate drum sequences. Because of the limited computing power on a Rasberry Pi, computations are performed by a separate Python server, which needs to be independently run on a computer in the same network.
It is being developed as part of my Master's thesis in computer science, which aims to research interactive music generation with deep learning.
The project consists of two parts:
- a client, written as a Norns script in Lua
- a server, implemented as a Python server (Flask) that wraps a MusicVAE (Tensorflow) instance
Running the server
There are two options for running server:
- Pre-built distributable (Windows)
- Running from source (Mac/Windows)
If successfully started, the console will display:
* Running on http://<ip address>:5000/ (Press CTRL+C to quit)
Sadly, installing the server requires a large number of dependencies (in particular Tensorflow).
Pre-built distributable (Windows)
Download the distributables here and run server.exe.
To uninstall, simply delete the folder; nothing is installed locally.
Running from source (Mac)
On Mac, you'll need to run the server from source. You'll need Python and Miniforge.
Installation
Download Miniforge.
If you have an M1 Mac, you'll need the arm64 (Apple Silicon) version. Download the script here and install it:
bash Miniforge3-MacOSX-arm64.shIf you have an Intel Mac, you'll need the x86_64 version. Download the script here and install it:
bash Miniforge3-MacOSX-arm64.shOnce this is complete, you can set up a new Conda environment where we will install the required packages:
conda create --name nornsvae python=3.8Now you can use (activate) this environment:
conda activate nornsvaeThe command line should now display
(nornsvae).Install Tensorflow inside the new environment:
conda install -c apple tensorflow-depsIf you have an M1 Mac, install
tensorflow-macos:pip install tensorflow-macosIf you have an Intel Mac, install
tensorflow:pip install tensorflowDownload the NornsVAE Server here and unzip it. Run the following commands from within the
serverfolder:pip install -r requirements.txtMake sure that you are in the NornsVAE environment:
conda activate nornsvae
If you have trouble installing the requirements, see the Troubleshooting Guide.
If you wish to uninstall, delete the nornsvae environment with conda env remove --name nornsvae or uninstall Miniforge altogether.
Run
Once you have installed all dependencies, simply navigate to the server folder and run the server using python server.py. Make sure that you are in the NornsVAE environment: conda activate nornsvae
The terminal will display the local IP address of your computer, if everything works.
Running the client
- From maiden, type
;install https://github.com/jacbz/nornsvae_client - Write the IP address of the server into the file
server-ip, located inside the script folder - You can now start using the script!