View Issue Details

IDProjectCategoryView StatusLast Update
0001737ardourbugspublic2020-04-19 20:12
Reportergiso Assigned Topaul  
PrioritynormalSeverityminorReproducibilityrandom
Status closedResolutionfixed 
Product Version2.0 
Summary0001737: click at the end of crossfades
DescriptionIn some sessions a click is created at the end of a crossfade if the earlier region is on top of the later region. Raising the later region to the top removes that click. At short cross-fades the click occurs at the end of the crossfade, not at the end of the region overlap.
Additional InformationThis problem seems to be reproducible only in session which have differences between menu settings for cross-fades and the internal default values (see bug 0001593, possibly also 0001702). Attached is a session file which has this problem, and a later version of the same file where I do not see the problem. In the later version, I am not able to raise earlier regions to the top layer (this might be the reason why I cannot reproduce).
TagsNo tags attached.

Relationships

related to 0002490 acknowledged incorrect output when transport is started within full crossfade 

Activities

2007-06-18 19:09

 

giso

2007-06-18 19:24

reporter   ~0004072

When I change a short 'clicking' crossfade into a full crossfade, the starting point stays where the starting point of the short crossfade was (at the end of the upper and earlier region), i.e., the crossfade spans a time interval with most of it outside the region. It sounds as if the fade-out would still be short, but the fade-in already full (but with wrong position). See also screenshot 'changing_short_crossfade_to_full.png'.

2007-06-18 19:24

 

giso

2008-02-11 04:32

reporter   ~0004716

The click noise is not audible if the later region is higher (ardour 2.1).

2008-02-11 04:48

 

export.wav (666,344 bytes)   

giso

2008-12-11 21:02

reporter   ~0005513

Last edited: 2008-12-11 21:25

This bug seems to still exist in 2.7.1. See attached project "test" in crossfade_bug3.tgz, which was created from the scratch with ardour 2.7.1. The amplitude of the click depends on the signal, and is loudest when they have opposite sign. Probably one (last) sample from the first/top region is played before playing bottom region after crossfade.

2008-12-11 21:17

 

crossfade_bug2.tgz (41,055 bytes)

2008-12-11 21:22

 

crossfade_bug3.tgz (43,632 bytes)

thorgal

2008-12-13 20:19

reporter   ~0005517

I can confirm this. I noticed that quite a while ago.

giso

2008-12-14 19:19

reporter   ~0005520

Last edited: 2008-12-14 19:40

Here is the source of the bug:

In file crossfade.cc, function Crossfade::update()

The lines

    case EndOfOut:
        _position = _out->last_frame() - _length;
    }

should be

    case EndOfOut:
        _position = _out->last_frame() - _length + 1;
    }

Otherwise _position will point to the last frame before the crossfade!

This fix will not solve problems with invalid XML files. If the invalid position is stored there it will still click. I think this can be fixed by checking that the assumption /* precondition: caller has verified that we cover the desired section */ is correct.

seablade

2009-01-28 02:08

manager   ~0005653

Assigned to Paul to take a quick look at the proposed fix.

      Seablade

giso

2009-01-29 08:26

reporter   ~0005678

The solution mentioned above fixes only the problem described here, but I think there is a second of-by-one bug two lines above or below (I do not have ardour source code right now). Also the loading of sessions with the described problem will still produce clicks (because the method Crossfade::update() is not called from the XML constructor -- is there a possibility to emit an update signal in that constructor?).

  Giso

paul

2009-03-02 20:59

administrator   ~0005784

please check rev 4720 - proposed fix(es) applied and committed. please let me know if this fixes the problem for you.

system

2020-04-19 20:12

developer   ~0021533

Issue has been closed automatically, by Trigger Close Plugin.
Feel free to re-open with additional information if you think the issue is not resolved.

Issue History

Date Modified Username Field Change
2007-06-18 19:09 giso New Issue
2007-06-18 19:09 giso File Added: crossfade_bug_sessions.tar
2007-06-18 19:24 giso Note Added: 0004072
2007-06-18 19:24 giso File Added: changing_short_crossfade_to_full.png
2008-02-11 04:32 giso Note Added: 0004716
2008-02-11 04:48 giso File Added: export.wav
2008-12-11 21:02 giso Note Added: 0005513
2008-12-11 21:17 giso File Added: crossfade_bug2.tgz
2008-12-11 21:22 giso File Added: crossfade_bug3.tgz
2008-12-11 21:25 giso Note Edited: 0005513
2008-12-13 20:19 thorgal Note Added: 0005517
2008-12-14 19:19 giso Note Added: 0005520
2008-12-14 19:40 giso Note Edited: 0005520
2009-01-28 02:05 seablade Relationship added related to 0002490
2009-01-28 02:08 seablade Status new => assigned
2009-01-28 02:08 seablade Assigned To => paul
2009-01-28 02:08 seablade Note Added: 0005653
2009-01-29 08:26 giso Note Added: 0005678
2009-03-02 20:59 paul cost => 0.00
2009-03-02 20:59 paul Status assigned => resolved
2009-03-02 20:59 paul Resolution open => fixed
2009-03-02 20:59 paul Note Added: 0005784
2020-04-19 20:12 system Note Added: 0021533
2020-04-19 20:12 system Status resolved => closed