link-time
module reference
link-time
module reference
Musical time with Ableton Link.
index
- Attack-Decay enveloper from bang!.
- Create a clock source.
- Decay envelope from bang!.
- Emit events regularly.
- Low-frequency oscillator.
- Get phase.
- Get normalized phase.
- Integrate impulses using easing
- Count ticks.
details
- Attack-Decay enveloper from bang!.
(ad [clock] attack decay trigger)
Ramp from
0
to1
and back ontrigger
.clock
should be alink/clock~
stream. This argument can be omitted and the stream be passed as a dynamic definition in*clock*
instead.attack
anddecay
should be num~ streams.trigger
should be a bang! stream.
- Create a clock source.
(clock [synced] [bpm] [fps])
Creates a new
link/clock~
stream.The clock event stream is an IO that triggers other operators at a fixed frame rate.
synced
has to be a bool~ constant and defaults tofalse
.bpm
should be a num~ stream and defaults to120
.fps
has to be a num= constant and defaults to60
if omitted.
- Decay envelope from bang!.
(decay [clock] dur trigger)
Ramp from
1
to0
indur
beats ontrigger
.clock
should be alink/clock~
stream. This argument can be omitted and the stream be passed as a dynamic definition in*clock*
instead.dur
should be a num~ stream.trigger
should be a bang! stream.
- Emit events regularly.
(every [clock] period [phase] [evt])
Emits
evt
as an event once everyperiod
beats.clock
should be alink/clock~
stream. This argument can be omitted and the stream be passed as a dynamic definition in*clock*
instead.period
should be a num~ stream.phase
should be a num~ stream and defaults to 0.evt
can be a value of any type. It defaults tobang
.- the return type will be an event stream with the same type as
evt
.
- Low-frequency oscillator.
(lfo [clock] period [phase] [wave])
Oscillates betwen
0
and1
once everyperiod
beats.clock
should be alink/clock~
stream. This argument can be omitted and the stream be passed as a dynamic definition in*clock*
instead.freq
should be a num~ stream.phase
should be a num~ stream and defaults to 0.wave
selects the wave shape from one of the following:'sin'
(the default)'saw'
'tri'
- Get phase.
(tick [clock] period [phase])
Ramps from
0
toperiod
once everyperiod
beats.clock
should be alink/clock~
stream. This argument can be omitted and the stream be passed as a dynamic definition in*clock*
instead.period
should be a num~ stream.phase
should be a num~ stream and defaults to 0.
- Get normalized phase.
(ramp [clock] period [phase])
Ramps from
0
to1
once everyperiod
beats.clock
should be atime/clock!
stream. This argument can be omitted and the stream be passed as a dynamic definition in*clock*
instead.period
should be a num~ stream.phase
should be a num~ stream and defaults to 0.
- Integrate impulses using easing
(spring [clock] evt0 [evt1…])
Every arriving
evt
triggers an impulse that is integrated asclock
ticks. Returns a num~ stream that starts at 0.clock
should be alink/clock~
stream. This argument can be omitted and the stream be passed as a dynamic definition in*clock*
instead.evt!
are !-streams of structs. The following struct keys can be specified:amp
: amplitude of the impulsedur
: duration of the impulse (beats)
- Count ticks.
(tick [clock] period [phase])
Counts upwards by one every
period
beats.clock
should be alink/clock~
stream. This argument can be omitted and the stream be passed as a dynamic definition in*clock*
instead.period
should be a num~ stream and defaults to 1.phase
should be a num~ stream and defaults to 0.- returns a
num~
stream that increases by 1 everyperiod
.