Skip to content

Commit

Permalink
Update analysis.ts
Browse files Browse the repository at this point in the history
startIndex is not necessary yet (issue #445 should be dealt with separately)
  • Loading branch information
inthar-raven authored Nov 29, 2023
1 parent 7c8b8e4 commit 27b759d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/analysis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,12 @@ export function utonalFundamental(frequencies: number[], maxDivisor = 23) {
}

// Interval matrix a.k.a the modes of a scale
export function intervalMatrix(scale: Scale, startIndex: number) {
export function intervalMatrix(scale: Scale) {
const result = [];
const columns = [...Array(scale.size + 1 - startIndex).keys()];
const columns = [...Array(scale.size + 1).keys()];
for (let i = 0; i < scale.size; ++i) {
const mode = scale.rotate(i);
result.push(columns.map((j) => mode.getInterval(j + startIndex)));
result.push(columns.map((j) => mode.getInterval(j)));
}
return result;
}

0 comments on commit 27b759d

Please sign in to comment.