Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
inthar-raven authored Nov 27, 2023
1 parent 6589dcb commit 89abc03
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) {
export function intervalMatrix(scale: Scale, startIndex: number) {
const result = [];
const degrees = [...Array(scale.size + 1).keys()];
const degrees = [...Array(scale.size + 1 - startIndex).keys()];
for (let i = 0; i < scale.size; ++i) {
const mode = scale.rotate(i);
result.push(degrees.map((j) => mode.getInterval(j)));
result.push(degrees.map((j) => mode.getInterval(j + startIndex)));
}
return result;
}

0 comments on commit 89abc03

Please sign in to comment.