13
0
Commit Graph

597 Commits

Author SHA1 Message Date
nick_m
dca96d8b5d rename Region pulse to pos_beats. use new beat distance api where required.
- add more debugging output detecting regions whose
	  beat and frame position do not align on a playlist.
	  this is required as a check as we have never used
	  frame rounding on constant tempi before 8884a5723dc
2016-11-11 03:37:08 +11:00
nick_m
24846f478b clean up ghost note wrt create drag.
- hide ghost note when add dragging.

	- new note length snaps as per ghost note start (shifted snap).

	- prevent ghost note from appearing before region start.
2016-10-26 04:52:09 +11:00
nick_m
1c9dbb5242 Amend previous commit. 2016-10-17 04:33:48 +11:00
nick_m
2359a0b2fa Set note colour of new MidiGhostRegions corrctly. 2016-10-17 04:23:43 +11:00
nick_m
1692968627 Slightly improve note update performance, fix note resizing for non-4.0 meter divisors. 2016-10-16 03:11:05 +11:00
nick_m
9698f16aee Note selection state uses note event_id_t. 2016-10-15 23:50:02 +11:00
nick_m
4faf44588f Interpret start & length_beats properties as double rather than Evoral::Beats.
- Evoral::Beats operator!= would prevent an increment
	  of start_beats by intervals of less than a tick,
	  so its possible that other subtle problems
	  existed due to this kind of thing.
2016-10-10 03:39:57 +11:00
nick_m
a54d105107 Use double comparison in MidiRegionView::note_in_region_range(). 2016-10-09 03:24:14 +11:00
nick_m
4270569528 Fix bug where drawing long notes placed the new note on the previous snap line.
- NoteCreateDrag already applies this shift, so it was
	  always applied twice to the note start frame.
2016-09-23 05:06:03 +10:00
nick_m
080e7755a6 Remove _midi_regions_use_bbt_beats from Session, _start_pulse and _length_pulse from MidiRegion.
- _start/length_beats are now quarter notes regardless
	  of loaded session version.

	- also restores note colour update
