Skip to content

Don't auto-quantize notes when recording MIDI input - #6714

Merged
sakertooth merged 15 commits into
LMMS:masterfrom
irrenhaus3:record-hires-midi
Apr 8, 2024
Merged

sakertooth merged 15 commits into
LMMS:masterfrom
irrenhaus3:record-hires-midi

Conversation

@irrenhaus3

Copy link
Copy Markdown
Contributor

Relates to issue #6332.
I regularly ran into trouble with the piano roll quantization when recording a MIDI pattern from my controller (meaning I regularly forgot that I sometimes had to manually set quantization to 1/192 before hitting record), which led to me having to throw my pattern away and redo it. Pretty frustrating.
This PR makes only one change: When recording MIDI input in one of the two realtime modes, neither note positions nor lengths are quantized automatically. Makes life a lot easier, so I think it's a worthy change to merge upstream.

@superpaik

Copy link
Copy Markdown
Contributor

Sorry I didn't participate in the discussion of the topic, but what about having a variable in the MIDI Setting section so that the user can set the default behavior according to their preferences? Many people can't play the piano proficiently, and I think quantization is a great help (it's true that you can quantize later, but it might not be seen as a good alternative for some people).

@irrenhaus3

Copy link
Copy Markdown
Contributor Author

it's true that you can quantize later, but it might not be seen as a good alternative for some people

I'm not a good piano player myself (like, at all, I just hit chords along with the song playback 😄), but for me, the mode of recording freeform first and then moving & quantizing where needed is the only one that feels "right". Everything else feels like the software getting in the way instead of helping me with what I want to do.
If we want a toggle for auto-quantization in the MIDI settings, I'd strongly advocate for the default to be "Off".

@superpaik

Copy link
Copy Markdown
Contributor

I'm not against having it to "Off" by default, but I think that for some people having auto-quantize while recording can be seen as a positive feature.

@yohannd1

Copy link
Copy Markdown
Contributor

Whatever is the default option, it'd be good if a per-user default value could be configured via the settings. Same with other options like follow-play-marker but I digress.

@irrenhaus3
irrenhaus3 force-pushed the record-hires-midi branch from 70855d4 to 52f530d Compare June 3, 2023 18:47
@irrenhaus3

Copy link
Copy Markdown
Contributor Author

I've added a checkbox for this in the MIDI settings. I'm not sure if that's the right place though, kinda feels like this should be a button in the piano roll editor.

@superpaik

Copy link
Copy Markdown
Contributor

I've added a checkbox for this in the MIDI settings. I'm not sure if that's the right place though, kinda feels like this should be a button in the piano roll editor.

To me is ok to have it in MIDI settings, as per-user configuration better than as per-record configuration (I don't know if that makes sense ;-)

Comment thread src/gui/editors/PianoRoll.cpp Resolved
Comment thread src/gui/editors/PianoRoll.cpp Resolved
Comment thread src/gui/modals/SetupDialog.cpp Resolved
Comment thread src/gui/modals/SetupDialog.cpp Resolved
Comment thread src/gui/editors/PianoRoll.cpp Resolved
@sakertooth sakertooth linked an issue Aug 26, 2023 that may be closed by this pull request
irrenhaus3 and others added 2 commits August 26, 2023 18:03
Style formatting

Co-authored-by: saker <sakertooth@gmail.com>
…nd update it on ConfigManager::valueChanged()

@sakertooth sakertooth left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Tested and working. Could easily see the improvement made at lower resolutions. Automatic updates of the auto quantization option also works as expected.

Comment thread src/gui/editors/PianoRoll.cpp Resolved
Comment thread src/gui/editors/PianoRoll.cpp Resolved
Comment thread src/gui/editors/PianoRoll.cpp Resolved
Comment thread src/gui/modals/SetupDialog.cpp Resolved
One formatting change, and reusing an existing variable instead of introducting a new local one.

Co-authored-by: saker <sakertooth@gmail.com>
Co-authored-by: IanCaio <iancaio_dev@hotmail.com>
Comment thread src/gui/modals/SetupDialog.cpp Resolved
irrenhaus3 and others added 2 commits August 27, 2023 16:04
Good catch.

Co-authored-by: IanCaio <iancaio_dev@hotmail.com>

@irrenhaus3 irrenhaus3 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Found a bug.

Comment thread src/gui/editors/PianoRoll.cpp Resolved
@irrenhaus3
irrenhaus3 requested a review from IanCaio August 27, 2023 19:05

@IanCaio IanCaio left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code-wise it LGTM, I didn't manage to test it yet though.

@zonkmachine zonkmachine left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Tested, works well!

@sakertooth sakertooth left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm okay with the new changes 👍

@sakertooth
sakertooth merged commit 1f5f28f into LMMS:master Apr 8, 2024
enp2s0 pushed a commit to enp2s0/lmms that referenced this pull request Apr 12, 2024
* Don't auto-quantize notes when recording MIDI input.

* Add midi:autoquantize to config file and a widget to set it in the MIDI settings.

* Quantize notes during recording if midi:autoquantize is enabled.

* Apply suggestions from code review: Formatting

Style formatting

Co-authored-by: saker <sakertooth@gmail.com>

* Cache the auto quantization setting in a PianoRoll member variable, and update it on ConfigManager::valueChanged()

* Apply suggestions from code review: Formatting & temp variable

One formatting change, and reusing an existing variable instead of introducting a new local one.

Co-authored-by: saker <sakertooth@gmail.com>
Co-authored-by: IanCaio <iancaio_dev@hotmail.com>

* Update src/gui/modals/SetupDialog.cpp

Good catch.

Co-authored-by: IanCaio <iancaio_dev@hotmail.com>

* Fix logic bug in PianoRoll's midi/autoquantize value observer.

* Use '!' instead of 'not' to please MSVC.

* autoquantize: Add an explicit check for consistency with the rest of the PR, and give the setting a default value in SetupDialog constructor.

* Integrate MIDI auto-quantize checkbox into the resizable layout, and add a tool tip.

---------

Co-authored-by: saker <sakertooth@gmail.com>
Co-authored-by: IanCaio <iancaio_dev@hotmail.com>
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.

Hidden relationship between 'record-buttons' and Q-value.

6 participants

⌂