Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Feature Requests

Reply
 
Thread Tools Display Modes
Old 08-29-2019, 10:01 AM   #1
Thonex
Human being with feelings
 
Join Date: May 2018
Location: Los Angeles
Posts: 783
Default [They Added It!!!] MIDI chasing to allow negative delays per track

Hi There,

EDIT: They added it : https://forum.cockos.com/showthread.php?t=225194

Quote:
Originally Posted by Neutronic View Post
v5.983+dev0918 - September 18 2019
+ ARA: do not inform plug-ins that samples are available if the source audio has been deleted or moved
+ ARA: improve loading projects with missing media
+ Tracks: support positive or negative playback time offset without affecting PDC

------------------------- Note -------------------------

I changed the title to better communicate what this feature request is about. There needs to be MIDI chasing on negative track delays. The problem is Reaper is not playing negatively delayed MIDI notes on the downbeats of playback or record making it very difficult to work.

Also, the JS MIDI delay work-around solutions do not calculate the MIDI offset correctly. See Bug Report.

----------------------End of Note -------------------------


The ability to give a MIDI track a negative delay (per track) would allow MIDI composers/producers to use the Look Ahead features on many Sample Libraries as well as compensate for slow attacked instruments that may sound laggy in a mix. Just to be clear... this is NOT the same thing as PDC (Plugin Delay Compensation)!

This is MASSIVELY missing from Reaper. And this really should be a native solution... and not an insert or plugin. Not to mention this has been around on other DAWs for decades.

[------------- EDIT -- adding a video to help explain -------------]

CLICK HERE FOR VIDEO EXPLANATION

Since this is a difficult topic to cover, I’m including a link to a short 4 minute video below. I show how Negative Delay works in a real-world situation… and why Reapers approach is broken… and why this Feature Request is relevant.

Basically it boils down to this: If you don’t want the MIDI at your starting cursor position be missing upon playback, then this needs to be fixed. Personally, missing the MIDI playback under the starting playback cursor is a deal breaker for me… and pretty much every MIDI person I know that uses negative MIDI delay. BTW, this also applies to record: MIDI is missing at the downbeat of the play cursor if using a count-in.

If you want to skip DAW comparisons and go straight to “why Reaper’s negative MIDI delay is broken” then start at 3:17 in the video.



[------------- End of Edit -------------]



In Cubase, Nuendo, Logic etc., each track has a delay setting that can be positive or negative (for modern library latency compensation -- Legato, etc.). It is important that the MIDI be negatively delayed as opposed to the audio output of the VSTi, this is because the latter makes it impossible to play in real-time. With a negative MIDI delay however, if set to negative, there would be no change on recording parts, only on playback of the MIDI (this is intentional) -- for how can you negatively delay something played in real-time?!

This must be done natively so that when you press play, all the non-negative delay tracks are delayed... this way you don't miss the downbeat of MIDI notes when you press play.

I have spent a lot of time on this and trying to find work around, but it becomes very tricky with recording at the downbeat and playback at the downbeat without setting the playback head back in time -- a silly nuisance.

Don't be fooled by previous threads that claim there is a workable solution... they aren't reliable:

Quote:
Originally Posted by heda View Post
maybe I spoke too soon. it works but then it is not very stable.. if you change the parameters of the delay.. it won't update the delay. I really can't get it working today... I don't know why.

negative MIDI delay would be an important feature in my opinion.

Quote:
Originally Posted by Soli Deo Gloria View Post
Well, the first time you set a negative value it probably works; when you begin to fiddle with the values, things go out of control. Evidently, Heda has had a similar experience with the plug, according to the above post. I suppose that with these kind of operations PDC must be somewhat difficult to manage...
I might add, even if the hacked MIDI Delay plugin worked, it is still a problem because you have to write a series of scripts for Playback and Record so that the cursor goes back a few hundred ms (whatever the negative delay is) or otherwise you don't hear the MIDI at the downbeat of the cursor (since it was negatively delayed)... that THAT's why it needs to be native.


Cheers,

Andrew K
__________________
Cheers,
Andrew K
v5.983+dev0922 - September 22 2019 • Mac 10.12.+ • i7 Quad 2.9GHz • 24GB

Last edited by Thonex; 09-18-2019 at 12:14 PM. Reason: Change title and clarify
Thonex is online now   Reply With Quote
Old 08-29-2019, 10:08 AM   #2
deeb
Human being with feelings
 
