From fa9cc732579bc0e140c9ca07b22749195579cf25 Mon Sep 17 00:00:00 2001 From: Lumi Pakkanen Date: Thu, 4 Apr 2024 19:09:35 +0300 Subject: [PATCH] Implement a "repeat" modifier ref #406 --- CHANGELOG.md | 2 + src/components/ModifyScale.vue | 8 ++++ .../modals/modification/RepeatScale.vue | 44 +++++++++++++++++++ src/stores/modal.ts | 6 +++ 4 files changed, 60 insertions(+) create mode 100644 src/components/modals/modification/RepeatScale.vue diff --git a/CHANGELOG.md b/CHANGELOG.md index 1680f1a9..08f9b2e4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,8 @@ * Feature: Scott Dakota's prime rings on the lattice tab [#551](https://github.com/xenharmonic-devs/scale-workshop/issues/551) * Feature: Tonnetz prime ellipse coordinates on the lattice tab [#588](https://github.com/xenharmonic-devs/scale-workshop/issues/588) * Feature: New `latticeView()` command for displaying the order of intervals (prior to sorting) [#597](https://github.com/xenharmonic-devs/scale-workshop/issues/597) + * Feature: New "repeat" modifier [#406](https://github.com/xenharmonic-devs/scale-workshop/issues/406) + * Bug fix: Extreme ratios now only break parts of the tuning table that do not have IEEE floating point representation and format better when non-finite [#631](https://github.com/xenharmonic-devs/scale-workshop/issues/631), [#632](https://github.com/xenharmonic-devs/scale-workshop/issues/632) * Alpha cycle issues: [#574](https://github.com/xenharmonic-devs/scale-workshop/issues/574), [#579](https://github.com/xenharmonic-devs/scale-workshop/issues/579) ## 2.4.1 diff --git a/src/components/ModifyScale.vue b/src/components/ModifyScale.vue index 2ede7768..bc0931e0 100644 --- a/src/components/ModifyScale.vue +++ b/src/components/ModifyScale.vue @@ -51,6 +51,10 @@ const RandomModal = defineAsyncComponent( () => import('@/components/modals/modification/RandomVariance.vue') ) +const RepeatModal = defineAsyncComponent( + () => import('@/components/modals/modification/RepeatScale.vue') +) + const RotateModal = defineAsyncComponent( () => import('@/components/modals/modification/RotateScale.vue') ) @@ -79,6 +83,7 @@ const showEqualizeModal = ref(false) const showExpandModal = ref(false) const showMergeOffsetsModal = ref(false) const showRandomModal = ref(false) +const showRepeatModal = ref(false) const showRotateModal = ref(false) const showStretchModal = ref(false) const showSubsetModal = ref(false) @@ -95,6 +100,7 @@ function closeModals() { showExpandModal.value = false showMergeOffsetsModal.value = false showRandomModal.value = false + showRepeatModal.value = false showRotateModal.value = false showStretchModal.value = false showSubsetModal.value = false @@ -156,6 +162,7 @@ defineExpose({ blur })
  • Reduce
  • Retrovert
  • Rotate
  • +
  • Repeat
  • Subset
  • Stretch/compress
  • Random variance
  • @@ -214,6 +221,7 @@ defineExpose({ blur }) @cancel="showMergeOffsetsModal = false" /> + diff --git a/src/components/modals/modification/RepeatScale.vue b/src/components/modals/modification/RepeatScale.vue new file mode 100644 index 00000000..0b03d7c9 --- /dev/null +++ b/src/components/modals/modification/RepeatScale.vue @@ -0,0 +1,44 @@ + + + diff --git a/src/stores/modal.ts b/src/stores/modal.ts index 95fdf48b..4ad8a208 100644 --- a/src/stores/modal.ts +++ b/src/stores/modal.ts @@ -346,6 +346,9 @@ export const useModalStore = defineStore('modal', () => { const varianceAmount = ref(10) const varyEquave = ref(false) + // Repeat scale + const numRepeats = ref(2) + // Rotate scale const newUnison = ref(0) @@ -546,6 +549,9 @@ export const useModalStore = defineStore('modal', () => { varianceAmount, varyEquave, + // Repeat + numRepeats, + // Rotate newUnison,