MCPcopy Create free account
hub / github.com/CoderLine/alphaTab / pickSlotDuration

Function pickSlotDuration

packages/playground/src/apps/RecorderApp.ts:341–354  ·  view source on GitHub ↗
(subdivisionsPerBeat: number)

Source from the content-addressed store, hash-verified

339}
340
341function pickSlotDuration(subdivisionsPerBeat: number): alphaTab.model.Duration {
342 switch (subdivisionsPerBeat) {
343 case 2:
344 return alphaTab.model.Duration.Eighth;
345 case 4:
346 return alphaTab.model.Duration.Sixteenth;
347 case 8:
348 return alphaTab.model.Duration.ThirtySecond;
349 case 16:
350 return alphaTab.model.Duration.SixtyFourth;
351 default:
352 throw new Error(`unsupported subdivisionsPerBeat: ${subdivisionsPerBeat}`);
353 }
354}

Callers 1

constructorMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected