Comments (18)
I'm adding some undo blocks now, giving those points friendlier names that should also work well in other languages (think it'll happen automatically as the action names are already translated).
IMO removing undo points around navigation would need some discussion of the tradeoffs, seeing as navigation is tied to selection. Also... er... I don't know how that would be done yet.
from osara.
@ScottChesworth
I've just tried the build with the changes.
I don't think this is much better. I now get an undo point for every osara chord action.
The previous behavior with the unselect all events did exactly that at worst, but sometimes I would only get the unselect all point when using the chord osara action for the first time when opening the midi editor, and then the following actions wouldn't generate any more undo points until I edited the note and then another one would be generated.
I'm even confused why the unselecting would be happening as I'm not manually selecting events, just navigating through them.
from osara.
from osara.
Hmm I think something can be done here, but not sure what yet. Agreed that the approach I took earlier isn't it. Will keep experimenting.
from osara.
I'm even confused why the unselecting would be happening as I'm not manually selecting events, just navigating through them.
Navigating through chords or notes selects them, so we have to unselect them when navigating again unless you're doing multiple selection.
You can compress multiple undo points into a single, custom undo point, but i don't know of a way from the API to completely prevent one of REAPER's own undo points. The only thing I can't recall whether I've tried is passing an empty string to Undo_EndBlock, but I very much doubt that'll do it.
from osara.
I think the "Unselect all events" undo point is unnecessary most of the time, because when we press the cursor keys, their function is to browse the contents of the MIDI editor, not to change it. Since the event has not changed there is no need to create an undo point.
However, OSARA may need to Unselect all events in the process of browsing notes, but I personally think that at the user level, this step does not need to be presented in most cases. As other friends said, undoing previously made changes requires undoing several "Unselect all events", which is obviously not a good experience.
Or similar to REAPER, provide an option in the settings for users to choose whether to create undo points.
from osara.
I can't recall whether I've tried passing an empty string to Undo_EndBlock, but I very much doubt that'll do it.
Tried that just now and nope.
from osara.
I think the "Unselect all events" undo point is unnecessary most of the time, because when we press the cursor keys, their function is to browse the contents of the MIDI editor, not to change it.
That's understood. The key point is that we aren't intentionally generating these undo points. REAPER is and we can't prevent that.
We could try unselecting each selected event ourselves using API calls, rather than executing a REAPER action to do this. My concern is that this might be slow if there are a lot of events selected, whereas REAPER can probably do this faster internally, but I guess it's worth a shot.
from osara.
Shall I poke Justin before we refactor things, just in case there's some trick we don't know about using UndoBlock?
from osara.
UP to you. I'd say there's a 99.9% chance we're not missing something, but I guess it can't hurt to ask if you haven't used up your Justin credits this month. :)
from osara.
Done. Will report back when I hear back.
from osara.
Yeah we didn't miss anything. Justin says he'll have a think about a way to prevent selection state being included in undo, says he might be able to add an option.
from osara.
That would be cool if there could be an option to not add midi editor selection actions to undo just like Pitermach mentioned there are options for item/track/envelope selection.
Thank you so much for considering this and even forwarding it to the Reaper devs.
Yeah we didn't miss anything. Justin says he'll have a think about a way to prevent selection state being included in undo, says he might be able to add an option.
from osara.
So in today's dev build of REAPER, there's a new Undo category in Prefs, and MIDI events is one of the things that can be unchecked. However, right now it doesn't prevent those unselect undo points from showing up. Hmmm. Not sure where to go from here.
from osara.
That feels like a bug. That undo point is generated by REAPER's Unselect all action, so it would seem that undo option isn't applying there?
I wouldn't want this to prevent us from undoing insertion, length changes, etc. We just want to be able to avoid undo points for selection changes in the MIDI editor.
from osara.
I've followed up and asked for "Edit: Unselect all" to not generate an undo point. Suppose Justin wants to keep this behaviour though, I'm thinking a new "Edit: Unselect notes" action would meet our needs so long as it was included in the new option, right?
from osara.
I'm slightly concerned that inserting events and lengthening notes might be part of the new undo setting. Are they?
Edit: Unselect notes would be a change in behaviour I think. If you select all, then press right arrow, you kinda expect that pressing delete will only delete the note you just selected. With unselect notes, I think that will end up deleting any CCs that got selected. Though I'm not entirely sure how select all and unselect all behave with respect to CCs, so maybe I'm wrong.
from osara.
I'm slightly concerned that inserting events and lengthening notes might be part of the new undo setting. Are they?
No. I was clear that we only wanted it effecting selection. Have just verified that inserting and lengthening are both still fine.
from osara.
Related Issues (20)
- The inconvenience and thoughts caused by using the method of inserting notes to input notes in the MIDI editor HOT 2
- "OSARA: Report tempo and time signature at play cursor" action needs a tweak HOT 2
- movement between regions HOT 10
- Configuration-window, ui-elements not visible HOT 1
- Feedback: Edit: Select all CC events in time selection (in last clicked CC lane)
- osara HOT 1
- 有关cc 动作的报告反馈 HOT 2
- Let me approve Russian translations for OSARA HOT 3
- navigation between CCs in lanes do not respect the position flag
- Configure REAPER for optimal screen reader accessibility: Hide mixer HOT 4
- precision in parameter adjustment HOT 1
- I don't understand the last translation HOT 10
- Help keyboard shortcuts no longer speak in event list mode HOT 7
- Key map update for August 2024 HOT 1
- delete item right after splitting HOT 5
- request on the cc lanes
- grouping of tracks HOT 3
- loss of focus in multimedia browser HOT 12
- Osara FX parameters search filter HOT 1
- Optimal Config: uncheck FX Browser, Options menu, Show in FX list, Plug-in type prefixes HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from osara.