Commit Graph

15341 Commits

Author SHA1 Message Date
1999a3aae8 explicitly discard the return value from ::process_redisplay_track_views() 2022-04-05 20:52:10 -06:00
a287499f75 queue ::redisplay_track_views() in an idle handler right after ::idle_resize()
Both of these are currently needed: idle_resize() is required for
::set_height() to take effect on all affected tracks, and
::redisplay_track_views() is needed to reposition all other tracks as
necessary.
2022-04-05 20:52:10 -06:00
c1fb7bc05d we do not need to queue ::redisplay_track_Views() for track height changes
This may be incorrect, since track height changes may be driven
directly (e.g. via menu items) rather than by mouse drags. This may
need revisiting and there may need to be a way to separate dragged height
changes from others.
2022-04-05 20:52:10 -06:00
da20e4ed60 change return type of Editor::process_redisplay_track_views() to bool
This allows it to be used in an idle callback. If we use
::redisplay_track_views() directly, we do not disconnect the idle
connection. This will happen automatically since the callback will return
false, but it seems better to explicit about this. Even better would be to use
::connect_once() but this may not be available in the version of glibmm that we
are using at present.
2022-04-05 20:52:10 -06:00
f2e6798e66 change idle priority of Editor::redisplay_track_views()
It appears that GDK/glib will not run idle callbacks with a lower priority than
HIGH_IDLE+10 *if* a new user input event is pending. This means that if mouse
motion events are arriving and causing resizes of selected tracks, the call
to ::redisplay_track_views() which is needed to update all the other tracks,
will not take place if a new motion event arrives. Changing the priority to
same as is used for the ::idle_resize() callback prevents new motion events
from being handled before ::redisplay_track_views() is called.
2022-04-05 20:52:10 -06:00
f8b0a8843c stash info on whether we disabled region view redisplay for view-only or model changes
The bool may be unnecessary since everywhere we use this seems to be for model changes
2022-04-05 20:52:10 -06:00
6ac9c52b5f remove debug output and some mistakenly commented lines 2022-04-05 20:52:10 -06:00
4fa97e2c50 split midi region view redisplay into two similar methods
::model_changed() is used when the model has changed (eg. new notes or some
notes deleted); ::view_changed() is used when only some view parameter (e.g.
zoom, scroll, track height etc) has been altered.

Not fully functional yet (::view_chanted() ignores scroll)
2022-04-05 20:52:10 -06:00
1a8b80e56e drop experimental use of RegionView::DisplaySuspender during trim drags 2022-04-05 20:52:10 -06:00
0638d3c99e remove use of canvas freeze-queue-draw API
Measurement shows that this makes no actual difference to the speed
of marking up the canvas for a redraw
2022-04-05 20:52:10 -06:00
3ff4d6c5ab some instrumentation for MidiRegionView::redisplay_model() 2022-04-05 20:52:10 -06:00
cc0869d931 restore setting selection in MidiRegionView::redisplay_model() 2022-04-05 20:52:10 -06:00
582661dbd0 as an experiment, prevent redisplay of (MIDI) regions during trimming
This doesn't actually work right now because of a conflicting design in MidiRegionView, but
could be promising. Or it might be reverted
2022-04-05 20:52:10 -06:00
5ec7375884 fix issue with RAII RegionView::DisplaySuspender copy constructor 2022-04-05 20:52:10 -06:00
b8a6b97b49 redesign (MIDI)RegionView display disabling around an RAII model 2022-04-05 20:52:10 -06:00
d586956636 NOOP: some minor whitespace fixes 2022-04-05 20:52:09 -06:00
7c6bce5cda fix recursive loop in patch change display
We do not want a loop between ::add_canvas_patch_change() and
::display_patch_changes(), even if it does bottom out in the end
2022-04-05 20:52:09 -06:00
9efdba5b91 comment name of unused function parameter 2022-04-05 20:52:09 -06:00
ae8c043fe1 regionviews: use integer counter instead of boolean to control redisplay of contents 2022-04-05 20:52:09 -06:00
bc38f8d424 MidiSource: change thread mutual exclusion object from Mutex to a RWLock
This allows two reader threads to proceed without blocking each other, as can
happen when the butler renders a MIDI track into an RT-safe buffer while the
GUI reads the same MidiModel/Source for visual display.
2022-04-05 20:52:09 -06:00
1686db8b0c Change the type of reference held by a MidiModel to its MidiSource
This also requires a change in the type of reference held by
a MidiAutomationListBinder.

