13
0
Commit Graph

36196 Commits

Author SHA1 Message Date
c8ddfd5637 Fix C++ memory layout for the TempoMap
Usually C++ class instance has the same mem address as its first parent.
LuaBridge uses this to for derived classes. A TemopPoint instance has
the same address as its parent Tempo. However due to virtual inheritance
this was not the case due to a lack of virtual d'tor.

Now the following Lua code works correctly
```
tm = Temporal.TempoMap.read()
tp = Temporal.timepos_t (0)
print (tm:tempo_at(tp):note_type())
```

Previously the last line failed calling Tempo::note_type()
on a TempoPoint instance, due to memory offset e.g.
TempoPoint: 0x600000ff90e0 Tempo: 0x600000ff90e8
2022-09-28 04:12:11 +02:00
76c0f42ecb
Second round of Lua script API updates 2022-09-27 20:00:50 +02:00
1abf6a77d6
Even more Lua bindings 2022-09-27 20:00:50 +02:00
0d5fd0de0c rename "library manager" to "library downloader everywhere (breaks string freeze) 2022-09-27 11:22:56 -06:00
577c21776a fix position of imported tempo markers from SMF files 2022-09-27 09:32:19 -06:00
bf0a525647 remove unused variable 2022-09-27 09:32:19 -06:00
30a92894fc
First round of Lua script API updates 2022-09-27 13:06:18 +02:00
395bf4a650
Cont'd work on nutempo Lua bindings 2022-09-27 13:06:16 +02:00
8c83149c4c
Fix time stretch if region-start > 0
For some reason applying the property change
  plist.add (Properties::start, std::numeric_limits<timepos_t>::min());
does not correctly reset the offset of the newly created region.
2022-09-27 13:06:13 +02:00
28d11df6f6
operator% is a const operation 2022-09-27 13:04:49 +02:00
36aa661a1d
Add explicit BBT/Beat print functions (like timeline.h has)
This is in preparation for Lua bindings to allow print()ing
the value. We cannot use PBD::to_string() here.
2022-09-27 02:23:11 +02:00
f79f3ee301
Remove unused API 2022-09-27 00:40:35 +02:00
3f812ca1a3 fix behavior of region gain envelope when performing a separate action (2-point split)
This was a simple typo, using pos1 rather than pos2. Also removed now-irrelevant comment line
2022-09-26 16:40:08 -06:00
6ff57ca37b improve accuracy of DEBUG_TRACE output 2022-09-26 16:40:08 -06:00
60aaccb2f9 a likely better fix than 8ba21e7fff for the same problem 2022-09-26 16:40:08 -06:00
b4ad81075e provide and use a method to show the library download manager 2022-09-26 16:40:08 -06:00
831fd9c4b2
Amend eb85b336c, remove Lua binding of declared but not implemented method 2022-09-26 23:33:38 +02:00
eb85b336c8
Add additional nutempo Lua bindings
Particularly it is now possible to sum timepos + timecnt
and subtract, calling distance() as appropriate.
2022-09-26 22:18:35 +02:00
e98fe4729e
LuaBridge - add API to try convert a value
This in in preparation to overload operators
2022-09-26 21:39:21 +02:00
fb750aa4b8 skeleton to allow opening the library download manager from the clip viewer 2022-09-26 11:15:52 -06:00
340253a095 bbt markers should be freely draggable regardless of grid setting 2022-09-26 11:15:52 -06:00
8ba21e7fff
Fix region-gain when trimming, cutting or partitioning regions
The during trim-front, the call order is
 1. Region::set_position_internal
 2. Region::set_length_internal

::set_position_internal sets `_last_length.set_position (position());`
but the later call ::set_length_internal does `_last_length = _length;`
This sets last_position() == position(), and later Region::mid_thaw()
does not call Region::recompute_at_start().

Region gain envelope was not updated.

