-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Labels
enhancementNew feature or requestNew feature or request
Description
An enhancement to the Translate library of a method that converts various duration values from different platforms to a corresponding millisecond value based on a set tempo.
example
const TL = require('total-serialism').Translate;
TL.setTempo(120);
//=> set tempo to 120 beats per minute
var rhythm = [8n, 4n, 16n];
TL.toTime(rhythm)
//=> [ 250, 500, 125 ]But could also work with division notation
const TL = require('total-serialism').Translate;
TL.setTempo(120);
//=> set tempo to 120 beats per minute
var rhythm = ['1/8', '1/4', '1/16'];
TL.toTime(rhythm)
//=> [ 250, 500, 125 ]Or with floating point ratio values
const TL = require('total-serialism').Translate;
TL.setTempo(120);
//=> set tempo to 120 beats per minute
var rhythm = [0.125, 0.25, 0.0625];
TL.toTime(rhythm)
//=> [ 250, 500, 125 ]Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request