Paul Davis
dc8382c0b5
some enforcement of NoInsert KeyEnforcementPolicy
2021-11-18 16:44:16 -07:00
Paul Davis
e8baad9efa
more centralized code for deciding if a note is visible or note based on key
2021-11-18 15:41:59 -07:00
Paul Davis
d0cdd0c9db
somewhat functional menu to control KeyEnforcementPolicy
...
And yes, this should likely be global, not per track
2021-11-18 14:17:21 -07:00
Paul Davis
bf28ecfc4c
fix enum registration for key enforcement policy (it's a bitmask)
2021-11-18 14:16:37 -07:00
Paul Davis
407936277f
NOOP: whitespace
2021-11-18 11:35:01 -07:00
Paul Davis
bfe52ca668
key enforcement: if NoInsert is in effect, MIDI mouse editing does not insert non-scale notes
2021-11-18 11:34:50 -07:00
Paul Davis
a3a8f355ee
key enforcement: use NoDraw to help decide whether or not to show ghost notes
2021-11-18 11:25:42 -07:00
Paul Davis
9f4bf02980
change type of MidiTrack's key enforcement to new enum type
2021-11-18 11:16:50 -07:00
Paul Davis
987c4de725
extend set of key enforcement policy flags
2021-11-18 11:13:29 -07:00
Paul Davis
ae8c755d51
add new KeyEnforcementPolicy enum type
2021-11-18 11:00:00 -07:00
Paul Davis
331377212e
tweak menu item names to be more reflective of common (western) practice
2021-11-18 10:36:31 -07:00
Paul Davis
eb0c1984de
midi region view: don't show ghost note if it is not in key
2021-11-18 10:36:07 -07:00
Paul Davis
2bb880aac0
midi track redisplay when mode/root is changed
2021-11-18 08:30:46 -07:00
Paul Davis
1793c9a61a
add new properties for musical mode & root
2021-11-18 08:30:46 -07:00
Paul Davis
4648785935
prefer major/minor to ionian/aeolian (but show both names)
2021-11-18 08:30:46 -07:00
Paul Davis
6cdbd4174d
Implement mode/root context menus and modification methods to MidiTimeAxisView
2021-11-18 08:30:46 -07:00
Paul Davis
9f76d688fd
provide missing implementations for MidiTrack key API
2021-11-18 08:30:46 -07:00
Paul Davis
1555896d8e
Extend API for MusicalMode and MusicalScale to expose mode type as a member
2021-11-18 08:30:46 -07:00
Paul Davis
55a0aadc74
Modify ParameterDescriptor::midi_note_name() to offer chance to get a non-octave-version
2021-11-18 08:30:45 -07:00
Paul Davis
22efa2bf17
use color on MIDI tracks to show off-key notes
2021-11-18 08:30:45 -07:00
Paul Davis
15e4ba5123
add new color name for offkey notes
2021-11-18 08:30:45 -07:00
Paul Davis
7f88c71bd3
implement MusicalKey::in_key()
...
Limited to 12 tones per octave for now
2021-11-18 08:30:45 -07:00
Paul Davis
fb7dd71c45
add default key and boolean to define whether or not to enforce it
2021-11-18 08:30:45 -07:00
Paul Davis
4801f488c5
reflect name change in files
2021-11-18 08:30:45 -07:00
Paul Davis
a7907d9e99
reflect rename in libs/ardour/wscript
2021-11-18 08:30:45 -07:00
Paul Davis
46242a0079
rename scale to key
...
Scale is just a silly biased overly limiting name for Mode, so use
Key for "Mode + Root"
2021-11-18 08:30:45 -07:00
Paul Davis
b4d6b888bb
initial data structure for musical scales (derived from mode)
...
This is built around a MIDI-like assumption that we have a fixed (integer) number of
note IDs and a semitone between them. We will need to expand this definition in the
future to handle Bohlen-Pierce, maqams and various other non-12TET scale systems
2021-11-18 08:30:45 -07:00
Ben Loftis
252ae56a08
MIDI Draw: change behavior regarding MIDI Channel of new notes
...
When adding a note, use these criteria to choose the channel number:
* if the user has explicitly specified a note in the pulldown, use that
* if the user has AUTO selected and we are in a region, choose the nearest note's channel (consistent with velocity behavior)
* as a fallback, query the track for its channel-filter (old behavior)
2021-11-18 08:23:08 -06:00
Ben Loftis
eebf3717e3
MIDI Draw: note-length-auto means 'use the Grid for note-length' (prior behavior)
2021-11-18 07:35:13 -06:00
Ben Loftis
93e68a5a00
MIDI Draw: provide a menu for Channel and Velocity
2021-11-18 07:35:13 -06:00
Ben Loftis
2a6da0113f
MIDI Draw: Provide a menu to explicitly select note-length
...
ToDo: 3,5,7's? keyboard shortcuts?
2021-11-18 07:35:13 -06:00
Paul Davis
5ba6e14310
triggerbox: catch a very strange condition via abort(), to help with debugging.
...
Not easily reproducable, but definitely a bug somewhere.
2021-11-17 21:16:38 -07:00
Paul Davis
ddf93aca19
triggerbox: make a somewhat half-baked attempt to resync a trigger that ended too early.
...
Instead of just restarting it inside the same ::run() call, mark it as waiting,
so that it will restart at the next quantization point.
This isn't a final or even fully correct solution, but it's a useful test of
the idea.
2021-11-17 21:14:56 -07:00
Paul Davis
6e404ea7bf
tempomap: reimplement TempoMap::bbt_walk()
...
This still needs work to deal correctly with negative (backwards/earlier)
walks.
2021-11-17 15:59:03 -07:00
Paul Davis
b1b5553d1d
tempomap: allow access to TempoMap::bbt_at () variant
2021-11-17 15:58:33 -07:00
Paul Davis
fcf0c253ad
control surface changes to follow TempoMap::sample_at() API change
2021-11-17 15:57:54 -07:00
Paul Davis
c24cabead0
GUI changes to follow TempoMap::sample_at() API changes
2021-11-17 15:57:30 -07:00
Paul Davis
2aefb472e2
temporal: change API of TempoMap::sample_at() to not require an explicit sample rate
...
We have a mechanism to get the engine sample rate and use that widely. We
should use it here also.
2021-11-17 15:56:06 -07:00
Paul Davis
3c9bebda00
remove debug output
2021-11-17 12:16:39 -07:00
Paul Davis
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
Paul Davis
7dbf2445f5
tempo map: NOOP: expand comment to explain more
2021-11-17 12:16:39 -07:00
Paul Davis
a5ccb521e6
tempo map: NOOP helpful comment, perhaps
2021-11-17 12:16:39 -07:00
Paul Davis
73c87064a5
tempo map: NOOP correct comment text
2021-11-17 12:16:39 -07:00
Paul Davis
c7adea3ec0
tempo map: really no-op code change to provide another useless compiler const hint
2021-11-17 12:16:39 -07:00
Paul Davis
d9b1d2ccc8
temporal: NOOP add helpful comment about bar_mod argument
2021-11-17 12:16:39 -07:00
Paul Davis
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
Paul Davis
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
Paul Davis
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
Paul Davis
8972ed1517
temporal: add Tempo::note_type_as_beats()
2021-11-17 12:16:39 -07:00
Paul Davis
d4c1d3e681
doc: add tempo math writeup from _FrnchFrgg_, lost from the nutempo branch
2021-11-17 12:16:39 -07:00