deeb's Avatar
 
Join Date: Feb 2017
Posts: 2,430
Default

+ 1 it's a slight thing but Might had groove and space for a sound.
deeb is offline   Reply With Quote
Old 08-29-2019, 10:29 AM   #3
Swi
Human being with feelings
 
Join Date: Apr 2018
Posts: 267
Default

+1 This is an essential composer tool. The JS: MIDI time adjustment plug is very inconsistent. It would be great to have this as part of the track.
Swi is offline   Reply With Quote
Old 08-29-2019, 02:02 PM   #4
enroe
Human being with feelings
 
Join Date: Nov 2017
Posts: 413
Default

Yes + 1! This is important, discussed already here (including a poll).
__________________
free mp3s + info: andy-enroe.de songs and weird stuff: enroe.de

Last edited by enroe; 08-29-2019 at 02:39 PM.
enroe is offline   Reply With Quote
Old 08-29-2019, 02:08 PM   #5
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 8,064
Default

Quote:
Originally Posted by Thonex View Post
. this is NOT the same thing as PDC (Plugin Delay Compensation)!
Of course manually setting a (pos/neg) delay is not the same as PDC which is controlled by any plugin providing that value to the DAW.

But the neg delay the DAW handles is just a number per thread. instructing it to align the streams accordingly when mixing.
Hence it should make no difference if the signal is Midi or audio. In fact the timing of Midi messages is tied to audio blocks with a time offset, just as any audio sample is tied to an audio block with its timing offset.
Hence using e.g. "+/-" with a negative value somewhere in the track and b this forcing a PDC setting should do exactly what is requested.

-Michael
mschnell is offline   Reply With Quote
Old 08-29-2019, 03:41 PM   #6
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Posts: 2,962
Default

Absolutely needed feature. Many guitar VST need this behavior to function correctly. Currently there is no way to achieve this.
__________________
My Reascripts forum thread | My Reascripts on GitHub | Stephan Römer - film composer
If you wish to donate for my scripts: please consider an organization like: animal shelter, doctors without borders, UNICEF, etc...
_Stevie_ is online now   Reply With Quote
Old 08-29-2019, 03:49 PM   #7
Thonex
Human being with feelings
 
Join Date: May 2018
Location: Los Angeles
Posts: 783
Default

Quote:
Originally Posted by mschnell View Post
Of course manually setting a (pos/neg) delay is not the same as PDC which is controlled by any plugin providing that value to the DAW.

But the neg delay the DAW handles is just a number per thread. instructing it to align the streams accordingly when mixing.
Hence it should make no difference if the signal is Midi or audio. In fact the timing of Midi messages is tied to audio blocks with a time offset, just as any audio sample is tied to an audio block with its timing offset.
Hence using e.g. "+/-" with a negative value somewhere in the track and b this forcing a PDC setting should do exactly what is requested.

-Michael
NO. AFAIK, the way Reaper handles the negative MIDI delay (using EvilDrgons little hack) is by virtually moving the midi backwards. The problem with this is whenever you press play and start from the downbeat of a measure, you will miss the MIDI that was supposed to be there. Just try it and you see. Try something significant like 200ms. The MIDI won't get triggered.

The way it should behave (and the way it behaves in Cubase and Logic) it is like this:

A MIDI track with negative delay is in fact delaying ALL other tracks to the inverse amount of the negative delay. So, you are no longer missing downbeats during playbacks. You are not longer having to do crazy scripts so you hear stuff from the downbeat and during record.

Mathematically, you are only delaying all other tracks by the maximum inverse negative delay (so a positive delay). It's a little tricky to explain, but I can guarantee you it's not the same as PDC. It has to virtually delay all non-negative delay tracks.

I hope I was clearer than mud

Cheers,

Andrew K
__________________
Cheers,
Andrew K
v5.983+dev0922 - September 22 2019 • Mac 10.12.+ • i7 Quad 2.9GHz • 24GB

Last edited by Thonex; 08-29-2019 at 04:46 PM.
Thonex is online now   Reply With Quote
Old 08-29-2019, 10:14 PM   #8
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 8,064
Default

Hmm.
In Reaper there is no concept of a "Midi Track".

The "negative delay" for certain tracks of course is done by virtually delaying the other tracks (in fact in terms of full blocks blocks and delaying this track to compensate for the remaining samples). The delaying is done by really delaying for armed tracks and reading ahead the media for un-armed tracks. This is confirmed for audio media. I did not do a test for Midi media, but it would not make sense to do this differently.
Hence there should be no difference for the working of the track mixing alignment be the origin audio or Midi.

