All Classes Namespaces Functions Variables Enumerations Enumerator Modules Pages
Public Types | Static Public Member Functions | List of all members
TempoSyncer Class Reference

Public Types

enum  Tempo

Static Public Member Functions

static int getTempoInSamples (double hostTempoBpm, double sampleRate, Tempo t)
static float getTempoInMilliSeconds (double hostTempoBpm, Tempo t)
static float getTempoInHertz (double hostTempoBpm, Tempo t)
static const String & getTempoName (int t)
static Tempo getTempoIndex (const String &t)
static void initTempoData ()

Detailed Description

A class that handles temposyncing.

All methods are static and it holds no data, so you have to get the host bpm before you can use this class.

If the supplied hostTempo is invalid (= 0.0), a default tempo of 120.0 is used.

Member Function Documentation

static Tempo getTempoIndex ( const String &  t)

Returns the index of the tempo with the name 't'.

static float getTempoInHertz ( double  hostTempoBpm,
Tempo  t 

Returns the tempo as frequency (in Hertz).

static float getTempoInMilliSeconds ( double  hostTempoBpm,
Tempo  t 

Returns the time for the specified tempo in milliseconds.

static int getTempoInSamples ( double  hostTempoBpm,
double  sampleRate,
Tempo  t 

Returns the sample amount for the specified tempo.

static const String& getTempoName ( int  t)

Returns the name of the tempo with the index 't'.

static void initTempoData ( )

Fills the internal arrays. Call this on application start.

©2017 HISE. This documentation is autogenerated from the HISE source code using Doxygen.