13
0
Commit Graph

33814 Commits

Author SHA1 Message Date
180c1d7759 tempo map: slight reorganization of ::get_grid
This avoids resetting beats based on superclocks in case where we
already do the opposite.
2021-11-17 12:16:39 -07:00
7dbf2445f5 tempo map: NOOP: expand comment to explain more 2021-11-17 12:16:39 -07:00
a5ccb521e6 tempo map: NOOP helpful comment, perhaps 2021-11-17 12:16:39 -07:00
73c87064a5 tempo map: NOOP correct comment text 2021-11-17 12:16:39 -07:00
c7adea3ec0 tempo map: really no-op code change to provide another useless compiler const hint 2021-11-17 12:16:39 -07:00
d9b1d2ccc8 temporal: NOOP add helpful comment about bar_mod argument 2021-11-17 12:16:39 -07:00
b3451f4055 tempo map: fix computation of superclocks_per_note_type_at()
Code used position as an absolute, rather than offset from the point
that defines tempo. It worked if the point was at zero, but not
otherwise.
2021-11-17 12:16:39 -07:00
a417cbae4b tempo map: fix a potential bug (not seen in the wild) when generating the grid
the "p" variable could point to _points.end(), so we cannot indirect and use
p->sclock() value unconditionally.
2021-11-17 12:16:39 -07:00
1ba2e28d6f tempo map: fix grid generation with ramped tempos
The old code used the instantaneous tempo at T0 to compute where the next
quarter note would be. This is incorrect, since the tempo is
changing (continuously, for now) during the time represented by that quarter
note. Instead, we need to add a quarter note (or technically, whatever the
tempo note type is) to get a new position in beats, then compute the superclock
time at that location (which will use our equations for tempo, including the
use of omega, the ramp factor).
2021-11-17 12:16:39 -07:00
8972ed1517 temporal: add Tempo::note_type_as_beats() 2021-11-17 12:16:39 -07:00
d4c1d3e681 doc: add tempo math writeup from _FrnchFrgg_, lost from the nutempo branch 2021-11-17 12:16:39 -07:00
7edcda4fc1 temporal: logic fixes for several tempo map modification methods 2021-11-17 12:16:39 -07:00
fd5594f831 use Editor::reassociate_metric_markers() before performing edits on tempo map
The objects referenced by markers point to the copy of the map held by the per-thread ptr. But
the edits must be done on a writable copy of the map. ::reassociate_metric_markers() fixes
the references to use the writable copy, so that when we pass references to the objects in the map
to the writable copy, it will find them and modify them (rather then ones in the previous
generation of the tempo map)
2021-11-17 12:16:39 -07:00
d61fc1e871 triggerbox: add passthru property to control input passthrough (monitoring) 2021-11-17 12:16:39 -07:00
1fb8779361 delete/cancel triggerbox worker thread at exit 2021-11-17 12:16:39 -07:00
18e851cd73 catch too-early use of PublicEditor::instance() 2021-11-17 12:16:39 -07:00
710c5b9b78 do not use PublicEditor::instance() in MainClock, since these obejcts can exist before the editor
The AudioEngine on the other hand is created in the global libardour init method, so use that instead
2021-11-17 12:16:39 -07:00
1532ebb38f temporal: truncate ::to_string() method for timeline types to ::str() for easier use in debugger 2021-11-17 12:16:38 -07:00
4fe1fec54e when setting a default audio region envelope, coerce the endpoint to AudioTime
Comment in code explains more
2021-11-17 12:16:38 -07:00
7a12458244 temporal: improve implementation of TempoMap::meter_at() and more templating
Needed to move template defns around to ensure that required instances are defined
2021-11-17 12:16:38 -07:00
4128088b70 temporal: TempoMap::tempo_at() ... templates FTW 2021-11-17 12:16:38 -07:00
fb2281129a temporal: add clarifying comments to TempoMap::remove_*()
These comments should correct an impression left in the commit message for
6e9e28343bc3695d that there may be some sort of problem with synchronization
of TempoMap changes. The actual problem is that TempoMap edits are done using
RCU, so the modifications are performaned using a copy of the map, but with
map elements taken from the pre-copy version.
2021-11-17 12:16:38 -07:00
b67965f499 temporal: add the entire _points list to output of TempoMap::dump() 2021-11-17 12:16:38 -07:00
f0cd3b5c0c editor: when the tempo map changes, update the per-thread pointer
TempoMap::use() merely returns the current per-thread tempo map
pointer; if a change is signalled, we should force an update
of the per-thread ptr via TempoMap::fetch()
2021-11-17 12:16:38 -07:00
8a59f3fe8e temporal: fix issue with removal of tempo, meter and bartime points
The correct algorithm is to traverse the type-specific list of points,
find the point (if any) whose time matches that of the argument (because
we do not allow multiple points of the same type at the same time), and
then use that discovered point from the _points list.

