better song sorting

This commit is contained in:
2021-06-13 00:00:26 +02:00
parent 7cc905449c
commit 4b931c06d8
18 changed files with 163 additions and 117 deletions

View File

@@ -45,18 +45,13 @@ export class TransposeService {
for (let i = 0; i < 12; i++) {
const source = scale[0][i];
const mappedIndex = (i + difference + 12) % 12;
const mapped = scale[0][mappedIndex];
console.log(mapped);
map[source] = mapped;
map[source] = scale[0][mappedIndex];
}
for (let i = 0; i < 12; i++) {
const source = scale[1][i];
const mappedIndex = (i + difference + 12) % 12;
const mapped = scale[1][mappedIndex];
console.log(mapped);
map[source] = mapped;
map[source] = scale[1][mappedIndex];
}
console.log(map);
return map;
}