Both the MidiSource and MidiModel have a reference to each other, and it is
important that we avoid circular references to avoid problems with object
destruction. We had been accomplishing this by having the Model hold a
weak_ptr<MidiSource>. However, the lifetime of a MidiSource and its MidiModel
are coincident and there's really no need to use a smart ptr at all. A normal
reference is just fine. However, due to constructors that accept a serialized
state, we cannot use an actual reference (we cannot set the constructor in the
initializer list), so we use a bare ptr instead.

This forces a similar change in MidiAutomationListBinder, which also maintains
a reference to the Source. However, the only purpose of this object is to
ensure that if the Source is destroyed, relevant commands will be removed from
the undo/redo history, and so all that matters here is that the binder connects
to the Destroyed signal of the source, and arranges for its own destruction
when received.

Note that the previous construction of the binder, actually holding a
shared_ptr<MidiSource> would appear have prevented the Destroyed signal from
ever being emitted (from ~Destructible), and so this may also be a bug fix that
allows MidiSources to actually be deleted (the memory object, not the file).
2022-04-05 20:52:09 -06:00
54597bd803 change the type of reference held by a MidiModel to its MidiSource
This also requires a change in the type of reference held by
a MidiAutomationListBinder.

Both the MidiSource and MidiModel have a reference to each other, and it is
important that we avoid circular references to avoid problems with object
destruction. We had been accomplishing this by having the Model hold a
weak_ptr<MidiSource>. However, the lifetime of a MidiSource and its MidiModel
are coincident and there's really no need to use a smart ptr at all. A normal
reference is just fine. However, due to constructors that accept a serialized
state, we cannot use an actual reference (we cannot set the constructor in the
initializer list), so we use a bare ptr instead.

This forces a similar change in MidiAutomationListBinder, which also maintains
a reference to the Source. However, the only purpose of this object is to
ensure that if the Source is destroyed, relevant commands will be removed from
the undo/redo history, and so all that matters here is that the binder connects
to the Destroyed signal of the source, and arranges for its own destruction
when received.

Note that the previous construction of the binder, actually holding a
shared_ptr<MidiSource> would appear have prevented the Destroyed signal from
ever being emitted (from ~Destructible), and so this may also be a bug fix that
allows MidiSources to actually be deleted (the memory object, not the file).
2022-04-05 20:52:09 -06:00
e0fa447d29 NOOP: whitespace and multiline -> one line changes 2022-04-05 20:52:09 -06:00
22a56de13a use canvas freeze-queue-draw API when redrawing a MIDI region 2022-04-05 20:52:09 -06:00
1769b20dd1 arcall: use dedicated directory for output, and add --dump-instr=yes 2022-04-05 20:52:09 -06:00
7cb7d83bb8
Cont'd "meter/time-signature" disambiguation 2022-04-05 19:26:01 +02:00
7e10061d16
Disambiguate "Meter" use "Time Signature for music meter
In general we should use
* "meter": signal level meter
* "time-signature": music meter / metrum
2022-04-05 18:56:10 +02:00
504a04878f
Fix typos, consistent text markup
Thanks to Edgar Aichinger
2022-04-05 18:45:40 +02:00
f74b8227c5
Ignore LD-environment for video transcoding and Lua exec 2022-04-01 18:20:04 +02:00
0b5e502546
Video import/export overhaul and ffmpeg-5.0 compat
* Update commandline parameters for ffmpeg 5.0
* Simplify video-export, allow only standard settings
* Check ffmpeg exit code and parse errors
* Fix SessionhandleRef on audio-import (clear import status)
* Cleanup and reformat sourcecode
2022-04-01 01:35:08 +02:00
391c3e96b3
Clarify stop-at-session-end preference tooltip 2022-03-31 21:51:32 +02:00
9c9f1dbf82
Fix nudge-playhead-backward 2022-03-30 03:08:16 +02:00
5d7ff24130
Hide scroomer when using layered mode
In layered mode the scroomer is not usable with stacked MIDI regions.

