View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0008277 | ardour | bugs | public | 2020-06-30 08:43 | 2020-06-30 08:45 |
Reporter | laex | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | new | Resolution | open | ||
Platform | Ubuntu | OS | Mint 19.3 | OS Version | (any) |
Product Version | 6.0 | ||||
Summary | 0008277: No undo for scripted fade outs (in many cases) | ||||
Description | When Lua scripting fade ins and outs for audio regions, the fade outs (in many cases) do not register an undo correctly (as do the fade ins) and therefore cannot be undone! I did a lot of test rounds with virgin Ardour6 config folders, old and freshly created projects… It is 100% reproducible on my machine - try this basic example script: <script> -- prepare undo operation Session:begin_reversible_command ("FADE IN AND OUT") local add_undo = false -- keep track if something has changed local sel = Editor:get_selection () for r in sel.regions:regionlist ():iter () do -- prepare selected region(s) for undo r:to_stateful ():clear_changes () local ar = r:to_audioregion () ar:set_fade_out_shape (ARDOUR.FadeShape.FadeLinear) ar:set_fade_out_length (100000) ar:set_fade_out_active (true) ar:set_fade_in_shape (ARDOUR.FadeShape.FadeLinear) ar:set_fade_in_length (100000) ar:set_fade_in_active (true) -- save changes for selected region(s) (if any) to undo command if not Session:add_stateful_diff_command (r:to_statefuldestructible ()):empty () then add_undo = true end end -- all done, commit the combined Undo Operation if add_undo then -- the 'nil' Command here means to use the collected diffs added above Session:commit_reversible_command (nil) else Session:abort_reversible_command () end </script> | ||||
Steps To Reproduce | It works perfectly (as expected) with: + Freshly recorded regions + Regions of freshly opened (existing) projects + Regions that have been moved within their track + Regions that have been shortened or extended by moving their boundaries Fade-Out-Undo doesn’t work with: + A region that got moved to another track + Imported audio files/regions + Regions that have been cut apart (both new regions don’t work) + Region that got copied with Ctrl+drag (“original” region still works) or Ctrl+c/x/Ctrl+v (Once project is saved and reopened, also those regions work as expected (again)!) | ||||
Additional Information | On the fade-in-side everything seems to be perfect! When scripting fade ins and fade outs in one script, fade ins are undo-able perfectly, the fade outs (in cases mentioned above) don't react to undo. When scripting ONLY fade outs: Interestingly, the undo command is not even registered/available for the dysfunctioning cases mentioned above! | ||||
Tags | No tags attached. | ||||