As the negative delay only (needs to) get acknowlaged when mixing tracks together (which is on audio) there should be no difference if negative delaying Midi or audio.

Did you try "+/- delay" or similar PDC forcing plugin ?

-Michael

Last edited by mschnell; 08-29-2019 at 10:20 PM.
mschnell is offline   Reply With Quote
Old 08-29-2019, 10:30 PM   #9
EvilDragon
Human being with feelings
 
EvilDragon's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 23,507
Default

Quote:
Originally Posted by mschnell View Post
Hmm.Did you try "+/- delay" or similar PDC forcing plugin ?
He did, that's why he wrote up this FR in the first place. It doesn't work as it does in other DAWs. The FR was pretty well explained, and is legitimate, because this really isn't possible in Reaper currently.
EvilDragon is offline   Reply With Quote
Old 08-30-2019, 03:17 AM   #10
lucor
Human being with feelings
 
Join Date: Jan 2016
Posts: 56
Default

+1!
An absolutely essential feature for midi composition. More and more sample libraries these days are designed with a Midi Delay in mind, and it's extremely cumbersome to have to make them work without it.
lucor is offline   Reply With Quote
Old 08-30-2019, 04:13 AM   #11
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 8,064
Default

Quote:
Originally Posted by EvilDragon View Post
He did, .... because this really isn't possible in Reaper currently.
As you seem to explain that it is possible using (e.g.) +/- delay. (AFAIU, regarding the delay, Reaper does (and should) not make a difference between a track with audio vs Midi input.)

Hence (If I understand correctly) this might be considered a workaround / inconvenient, and not especially tied to the use of Midi. Seemingly simply different than it might be done in "other DAWs" (i.e. needing a plugin in Reaper). So I don't see that it is of high priority.

The OP speaks of a negative delay related to playing live which of course is technically impossible at the same time and thus I did not understand that part.

Maybe he wants to have Reaper use a negative delay when mixing, but not use it when inputting midi notes by a keyboard (and listening to the result).

This of course is worth considering and a decent description of the desired behavior / workflow could help to find a way Reaper can do this.

-Michael

Last edited by mschnell; 08-30-2019 at 04:25 AM.
mschnell is offline   Reply With Quote
Old 08-30-2019, 12:37 PM   #12
Thonex
Human being with feelings
 
Join Date: May 2018
Location: Los Angeles
Posts: 783
Default

Quote:
Originally Posted by mschnell View Post
.
.
.
Hence (If I understand correctly) this might be considered a workaround / inconvenient, and not especially tied to the use of Midi. Seemingly simply different than it might be done in "other DAWs" (i.e. needing a plugin in Reaper). So I don't see that it is of high priority.
.
.
.

-Michael
Hi Michael,

I’m not sure you understand correctly, there is no real workaround that I or anyone else has found.

Since this is somewhat of a mystery to those who don’t use negative MIDI delay, I’m going to including a short video below explaining why it doesn’t work in Reaper. I made this for the Reaper developers, but I think it would help you understand.

If missing the MIDI notes at the downbeat of the playback cursor doesn’t bother you, then perhaps this FR isn’t for you. For the rest of us MIDI guys, it’s somewhat of a deal-breaker.

Cheers,

Andrew K
__________________
Cheers,
Andrew K
v5.983+dev0922 - September 22 2019 • Mac 10.12.+ • i7 Quad 2.9GHz • 24GB
Thonex is online now   Reply With Quote
Old 08-30-2019, 01:07 PM   #13
Thonex
Human being with feelings
 
Join Date: May 2018
Location: Los Angeles
Posts: 783
Default

Hey everyone (Reaper devs ),

Since this is a difficult topic to cover, I’m including a link to a short 4 minute video below. I show how Negative Delay works in a real-world situation… and why Reapers approach is broken… and why this Feature Request is relevant.

Basically it boils down to this: If you don’t want the MIDI at your starting cursor position be missing, then this needs to be fixed. Personally, missing the MIDI playback under the starting playback cursor is a deal breaker for me… and pretty much every MIDI person I know that uses negative MIDI delay. BTW, this also applies to record: MIDI is missing at the downbeat of the play cursor if using a count-in.

