diff --git a/src/App.vue b/src/App.vue
index c441d41b..4ba32701 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -929,6 +929,7 @@ watch(degreeDownCode, (newValue) =>
Build Scale
Analysis
+ Lattice
Virtual Keyboard
Virtual QWERTY
diff --git a/src/components/ScaleLattice.vue b/src/components/ScaleLattice.vue
new file mode 100644
index 00000000..baaac6bb
--- /dev/null
+++ b/src/components/ScaleLattice.vue
@@ -0,0 +1,346 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/router/index.ts b/src/router/index.ts
index ce43c333..24a999d2 100644
--- a/src/router/index.ts
+++ b/src/router/index.ts
@@ -42,6 +42,11 @@ const router = createRouter({
name: "analysis",
component: () => import("../views/AnalysisView.vue"),
},
+ {
+ path: "/lattice",
+ name: "lattice",
+ component: () => import("../views/LatticeView.vue"),
+ },
{
path: "/midi",
name: "midi",
diff --git a/src/utils.ts b/src/utils.ts
index 9cfd7061..8d6e469c 100644
--- a/src/utils.ts
+++ b/src/utils.ts
@@ -238,3 +238,24 @@ export function computedAndError(
const error = computed(() => valueAndError.value[1]);
return [value, error];
}
+
+// Calculates euclidean distance for monzos, as it assumes that if points are not of the same dimension, then the missing dimensions have a value of zero.
+export function monzoEuclideanDistance(
+ equavePrimeIndex: number,
+ point1: number[],
+ point2: number[]
+): number {
+ // Ensure that both points have the same dimension
+ const maxDimension = Math.max(point1.length, point2.length);
+ // Pad the shorter point with zeroes to match the longer point's dimension
+ const point1_ = point1.concat(Array(maxDimension - point1.length).fill(0));
+ const point2_ = point2.concat(Array(maxDimension - point2.length).fill(0));
+
+ const distance = Math.hypot(
+ ...point1_.map((coord1, index) => {
+ return index === equavePrimeIndex ? 0 : point2_[index] - coord1;
+ })
+ );
+
+ return distance;
+}
diff --git a/src/views/AboutView.vue b/src/views/AboutView.vue
index aedeea0e..9c0f5b33 100644
--- a/src/views/AboutView.vue
+++ b/src/views/AboutView.vue
@@ -37,7 +37,8 @@
Sevish - UI/UX designer
Vincenzo Sicurella - developer
Lajos Mészáros - developer
- Forrest Cahoon - developer
+ Forrest Cahoon - developer
+ Videco - developer
diff --git a/src/views/LatticeView.vue b/src/views/LatticeView.vue
new file mode 100644
index 00000000..1e348080
--- /dev/null
+++ b/src/views/LatticeView.vue
@@ -0,0 +1,40 @@
+
+
+
+
+ Lattice visualization
+
+
+
+
+