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

Tempo
ExtensionExtension

for control of tempo and for use in tempo based calculations

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

.default

.new

Arguments:

tempo

tempo in beats per second

tempoClock

The TempoClock that this Tempo object will control

.initClass

.bpm

beats per minute

Arguments:

bpm

.next

.beats2secs

convert beats to seconds

Arguments:

beats

.secs2beats

convert seconds to beats

Arguments:

secs

.tempo

tempo in beats per second

Arguments:

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:

.beats2secsKr

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

Arguments:

beats

.makeClock

Arguments:

owner

Instance Methods

.tempo

Arguments:

t

.beatsPerBar

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

Arguments:

b

.init

Arguments:

t

.bpm

Arguments:

bpm

.next

.beats2secs

Arguments:

beats

.secs2beats

Arguments:

secs

.bars2secs

Arguments:

bars

.secs2bars

Arguments:

secs

.guiClass

.kr

.destroy

.makeClock

Arguments:

owner

.cmdPeriod

.clearClocks

.clockDidClear

Examples

Tempo.kr