If you want to skip DAW comparisons and go straight to “why Reaper’s negative MIDI delay is broken” then start at 3:17 in the video.


CLICK HERE FOR VIDEO EXPLANATION

I hope this helps explain.


[note: I’m copying this to the OP]
__________________
Cheers,
Andrew K
v5.983+dev0922 - September 22 2019 • Mac 10.12.+ • i7 Quad 2.9GHz • 24GB

Last edited by Thonex; 08-30-2019 at 01:18 PM.
Thonex is online now   Reply With Quote
Old 08-30-2019, 02:38 PM   #14
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 8,064
Default

Obviously the intended use it compensating the delay the Midi player plugin introduces when playing back stored media data.

If this would be Audio it is known that Reaper compensates the track delay (denoted by the summed up PDC value) by pre-reading the the media of the affected track the appropriate (rounded up) count of blocks (and then delaying this track to compensate for the rounding)

Did you try out with a pure audio pluging (e.g. some delay plugin) to find out if this happens in the same way as with the Midi plugin ?

If it's not the same, this would be a bug of Reaper's, as Midi and audio is supposed to be handles exactly identical.

If it's the same, maybe the Feature Request would need to be enhanced regarding the audio problem.

-Michael

Last edited by mschnell; 08-30-2019 at 10:19 PM.
mschnell is offline   Reply With Quote
Old 08-30-2019, 03:17 PM   #15
Klangfarben
Human being with feelings
 
Join Date: Jul 2016
Location: Los Angeles, CA
Posts: 758
Default

This has been brought up in several different threads. Here are the bullet points in case anyone has missed them.

- Currently reaper has no native way to do a negative offset for midi items on a track (and yes, everyone understands a track is not specific to audio or midi)

- Some very clever people found that if you use midi PDC, you can hack it so there is a negative midi offset, however that hack will not trigger midi info that is located at the start of the playhead (nor record midi at the start of the playhead)

- Using the time adjustment audio JSFX is also not a suitable option as again, midi will not be triggered correctly - and makes live playback of midi extremely difficult (similar to playing live with an extremely high sample buffer)

- Both the midi PDC and Time Adjustment JSFX "hacks" require a plugin on every single instrument track that requires a negative offset which not only makes things convoluted, it doesn't allow for true a true negative offset without the above issues.

- The feature request itself has nothing at all to do with PDC and should not be confused as such. The plugin itself is not causing the late midi - it is specific patches or instruments in the plugin. A kontakt plugin with one instrument will need a completely different negative offset than a kontakt plugin on another track.

Therefore, the feature request is a much needed one. If you don't use lots of samples, the issue might be confusing. However, for those of us that do, it stares you in the face every day. This is a very large problem with NO suitable solution at the moment and also an issue which all other major DAWS have solved long ago.

Massive +1 from me for this.
Klangfarben is online now   Reply With Quote
Old 08-30-2019, 04:07 PM   #16
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Posts: 2,962
Default

Quote:
Originally Posted by Klangfarben View Post
Massive +1 from me for this.
To reduce the useless noise in here I will just say: another huge +1.
The video really perfectly shows what it’s all about.
__________________
My Reascripts forum thread | My Reascripts on GitHub | Stephan Römer - film composer
If you wish to donate for my scripts: please consider an organization like: animal shelter, doctors without borders, UNICEF, etc...
_Stevie_ is online now   Reply With Quote
Old 08-30-2019, 04:55 PM   #17
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 5,493
Default

Thonex... in the video... at 3:45 when you go back to Nuendo to demonstrate that the first notes play, yes you can hear the notes, but they are not in sync with the metronome. So I think it plays bypassing the negative delay, until the negative delay time has passed, then it can start to delay the next notes.
heda is offline   Reply With Quote
Old 08-30-2019, 04:57 PM   #18
Thonex
Human being with feelings
 
Join Date: May 2018
Location: Los Angeles
Posts: 783
Default

Quote:
Originally Posted by heda View Post
Thonex... in the video... at 3:45 when you go back to Nuendo to demonstrate that the first notes play, yes you can hear the notes, but they are not in sync with the metronome. So I think it plays bypassing the negative delay, until the negative delay time has passed, then it can start to delay the next notes.
I'll open the project and put in a crazy negative delay to check. That may be an easier solution for the Reaper team.... I'm guessing... no?
__________________
Cheers,
Andrew K
v5.983+dev0922 - September 22 2019 • Mac 10.12.+ • i7 Quad 2.9GHz • 24GB
Thonex is online now   Reply With Quote
Old 08-30-2019, 05:08 PM   #19
Thonex
Human being with feelings
 
