Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Bug Reports

Reply
 
Thread Tools Display Modes
Old 10-01-2020, 04:16 AM   #1
cjunekim
Human being with feelings
 
Join Date: Dec 2016
Posts: 255
Default [6.36] regression bug when loop recording a midi item

2021.9.17 : Title used to be "PDC makes wrong punch-in/out timing when time-selection auto punch". Look at near the bottom to see the new regression bug https://forum.cockos.com/showpost.ph...8&postcount=13

TL;DR
  • In the time-selection auto punch mode, Punch-in/out's timing works wrong -- it gets late -- for a track with a non-zero pdc
  • In the auto-punch selected items mode, punch-in gets its timing right, but the punch-out gets late still. Hence, the next coming part is truncated and becomes short.
  • It aggravates with midi items but audio items have issues too
  • You can turn off PDC entirely, but it won't sync with other tracks then
  • This issue has been there for years, and it's there with the most recent reaper versions.


Hi

Have a look at this video recording:



Steps to reproduce the bug:
  1. Create an empty track with an empty MIDI item two-bar long, which starts from 3.1.00.
  2. Draw some midi notes on both the bars
  3. Add a VSTi with a sample buffer larger than 0 (or you may just add reafir)
  4. Time select the second bar only
  5. Set the recording mode to time selection auto punch
  6. Move the cursor to the beginning of the first bar
  7. Hit record
  8. You can hear the first note of the second bar is played briefly. Otherwise, you may add ReaControlMIDI to see the MIDI log at the track fx.

I've set a time selection to re-record, exactly from the start of a bar to the end of the bar. The recording mode is set to "time selection auto punch". All the notes are quantized to the grid.

Now when I hit the record button, the first bar(C D E, that is MIDI notes 48, 50, and 52) plays, and when it gets to the second bar, the initial recording's first note(MIDI note 48) is played for a short time(for 4ms between NOTE ON and NOTE OFF, but in MIDI world this can be significant because NOTE ON is actually making a sound and that can make you confused when recording) and then it gets recording. You can confirm this from the MIDI acitivty log.

