DESCRIPTION
This is a java app for making custom layouts on the monome. It consist on a paged layout (ie. 8 pages on a monome 40h), in which you can insert objects like buttons (on-off, push, etc), faders, XY, etc., so you can make your personalized layout for the monome.
Furthermore, Layouts includes an extremely simple Javascript API for making custom objects, like apps that run inside Layouts. Two examples for demonstrating the api are provided: a midi sequencer and a boiing-like app (you can find the original here: http://docs.monome.org/doku.php?id=app:boiingg) It is expected that the number of JS apps increase in the future.
LAUNCH Layouts requires Java. Download layouts.jar from here: http://github.com/downloads/jiparis/monome-layouts/layouts.jar To launch, simply type: java -jar layouts.jar configfile.json You can press "r"ENTER to reload the config file (or any external javascript file) at any time.
CONFIGURATION
Layouts has NO GUI. All the configuration is done through a configuration file in JSON format (no XMLs are needed here). You can press "r"ENTER to reload the config file at any time. Provided is a sample config file. Several options are available:
For each page you can specify the objects that you can insert. For example:
{"type":"note", "channel": 1, "note": 35, "x":0, "y":0} represents a note button at 0,0 that sends note 35 at channel 2 (channels are 0-indexed). That's all you need!!
As said before, there are several "types" of objects. All of them need the same parameters: channel, note, x, and y. In addition each type may need more parameters:
Buttons Represent a single button on the monome: note (sends note on-off messages), cc (sends cc message on push), toggle (sends activation-deactivation messages as noteon noteoff)
note: for cc buttons, the "note" parameter indicates de CC number.
Faders Represent horizontal ("type":"xfader") or vertical faders ("type":"fader")
{"type":"fader", "channel": 1, "note": 26, "x":6, "y":0, "size": 7},
Groups It is possible to create several objects of the same type at once. It's useful for buttons, but also for faders.
{"type":"group", "of":"note", "channel": 1, "note": 35, "x":0, "y":0, "width":7, "height":8} {"type":"group", "of":"fader", "channel": 1, "note": 26, "x":0, "y":0, "size": 8, "width":7, "height":1},
As you can see, "type" is set to "group", and the actual type is indicated in "of". Two more parameters are needed: "width" and "height" of the group. Each button in the group increments its "note" param by one, in a chromatic style. It is possible to alter this behavior, indicating an extra optional parameter "mode". Possible values for "mode" are "chromatic" (default) and "fourths" (as Streta in this video: http://www.youtube.com/watch?v=uQm3xbTxJRc). More to come.
XY This object represents a XY surface.
{"type":"xyfader","channel": 0, "note":35, "note2":36, "x":0, "y":0, "width": 7, "height":8}
JAVASCRIPT API If those objects are not enough for you, you can always create your own components in javascript. The examples folder contains some useful components, like a boiinng app and a sequencer. Here is the boiinng app. You can instantiate as many as you want. {"type":"js", "file":"examples\boiing.js", "channel": 6, "note":71, "x":0, "y":0, "width": 7, "height":8, "res":"1/8"}
There are some root objects that you can use in your scripts:
More documentation is on the way. Please, look at the code examples!!