Join Date: May 2018
Location: Los Angeles
Posts: 783
Default

Quote:
Originally Posted by heda View Post
Thonex... in the video... at 3:45 when you go back to Nuendo to demonstrate that the first notes play, yes you can hear the notes, but they are not in sync with the metronome. So I think it plays bypassing the negative delay, until the negative delay time has passed, then it can start to delay the next notes.
Heda, You may be on to something.

I put the maximum which was -600ms.

But I'm not sure it waits until 600ms have passed to start working, since the second syllable is almost on top of the first in this extreme case. It doesn't sound like there was a 600ms buffer gap... If I'm understand you correctly. But maybe 600ms goes by faster than I think LOL

That's a workaround I've been able to live with since forever. Do you think you could adjust the code the the JS Time Adjustment plugin to behave that way?
__________________
Cheers,
Andrew K
v5.983+dev0922 - September 22 2019 • Mac 10.12.+ • i7 Quad 2.9GHz • 24GB

Last edited by Thonex; 08-30-2019 at 05:17 PM.
Thonex is online now   Reply With Quote
Old 08-30-2019, 10:22 PM   #20
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 8,064
Default

Quote:
Originally Posted by Klangfarben View Post
Some very clever people found that if you use midi PDC,.
What do you mean by "Midi PDC" ?

AFAIK, there is no such thing. But each track just features a "number" called PDC, that can be "set" by a (or multiple) plugin and is adhered to when Reaper mixes tracks.

Quote:
Originally Posted by Klangfarben View Post
The feature request itself has nothing at all to do with PDC
"PDC" ("Plugin Delay Compensation") is just a name for that number. Of course it could be set by an additional menus in reaper itself, instead of using e.g. +/- delay. but as seemingly shown this would not help with the missing first event(s) in the Video. Hence the feature Request seems more like something like "chasing" the midi events to process ahead of time.
OTOH the Video seemingly exactly is about "Plugin Delay Compensation", hence the name of PDC seems perfectly appropriate here.

-Michael

Last edited by mschnell; 08-30-2019 at 10:30 PM.
mschnell is offline   Reply With Quote
Old 08-30-2019, 11:16 PM   #21
EvilDragon
Human being with feelings
 
EvilDragon's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 23,507
Default

Quote:
Originally Posted by mschnell View Post
What do you mean by "Midi PDC" ?
JS FX command, see JS FX reference:

https://www.reaper.fm/sdk/js/vars.php#js_specialvars,


Please read Klangfarben's post. He explains it perfectly. I thought that setting pdc_midi would help but as it turns out, this is not a solution since it doesn't cover all cases well. Klangfarben explains why.
EvilDragon is offline   Reply With Quote
Old 08-31-2019, 03:01 AM   #22
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 8,064
Default

I see:

Quote:
pdc_midi
Context: @block, @slider
Usage: read-write
If set to 1.0, this will delay compensate MIDI as well as any specified audio channels.
This is no contradiction to what I pointed out before (leaving out the details about block rounding, and multiple plugins in a row requesting PDC):
- PDC is just a number associated to each track
- PDC is acknowlaged when mixing tracks together
- In play mode, PDC is done by pre-reading the media file.

The only news here is that this PDC will only affect the reading of audio when pdc_midi is set to zero and also affect the reading of mid media if it's set to 1.

I will update the +/- delay plugin to allow for setting pdc_midi.

-Michael
mschnell is offline   Reply With Quote
Old 08-31-2019, 03:11 AM   #23
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 8,064
Default

Quote:
Originally Posted by Thonex View Post
To me it seems that a problem might be that when a PDC is introduced, the pre-reading of the Midi item might or might not include a certain midi event. This might be a matter of just some microseconds.

I updated the +/- delay JSFX (in ReaPack) to allow for explicitly setting the pdc_midi variable and hence enable/disable PDC for Midi media. I'll do some tests with same and come back with results.

If this works exactly like the negative audio delay, the following should be stated, if it does not work exactly like the negative audio delay, this should be considered a bug and reported in the other subforum.

It seems this boils down to a dual Feature request:
1) A menu could be added to Reaper in order to in each track set an addition value to the PDC requested by the plugins. (The GUI of this might be hidden in an action or in an option for theming to avoid cluttering the existing default GUI)
2) Improve the chasing of Midi events close to the PDC modified starting point of reading the Midi media when starting playback/rendering.

