Old 08-31-2019, 02:33 PM   #1
Thonex
Human being with feelings
 
Join Date: May 2018
Location: Los Angeles
Posts: 752
Default Track Delay: JS time adjustment bugs (2 bugs)

Hi there,

These were discovered when trying to brainstorm for a proper Negative MIDI Delay.

The original thread here here.

So I've done some testing on the JS Time Adjustment plugin hat has been modified for MIDI by adding this line of code:

Code:
pdc_midi = 1;
In the video, you'll see it's named JS MIDI Time Adjustment -- that's just so I know which plugin to choose. Also, the timeline is set to Seconds so we can be sure what we are doing.

There are 2 issues:

1) The negative delay does not line up with the Play Start positions. In other words, if you have a delay of -300, then the play cursor must be MORE than -300ms... sometimes as much as 10ms more (so -310ms) before the MIDI note. So there is some kind of miscalculation going on here.

2) The plugin will only remember the greatest negative delay you input. So if you start with -100, then try -500, then go back to -100... the delay will still be at -500.


Here is a video to demonstrate. I use Reasamplomatic just so we can agree it has nothing to do with Kontakt and we can be consistent in our tests.

VIDEO OF BUG
__________________
Cheers,
Andrew K
v5.982/64 Mac 10.12.+, i7 Quad 2.9GHz, 24GB

Last edited by Thonex; 08-31-2019 at 03:37 PM.
Thonex is offline   Reply With Quote
Old 08-31-2019, 10:21 PM   #2
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 7,898
Default

Please also try ReaPack -> Dual Time Adjustment +/- Delay (just updated regarding pdc_midi) and check if same is better or worse on that behalf.

-Michael
mschnell is offline   Reply With Quote
Old 09-01-2019, 01:01 AM   #3
Thonex
Human being with feelings
 
Join Date: May 2018
Location: Los Angeles
Posts: 752
Default

Quote:
Originally Posted by mschnell View Post
Please also try ReaPack -> Dual Time Adjustment +/- Delay (just updated regarding pdc_midi) and check if same is better or worse on that behalf.

-Michael
Ok. Going to bed now. Will check in the morning.
__________________
Cheers,
Andrew K
v5.982/64 Mac 10.12.+, i7 Quad 2.9GHz, 24GB
Thonex is offline   Reply With Quote
Old 09-01-2019, 04:32 AM   #4
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 7,898
Default

I'm rather sure that both JSFXes mentioned can't be improved regarding the said issues.

Re (1): What we see supposedly is what a (negative) delay is supposed to do. It should work perfectly exact. (I did not yet test if Reaper indeed does this). Of course if a Midi note on is located at "nearly exact" that point in time, it could be directly before or behind the starting point and hence be played or not.

To hear correct results when starting playback somewhere within a stored Midi stream I would think that this indeed needs a kind of "Midi event chasing" - even for note-on/off events - (which has been discussed in other locations here regarding "articulations"). "Chasing" means that Midi events are issued with a fake timing directly when playback/rendering is started even though their correct timing is before the starting point of the playback. This of course gets even more necessary when "Midi PDC" is applied to a track.

I have no idea if/how this could be solved.

Re (2): this is a known fact/issue. The PDC value is not set "on the fly" but only when recording is stopped and re-started.

-Michael
mschnell is offline   Reply With Quote
Old 09-01-2019, 02:03 PM   #5
Thonex
Human being with feelings
 
Join Date: May 2018
Location: Los Angeles
Posts: 752
Default

Quote:
Originally Posted by mschnell View Post
Please also try ReaPack -> Dual Time Adjustment +/- Delay (just updated regarding pdc_midi) and check if same is better or worse on that behalf.

-Michael
OK... thanks Michael.


I did some testing...

1) This issue is still broken in EXACTLY the same way:

The negative delay does not line up with where its supposed to be. In other words, if you have a delay of -300, then the playback is as much as 10ms more (so -310ms) before the MIDI note. So there is some kind of miscalculation going on here.

