a Max for Live device for writing javascript in Ableton
the current tempo of the live set
the current time signature of the live set
An object of the form:
grid:
bar: float
beat: float
sxtn: float
tick: float
representing the current location of the playhead
An empty object that can be used to store values across script evaluations.
output a value to a mapper
wait for the specified time in milliseconds, then run the given function
An alias for setTimeout
returns a random value between low and high. Defaults to a random value between 0 and 1
round a number down to an integer
linearly scale a value from range s1 to s2, to range e1 to e2
linearly scale a value between 0 and 1 to range e1 to e2
linearly scale a value between s1 and s2 to a float between 0 and 1
convert a continuous value between 0 and 1 to a discrete number of steps
convert a value between 0 and 1 to an int between 0 and 127
convert an int between 0 and 127 to a float between 0 and 1
convert a freqency in hertz to the corresponding midi note number
convert a midi note number to a frequency in hertz
confine a value to range min to max
force a midi value to the nearest midi value in a scale. Scales are defined as an array of ints between 0 and 11 representing the twelve chromatic notes of western music theory.
run a function on each item in an array modifying it in place.
map each item in an array to a new value and return the new array.
returns an array of ints from 0 to len - 1
returns an array of zeros of length len