-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Some automation pattern fixes #3352
Conversation
Found a better solution that keeps the quantization but defaults for minimal value. |
On an offtopic note, I think the automation editor should support all quantization values, it can't do triplets atm. |
|
src/core/AutomationPattern.cpp
Outdated
Note::quantized( _time, quantization() ) : | ||
_time; | ||
Note::quantized( _time, | ||
DefaultTicksPerTact / 64 ) : // finest quantization |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be adjusted to DefaultTicksPerTact / 192
per #3358?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, or maybe reverted back to the first commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm yes, the first commit does look better, cause we never want to limit the deletion of automation points really, at any quantization.
08bb433
to
82233dd
Compare
OK. Reverted back to the first commit. |
Tested something. Right now the quantized position only covers the starting point. Let it instead also cover the length of the Automation Point by just wiping clean the time positions it covers. |
|
d9d76a5
to
25799d5
Compare
I bunched the three automation pattern/editor fixes together. Ready for testing |
cfd6e93
to
70e8c2d
Compare
@Umcaruje I fixed the algorithm for erase so it's smoother and catches Automation Points around it proportional to the zooming factor, but I don't know how it works on different resolutions. Can you test this and especially erasing Automation Points when right click + moving across them at various zoom levels? |
a031123
to
d5cfc65
Compare
Merge? |
src/gui/editors/AutomationEditor.cpp
Outdated
@@ -139,6 +139,9 @@ AutomationEditor::AutomationEditor() : | |||
} | |||
m_quantizeModel.addItem( "1/192" ); | |||
|
|||
connect(&m_quantizeModel, SIGNAL(dataChanged()), this, SLOT(setQuantization())); | |||
m_quantizeModel.setValue( m_quantizeModel.findText( "1/4" ) ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've been using the automation editor lately, and find the 1/8 quantization to work best for my needs, tbqh. 1/4 feels too limiting and 1/16 is too much.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK. Changing to 1/8.
d7b8a98
to
d7d0fdb
Compare
@Umcaruje Did you test this change? It gives the Automation Point the same length as it's quantization. I think it's a really smooth solution. You could make something like a shift key override for this but I don't think it would be used a whole lot. |
Hmm, I'm not sure how much I like the deleting solution, now that I've tested it. It would be nice if it catches the 20-40px around the point, but not the whole length. It just surprises me from a UX perspective. I record automation sometimes and I delete unnecessary points, and while doing that I hold my right mouse key. With the new behaviour this just wipes clean along the Y axis, which feels weird.
Yes, it actually is something I would use rather than my previous method of erasing. I'd implement a shift override, because LMMS doesn't allow to have two automation points at the same position. This makes ramping automation hard to do, so I usually use the lowest quantisation to put the previous point as close to the next one. The new behaviour would make changing those points hard. |
Is this about erasing when sweeping with the mouse? For me the automation point is deleted when the mouse is at about 'one automation point diameter' distance. What is your screen resolution?
OK. Will try the shift fix.. |
Right, I think I got you. Some space to counter this #3301 ? |
d7d0fdb
to
ed75dac
Compare
OK. Shift key was busy so I used the Ctrl key. |
@zonkmachine I don't have time to build and test this, so if someone else can confirm that automation points smaller than default Quantization can be edited/deleted with this PR, the bug should be closed.
I had originally assumed they were related, but on second glance it should be reopened as a separate item if still valid after this is closed. |
I had a second look at this and it is of course the same issue. Multiples of 3 is the positions for 1/64 quantization so if you erase with 1/16 quantization you'll get those values. Just duplicated the bug. |
But then again you have the issue of the volume automation and that's not really related... |
If there are no further comments I'll merge this later this evening. |
all seems working to me, I agree with @Umcaruje there should be a hint for the ctrl override. |
27eb791
to
474a066
Compare
Qt cuts off the last words sometimes? m_quantizeComboBox->setWhatsThis( tr( "Quantization. Sets the smallest "
"step size for the Automation Point. By default "
"this also sets the length of the Automation "
"Point, clearing out other points in the range. "
"Press <Ctrl> to override this behaviour." ) ); |
Dropping the quantization on delete makes it more or less a necessity. It's painful enough in 1.1.3 . |
@lukeoftheaura @Umcaruje Thanks for testing. I made the erase/delete a bit less aggressive and the whatsthis now reads: setWhatsThis( tr( "Quantization. Sets the smallest "
"step size for the Automation Point. By default "
"this also sets the length, clearing out other "
"points in the range. Press <Ctrl> to override "
"this behaviour." ) ); |
I'm not sure what's wrong in the animation though. It looks pretty good and I see no accidental deletions in it. ps. I'm still on schedule to merge this later on... 😃 |
* Fix deleting automation points out of quantization * Triplets in Automation Editor + better remove action * Let a quantized Automation point wipe clean the space it covers * Improve sensitivity on erase with zoom < 100% * Eigth note default quantization * Tooltip and whatsthis text
MidiTime putValue( const MidiTime & time, | ||
const float value, | ||
const bool quantPos = true, | ||
const bool controlKey = false ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Core objects should not have references to the control key, which is a UI concept.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ouch! I'm looking into this now but I'm not sure how to fix that. The objective is to be able to turn off the feature to give the control point a 'minimum length' according to it's quantization value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You have two choices:
- The clean way: Move the feature to the view object, which reacts to the control key.
- The easy way: Keep the feature in the model and rename
controlKey
to something likeignoreSurroundingPoints
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- The easy way: Keep the feature in the model and rename
controlKey
to something likeignoreSurroundingPoints
.
Do you mean like:
diff --git a/include/AutomationPattern.h b/include/AutomationPattern.h
index 480b69f..1bb5c03 100644
--- a/include/AutomationPattern.h
+++ b/include/AutomationPattern.h
@@ -79,7 +79,7 @@ public:
MidiTime putValue( const MidiTime & time,
const float value,
const bool quantPos = true,
- const bool controlKey = false );
+ const bool ignoreSurroundingPoints = false );
void removeValue( const MidiTime & time );
diff --git a/src/core/AutomationPattern.cpp b/src/core/AutomationPattern.cpp
index ffe13ff..7996af3 100644
--- a/src/core/AutomationPattern.cpp
+++ b/src/core/AutomationPattern.cpp
@@ -208,7 +208,7 @@ void AutomationPattern::updateLength()
MidiTime AutomationPattern::putValue( const MidiTime & time,
const float value,
const bool quantPos,
- const bool controlKey )
+ const bool ignoreSurroundingPoints )
{
cleanObjects();
@@ -221,7 +221,7 @@ MidiTime AutomationPattern::putValue( const MidiTime & time,
// Remove control points that are covered by the new points
// quantization value. Control Key to override
- if( ! controlKey )
+ if( ! ignoreSurroundingPoints )
{
for( int i = newTime + 1; i < newTime + quantization(); ++i )
{
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Fixed here: #3459
Change the default value of ignoreSurroundingPoints in AutomationPattern::putValue to true, which was false in #3352. Fixes automation filpping bug and some potential issues.
* Fix deleting automation points out of quantization * Triplets in Automation Editor + better remove action * Let a quantized Automation point wipe clean the space it covers * Improve sensitivity on erase with zoom < 100% * Eigth note default quantization * Tooltip and whatsthis text
Change the default value of ignoreSurroundingPoints in AutomationPattern::putValue to true, which was false in LMMS#3352. Fixes automation filpping bug and some potential issues.
Fixes #391
We should maybe iterate through the neighbouring positions if there are no values at the current positon as it's a bit hard currently to hit the right spot for deletion. You have a similar problem when dragging an Automation Point which I haven't touched in this PR. When you select an Automation Point made under finer quantization you will instead create a new point at the quantized position.