View Issue Details

IDProjectCategoryView StatusLast Update
0001937ardourbugspublic2020-04-19 20:12
Reporterdx9s Assigned Topaul  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version2.1 
Summary0001937: punch IN/OUT is horridly broken... resulting in lots of weird things
Descriptionaccording to las ... the arm buttons don't look right.

And when I tried to first report this "2.1" (version) was not available..

It is 2.1 (and -ongoing).

http://dx9s.ath.cx/files/punch-bug.ogg

(see issue 1928 for first reported bug -- functionally a duplicate)

TagsNo tags attached.

Relationships

related to 0001928 closedpaul punch (in + out) is broken big time (causing other problems) 

Activities

2007-10-26 23:09

 

punch-bug.ogg (2,262,536 bytes)

seablade

2009-07-04 06:59

manager   ~0006246

Is this still an issue in recent versions of Ardour (2.8 or later?)

seablade

2009-07-05 04:56

manager   ~0006322

As I posted in issue 1928, this doesn't seem to be an issue in recent versions, can you confirm or deny if it still exists?

seablade

2009-07-05 04:58

manager   ~0006323

Bah sorry about the double posting there, I got lost on myself;)

dx9s

2009-07-23 02:06

reporter   ~0006454

Tested 2.8.2 and there is still bugs .. however it seems better.. It still (sometimes) creates regions at the start of the timeline (or perhaps where the start marker is located) and moves them to the position where the punch in/out is (instead of leaving the punched in/out region in weird places) ... but it leaves super small regions at the start of the track..

this is what I've seen so far in the (under) 10 minutes with 2.8.2 .. I will continue to see if there is a predictable pattern and document.

--Doug

dx9s

2009-07-23 02:20

reporter   ~0006456

punch in/out is still buggy, but is now more usable... I will create ogg video sometime. I've had it make a region that was longer than the punch in/out area and creates the region at the start of the timeline then (once STOP is pressed) move the region to the place where punch in/out is located and create (what can be best described as) micro-regions (assuming it is one jackd frame) at the start of the timeline.

Guessing it's a bug with how ardour2 (2.8.2) creates new empty wave files and keeps them on hand for instant write-to-disk when capturing (for a particular track) is started (via punch or elsewise)... I am betting these files don't completely exist in the XML database structure. Guessing this "pseudo" wave files (for the purpose of having on hand for next capture/region creation) start off with a location of 0 (start of timeline).

In any case, the problem is not obvious considering the revisions that the code base has moved through and still not found.

I don't envy anyone trying to track this one down.

2009-07-24 03:25

 

PunchInOutBug-2.8.2.ogg (4,767,064 bytes)

dx9s

2009-07-24 03:25

reporter   ~0006466

Attached a video .. pretty much same symptoms back in 2.1 / -ongoing (at the time)

dx9s

2009-07-24 03:29

reporter   ~0006467

Also mentioned in the old/related ticket that I suspect the super small regions that are created at at start of the track are the size of the Jackd frame. Also they are created whenever during a capture via punch in occurs and the display shows the region at the start of the track instead of where the punch in/out is... I will restate that pattern: it creates those "micro" regions when it draws the currently captured region at the start of the timeline instead of where the playhead is... Does this ring any bells with any other open bugs ??

2009-07-24 03:48

 

junk.tgz (811,780 bytes)

dx9s

2009-07-24 03:51

reporter   ~0006468

Attached is a file that has those mysterious micro regions (9 files in the interchange folder... which is expected 6 for the 3 tracks and recorded twice 3x2=6 + 3 "stub" 56 byte wave files for the next recording)... I don't know if the micro region at the start line is pointing at the stub file or (more likely) just a single region placed twice.

In any case figuring out where those micro regions (placement) are/how being created might help to figuring out what is up with punch in/out and it acting weird.

--Doug (dx9s)

dx9s

2009-07-30 17:44

reporter   ~0006474

bump...

I don't see any response -- but since Seablade indicated he has zero problems on OSX.. the problem is something subtle ... perhaps hidden in a "ifdef OSX/LINUX" kind of source code directive

2009-10-14 19:30

 

hsyl20

2009-10-14 20:43

reporter   ~0006707

Last edited: 2009-10-14 20:45

I've attached another video which shows that problems with punch in-out are still present in 2.8.3. It's another wrong behavior of punch in/out.

There is a problem in libs/ardour/audio_diskstream.cc as I've already stated in related issue 1928. I've even sent a patch nearly 2 years ago which "solves" the second case in my video (ie case where the recording cursor reaches the punch-out marker).

To solve this bug, add first_recordable_frame = max_frames at line 506 of libs/ardour/audio_diskstream.cc. It should look like:
} else if (!record_enabled() || !can_record) {

      /* stop recording */
      ...skipped...

      first_recordable_frame = max_frames;
   }


Explanations:
To trace that, I just printed first_recordable_frame (First) and last_recordable_frame (Last) each time "process" is called. I got:

0000001 - Full punch in-out recording (punch 52000 -> 65000)
First -1 Last -1
First 52000 Last -1
First 52000 Last 65000

