2020-10-03 02:50:15 -04:00
|
|
|
package;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* ...
|
|
|
|
* @author
|
|
|
|
*/
|
|
|
|
class Conductor
|
|
|
|
{
|
|
|
|
public static var bpm:Int = 100;
|
|
|
|
public static var crochet:Float = ((60 / bpm) * 1000); // beats in milliseconds
|
|
|
|
public static var stepCrochet:Float = crochet / 4; // steps in milliseconds
|
|
|
|
public static var songPosition:Float;
|
|
|
|
public static var offset:Float = 0;
|
|
|
|
|
2020-10-03 13:36:39 -04:00
|
|
|
public static var safeFrames:Int = 5;
|
|
|
|
public static var safeZoneOffset:Float = (safeFrames / 60) * 1000; // is calculated in create(), is safeFrames in milliseconds
|
|
|
|
|
2020-10-03 02:50:15 -04:00
|
|
|
public function new() {}
|
2020-10-04 20:53:49 -04:00
|
|
|
|
|
|
|
public static function changeBPM(newBpm:Int)
|
|
|
|
{
|
|
|
|
bpm = newBpm;
|
|
|
|
|
|
|
|
crochet = ((60 / bpm) * 1000);
|
|
|
|
stepCrochet = crochet / 4;
|
|
|
|
}
|
2020-10-03 02:50:15 -04:00
|
|
|
}
|