The maths seems wrong. Here is a screen shot of where the click should be (marker 1) ... and where it is (marker 2) -- in this case about a 10ms discrepancy :



Please verify this yourself. 100% reproducible. Not always 10ms... but always inaccurate. To me this indicates some bad maths or maybe something else like ignoring sample rate in the calcs. I run at 48K.

2) Interestingly, the refresh bug does NOT exist on this delay plugin (where when you change to greater negative delays, then try to go back, it stays at the greatest negative delay). Either that, or you fixed it without knowing it. Bravo!

So, if you could fix issue #1 (the inaccurate playback) that would be great.

Lastly, I'm assuming this is for testing only, because otherwise (IMO) this is totally unacceptable as a MIDI plugin since it is utterly confusing to the end user. VU meters on a MIDI plugin? Left and Right channel delays? Dual input delay fields in MIDI Mode? I was able to figure it out, but this cannot be a solution as a release candidate for the general user. I run a music software company and this would be way too confusing. Look at the JS MIDI Delay for an idea of what fields to include. But I'm hoping this was just for testing. Right?

Thanks for your help.

I will respond to the feature request thread on other topics.
__________________
Cheers,
Andrew K
v5.982/64 Mac 10.12.+, i7 Quad 2.9GHz, 24GB

Last edited by Thonex; 09-01-2019 at 03:06 PM.
Thonex is offline   Reply With Quote
Old 09-01-2019, 02:15 PM   #6
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 7,898
Default

A track's FX chain holds as well Midi as audio.

The +/- delay was born as an audio utility. But as there is no dedicated negative Midi delay in reaper but you just can enable the Midi functionality additionally when doing a negative audio delay, the +/- delay JSFX exactly reproduces what Reaper offers.

I supposedly will add the positive Midi delay feature (for all channels and buses) to that plugin (by stealing the code from the stock Midi delay JSFX) some day soon.
To do a pure midi negative delay plugin, you would need to add a positive audio delay to that track as a compensation. But this does not make much sense IMHO.

-Michael
mschnell is offline   Reply With Quote
Old 09-01-2019, 02:35 PM   #7
Thonex
Human being with feelings
 
Join Date: May 2018
Location: Los Angeles
Posts: 752
Default

Thanks Michael,

What about the inaccurate playback? You didn't mention anything on that. Is that possible to fix?

Quote:
Originally Posted by mschnell View Post
But as there is no dedicated negative Midi delay in reaper
And now you understand why I have the "Native" Negative MIDI delay Feature Request in the FR forum.

Quote:
Originally Posted by mschnell View Post
but you just can enable the Midi functionality additionally when doing a negative audio delay, the +/- delay JSFX exactly reproduces what Reaper offers.
Does the jsfx engine allow access to these types of data?

Code:
 retval, selected, muted, startppqpos, endppqpos, chan, pitch, vel = reaper.MIDI_GetNote( take, noteidx )
If so, maybe there is a way. No?
__________________
Cheers,
Andrew K
v5.982/64 Mac 10.12.+, i7 Quad 2.9GHz, 24GB
Thonex is offline   Reply With Quote
Old 09-01-2019, 09:37 PM   #8
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 7,898
Default

Quote:
Originally Posted by Thonex View Post
And now you understand why I have the "Native" Negative MIDI delay Feature Request in the FR forum.
Not really.

I don't see why it should be necessary to have a (negative) delay on Midi but not on audio. The (PDC introduced negative) delay is on the track .

JSFX does not allow to access stuff that is controlled by the Reaper GUI.

-Michael
mschnell is offline   Reply With Quote
Old 09-02-2019, 10:42 AM   #9
Thonex
Human being with feelings
 
Join Date: May 2018
Location: Los Angeles
Posts: 752
Default

Quote:
Originally Posted by mschnell View Post
Not really.

