[go: up one dir, main page]

Menu

#243 Copied Time Instant Layer does not include instant at end of track

v3.0
open
None
5
2018-07-17
2017-09-29
No

When I copy a time instant layer to paste into new layer, the ending time instant is not included when it is at the end of the audio file. This bug is apparent when dividing time instances into new ones. To replicate this bug, first create a time instant layer, select all and then "insert time instances at selection boundries" so that two instances are create, one at the beginning and one at the end of the audio file. Now select all, and divide the instances into four again. Copy, the contents of the layer into a new one. Divide once again into four and noticed the last two adjacent time instances, which included the ending one are not divided.

Discussion

  • Samuel Miller

    Samuel Miller - 2017-09-29

    This bug occurs in the current stable release 3.0.3.

     
  • Chris Cannam

    Chris Cannam - 2018-04-18

    Confirmed

     
  • Chris Cannam

    Chris Cannam - 2018-04-18
    • assigned_to: Chris Cannam
     
  • Chris Cannam

    Chris Cannam - 2018-04-18

    When you "insert instants at selection boundaries", the second time instant is actually inserted just beyond the end of the selection, i.e. at the first frame number that is not contained within the selection.

    This is by design, because it means that the time difference between the two inserted instants is the same as the length of the selection. For example, if you make a selection that only spans a single sample, and then use this function, you get two separate instants inserted one sample apart; it doesn't try to create two instants at the same sample number. If you select 44100 samples and then use it, you get two instants whose sample numbers are separated by 44100 and are therefore exactly one second apart if the underlying audio rate is 44100Hz.

    But in this case it's the start of a problem:

    • if you select a region, then use "insert instants at selection boundaries", then copy the instants from the selected region, the second instant will not be included in the selection you copied

    In this case, the second instant is not included even if you "select all" again after creating the new instants. That's because of another unfortunate bit of behaviour:

    • "select all" selects the whole span of the main audio model in the session; it does not select anything outside that span, and the point just created is outside that span (by one sample)

    The latter is a fairly significant problem in its own right. For example if you first open a short audio file, then "import more audio" to open a longer one, and finally scroll to a point in the longer file beyond the end of the shorter one and create some instants there, then those instants will not be selected by any subsequent "select all".

    So the first thing, I think, is to ensure that "select all" selects the whole span of everything in the session, not just the first (main) audio file.

     
  • Chris Cannam

    Chris Cannam - 2018-04-19

    Done that first thing, in commit 0e963dac67e2 - "select all" now creates a selection spanning everything that exists anywhere.

     
  • Chris Cannam

    Chris Cannam - 2018-07-17

    That change is rolled out in v3.1.

     

Log in to post a comment.