#2 - Full punch in-out recording (punch 52000 -> 65000)
First 52000 Last -1
First 52000 Last 65000
No noticeable problem because First = punch-in

#3 Let's move punch-in to the right (punch 56000 -> 65000)
First 52000 Last -1
First 56000 Last -1
First 56000 Last 65000
Recording started at 52000 but it should have started at 56000. => BUG

0000004 Let's move punch-in to the left (punch 49000 -> 65000)
First 56000 Last -1
First 49000 Last -1
First 49000 Last 65000
No noticeable problem because the playhead reaches punch-in before First.

As we can see, the first time first_recordable_frame is set to max_frames (-1). But it is never reset to max_frames after that. Adding the line as mentionned before just reset first_recordable_frame to -1 each time the recording stops (punch-out reached, rec button disabled...). My last patch on issue 1928 reset first_recordable_frame only when punch-out was reached which was better than nothing but didn't solve all cases.

dx9s

2009-10-14 20:55

reporter   ~0006708

Watched your video, and yes looks like one of the several punch-in/out issues I've seen (and think recorded in video) as well.

if you (hsyl20) have patch that solves what you explicitly demonstrated in your 2.8.3 video... I might want to try it as well!

2009-10-14 21:13

 

hsyl20_ardour283_punch.patch (357 bytes)   
--- ardour-2.8.3/libs/ardour/audio_diskstream.cc	2009-10-08 16:44:24.000000000 +0200
+++ ardour-2.8.3-patched/libs/ardour/audio_diskstream.cc	2009-10-14 22:25:54.000000000 +0200
@@ -503,6 +503,8 @@
 		} else {
 			last_recordable_frame += _roll_delay;
 		}
+
+      first_recordable_frame = max_frames;
 	}
 
 	last_possibly_recording = possibly_recording;

hsyl20

2009-10-14 21:15

reporter   ~0006709

Ok, patch for 2.8.3 attached.

To install:
# tar xvjf ardour-2.8.3.tar.bz2
# patch ardour-2.8.3/libs/ardour/audio_diskstream.cc hsyl20_ardour283_punch.patch

seablade

2009-10-14 21:36

manager   ~0006710

Assigned it to Paul to take a look at the patch. Thanks.

     Seablade

seablade

2009-10-14 21:37

manager   ~0006711

For the record, the best way to submit patches to fix things is to attach them to the issues so that I can assign the issue to Paul and make sure he sees the patch, and we don't lose it in time if we are working on other things.

      Seablade

paul

2009-10-30 16:45

administrator   ~0006994

committed (rev 5981), i'd like confirmation that the issue is fixed.

naptastic

2009-10-31 05:48

reporter   ~0007004

Confirmed! Using revision 5992, I could not recreate this behavior. Punch in/out works as it should.

paul

2009-10-31 12:38

administrator   ~0007009

see notes. will be in 2.8.4

system

2020-04-19 20:12

developer   ~0021573

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-10-26 23:09 dx9s New Issue
2007-10-26 23:09 dx9s File Added: punch-bug.ogg
2007-11-04 23:27 cth103 Relationship added related to 0001928
2009-07-04 06:59 seablade Note Added: 0006246
2009-07-04 06:59 seablade Status new => feedback
2009-07-05 04:56 seablade Note Added: 0006322
2009-07-05 04:56 seablade Description Updated
2009-07-05 04:56 seablade Additional Information Updated
2009-07-05 04:58 seablade Note Added: 0006323
2009-07-23 02:06 dx9s Note Added: 0006454
2009-07-23 02:20 dx9s Note Added: 0006456
2009-07-24 03:25 dx9s File Added: PunchInOutBug-2.8.2.ogg
2009-07-24 03:25 dx9s Note Added: 0006466
2009-07-24 03:29 dx9s Note Added: 0006467
2009-07-24 03:48 dx9s File Added: junk.tgz
2009-07-24 03:51 dx9s Note Added: 0006468
2009-07-30 17:45 dx9s Note Added: 0006474
2009-10-14 19:30 hsyl20 File Added: ardour_punchinout_bug_2.8.3.avi
2009-10-14 20:43 hsyl20 Note Added: 0006707
2009-10-14 20:45 hsyl20 Note Edited: 0006707
2009-10-14 20:55 dx9s Note Added: 0006708
2009-10-14 21:13 hsyl20 File Added: hsyl20_ardour283_punch.patch
2009-10-14 21:15 hsyl20 Note Added: 0006709
2009-10-14 21:36 seablade Status feedback => assigned
2009-10-14 21:36 seablade Assigned To => paul
2009-10-14 21:36 seablade Note Added: 0006710
2009-10-14 21:37 seablade Note Added: 0006711
2009-10-30 16:45 paul Note Added: 0006994
2009-10-31 05:48 naptastic Note Added: 0007004
2009-10-31 12:38 paul cost => 0.00
2009-10-31 12:38 paul Note Added: 0007009
2009-10-31 12:38 paul Status assigned => resolved
2009-10-31 12:38 paul Resolution open => fixed
2020-04-19 20:12 system Note Added: 0021573
2020-04-19 20:12 system Status resolved => closed