View Issue Details

IDCategoryLast Update
0007105bugs2017-03-11 11:34
ReporterunfaAssigned Totimbyr 
Reproducibilityhave not tried 
Status resolvedResolutionfixed 
PlatformGNU/Linux AMD 64OSLinux MintOS Version18 KDE5
Product Version5.4 
Fixed in Version 
Summary0007105: Linked MIDI regions shift notes when resizing
DescriptionI think I know why this is happening.

When resizing linked MIDI regions - the regions is increasing in size so that the first note has more space between itself and the start of the region - room where new notes can be inserted. The problem is, the other linked regions should compensate for that to keep their notes in place - instead they shift their notes.
Steps To Reproduce1. Create MIDI region on a MIDI track and put some notes in it.
2. Duplicate that region onto the same MIDI track (drag & drop while holding Ctrl)
3. Resize the duplicated region's start to the left.
4. The original MIDI regions's notes will shift to the right - breaking sync with the track.
TagsNo tags attached.



2016-11-13 00:21

developer   ~0018946

I can confirm this issue in 5.4 and 5.4.320 nightly.

This behaviour seems incorrect to me, the offset of the MIDI events from region start within a region should be independent even for linked regions if that is possible or if not then region should automatically become unlinked. I can't think of a situation where the current behaviour would ever be intentional.

I also notice that it seems to increase the offset if you move the region start earlier on the timeline but it won't change the offset back when you move the region start position back to the original position.


2016-11-16 12:13

reporter   ~0018973

this is due to the trim operation extending the source start to the region
see MidiRegion::fix_negative_start()

it should be possible to remove this.


2016-11-16 12:28

reporter   ~0018974

so if se reset the start for all regions using the same source, it should work.
i think the problem is that the other regions don't know that their source has been resized.


2017-03-04 00:35

reporter   ~0019461

this should be fixed by commit e8b5b4fcf3.

can you test?



2017-03-05 01:03

developer   ~0019483

It seems to work as expected but I have noticed and issue with undo.

If you copy (linked) a MIDI region and trim/move the start position to the left past original region start then the first region doesn't change as it used to, but undo at that point will change note offset in the original region.


2017-03-05 14:04

reporter   ~0019487

this bug only appears if a region that uses the same source is on another playlist.

it should be fixed by commit a445e8277640

please test region start trim undo for audio and midi regions and combinations of
multiple track region start trims.


2017-03-06 00:19

developer   ~0019490

There still seems to be an issue with undo after commit, I've attached a video to capture what I'm seeing.


2017-03-06 00:19


Ardour-5.8.73-test-bug-7105.webm (383,413 bytes)


2017-03-06 04:53

reporter   ~0019493

does commit 16089bff96a13b8 fix it?



2017-03-06 06:43

developer   ~0019494

It now seems to work as expected without any issues after a little testing in version 5.8.76(16089bff96)

I'll do some further testing and if I can't find any issues with it I'll mark it as resolved.


2017-03-11 11:34

developer   ~0019522

I spent a bit more time testing this (with 5.8.116) and it does seem to always work correctly with undo/redo etc. Marking as resolved.

Issue History

Date Modified Username Field Change
2016-11-12 22:11 unfa New Issue
2016-11-13 00:21 timbyr Note Added: 0018946
2016-11-13 00:21 timbyr Status new => confirmed
2016-11-16 12:13 nick_m Note Added: 0018973
2016-11-16 12:28 nick_m Note Added: 0018974
2017-03-04 00:35 nick_m Note Added: 0019461
2017-03-04 00:52 timbyr Status confirmed => feedback
2017-03-05 01:03 timbyr Note Added: 0019483
2017-03-05 14:04 nick_m Note Added: 0019487
2017-03-06 00:19 timbyr Note Added: 0019490
2017-03-06 00:19 timbyr File Added: Ardour-5.8.73-test-bug-7105.webm
2017-03-06 04:53 nick_m Note Added: 0019493
2017-03-06 06:43 timbyr Note Added: 0019494
2017-03-11 11:34 timbyr Note Added: 0019522
2017-03-11 11:34 timbyr Status feedback => resolved
2017-03-11 11:34 timbyr Resolution open => fixed
2017-03-11 11:34 timbyr Assigned To => timbyr