This approach is required because the actual argument may no longer be
in the tempo map (due to a change made by another thread). The lack of
sync, however, needs investigation.
2021-11-17 12:16:38 -07:00
4d5cf43789 triggerbox: use correct API to track tempo 2021-11-17 12:16:38 -07:00
dd4e495d90 audioclock: use correct call for "right now" tempo display 2021-11-17 12:16:38 -07:00
2735022357 audio_clock: fix uninitalized variable 2021-11-17 12:16:38 -07:00
5b5ca546e0 temporal: fix incorrect implementation of TempoMap::tempo_map()
std::lower_bound() is not appropriate here. We need to find the first
TempoPoint after the given time, then return the one before that.
2021-11-17 12:16:38 -07:00
e7e44351cc temporal: move implementation of quarters_per_minute_at() into .cc file 2021-11-17 12:16:38 -07:00
a0e134e1b3 temporal: update comment on a method that suggest not using it; provide TempoMap::quarters_per_minute_at () 2021-11-17 12:16:38 -07:00
4f3bf37680 temporal: implement a faster method to lookup TempoPoint
There is no reason to build a TempoMetric if you only need the Tempo
2021-11-17 12:16:38 -07:00
5105083394 triggerbox: first pass at using "realtime" rubberband rather than pre-stretch 2021-11-17 12:16:38 -07:00
e1b2a24221
Fix error message (include plugin ID) 2021-11-17 18:46:29 +01:00
83225886a1
Fix gcc4 builds ('EEXIST' was not declared in this scope) 2021-11-15 19:12:00 +01:00
8c632c8446 temporal: allow negative timecnt_t to be used when constructing a timepos_t
Negative positions are legal and should be handled by higher level logic
2021-11-14 15:22:53 -07:00
d9b9f4f588
Waveform: work around empty peakfile edge-case
(gdb) p peak.max
$5 = -1
(gdb) p peak.min
$6 = 1
2021-11-14 23:11:19 +01:00
8e89325bee
Waveform: scope-like smooth waveform
* Draw antialised waveform if waveform is monotonic
* Fix center-line position (span at most height - 1),
* Remove invalid "side-lines" that were previously
  drawn around spikes.
* Do not linearly center min/max when drawing log-scale
* Fix offset of lower outline and clip indicators
2021-11-14 22:28:55 +01:00
70a07eec48
Waveview: properly draw 1px outline 2021-11-14 22:28:55 +01:00
3f69e8e329 MIDI Import: implement missing SMFSource::update_length
Provides intended behavior: imported midi region length should be rounded to the nearest beat

ToDo: add options to round to Bar/Beat/None ?
2021-11-14 14:25:31 -06:00
f6adf9c897 MIDI Import: gtk part 2021-11-14 08:21:00 -06:00
58033262ae MIDI Import: Support for separating the channels of a Type1 midifile track(s) 2021-11-13 16:23:15 -06:00
0733b2d9e2 SMF: Often files don't have Track+Instr names. Make something up to avoid file collisions. 2021-11-13 15:54:11 -06:00
35312dc85c SMF: API change: report format (0,1 or2) and total channels used 2021-11-13 15:54:11 -06:00
4c472ca1c5 TriggerSlot: Remove Queued menu-item (for now) 2021-11-13 15:54:11 -06:00
4eeb5afa92
Fix false positive "missing AU Blacklist" message
See d6e4e0fb35 for an explanation
2021-11-12 23:34:07 +01:00
85fc3d5629 add missing file 2021-11-10 21:16:27 -07:00
4f58a92c6d show trigger/slot selection 2021-11-10 17:51:04 -07:00
a9949f20e6 basic architecture for Trigger selection
This is all done in the GUI, using GUI objects. THe primary goal
here is to allow actions to be applied to selected triggers, so
there's no real need for a trigger aspect to libardour (core)
selection.
2021-11-10 16:37:15 -07:00
91a28b78c4 modify and extend both Session and TriggerBox API to allow better transport control
This allows a stop transport request to first stop all active triggers and then stop the transport
2021-11-10 15:55:58 -07:00