nest_ {
}
}
_input {
}
_output {
}
_group { }
}
_preset {
}
_pattern {
}
one of the two basic types in nest_
. for introductory info, see nests and affordances
one of the two basic types in nest_
. for introductory info, see nests and affordances
a simple container type for grouping affordances by device or module. ex: _grid.value
, _txt.enc.number
stores input behaviors of a _affordance
, data is independent of _output
stores output behaviors of a _affordance
, data is independent of _input
stores observation behavior & data for meta-affordances
an observer subtype for preset meta-affordances
an observer subtype for pattern meta-affordances
a link to the parent of a child object
the key of a child object
the order of children within a nest_
when drawn or updated by a device input. higher z values will be drawn or updated first, default = 0. here's an example of usage!
boolean value, sets whether a given object and its children are drawn + updated. useful for pagination !
the definitive datapoint of an affordance. this is the only property expected to change dynamically, though it can be initialized just like any other property. different affordances will expect different datatypes and range constraints. along with p
, k
, and z
, a pointer function cannot be assigned to value
.
the nest_
, _affordance
, or table of nests/affordances that will pass data to the _observer
whenever an affordance value
is updated.
the data that is passed from the target
s to the _observer
. usually this is type-defined. possible values are:
"input"
: arguments passed to thehandler
function"action"
: arguments passed to theaction
function (the first argument isvalue
)"value"
: the value of the affordance only
assigns a table of device keys and values to a nest structure and initializes it. this might look something like:
nest_{
...
} :connect {
g = grid.connect(),
screen = screen,
key = key,
enc = enc
}
the device key value pairs are:
g = grid.connect(n),
a = arc.connect(n),
m = midi.connect(n),
h = hid.connect(n),
screen = screen,
enc = enc,
key = key
user-defined method called immediately after a nest structure has been initialized, usually via nest_:connect()
this should be ran after updating _affordance.value
in order call the action
method and signal a device to be redrawn.
a typically user-defined method called whenever update
is called either manually or by a device, usually when value
has changed. any return value will in turn assigned value
, so the action can be used as a filter if desired
user-defined or type-defined method to convert device input (as arguments) into a value. additional return values are sent as arguments to action
. this might look something like:
handler = function(s,v,x,y,z)
if z == 1 then
return 1
else
return 0
end
end
user-defined or type-defined method to convert a value into device output. value
and a device object are sent as arguments. this might look something like:
redraw = function(self, value, g)
if value == 1 then
g:led(self.x, self.y, 15)
else
g:led(self.x, self.y, 0)
end
end
see study 2
recursively sum this nest with nest
bind affordance to param id of id
_pattern:store(n)
store the target value(s) to the nth preset slot
_pattern:store(n)
push the value(s) in the nth preset slot to the target(s)
see http://norns.local/doc/classes/pattern.html
see http://norns.local/doc/classes/pattern.html
see http://norns.local/doc/classes/pattern.html
see http://norns.local/doc/classes/pattern.html
see http://norns.local/doc/classes/pattern.html
see http://norns.local/doc/classes/pattern.html
play the pattern without restarting to the beginning