-Michael

Last edited by mschnell; 08-31-2019 at 12:42 PM.
mschnell is offline   Reply With Quote
Old 08-31-2019, 01:01 PM   #24
Thonex
Human being with feelings
 
Join Date: May 2018
Location: Los Angeles
Posts: 783
Default

Quote:
Originally Posted by mschnell View Post
To me it seems that a problem might be that when a PDC is introduced, the pre-reading of the Midi item might or might not include a certain midi event. This might be a matter of just some microseconds.

I updated the +/- delay JSFX (in ReaPack) to allow for explicitly setting the pdc_midi variable and hence enable/disable PDC for Midi media. I'll do some tests with same and come back with results.

If this works exactly like the negative audio delay, the following should be stated, if it does not work exactly like the negative audio delay, this should be considered a bug and reported in the other subforum.

It seems this boils down to a dual Feature request:
1) A menu could be added to Reaper in order to in each track set an addition value to the PDC requested by the plugins. (The GUI of this might be hidden in an action or in an option for theming to avoid cluttering the existing default GUI)
2) Improve the chasing of Midi events close to the PDC modified starting point of reading the Midi media when starting playback/rendering.

-Michael

Michael,

I'm doing some tests here and am having some real issues with the plugin. If you change the negative delay settings various times, the playback becomes wrong. This is aside from the playback start MIDI missing. I have an idea on that too. Will post more as I become more certain of my findings.

But I'm thinking if you have 1 Boolean that ignores negative MIDI delay until the negative MIDI delay Window is met, then the Play Start MIDI will be triggered (at least we will hear something)... and everything after the negative delay will be properly delayed. But I'll also do some tests on Neundo to see what they are doing.

But let me do some more tests first.
__________________
Cheers,
Andrew K
v5.983+dev0922 - September 22 2019 • Mac 10.12.+ • i7 Quad 2.9GHz • 24GB
Thonex is online now   Reply With Quote
Old 08-31-2019, 02:02 PM   #25
Thonex
Human being with feelings
 
Join Date: May 2018
Location: Los Angeles
Posts: 783
Default

OK Michael,

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 i 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 s 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

First I think these have to be resolved... agreed?

I'm attaching the Urie click below so you can test it that if you want.

Also, I'm going to post this video in the Bugs forum.
Attached Files
File Type: zip Urie_Click-16-48.WAV.zip (1.2 KB, 18 views)
__________________
Cheers,
Andrew K
v5.983+dev0922 - September 22 2019 • Mac 10.12.+ • i7 Quad 2.9GHz • 24GB

Last edited by Thonex; 08-31-2019 at 02:35 PM.
Thonex is online now   Reply With Quote
Old 08-31-2019, 10:27 PM   #26
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 8,064
Default

Could you also try the +/- delay JSFX in ReaPack , I just updated to feature a settable midi-pdc ?