Ideally we'd only hide it if there is more than one layer
but that is for another day.
2022-03-29 01:30:51 +02:00
08acf42676
Correctly restore mixer-ui pane sizes
Pane::set_divider() constrains the divider so that widget
minimum sizes are honored.

Initially the mixer is empty and the tab has width of ~110px
(just scroll window). Pane::on_size_allocate() calls set_divider()
before actual mixer-strips are added and before the mixer window
size was restored. This incorrectly constrained pane sizes.
2022-03-29 00:31:15 +02:00
22220c215a
Keep export-format dialog on top of export dialog 2022-03-28 18:55:29 +02:00
66c71512c7
Add tooltip for non/layered button 2022-03-28 18:55:22 +02:00
b3ccccb48f add #warning to code that should be fixed ASAP but not pre-Mixbus8 release 2022-03-21 13:00:01 -06:00
fead587a5a
Remove debug output 2022-03-21 18:47:53 +01:00
f6646eaa2d
Fix undo/redo when moving regions to a different track
This was broken during development of ripple-all.
First explicit rdiff_and_add_command() was used, but
when that was reverted later, the original stateful_diff
was not restored.

989408626d
1ccf272d58
2022-03-21 18:47:53 +01:00
11a0617cff Revert trigger_ui: 'Inhibit' change
This reverts commit c814726dc0.
2022-03-19 16:56:28 -05:00
c8afda0116 add config-var for insert_at and show_on_cue_page
* store the user's selection in the configu
2022-03-18 18:37:37 -05:00
b25aa18c80 add_route_dialog: add a checkbox to show Tracks on the Cue page 2022-03-18 18:36:06 -05:00
c814726dc0 trigger_ui: FA:None did not convey the meaning; try 'Inhibit'
* Inhibit prevents any FAs, FA Count, Probability, etc ... but leaves settings intact
* Removed Inhibit from the Right FA menu ... it only needs to be set on the Left
* Removed Inhibit from the clip context menu, we only want shortcuts to explicit actions there
2022-03-18 09:03:12 -05:00
139d54ac9b
Fix automation range drag guard points
This addresses an issue with missing guard points at the
beginning of a range drag when the range is not snapped to
a musical grid.

Note that the code below "same thing for the end" does not use
.beats() either.
2022-03-18 02:31:31 +01:00
d32796d695 trigger_ui: selection rules prevent loading a slot from selection menu item
* the Slot *is* the Selection, you can't also have a Range or Region selected
* perhaps this will change someday
2022-03-17 18:12:04 -05:00
c2243d8b1c ruler markers: consolidate range-marker shapes
* if the same color is used for the marker and the flag, some range markers looked odd
* now that rulers are highlighted when you hover, it's less necessary to disambiguate by shape
2022-03-17 18:12:04 -05:00
e3b66825eb superclock_ticks_per_second: GUI edition changes 2022-03-17 14:15:59 -06:00
641589c56a Revert "change clock_display_limit default value, to fit within an int62_t"
This reverts commit 0d84d32792.
2022-03-17 14:15:59 -06:00
f78b54a06d
Fix AutomationLine editing (range based editing)
This fixes various offset issues when editing MIDI (CC)
automation as well as RegionGain range and point based editing.

(It does not fix a related issue that region start-trim
offsets region-gain. Historically region-gain _offset is always
zero, regardless of region->start().
2022-03-17 20:16:07 +01:00
9f29986a16
Fix Wreorder 2022-03-17 17:12:08 +01:00