2016-09-23 03:39:05 +10:00
Guido Aulisi
e2b724194e Do not delete selected MIDI notes while dragging. (See #6602)
This is not caused by commit_reversible_command, but because
NoteDrag::total_dx calls Evoral::Note<Evoral::Beats>::time()
with invalid MIDI note (deleted).
2016-09-15 23:24:36 +10:00
nick_m
fb9f4636e7 Remove unused variable. 2016-09-07 00:27:01 +10:00
nick_m
d7879486a0 Ensure the correct position is passed to MidiRegionView::get_grid_beats(). 2016-09-02 05:18:53 +10:00
nick_m
34e234825e No-op - rename var in MidiRegionView::note_dropped(). 2016-08-31 23:12:11 +10:00
nick_m
c0f89e99a2 MidiRegionView uses quarter note snapping.
- also ensures poiinter ghost note respects the snap modifier.
2016-08-31 23:12:11 +10:00
nick_m
a9b72f87a6 Add missing line feed in midi_region_view.cc 2016-08-16 00:56:08 +10:00
nick_m
cecbae1df4 Midi region ghost note uses beat-based note time calculation. 2016-08-16 00:52:18 +10:00
nick_m
62372b48ea Fix frame-based beat calculation in MidiRegionView::snap_frame_to_grid_underneath()
- this caused the ghost note under the pointer to behave badly when
	  hovering near an audio-locked meter.
2016-08-16 00:48:54 +10:00
6a4fb58384 fix thinko that causes near duplicate menu items in group context menu when not in group tabs 2016-08-08 23:36:33 +02:00
nick_m
6e49ca61a4 Remove the temporary note group in MidiRegionView, update start trim during drag. 2016-07-22 23:21:27 +10:00
cf52d6e4b4 enough with umpteen "i18n.h" files. Consolidate on pbd/i18n.h 2016-07-14 14:45:23 -04:00
7ed6dab340 use new midi-note-name API 2016-07-12 23:02:46 +02:00
140258d8ab remove reference "const int32_t&" -> const int32_t"
this simplifies lua-bindings and also let's the compiler worry about
constant primitive types.
2016-07-10 15:30:41 +02:00
nick_m
5f0ab71989 Midi note resizing uses exact beat. 2016-07-10 02:18:38 +10:00
nick_m
11f002ddc4 Use exact beat when adding midi notes. 2016-07-10 02:18:38 +10:00
nick_m
9603233a68 Fix note trimming over tempo changes, correct note length properly when resizing midi region. 2016-07-10 02:18:37 +10:00
nick_m
13c851f3cf Restore earlier midi region trim display. 2016-07-10 02:18:37 +10:00
nick_m
b732147676 Use Note::set (Rect) for speed improvement when rendering notes. 2016-07-10 02:18:37 +10:00
nick_m
71ed5865f5 Temporary work-around for note colour. 2016-07-10 02:18:37 +10:00
nick_m
7a6efaaf3d Quick fix to get trim working again (bahaving oddly during trim right now) 2016-07-10 02:18:37 +10:00
nick_m
550f2925cc Performance - don't redisplay model immediately in MidiRegionView::enable_display ().
- allows MidiRegionView::reset_width_dependent_items () to do it
	  as intended (i think).
2016-07-10 02:18:36 +10:00
nick_m
6b0eadc62f Use mostly beat-based calculation for displayed midi note position. 2016-07-10 02:18:36 +10:00
nick_m
0e63fa65b5 Remove frame conversion for MidiRegionView::note_in_region_range(), speed up tempo dilation 2016-07-10 02:18:36 +10:00
nick_m
93c24e4433 Paste uses exact beats. rework _start_beats calculation in copy-with-offset ctor. 2016-07-10 02:18:36 +10:00
nick_m
94e0a15325 Exact beat - provide audio->music mapping for region split.
- for those not in the know, this series provides a way to
	  remove the temporal distortion introduced when using an
	  audio frame-based gui for music-locked objects.

	  In short, the gui uses an audio frame representation to move
	  objects. It displays the object using frame_at_beat(), quantizing
	  the time value to audio frames. This is fine until the user selects
	  that frame but expects it to be interpreted as a beat.
	  Thus beat_at_frame() would not produce the user-expected beat
	  (temporal quantization error of up to 0.5 audio samples).
	  This is one method of mapping audio time to music time accurately.
2016-07-10 02:18:36 +10:00
nick_m
f3b4644969 Fix many offset errors when drawing notes in midi regions that have been edited.
- hopefully this can close bugs such as 6270 & 6793
2016-06-11 05:40:50 +10:00
nick_m
03ea905b86 Step edit cursor no longer assumes constant tempo. 2016-06-08 02:45:40 +10:00
4653e301c8 slight improvement of MIDI program names in verbose cursor while scrolling 2016-05-31 15:30:44 -04:00
nick_m
5d6ad68004 Revert terrible thinko in 647c86e. (back to slow for now) 2016-05-29 05:57:19 +10:00
nick_m
647c86e0f7 Speed up redraw while tempo dragging with midi regions (and possibly other redraws) 2016-05-29 05:47:11 +10:00
nick_m
baf8f37967 Tempo ramps - rename meter_at() -> meter_at_frame() & make the ticker slightly more efficient. 2016-05-27 23:38:17 +10:00
nick_m
4f7a4cd233 Crapola - this is an experimental performance hack that must be reverted. 2016-05-27 23:38:14 +10:00
nick_m
e82c997b3d Tempo ramps - remove double calls to RegionView::set_duration() and MidiRegionView::redisplay_model()
- massively improves note redrawing performance when dragging tempos
	  and audio-locked meters,
2016-05-27 23:38:11 +10:00
nick_m
b415b59f79 Tempo ramps - respect tempo note type and meter note divisor correctly.
- tempo and meter position is now pulse-based,
	  although meter still has a beat for convenience.
2016-05-27 23:38:11 +10:00
nick_m
d3c24fe0ca Tempo ramps - midi notes resize when dragged, misc bug fixes. 2016-05-27 23:38:11 +10:00
nick_m
bdef9b2466 Tempo ramps - fix constant tempo assumption wrt midi ghost note. 2016-05-27 23:38:10 +10:00
nick_m
885f1fd684 Tempo ramps - update midi regions and locations when dragging tempo.
- also make locations and regions use a double beat rather than bbt for musical position.
2016-05-27 23:38:10 +10:00
nick_m
dbfe991cd8 Tempo ramps - fix changing from const to ramp in the gui.
- also fixes some midi mouse over problems
	- start using replacements for frames_per_bar() frames_per_beat() etc.
2016-05-27 23:38:09 +10:00
Adrian Knoth
6fa88273aa Spelling correction patch from Debian
Patch taken (and forward-ported to HEAD) from
<https://anonscm.debian.org/cgit/pkg-multimedia/ardour.git/plain/debian/patches/0100-fix-typos.patch>
2016-02-22 15:13:01 -05:00
90e35c7143 Fix bug #6762, MIDNAM note read outs don't work when dragging MIDI note
Also fixes it so the key is selected in the piano roll header
2016-02-11 08:17:18 +10:00