Re (1): "More than" ??? This is not what a (negative) delay is supposed to do. It should work perfectly exact. (I did not yet test if Reaper indeed does this). Regarding your demand, I would think that this indeed is a kind of "Midi event chasing" (which has been discussed in other locations here regarding "articulations". 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

Last edited by mschnell; 08-31-2019 at 10:33 PM.
mschnell is offline   Reply With Quote
Old 09-01-2019, 12:58 AM   #27
Thonex
Human being with feelings
 
Join Date: May 2018
Location: Los Angeles
Posts: 783
Default

Quote:
Originally Posted by mschnell View Post

Re (1): "More than" ??? This is not what a (negative) delay is supposed to do. It should work perfectly exact. (I did not yet test if Reaper indeed does this).
Michael, did you watch the video “VIDEO OF BUG” directly above your last post?

I did test it.
__________________
Cheers,
Andrew K
v5.983+dev0922 - September 22 2019 • Mac 10.12.+ • i7 Quad 2.9GHz • 24GB
Thonex is online now   Reply With Quote
Old 09-01-2019, 04:24 AM   #28
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 8,064
Default

Of course I did watch it.

But the finding there does not mean that the proposes solution is viable. Consider that articulations are associated with the Midi notes you want to hear. Without a by far more complex Midi event chasing you will not get usable results when starting to play somewhere in the Midi stream.

(More in your thread in "bug fixes.)

-Michael
mschnell is offline   Reply With Quote
Old 09-01-2019, 10:55 AM   #29
Klangfarben
Human being with feelings
 
Join Date: Jul 2016
Location: Los Angeles, CA
Posts: 758
Default

Quote:
Originally Posted by mschnell View Post

Re (1): "More than" ??? This is not what a (negative) delay is supposed to do. It should work perfectly exact. (I did not yet test if Reaper indeed does this).
Michael, you should really confirm Thonex's test results. Of course that isn't what it is supposed to be doing, but unfortunately it is and he went to a lot of trouble to show that.

Quote:
Originally Posted by mschnell View Post
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
I think your response here is a perfect example why PDC simply cannot work for negative midi delay as much as you or anyone else badly wants it to or thinks it should. Rather than continue a lengthy discussion about this, I think it's best to just concede that a native implementation of midi offset is much needed and respect that this is a very legitimate feature request.
Klangfarben is online now   Reply With Quote
Old 09-01-2019, 02:22 PM   #30
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 8,064
Default

Quote:
Originally Posted by Klangfarben View Post
I think your response here is a perfect example why PDC simply cannot work for negative midi delay
I suppose it does technically work and I will do a test confirming (or disproving) this.

But this does not mean that it in fact is usable in the way someone might intend to use it.
In fact (as stated above) I don't think it's really usable in a case where you want to put the play cursor somewhere and hit play. For this to yield a decent result you need appropriate Midi chasing, and I am rather sure that there is no documentation stating that Reaper does this in that case.

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

Quote:
Originally Posted by mschnell View Post
Could you also try the +/- delay JSFX in ReaPack , I just updated to feature a settable midi-pdc ?

Re (1): "More than" ??? This is not what a (negative) delay is supposed to do. It should work perfectly exact. (I did not yet test if Reaper indeed does this). Regarding your demand, I would think that this indeed is a kind of "Midi event chasing" (which has been discussed in other locations here regarding "articulations". 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
Thanks Michael,

OK...

So, regarding the bug testing, please see the Bug Reports Thread for my test results.

Now, regarding this threads feature request of Native Negative MIDI delay maybe (just maybe) there is a way to find a usable workaround without having to do much (fingers crossed).

Is it possible to modify the plugin you modified to IGNORE any MIDI Negative Delay less than the delay amount upon Playback START? This way we won't miss the initial notes on the downbeat of the measure.

So in programmers speak, let's say we have a negative delay of -300ms :

Code:
if MIDI_Note_Pos - Playback_Start_Cursor_Pos < 300 ms then Do Not Delay
Something like that? It's not perfect, but certainly better than what Reaper has now. If I gave an example with 5 seconds of sustained strings, then you will not hear any of those strings... so for 5 seconds there would nothing.

Obviously, I think I and everyone here would prefer a native feature, but otherwise, maybe this kind of approach or something similar would work.

Worth exploring Michael?
__________________
Cheers,
Andrew K
v5.983+dev0922 - September 22 2019 • Mac 10.12.+ • i7 Quad 2.9GHz • 24GB

Last edited by Thonex; 09-01-2019 at 03:22 PM.
Thonex is online now   Reply With Quote
Old 09-01-2019, 09:41 PM   #32
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 8,064
Default

I suppose the PDC value is only updated when playback is started or stopped. So I don't thinks this possible, but I'll take a look.
And moreover I don't think that it will decently help (see discussion on Midi Chasing).
-Michael
mschnell is offline   Reply With Quote
Old 09-02-2019, 12:15 AM   #33
Thonex
Human being with feelings
 
Join Date: May 2018
Location: Los Angeles
Posts: 783
Default

Quote:
Originally Posted by mschnell View Post
... but I'll take a look.
Thanks Michael, let us know what you find.
__________________
Cheers,
Andrew K
v5.983+dev0922 - September 22 2019 • Mac 10.12.+ • i7 Quad 2.9GHz • 24GB
Thonex is online now   Reply With Quote
Old 09-02-2019, 11:55 AM   #34
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,364
Default

+1 from me as well. This sort of adjustment is something you want to do to the entire track, and should therefore have a track-level solution.

I'm not sure why this is such a contentious issue, unless there's been some input from Cockos suggesting that it's not feasible.
Lokasenna is offline   Reply With Quote
Old 09-02-2019, 02:24 PM   #35
nappies
Human being with feelings
 
nappies's Avatar
 
Join Date: Dec 2017
Posts: 132
Default

To solve this problem, you can do smart play.Were cursor will jump a little in backwards to compensate lookahead.

Code:
function getpredelay()
delay=1
function ToggleTrackFX(tracki)
retval, fx_name = reaper.TrackFX_GetFXName(tracki, 0, 0);  
if fx_name == "JS: MIDI_Time_Adjustment" then  
local tdelay =reaper.TrackFX_GetParamNormalized( tracki, 0, 0 )
delay= math.min(tdelay, delay)
end
end 
NumberTracks = reaper.CountTracks(0)
for i = 0, NumberTracks - 1 do                                     
tracki = reaper.GetTrack(0, i)                                  
  ToggleTrackFX( tracki )
end
if delay == 0.5 or delay > 0.5 then  outdelay=0
elseif  delay < 0.5  then  outdelay = ((0.5-delay)*4000)*(0.001) end
return outdelay
end

local predelay =  getpredelay()
local cur_pos =  reaper.GetCursorPosition()
reaper.PreventUIRefresh(1)
if  predelay > 0 then 
local cur_predelay = ((cur_pos - predelay)-0.015) 

reaper.SetEditCurPos2( 0, cur_predelay, 0, 0)

reaper.Main_OnCommand(40044, 0)-----Play
nappies is offline   Reply With Quote
Old 09-02-2019, 02:34 PM   #36
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 8,064
Default

Quote:
Originally Posted by Lokasenna View Post
I'm not sure why this is such a contentious issue, unless there's been some input from Cockos suggesting that it's not feasible.
Supposedly everything is just correct when rendering a project from beginning to end, but problems arise when starting playback somewhere withing the project (supposedly due to lack of decent "chasing")
-Michael
mschnell is offline   Reply With Quote
Old 09-02-2019, 02:59 PM   #37
Thonex
Human being with feelings
 
Join Date: May 2018
Location: Los Angeles
Posts: 783
Default

Quote:
Originally Posted by nappies View Post
To solve this problem, you can do smart play.Were cursor will jump a little in backwards to compensate lookahead.
Thanks nappies,

Thanks for chiming in.

Yeah... I had written a script like that (first thing I did LOL), and then the "record" version of the script so I could hear the downbeats of MIDI (go figure LOL). The problem with the latter is it totally messes up Reapers MIDI merge item displays.. and you end up spending all day cleaning up you item's display. :O

Really, this should just be a MIDI feature that is handled natively by Reaper. Everything else (that I've found) is a workaround and ugly.
__________________
Cheers,
Andrew K
v5.983+dev0922 - September 22 2019 • Mac 10.12.+ • i7 Quad 2.9GHz • 24GB
Thonex is online now   Reply With Quote
Old 09-02-2019, 03:06 PM   #38
Thonex
Human being with feelings
 
Join Date: May 2018
Location: Los Angeles
Posts: 783
Default

Quote:
Originally Posted by mschnell View Post
Supposedly everything is just correct when rendering a project from beginning to end, but problems arise when starting playback somewhere withing the project (supposedly due to lack of decent "chasing")
-Michael
That does not help in any way when you press play at any point in the project. Or when you press record and try to hear back MIDI at the initial play position.
__________________
Cheers,
Andrew K
v5.983+dev0922 - September 22 2019 • Mac 10.12.+ • i7 Quad 2.9GHz • 24GB
Thonex is online now   Reply With Quote
Old 09-02-2019, 03:09 PM   #39
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Posts: 2,962
Default

Quote:
Originally Posted by Thonex View Post
Really, this should just be a MIDI feature that is handled natively by Reaper. Everything else (that I've found) is a workaround and ugly.
I agree. This functionality is way too complex as that it could be implemented by a script.
__________________
My Reascripts forum thread | My Reascripts on GitHub | Stephan Römer - film composer
If you wish to donate for my scripts: please consider an organization like: animal shelter, doctors without borders, UNICEF, etc...
_Stevie_ is online now   Reply With Quote
Old 09-02-2019, 03:19 PM   #40
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 5,493
Default

Let's say the maximum delay of all tracks is -300ms. Then a script running in the background TI for example) could rewind 300ms before playing starts, mute the master, start playing for 300ms and then unmute the master while keeps playing. Would this work? I think so. If all delays are entered with Track Inspector, it would be easy to know which is the largest negative delay of all and be saved in TI data for quick access.
heda 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 07:25 PM.


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