Tempo:
Filter:
Classes (extension) | Libraries > crucial > Scheduling

Tempo : Object
ExtensionExtension

for control of tempo and for use in tempo based calculations
Source: Tempo.sc

Description

This class represents the concept of tempo. It can be used for translations between seconds, beats and bars. It holds an instance of TempoClock which it keeps set to its own tempo.

It can be used to convert beats <-> seconds, but this value is only accurate at the time you make the computation. If the tempo is changed the value is no longer valid.

TempoBus adds itself as a dependant to the Tempo object, so when the tempo changes, it is informed, and it updates the value on the bus.

All class methods refer to the default global tempo. You can create an instance of Tempo if you need individual, separate tempii.

Class Methods

Tempo.default

Tempo.new(tempo: 1.0, tempoClock)

Arguments:

tempo

tempo in beats per second

tempoClock

The TempoClock that this Tempo object will control

Tempo.initClass

Tempo.bpm

Tempo.bpm = bpm

beats per minute

Arguments:

bpm

Tempo.next

Tempo.beats2secs(beats)

convert beats to seconds

Arguments:

beats

Tempo.secs2beats(secs)

convert seconds to beats

Arguments:

secs

Tempo.tempo

Tempo.tempo = tempo

tempo in beats per second

Arguments:

tempo

Tempo.kr

when used in an Instr in a Patch this will insert a control rate UGen that will emit the tempo. changing the tempo in the language will change this tempo on the server.

Discussion:

Tempo.beats2secsKr(beats)

when used in an Instr in a Patch this will convert beats to seconds, inserting a control rate UGen with the result.

Arguments:

beats

Tempo.makeClock(owner)

Arguments:

owner

Inherited class methods

Instance Methods

.tempo

.tempo = t

Arguments:

t

.beatsPerBar

.beatsPerBar = b

Bored with the old 4/4 ? Tempo.beatsPerBar = 7.0;

Arguments:

b

.init(t)

Arguments:

t

.bpm

.bpm = bpm

Arguments:

bpm

.next

.beats2secs(beats)

Arguments:

beats

.secs2beats(secs)

Arguments:

secs

.bars2secs(bars)

Arguments:

bars

.secs2bars(secs)

Arguments:

secs

.guiClass

.kr

.destroy

.makeClock(owner)

Arguments:

owner

.cmdPeriod

.clearClocks

.clockDidClear

Inherited instance methods

Examples

Tempo.kr