feat: core types, time, rng, model fetch

Co-Authored-By: Claude Haiku 5.5 <[email protected]>
This commit is contained in:
Lucas Winther
2026-10-30 02:38:02 +01:00
co-authored by Claude Haiku 5.5
parent 0a6ec1dc40
commit bac4fbeb1d
8 changed files with 140 additions and 2 deletions
+10
View File
@@ -0,0 +1,10 @@
import { TPQ } from "./types.ts";
// One quarter note = TPQ ticks.
export function ticksToSeconds(tick: number, bpm: number): number {
return (tick / TPQ) * (60 / bpm);
}
export function secondsToTicks(s: number, bpm: number): number {
return s * (bpm / 60) * TPQ;
}