Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always show accurate information in the interval matrix #433

Merged
merged 1 commit into from
Nov 26, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/views/AnalysisView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@ import { intervalMatrix } from "@/analysis";
import type { VirtualSynth } from "@/virtual-synth";
import ChordWheel from "@/components/ChordWheel.vue";
import { computed, ref } from "vue";
import type { Interval, IntervalOptions, Scale } from "scale-workshop-core";
import {
reverseParseInterval,
type Interval,
type IntervalOptions,
type Scale,
} from "scale-workshop-core";

const MAX_SCALE_SIZE = 100;

Expand Down Expand Up @@ -73,7 +78,8 @@ function formatMatrixCell(interval: Interval) {
return interval.centsString();
}
// If we're here the name should faithfully represent the interval.
return interval.name;
// Reverse parsing takes care of obscure corner cases.
return reverseParseInterval(interval);
}

const matrix = computed(() => {
Expand Down