Skip to content

module node liveosc Clip.API

Tom edited this page Jul 17, 2014 · 6 revisions

Class: Clip

node-liveosc~ Clip

new Clip(liveosc, track, id)

Clip object, represents a clip in the Ableton Live set.

Parameters:
Name Type Description
liveosc Object

LiveOSC instance

track Object

Track this Clip belongs to

id Number

id of the clip

Source:

Members

coarse :Number

The coarse pitch of the clip (audio clips only)

Type:
  • Number
Source:

eventEmitter :EventEmitter

EventEmitter for clip events

Type:
  • EventEmitter
Source:

fine :Number

The fine pitch of the clip (audio clips only)

Type:
  • Number
Source:

id :Number

The id of this clip

Type:
  • Number
Source:

length :Number

The length of the clip in beats

Type:
  • Number
Source:

liveosc :Object

Instance of LiveOSC

Type:
  • Object
Source:

loopend :Number

The loop end position of the clip in beats

Type:
  • Number
Source:

loopstart :Number

The loop start position of the clip in beats

Type:
  • Number
Source:

loopstate :Number

The loop enabled state of the clip

Type:
  • Number
Source:

name :String

The name of this clip

Type:
  • String
Source:

state :Number

The playing state of this clip

0 = empty (no clip) 1 = stopped 2 = playing 3 = triggered

Type:
  • Number
Source:

track :Object

The track this clip belongs to

Type:
  • Object
Source:

warping :Number

The warping mode of the clip

0 = Beats 1 = Tones 2 = Texture 3 = Repitch 4 = Complex 5 = Complex Pro

Type:
  • Number
Source:

Methods

destroy()

Called when a clip is refreshed or destroyed

Source:

emitEvent(ev, params)

Emit a clip event

Parameters:
Name Type Description
ev String

event name

params Object

event parameters

Source:

on(ev, cb)

Listen for a clip event, current events are:

state loopstart loopend loopstate warping coarse fine name destroy

Parameters:
Name Type Description
ev string

event name

cb function

callback

Source:

play()

Trigger the clip to start playing

Source:

refresh()

Refresh the state of the clip

Source:

setLoopend(loopend)

Sets the loop end position of the clip in beats

Parameters:
Name Type Description
loopend Number

the loop end position in beats

Source:

setLoopstart(loopstart)

Sets the loop start position of the clip in beats

Parameters:
Name Type Description
loopstart Number

the loop start position in beats

Source:

setLoopstate(loopstate)

Enable or disable looping of the clip

Parameters:
Name Type Description
loopstate Number

0 to disable, 1 to enable

Source:

setName(name)

Set the name of the clip

Parameters:
Name Type Description
name String

the new clip name

Source:

setPitch(coarse, fine)

Set the pitch of the clip (audio only)

Parameters:
Name Type Description
coarse Number

the coarse pitch of the clip

fine Number

the fine pitch of the clip

Source:

setWarping(warping)

Set the warping mode of the clip

0 = Beats 1 = Tones 2 = Texture 3 = Repitch 4 = Complex 5 = Complex Pro

Parameters:
Name Type Description
warping Number

the new warping mode

Source:

stop()

Trigger the clip to stop playing

Source:

view()

Focus the clip

Source:

<inner> clipinfoListener(trackId, clipId, state, length)

Listen for /live/clip/info

Parameters:
Name Type Description
trackId Number

the id of the track

clipId Number

the id of the clip

state Number

the new playing state of the clip

length Number

the new length of the clip

Source:

<inner> clipnameListener(trackId, clipId, name)

Listen for /live/clip/name

Parameters:
Name Type Description
trackId Number

the id of the track

clipId Number

the id of the clip

name String

the new name of the track

Source:

<inner> loopendListener(trackId, clipId, loopend)

Listen for /live/clip/loopend

Parameters:
Name Type Description
trackId Number

the id of the track

clipId Number

the id of the clip

loopend Number

the new loopend position

Source:

<inner> loopstartListener(trackId, clipId, loopstart)

Listen for /live/clip/loopstart

Parameters:
Name Type Description
trackId Number

the id of the track

clipId Number

the id of the clip

loopstart Number

the new loopstart position

Source:

<inner> loopstateListener(trackId, clipId, loopstate)

Listen for /live/clip/loopstate

Parameters:
Name Type Description
trackId Number

the id of the track

clipId Number

the id of the clip

loopstate Number

the new loop state

Source:

<inner> pitchListener(trackId, clipId, coarse, fine)

Listen for /live/pitch

Parameters:
Name Type Description
trackId Number

the id of the track

clipId Number

the id of the clip

coarse Number

the new coarse pitch

fine Number

the new fine pitch

Source:

<inner> warpingListener(trackId, clipId, warping)

Listen for /live/clip/warping

Parameters:
Name Type Description
trackId Number

the id of the track

clipId Number

the id of the clip

warping Number

the new warping state

Source:

Generated with wicked.

Clone this wiki locally