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

Steps can be increamented with - Semitone, Tone, Octave. According to choice of user #822

Closed
wants to merge 3 commits into from

Conversation

sohamm20
Copy link

@sohamm20 sohamm20 commented Nov 8, 2024

Screenshot 2024-11-08 at 9 35 24 PM

@frostburn
Copy link
Member

Was there community demand for this?
I personally think this just adds clutter.
We can have it, but please put it behind a preference that's off by default.

@sohamm20
Copy link
Author

sohamm20 commented Nov 9, 2024

Can you give suggestions on how to add it as a preference?

midiNoteNumberToName(scale.baseMidiNote, -1, scale.accidentalPreference)
}}</span>

<span>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's been a while since I've programmed Vue, but it's something along the lines of adding the new preference, const state = useStateStore() and replacing this line with: <span v-if="state.showMidiStepVariants">.

@sohamm20
Copy link
Author

@frostburn Added it as a preferance. Can you take a look?

@@ -126,7 +126,7 @@ ul.btn-group {
display: flex;
flex-flow: row wrap;
align-items: stretch;
gap: 0.15rem;
gap: 0.15rem 0.15rem;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unnecessary change. If only one value is included, that value is used for both dimensions.

import { useStateStore } from '@/stores/state'
const state = useStateStore()

const stepx = ref("1")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uninformative variable name. What is it associated with?

@@ -54,6 +54,8 @@ export const useStateStore = defineStore('state', () => {
// Debugging features.
const debug = ref(storage.getItem('debug') === 'true')

const step = ref(storage.getItem('step') === 'true')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uninformative storage key. Step of what?

@@ -54,6 +54,10 @@ const scale = useScaleStore()
<input id="debug" type="checkbox" v-model="state.debug" />
<label for="debug" class="right-of-checkbox">Enable debugging features</label>
</div>
<div class="control checkbox-container">
<input id="custom-step" type="checkbox" v-model="state.step" />
<label for="custom-step" class="right-of-checkbox">Enable Custom Step Increment</label>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not enough information for the user. Which step increment is this?

@frostburn
Copy link
Member

In addition to the step increment. Setting the property to anything other than 1 also fixes the "root" value. Is it intentional behavior that e.g. 61 is an invalid value when the Tone size is selected? Same goes for the Octave option: Are 0, 12, 24, etc. exactly the values you want?

@frostburn
Copy link
Member

The motivation of this PR still escapes me. Can you elaborate on why you'd want this?

@frostburn
Copy link
Member

If you wish to, remember to add your name to the Contributors list on the about page.

@sohamm20
Copy link
Author

I often need to switch between lower and higher octaves while staying on the same note. Normally, this would require pressing up or down 12 times, but this option makes the process much more convenient.

@sohamm20
Copy link
Author

In addition to the step increment. Setting the property to anything other than 1 also fixes the "root" value. Is it intentional behavior that e.g. 61 is an invalid value when the Tone size is selected? Same goes for the Octave option: Are 0, 12, 24, etc. exactly the values you want?

Could we grey out the button if selecting it would result in an invalid root value?

@frostburn
Copy link
Member

I often need to switch between lower and higher octaves while staying on the same note. Normally, this would require pressing up or down 12 times, but this option makes the process much more convenient.

That's not what MIDI base note is for. It's more relevant for exporters.

See keyboard shortcuts equave shift up/down for what you're doing.
image

@frostburn
Copy link
Member

Can you try the equave shift keys to see if they already do what this PR is trying to achieve?

If you're on mobile or otherwise do not have access to a numpad section on your keyboard I think you should replace this PR with a one that makes equave shift into an on-screen button.

@sohamm20
Copy link
Author

Sure, I will try

@sohamm20 sohamm20 closed this by deleting the head repository Jan 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants