seamstress and norns
seamstress is a Lua scripting environment for musical communication. It was inspired by norns and makes use of much of its library, but it is not a direct port as it was intended to be run on normal computers whereas norns is tailored for specific hardware.
This document will examine the differences between these two environments, to help those familiar with norns get comfortable with seamstress.
If you are new to Lua or new to norns scripting, we highly recommend checking out the other learning resources we’ve developed.
sections
software
- Install serialosc: /docs/serialosc/setup
- Install seamstress’s dependencies
- Install seamstress by either:
- downloading a prebuilt binary via GitHub
- using homebrew:
brew tap ryleelyman/seamstress
brew install seamstress
- building from source
The grid studies: seamstress are recommended if you have a grid.
running code
seamstress is run from the terminal by executing the command seamstress
. If it is not given any filename, seamstress looks for and runs a file called script.lua
in either the current directory or in ~/seamstress/
.
We recommend exploring the examples bundled with seamstress. Execute seamstress -e
to see a list, and run any with seamstress -e SCRIPTNAME
.
navigating the library
The fundamental comparison of functions and syntax can be seen by cross-referencing the libraries (API) of each environment:
You’ll notice they are formatted very similarly and include many of the same modules. Generally if modules are represented in both places they are compatible, but keep in mind that screen
and params
are substantially different, as noted below.
audio
seamstress has no audio engine and does not output any audio on its own.
As a result, the norns audio modules do not apply. This includes engine
, softcut
, tape
, effects, and poll
.
Alternatively, seamstress can communicate via OSC or MIDI with various software (including SuperCollider) to achieve similar results.
keys and encoders
norns was designed specifically with keys and encoders as an interface, which are not present on computers. Hence, seamstress does not have this functionality.
grids, MIDI, and OSC
Both systems follow the same syntax for grids, MIDI, and OSC.
A simple grid example:
g = grid.connect()
function g.key(x,y,z)
g:led(x,y,z*15)
g:refresh()
end
For an extended grid example, run seamstress -e plasma
(source).
For an example of MIDI usage, run seamstress -e hello_midi
(source).
screen
norns has a 128x64 monochromatic screen with sixteen levels of brightness (0-15), whereas seamstress has a full-color, resizable, clickable display with magnification.
In addition to offering norns’s monochromatic screen.level(v)
, seamstress uses full-color with the with screen.color(r, g, b, a)
and one can also resize the screen with screen.set_size()
. For example:
function init()
width = 200
height = 30
screen.set_size(width, height)
end
For examples of full-color screen drawing, run:
mouse
The norns hid
module can interface with a mouse, but seamstress combines this functionality into its screen-based functions:
screen.click(x, y, state, button)
: callback executed when the user clicks the mouse on the GUI window (API)screen.mouse(x, y)
: callback executed when the user moves the mouse with the GUI window focused (API)screen.wheel(x, y)
: callback executed when the user scrolls with the mouse wheel on the GUI window (API)
For example:
function screen.click(x, y, state, button)
print("x: "..x, "y: "..y, "state: "..state, "button: "..button)
end
keyboard
norns has a keyboard
module, but seamstress combines this functionality into its screen-based functions:
screen.key(char, modifiers, is_repeat, state)
: callback executed when the user types a key into the GUI window
For additional examples, run:
parameters, PSETs, PMAPs
Both environments offer parameters, each with a UI tailored for its hardware.
syntax difference alert — seamstress adds new arguments to each parameter type, so be sure to check the API. seamstress offers many of the same parameter types as norns, excluding :add_taper
(:add_control
can be manipulated for non-linear control) and :add_file
.
- to learn more about PSET functionality, please run
seamstress -e hello_psets
(source) - to learn more about PMAP functionality, please run
seamstress -e hello_pmaps
(source)
credits
seamstress was developed and designed by Rylee Alanza Lyman, inspired by matron from norns. matron was written by @catfact
. norns was initiated by @tehn
.
This document was created by Dan Derks and Brian Crabtree.
Contributions welcome. Submit a pull request to github.com/monome/docs or e-mail help@monome.org
.