* Converts a numerical value to its ticks equivalent. * @param duration the numerical proportion to convert. (i.E. timesignature denominator, note duration,...)
(duration: number)
| 41 | * @param duration the numerical proportion to convert. (i.E. timesignature denominator, note duration,...) |
| 42 | */ |
| 43 | public static valueToTicks(duration: number): number { |
| 44 | let denomninator: number = duration; |
| 45 | if (denomninator < 0) { |
| 46 | denomninator = 1 / -denomninator; |
| 47 | } |
| 48 | return (MidiUtils.QuarterTime * (4.0 / denomninator)) | 0; |
| 49 | } |
| 50 | |
| 51 | public static applyDot(ticks: number, doubleDotted: boolean): number { |
| 52 | if (doubleDotted) { |
no outgoing calls
no test coverage detected