Class: BPM

Addon#BPM(renderer, options)

new BPM(renderer, options)

BPM calculates beat per minutes based on a 'tap' function
Tapped BPM Example on codepen:
codepen

BPM returns a floating point between 1 and 0, in sync with a bpm the BPM is calculated based on a 'tap' function

Parameters:
Name Type Description
renderer GlRenderer
options Object

optional

Implements:
Source:
Example
var mixer1 = new Mixer( renderer, { source1: mySource, source2: myOtherSource })
var bpm = new BPM( renderer );
bpm.add( mixer1.pod )
window.addEventListener('keypress', function(ev) {
  if (ev.which == 13) bpm.tap()
})

Members

bpm

Beats Per Minute

Source:

bpm_float

BPM Float, current position of the BPM
If the BMP is a Sinus going up and down, the float shows up where it is on the curve
'up' is 1 and down is '0', oscillating.

Source:

bps

Tapping beat control

Source:

mod

Tapping beat control

Source:

sec

Second counter

Source:

useMicrophone

Audio analysis

Source:

Methods

getBpm()

Gets the current BPM (in bpm, as render() gives a float)

Source:

modDown()

half the bpm

Source:

modUp()

double the bpm

Source:

tap()

Tapping beat control

Source: