Skip to content

Commit 11792b8

Browse files
authored
refactor(core): keep the rhythm files under their comment share
Drops doc comments whose function or field name already says the same thing.
1 parent 59b4c9b commit 11792b8

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

‎packages/core/src/audioRhythm.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ export interface Rhythm {
4040
downbeats: Downbeats;
4141
}
4242

43+
/** Log energy per frame in log-spaced bands, `fps` frames per second, and a slower pitch-class profile. */
4344
export interface BandFrames {
4445
fps: number;
4546
bands: Float64Array[];
46-
/** Twelve pitch-class magnitudes per frame, `chromaFps` frames per second. */
4747
chroma: Float64Array[];
4848
chromaFps: number;
4949
}
@@ -217,7 +217,6 @@ function autocorrelation(curve: Float64Array, maxLag: number): Float64Array {
217217
return ac.map((v) => v / zero);
218218
}
219219

220-
/** Log-normal around 120 BPM, 0.8 octave wide. */
221220
const tempoPrior = (lag: number, fps: number) =>
222221
Math.exp(-0.5 * (Math.log2(60 / (lag / fps) / 120) / 0.8) ** 2);
223222

@@ -450,6 +449,7 @@ export const STEADY_BEAT_CONFIDENCE = 0.15;
450449
const beatConfidence = (clarity: number, lift: number) =>
451450
round(Math.max(0, Math.min(1, clarity)) * Math.max(0, Math.min(1, lift / 3)));
452451

452+
/** Beats and downbeats of `frames`, a signal's band energies and chroma. */
453453
function rhythmOf(frames: BandFrames): Rhythm {
454454
const curves = onsetCurves(frames);
455455
const { period, clarity } = beatPeriod(curves.broad, curves.fps);

‎packages/core/src/audioSections.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ function blockParts({ fps, bands, chroma, chromaFps }: BandFrames): number[][] {
5959
return blocks;
6060
}
6161

62-
/** Timbre and harmony each contribute half the block's squared length. */
6362
function blockFeatures(frames: BandFrames): number[][] {
6463
const blocks = blockParts(frames);
6564
standardizeBands(blocks);

0 commit comments

Comments
 (0)