I don't see why it should be necessary to have a (negative) delay on Midi but not on audio.
I never intimated there should not be a negative delay for audio. Where did I ever say that? What I'm saying in this thread (and providing a bug report on) is the MIDI negative delay is not accurate and needs to be addressed. Also there is issue #2 that is fixed on your updated (different plugin) but the JS Time Adjustment is still broken with regards to #2.

However, what I'm saying in the other FR thread is the MIDI Reaper negative MIDI delay doesn't play back notes on the downbeat like other DAWS do.
__________________
Cheers,
Andrew K
v5.982/64 Mac 10.12.+, i7 Quad 2.9GHz, 24GB
Thonex is offline   Reply With Quote
Old 09-02-2019, 12:39 PM   #10
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,257
Default

I can at least confirm #1.

Testing JS: Time Adjustment with pdc_midi = 1; and a kick in EZDrummer, I have to set the cursor around 2.3ms early or the note will be dropped.
Lokasenna is offline   Reply With Quote
Old 09-03-2019, 11:06 PM   #11
Thonex
Human being with feelings
 
Join Date: May 2018
Location: Los Angeles
Posts: 752
Default

Quote:
Originally Posted by Lokasenna View Post
I can at least confirm #1.

Testing JS: Time Adjustment with pdc_midi = 1; and a kick in EZDrummer, I have to set the cursor around 2.3ms early or the note will be dropped.
Yep...

@ mschnell, any progress in this area?

Thanks.
__________________
Cheers,
Andrew K
v5.982/64 Mac 10.12.+, i7 Quad 2.9GHz, 24GB
Thonex is offline   Reply With Quote
Old 09-15-2019, 04:09 PM   #12
Thonex
Human being with feelings
 
Join Date: May 2018
Location: Los Angeles
Posts: 752
Default

Quote:
Originally Posted by mschnell View Post
Rater unrelated but maybe somebody might want to test:

For completeness, I updated the +/- delay to allow for positive Midi delay.

-Michael
Hi Michael,

I tested it and it seems to work for POSITIVE delays (I'm stressing "POSITIVE" delays because I think you are really confusing this thread by introducing the testing of a different delay script and I want to the Devs to know that this is not about the OP which deals with NEGATIVE MIDI DELAYS).

That said, I think it will be confusing for the enduser. The idea of combining a MIDI delay on a stereo audio delay is really strange to me. Then the whole idea of taking the average of the L/R delays for the MIDI is also strange. I'm not sure why you are confusing the situation when there is a MIDI Delay that already does Positive MIDI delays with different time formats (time, QN, Samples):



For followups on your delay , please start your own thread and message me the link. I'm happy to help... but not distract from this thread.

Thanks.
__________________
Cheers,
Andrew K
v5.982/64 Mac 10.12.+, i7 Quad 2.9GHz, 24GB
Thonex is offline   Reply With Quote
Old 09-15-2019, 10:19 PM   #13
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 7,898
Default

Thanks for testing the positive delay, which is the by for more complicated case in the program code, while the negative delay (as well Audio as Midi) just triggers Reaper features..

The +/- delay JSFX delay plugin imposes just a delay working identically for either stream type: shifting the time (positive or negative) in a permanently ongoing stream of data. Positive by actually delaying the streams passing through, negative by telling Reaper to delay the other tracks accordingly.

This is (hopefully) done as well for audio as for Midi in the same way, allowing the streams passing through to stay aligned with each other. (I did some tests that show that it works as expected, but of course there might be glitches).

Of course there already are dedicated (positive) audio delay plugins and also there are dedicated (positive) Midi delay plugins, and there is Reaper's automatic PDC handling for negative (Audio) delay. The +/- JSFX is just for combining the different track delay types doable in Reaper in a common place, in an "easy to use" way.

This is just a general technical thingy and there is no dedicated usage case for this where it might or might not be helpful. (Hence this might not be the sensible place to discuss this and I don't understand why you posted an answer to a message in the other thread - even there explicitly denoted "unrelated" - here.)

-Michael

Last edited by mschnell; 09-15-2019 at 10:41 PM.
mschnell 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 11:49 AM.


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