It doesn't happen with zero latency VSTis like reasynth. Addictive Keys, for example, has 64/128 spls latency(128 here is my audio device's buffer size). Arturia's Piano V2 has also 64/128. This behavior happens with such an instrument. But, even with Addictive Keys, this strange behavior doesn't happen when the starting bar(in the case above it's at 3.1.00) is at 2.1.00. If the starting bar is at 3.1.00 just like the above, this short NOTE ON happens.

I believe this has something to do with how reaper handles the vsti latency when recording.

I want to make it precise so that the previous recording in the time selection isn't played at all. Of course, you can do it by shifting the first note in the second bar to the right slightly, but you know, this is very inconvenient everytime and it's a dirty hack! Another work around is splitting the item and using auto-punch selected items because the issue doesn't happen in this case.

I found a simple work around. It was just so annoying. In that VSTi's fx window, click "2 out" for example. There you click I/O button. Go to PDC (64 spls) > Disable and check it. The sample size may vary depending on your VSTi. It seems to disable PDC for that VSTi and the FX window's left-bottom shows now 0/0 spls. I also don't know what "adjust automation" does, and I also wonder why disable and adjust automation are not exclusively selected but both can be checked.

I am quite sure that there might be some side effects from this(since it's not compensated) but currently I no more hear any note on from the time selection area. Maybe, I could offset the track playback with a negative sample size.

I believe this is some sort of bug.

Last edited by cjunekim; 09-16-2021 at 08:28 PM.
cjunekim is offline   Reply With Quote
Old 02-24-2021, 07:39 PM   #2
cjunekim
Human being with feelings
 
Join Date: Dec 2016
Posts: 255
Default

Confirmed this with Reaper v6.23 as well.

To exaggerate this bug, do the following:
  1. Add an empty track with any vsti (it doesn't need to have zero-latency. Anything will reveal the bug)
  2. Insert an empty MIDI item, which is longer than one bar.
  3. Add some notes without any breaks in-between in that MIDI item.
  4. Add reafir next to the vsti and set its FFT size to 16384 to exaggerate the effect.
  5. Time select just one bar with the starting point set somewhere after the beginning of the MIDI item.
  6. Change record mode into time selection auto punch.
  7. Put the cursor a little bit before the MIDI item.
  8. Record

With this large PDC size, you will definitely hear some notes inside the time selection played wrongly.

Of course, you can work around this bug with your PDC off for this track, but then you will have another set of problems.

Quote:
Originally Posted by cjunekim View Post
Hi

Have a look at this video recording:



Steps to reproduce the bug:
  1. Create an empty track with an empty MIDI item two-bar long, which starts from 3.1.00.
  2. Draw some midi notes on both the bars
  3. Add a VSTi with a sample buffer larger than 0
  4. Time select the second bar only
  5. Set the recording mode to time selection auto punch
  6. Move the cursor to the beginning of the first bar
  7. Hit record
  8. You can hear the first note of the second bar is played briefly. Otherwise, you may add ReaControlMIDI to see the MIDI log at the track fx.

I've set a time selection to re-record, exactly from the start of a bar to the end of the bar. The recording mode is set to "time selection auto punch". All the notes are quantized to the grid.

Now when I hit the record button, the first bar(C D E, that is MIDI notes 48, 50, and 52) plays, and when it gets to the second bar, the initial recording's first note(MIDI note 48) is played for a short time(for 4ms between NOTE ON and NOTE OFF, but in MIDI world this can be significant because NOTE ON is actually making a sound and that can make you confused when recording) and then it gets recording. You can confirm this from the MIDI acitivty log.

It doesn't happen with zero latency VSTis like reasynth. Addictive Keys, for example, has 64/128 spls latency(128 here is my audio device's buffer size). Arturia's Piano V2 has also 64/128. This behavior happens with such an instrument. But, even with Addictive Keys, this strange behavior doesn't happen when the starting bar(in the case above it's at 3.1.00) is at 2.1.00. If the starting bar is at 3.1.00 just like the above, this short NOTE ON happens.

I believe this has something to do with how reaper handles the vsti latency when recording.

I want to make it precise so that the previous recording in the time selection isn't played at all. Of course, you can do it by shifting the first note in the second bar to the right slightly, but you know, this is very inconvenient everytime and it's a dirty hack! Another work around is splitting the item and using auto-punch selected items because the issue doesn't happen in this case.

I found a simple work around. It was just so annoying. In that VSTi's fx window, click "2 out" for example. There you click I/O button. Go to PDC (64 spls) > Disable and check it. The sample size may vary depending on your VSTi. It seems to disable PDC for that VSTi and the FX window's left-bottom shows now 0/0 spls. I also don't know what "adjust automation" does, and I also wonder why disable and adjust automation are not exclusively selected but both can be checked.

I am quite sure that there might be some side effects from this(since it's not compensated) but currently I no more hear any note on from the time selection area. Maybe, I could offset the track playback with a negative sample size.

I believe this is some sort of bug.

Reaper 6.14, tested on Windows 10 PRO

Last edited by cjunekim; 02-24-2021 at 07:57 PM.
cjunekim is offline   Reply With Quote
Old 02-26-2021, 09:04 PM   #3
cjunekim
Human being with feelings
 
Join Date: Dec 2016
Posts: 255
Default

I am adding in more information as I learn about this issue.

I used smart marker functionaly from SWS as a work-around. Instead of using a time selection and auto punch-in, I put a smart marker with !1013, which means Transport: Record, so that reaper starts to record by itself from that marker.

As before, the midi notes are spilt over. The notes just right to the marker is played. It shouldn't be.

I am not sure if it's because of the latency coming from smart marker, or this pdc bug. There is about 3ms latency between the marker position and the start of record.

So there seems to be no way to auto-punch in precisely with MIDI in Reaper currently. That's so disappointing.

Last edited by cjunekim; 02-26-2021 at 09:11 PM.
cjunekim is offline   Reply With Quote
Old 03-01-2021, 01:32 AM   #4
cjunekim
Human being with feelings
 
Join Date: Dec 2016
Posts: 255
Default

I'm adding a new discovery w.r.t this bug.

What really matters is the starting position of the time selection.

If the starting position of the time selection is one of the following,
  • 3.4.0
  • 3.3.0
  • 3.2.0
  • 3.1.0
  • 2.4.0
  • 2.3.0
  • 1.4.0
  • 1.3.0

This bug isn't triggered. Hence, the time selection auto punch is working precisely, without disabling PDC for the plugin. I don't see any obvious pattern here.

All other starting points(upto 10.1.0 that I have tested) trigger this bug. BTW, the time signature that I tested with is 4/4, as you might guess.

This is a really strange bug.

p.s. I randomly tested in the later area, like 27.3.0 and the bug isn't triggered in the point.
cjunekim is offline   Reply With Quote
Old 03-03-2021, 10:30 PM   #5
cjunekim
Human being with feelings
 
Join Date: Dec 2016
Posts: 255
Default

I've found one way to circumvent this bug. The previous one with PDC disabled was a dirty hack since it may cause different issues.

You can split items at time selection(shift+s) and then set record mode to auto-punch selected items. Now that midi note spill-over issue never occurs.

However, this is cumbersome and I hope this bug is corrected.
cjunekim is offline   Reply With Quote
Old 03-30-2021, 07:07 AM   #6
cjunekim
Human being with feelings
 
Join Date: Dec 2016
Posts: 255
Default

Confirmed on 6.27. It has been here since 6.14. (updated on 4/12/2021)

Last edited by cjunekim; 04-12-2021 at 06:29 AM.
cjunekim is offline   Reply With Quote
Old 04-12-2021, 06:43 AM   #7
cjunekim
Human being with feelings
 
Join Date: Dec 2016
Posts: 255
Default

It's been more than half a year now and no one has since left any comment yet. Maybe people don't use time-selection auto punch with VSTis with any amount of PDC in reaper.
cjunekim is offline   Reply With Quote
Old 08-04-2021, 10:55 PM   #8
cjunekim
Human being with feelings
 
Join Date: Dec 2016
Posts: 255
Default

Recently, I tested this with the latest reaper v6.33. The bug is still there. Moreover, the post above which talks about some starting point not triggering this bug doesn't seem to be applied to this version. Hence, this bug is triggered from any starting points.

Moreover, I also talked about a roundabout way to circumvent this bug, which was to use Record mode : auto-punch selected items. Yet, it has its own drawbacks as well. If you have some PDC for that track, and if you selected an item in the middle of midi items, the midi item that just following the selected item gets played a bit late, as much as the PDC. So the first note of that item is shortened. Now the punch-out timing is wrong.

The only option that works was "ignore PDC" but then that track doesn't sync with other tracks. So it brings up more problems.

Now, there is no viable option to achieve midi punch-in in a track with a vsti with some latency.


Quote:
Originally Posted by cjunekim View Post
It's been more than half a year now and no one has since left any comment yet. Maybe people don't use time-selection auto punch with VSTis with any amount of PDC in reaper.

Last edited by cjunekim; 08-05-2021 at 12:15 AM.
cjunekim is offline   Reply With Quote
Old 08-05-2021, 01:31 AM   #9
cjunekim
Human being with feelings
 
Join Date: Dec 2016
Posts: 255
Default

I was curious whether the bug appear with audio items. I experimented and it did!

Steps to reproduce the bug on audio tracks:
  1. import an audio item into an empty track
  2. add reafir to that track and set the FFT size to 16384
  3. time-select in the middle of the item
  4. set record mode to time selection auto-punch
  5. record arm the track
  6. move the cursor to a bar earlier than the time-selection
  7. start recording

You can hear some beginning part of the time-selection.

So the track is with midi or audio items, this PDC bug occurs. Still, midi is a more serious problem since it aggravates. Even A slightest bit(like some milliseconds) of midi note-on message from a previous part leaked on will trigger a vsti sound's attack.

Last edited by cjunekim; 08-05-2021 at 03:23 AM.
cjunekim is offline   Reply With Quote
Old 09-04-2021, 08:15 AM   #10
cjunekim
Human being with feelings
 
Join Date: Dec 2016
Posts: 255
Default

Confirmed this with v6.36.
cjunekim is offline   Reply With Quote
Old 09-06-2021, 05:46 AM   #11
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 15,716
Default

Fixing, thanks!
Justin is offline   Reply With Quote
Old 09-07-2021, 01:56 AM   #12
cjunekim
Human being with feelings
 
Join Date: Dec 2016
Posts: 255
Default

Quote:
Originally Posted by Justin View Post
Fixing, thanks!
Finally! Thank you, Justin.
cjunekim is offline   Reply With Quote
Old 09-08-2021, 04:57 AM   #13
cjunekim
Human being with feelings
 
Join Date: Dec 2016
Posts: 255
Default

Quote:
Originally Posted by Justin View Post
Fixing, thanks!
I've just tested with reaper636+dev0907a. It seems to be fixed, but there is a new regression bug.

Steps to reproduce this new bug:
1. Put Reasynth, and Reafir in an empty track and set reafir's FFT size to max to amplify the effect of PDC.
2. Put a MIDI item with some notes
3. Set the time selection in the middle of the midi item
4. Set the record mode to time selection auto punch
5. Turn on the Repeat button (to loop record)
6. Record and just watch

Now you can see this anomaly. In the first recording scan, reaper behaves as expected, which means it doesn't play the notes there already. However, in the second scan(for recording the second take), reaper plays the notes in the original item. Weird thing is it doesn't send out note-off, so you will hear the note indefinitely.

Here is the video recording:


The notes in the original midi item are A2, B2, C2, D2, E2, and F2. Their note numbers are 45, 47, 48, 50, 52, and 53, respectively.

The playhead starts from B2 and the loop includes C2 and D2. While recording, I didn't input any midi.

The expected log on ReaControlMIDI is,

1: 90 2F 60 [Note On] chan 1 note 47 vel 96
2: 80 2F 00 [Note Off] chan 1 note 47

And nothing following. Compare this to what you see on my recording.

Last edited by cjunekim; 09-08-2021 at 05:30 AM.
cjunekim is offline   Reply With Quote
Old 09-08-2021, 06:39 AM   #14
wallace
Human being with feelings
 
Join Date: Jan 2009
Location: UK
Posts: 594
Default

@cjunekim. Nice one!
wallace is offline   Reply With Quote
Old 09-17-2021, 12:50 AM   #15
cjunekim
Human being with feelings
 
Join Date: Dec 2016
Posts: 255
Default

Quote:
Originally Posted by Justin View Post
Fixing, thanks!
I wish the new regression bug is fixed as well before the official release, since I can't actually benefit from the current fix.
cjunekim is offline   Reply With Quote
Old 09-17-2021, 07:43 PM   #16
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 15,716
Default

Quote:
Originally Posted by cjunekim View Post
I've just tested with reaper636+dev0907a. It seems to be fixed, but there is a new regression bug.

Steps to reproduce this new bug:
1. Put Reasynth, and Reafir in an empty track and set reafir's FFT size to max to amplify the effect of PDC.
2. Put a MIDI item with some notes
3. Set the time selection in the middle of the midi item
4. Set the record mode to time selection auto punch
5. Turn on the Repeat button (to loop record)
6. Record and just watch

Now you can see this anomaly. In the first recording scan, reaper behaves as expected, which means it doesn't play the notes there already. However, in the second scan(for recording the second take), reaper plays the notes in the original item. Weird thing is it doesn't send out note-off, so you will hear the note indefinitely.

Here is the video recording:


The notes in the original midi item are A2, B2, C2, D2, E2, and F2. Their note numbers are 45, 47, 48, 50, 52, and 53, respectively.

The playhead starts from B2 and the loop includes C2 and D2. While recording, I didn't input any midi.

The expected log on ReaControlMIDI is,

1: 90 2F 60 [Note On] chan 1 note 47 vel 96
2: 80 2F 00 [Note Off] chan 1 note 47

And nothing following. Compare this to what you see on my recording.
Hmm I couldn't duplicate this -- what I found was the first pass of recording it did play the start of the notes (looking into if that's fixable), but subsequent passes it doesn't play any notes. Can you post the exact project used, reaper.ini, and let me know the samplerate and blocksize used by your audio device?

Last edited by Justin; 09-17-2021 at 07:51 PM.
Justin is offline   Reply With Quote
Old 09-17-2021, 09:54 PM   #17
cjunekim
Human being with feelings
 
Join Date: Dec 2016
Posts: 255
Default

Quote:
Originally Posted by Justin View Post
Hmm I couldn't duplicate this -- what I found was the first pass of recording it did play the start of the notes (looking into if that's fixable), but subsequent passes it doesn't play any notes. Can you post the exact project used, reaper.ini, and let me know the samplerate and blocksize used by your audio device?
Hey Justin. Thank you for your interest in fixing this issue.

I have installed a portable version for reaper636+dev0917_x64-install.exe and then created a new project there and tested it. So it's a clean setting, I think. Please see the project note.

I have attached the project file and reaper.ini.

I am using RME UCX audio interface with 48khz sample rate and 256 buffer size.
Attached Files
File Type: rpp loop record time selection bug.rpp (5.8 KB, 184 views)
File Type: ini reaper.ini (2.4 KB, 179 views)
cjunekim is offline   Reply With Quote
Old 09-18-2021, 04:42 AM   #18
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 15,716
Default

Thanks, duplicated and hopefully fixing
Justin is offline   Reply With Quote
Old 09-19-2021, 05:46 AM   #19
cjunekim
Human being with feelings
 
Join Date: Dec 2016
Posts: 255
Default

Quote:
Originally Posted by Justin View Post
Thanks, duplicated and hopefully fixing
Thank you for the fix! I have tested with the v6.36+dev0918 and it seems to have resolved all the mentioned issues above. I will experiment with this version for a while to really be sure.
cjunekim is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 03:06 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.