repl-looper
project name: repl-looper
project url: https://github.com/awwaiid/repl-looper
author: awwaiid
description: mash of REPL and looper; a live performance code sequencer with web UI
discussion url: https://llllllll.co/t/51485
tags: sequencer looper grid

Norns REPL-LOOPER

Anagogically integrated UI for Norns / Matron / Grid

Experimental performance and creative tool, mashing together several things that I like. REPL for interactive code creating. Grid to have a tactile UI (maybe we’ll throw in a midi pedal too). Dance between client and host, between recording loops and loops that can modify other loops and themselves.

Check out the dev branch and dev branch development journal for ongoing development work. The main branch is the current “stable” (haha) version.

Recent Releases

Installation and Usage

Install directly from maiden or by running this in the maiden/matron console:

;install https://github.com/awwaiid/repl-looper

Then start repl-looper on the norns. The norns screen will show some status information. Interaction is primarily done through a web-browser and grid. You can access the web interface at:

http://norns.local/api/v1/dust/code/repl-looper/ui/dist/repl-looper.html (or http://bit.ly/norns-repl-looper)

The browser interface is an alternative to maiden’s REPL with a few different features and style. The basic idea is the same – you run Lua commands and see the results. Verify that everything is running with some simple math

2+2

Which should output 4 (give or take). The built-in engine is a mash-up of Timber, Goldeneye, and Molly the Poly. There is a shortcut for a Timber-based piano sample, p. There is also an instance of Molly pre-defined. Try these:

-- Timber piano
p'c'
p'd'
p(68)

molly:note(60)
molly:randomize_params()
molly:note(62)
molly:stop()

Next thing to play with is loops/sequences. There are 8 pre-defined 16-step loops, one for each row, put into variables a..h. Start by recording into loop a:

a:rec()
-- loop 'a' is now playing and recording! You can see the steps
-- both on the grid

p'c'
-- now wait a bit
p'd'
-- the loop is playing and will wrap back around

a:stop() -- this stops recording but keeps playing
a:stop() -- stop again to also stop playing

-- At this point press some of the grid buttons to trigger all the
-- events recorded at that step immediately (ignoring their sub-step timing)

a:lua() -- show the loop contents

a:play() -- start loop again
a:clear() -- erase loop contents

Now that you have the script running on norns and the local UI up in a browser and everything working together, read through Techniques to get some ideas!

Resources

Reference

UI

Library and Live-Coding Helpers

Development

When developing you can run the UI directly on your laptop, but you’ll need to use docker or install dependencies (nodejs/npm). You get live-reload of changes and such. Slightly-evil the dist dir is then checked in to git for serving from the norns/maiden webserver. For the UI (a VueJS app):

cd ui

# Direct
npm install
npm run dev

# OR Docker, if you like
docker-compose up

On the norns side we need to run the lua server-side. During dev I do it this way:

# Auto-push to norns
./util/watch-sync.sh

Future Ideas

Shout Outs!