see also 00a1b7cb24 and 13d10582f0
2022-09-26 14:57:25 +02:00
d39f064756 library dialog: catch exception and behave appropriately 2022-09-26 01:10:20 -06:00
f2eddd404b downloader: create destdir if it does not already exist, throw exception if this fails 2022-09-26 01:10:20 -06:00
3b274bd433 rename loop download dialog (breaks string freeze) 2022-09-26 01:10:20 -06:00
12ffd962b3
Update SMF profile tool to show number of temmp changes 2022-09-25 03:30:15 +02:00
97b3aef0fa
Significantly speed up display of MIDI file information (again)
This regressed with changes to SMFSource to unconditionally load
the model. "Black MIDI Trilogy 2" now shows again in under 4 sec.
Before this change it took roughly 3 mins (!) and the UI was marked
as unresponsive.
2022-09-25 03:29:42 +02:00
5d9fc950c5
Update SMF-load test tool 2022-09-25 02:48:00 +02:00
bfe655775a
Set SMF::open option, do not scan since information is not needed 2022-09-25 02:47:14 +02:00
e09913ced7
Set SMF::open option, do not scan when loading the model 2022-09-25 02:46:59 +02:00
0457646387
Allow to scan midi file during file read
This partially reverts eced764480. In many places Ardour uses
SMF directly, without loading the MIDI model in a libardour SMFSource.

In this case no information (track, channel-count) was available,
after eced764480, and worse various members were not initialized
and showed random numbers.

This fixes various import options.
2022-09-25 02:46:09 +02:00
7428f13e15 MIDI: unlinked region copies get sources that are copies of the original
Previously, the copied source file only contained data within the initial region bounds. This
meant that you could not trim the (unlinked) copy to beyond its initial bounds. Seems wrong.
2022-09-24 15:38:45 -06:00
4f83eea46c Revert "step entry: do not pass auto_partition=true to Playlist::add_region()"
This was an error of understanding.

This reverts commit e9f98fe230.
2022-09-24 15:21:05 -06:00
e9f98fe230 step entry: do not pass auto_partition=true to Playlist::add_region()
This code path is only followed if there is no region at the start of step entry, so auto-partition
makes no sense anyway
2022-09-24 14:53:06 -06:00
fba4a5ff73 fix region drag across tracks that auto-partitioned the receiving playlist
Confusion caused during nutempo development when a boolean related to nick_m's old
"for music" concept ended up becoming the "auto_partition" argument instead
2022-09-24 14:27:20 -06:00
7e5fe695d0 Increase coreMIDI robustness, do not drop late events
see also https://discourse.ardour.org/t/ardour-not-getting-all-messages-from-midi-keyboard/107618/13
2022-09-24 02:29:50 +02:00
451fb3e761 fix crash when dragging BBT marker (must use audio time) 2022-09-23 15:51:17 -06:00
47e9bb05c8 midi editing: if nudge clock says zero, use grid for nudging notes 2022-09-23 11:30:17 -06:00
c4b63221d1
Allow to delete preset from context menu 2022-09-23 05:40:05 +02:00
2e0bfae628 midi note drawing: use RoundNearest not RoundDownMaybe for note ends 2022-09-22 16:21:07 -06:00
04d367fdfe midi note drawing: fix snap used to place ghost note 2022-09-22 16:16:20 -06:00
91df1d8e94 NO-OP: fix switch statement indentation 2022-09-22 16:10:34 -06:00
0cd87a917c push2: apply concept in 0af0e3a8e8 to push2 code (unused follow action icon) 2022-09-22 09:20:01 -06:00
0af0e3a8e8 remove unused code: an unused follow-action icon 2022-09-22 08:10:29 -05:00
af28394bfd push2: fix an apparent bug in cairo when drawing follow action icons
It seems that using ::move_to() followed by Pango::Layout::show_in_cairo_context() leaves
the context in a state that is not correctly restored when using ::restore(). Therefore,
clear the path to avoid leaving any dangling current point
2022-09-22 00:43:38 -06:00
7cad01ae1e clip list: add a Refresh button to the file list
It is tempting to update the list automatically when the dire contents change,
 but this can lead to the list changing while the user is clicking to audition
 or drag.

Instead, we should sensitize the button only when the dir contents have changed.
2022-09-21 20:47:23 -05:00
luz paz
7f06beda50 Fix typos
Found via `codespell -q 3 -S *.po,./.git,./share/patchfiles,./libs,./msvc_extra_headers,./share/web_surfaces,*.patch  -L acount,ba,buss,busses,discreet,doubleclick,hsi,ontop,retrn,ro,scrollin,seh,siz,sord,sur,te,trough,ue`
2022-09-21 19:09:55 -06:00
dbolton
078544482f Add Korg Kross 2 midnam 2022-09-21 19:05:19 -06:00
9b65be0e17
Add debug information for coreMIDI events 2022-09-22 00:42:56 +02:00
56c5db9115
Fix indent of previous commit 2022-09-21 22:38:22 +02:00