Class: Metronome

music21.tempo. Metronome

new Metronome(tempo)

Parameters:
Name Type Argument Default Description
tempo number <optional>
music21.tempo.baseTempo

the tempo of the metronome to start

Properties:
Name Type Argument Default Description
tempo number
numBeatsPerMeasure Int <optional>
4
minTempo number <optional>
10
maxTempo number <optional>
600
flash bool <optional>
false

flash the tempo

silent bool <optional>
false

play silently

beat Int

current beat number

chirpTimeout Int

an index of a timeout object for chirping

Source:

Extends

Methods

<static> Metronome#addDiv(where) → {JQueryDOMObject}

add a Metronome interface onto the DOM at where

Parameters:
Name Type Argument Default Description
where JQueryDOMObject | DOMObject <optional>
'body'
Source:
Returns:
  • a div holding the metronome.
Type
JQueryDOMObject

<static> Metronome#chirp()

Play a note (a higher one on the downbeat) and start the metronome chirping.

Source:

<static> Metronome#decreaseSpeed(n) → {number}

Decrease the metronome tempo one "click"

To change the tempo, just set this.tempo = n

Parameters:
Name Type Description
n Int

number of clicks to the left

Source:
Returns:

new tempo

Type
number

<static> Metronome#increaseSpeed(n) → {number}

Increase the metronome tempo one "click".

Value changes depending on the current tempo. Uses standard metronome guidelines.

To change the tempo, just set this.tempo = n

Parameters:
Name Type Description
n Int

number of clicks to the right

Source:
Returns:

new tempo

Type
number

<static> Metronome#stopChirp()

Stop the metronome from chirping.

Source:
Music21j, Copyright © 2013-2018 Michael Scott Cuthbert and cuthbertLab.
Documentation generated by JSDoc 3.5.5 on Wed Jul 4th 2018 using the DocStrap template.