Requestpolypressure( key, function ), Requestpitchwheel( function ), Requestchannelpressure( function ) – Expert Sleepers Augustus Loop v2.4.1 User Manual

Page 64: Time(), Requesttimedcallback( interval, function )

Advertising
background image

local function handlePC( channel, value )

-- do stuff

end
requestProgramChange( 2, handlePC )

requestPolyPressure( key, function )

Request that the given function be called in response to a MIDI poly pressure (polyphonic
aftertouch) event on the given key. E.g.

local function handlePolyPressure( channel, key, value )

-- do stuff

end
requestPolyPressure( 60, handlePolyPressure )

requestPitchWheel( function )

Request that the given function be called in response to a MIDI pitch wheel event. NB the
value passed to the handler function is the raw 14 bit MIDI value, not e.g. a normalised
±1.0 value. E.g.

local function handlePitchWheel( channel, value )

-- do stuff

end
requestPitchWheel( handlePitchWheel )

requestChannelPressure( function )

Request that the given function be called in response to a MIDI channel pressure (after-
touch) event. E.g.

local function handleChannelPressure( channel, value )

-- do stuff

end
requestChannelPressure( handleChannelPressure )

time()

Returns a value in seconds. The value itself is not particularly meaningful, but if you call it
twice and subtract the two values you will have the time interval between the two calls.
E.g.

time1 = time()

-- do stuff

time2 = time()
print( "elapsed time", time2-time1 )

requestTimedCallback( interval, function )

Requests that the given function should be called after interval seconds. Returns a timer
object that can be passed to cancelTimer() (see below). E.g.

local function timerTimeOut()

print( "it is now 2 seconds later" )

Advertising