Old 04-23-2019, 04:57 AM   #81
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Posts: 3,052
Default

All good man! I just wanted to point it out. Looking forward to it
__________________
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 04-23-2019, 11:25 AM   #82
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 8,213
Default

Quote:
Originally Posted by lb0 View Post
Eugen's original JSFX did it differently - and calculated the actual playback position according to the block start and offset - which would IMO be far more accurate.
If running in "playback" mode this might - or might not - help. If running in a kind of "live" (aka stop) mode, it will not.

see -> https://forum.cockos.com/showpost.ph...3&postcount=90
- doing anything related to Midi in @sample does not help at all.
- in @block the "offset" is relative to the block that is currently worked on in the effect chain. this might be another block than currently being worked on in another OS thread (another track or the GUI).

Supposedly, the playback position denotes the correct block and offset values the Midi information needs to be related to (no idea how this can be done).

-Michael
mschnell is offline   Reply With Quote
Old 04-23-2019, 12:51 PM   #83
lb0
Human being with feelings
 
Join Date: Apr 2014
Posts: 3,207
Default

Quote:
Originally Posted by mschnell View Post
If running in "playback" mode this might - or might not - help. If running in a kind of "live" (aka stop) mode, it will not.

see -> https://forum.cockos.com/showpost.ph...3&postcount=90
- doing anything related to Midi in @sample does not help at all.
- in @block the "offset" is relative to the block that is currently worked on in the effect chain. this might be another block than currently being worked on in another OS thread (another track or the GUI).

Supposedly, the playback position denotes the correct block and offset values the Midi information needs to be related to (no idea how this can be done).

-Michael
Hey Michael,

Thanks for the info - very interesting read.

So with respect to incoming 'live' MIDI - this is simply inserted in the queue as soon as it arrives at the fx input? No buffering of live midi (which would make it late anyway)?

If so - then my understanding was slightly off - and perhaps mpl's method is just fine or as reasonably accurate as can be expected? (at least when transport is stopped)

Thanks for your insight.

EDIT:

Maybe I misunderstood your original comment?

There is no 'live' communication via gmem between tracks. the data is simply stored in global memory so it is ready to be read when capturing is complete via a separate lua script.

But what you're getting at is that live midi coming into one track will have different timing as the same live midi coming into another track (with different plugins)? Therefore what is captured by RetroRec is never going to be exactly the same as what you hear live?

Sorry for all the questions - just trying to get the best understanding possible...
__________________
Projects - Reascripts - Lua:
LBX Stripper | LBX Chaos Engine | LBX Floating FX Positioner | LBX SRD Smart Knobs
Donate via Paypal

Last edited by lb0; 04-23-2019 at 01:04 PM.
lb0 is online now   Reply With Quote
Old 04-23-2019, 01:27 PM   #84
lb0
Human being with feelings
 
Join Date: Apr 2014
Posts: 3,207
Default

I've tested this script alongside Eugen's and also captured the same midi directly onto a track.

From what I can tell - Eugen's is as near perfect compared to the direct midi. mpl's is a little looser. Not terrible - but noticeably.

But - mpl's can capture when stopped - and I'm not yet sure whether Eugen's method can be performed while stopped (EDIT: it can ).
__________________
Projects - Reascripts - Lua:
LBX Stripper | LBX Chaos Engine | LBX Floating FX Positioner | LBX SRD Smart Knobs
Donate via Paypal

Last edited by lb0; 04-23-2019 at 03:21 PM.
lb0 is online now   Reply With Quote
Old 04-23-2019, 11:13 PM   #85
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 8,213
Default

Quote:
Originally Posted by lb0 View Post
There is no 'live' communication via gmem between tracks. the data is simply stored in global memory so it is ready to be read when capturing is complete via a separate lua script.
gemm is not "save" or "correctly timed" between multiple OS threads. Each track features it's own OS thread and the "guts" of Reaper (including all the GUI - including the JSFXes' @gfx sections - and the ReaScripts) has it's own OS Thread as well. As obviously a LUA script runs in the GUI thread of Reaper's, the said timing issue can hit (unless appropriate precautions are taken).

Maybe with this application (with no "Input" FX plugins enabled), the input threads usually are ahead of the GUI thread, this might "just work", but with a multiCore hardware the timing between OS threads might be very different from what we expect.

-Michael
mschnell is offline   Reply With Quote
Old 04-24-2019, 01:22 AM   #86
lb0
Human being with feelings
 
Join Date: Apr 2014
Posts: 3,207
Default

Quote:
Originally Posted by mschnell View Post
gemm is not "save" or "correctly timed" between multiple OS threads. Each track features it's own OS thread and the "guts" of Reaper (including all the GUI - including the JSFXes' @gfx sections - and the ReaScripts) has it's own OS Thread as well. As obviously a LUA script runs in the GUI thread of Reaper's, the said timing issue can hit (unless appropriate precautions are taken).

Maybe with this application (with no "Input" FX plugins enabled), the input threads usually are ahead of the GUI thread, this might "just work", but with a multiCore hardware the timing between OS threads might be very different from what we expect.

-Michael
Yes - but all the JSFX does is buffer what's coming in - storing the timing and other message details of the input midi. By using the block details and offset information - this is able to capture the timing of the incoming midi perfectly.

In my tests - Eugen's script captures exactly what MIDI is input (compared to hitting record on an empty track - the buffered data is identical). I've also adapted it so it will capture while the transport is stopped (by keeping a counter which gets incremented as each block is run).

This is all that is required for this retrospective record functionality to work.

This version of the script - does not take into account midi message offset - and uses a simplified routine to work out the timing of the incoming MIDI - which does mean that the captured data does not match that of the midi data recorded directly in a midi item - although it is very close.

There must be buffering of incoming 'live' midi data - or else the midircv function would not provide an offset value > 0 for this data (which it does). So I guess this is all part of the default system latency for midi data.

Anyway - I'm happy with the solution I have got - using an adaptation of Eugen's original script. I'll provide this to mpl should he be interested and wish to adapt it for gmem use (something I'm less fussed about - for me the ability to accurately buffer the midi data when stopped was the main purpose).
__________________
Projects - Reascripts - Lua:
LBX Stripper | LBX Chaos Engine | LBX Floating FX Positioner | LBX SRD Smart Knobs
Donate via Paypal
lb0 is online now   Reply With Quote
Old 05-31-2019, 12:39 AM   #87
Stevie
Human being with feelings
 
Stevie's Avatar
 
Join Date: Feb 2015
Location: Urkrain/Russia
Posts: 196
Default

Quote:
Originally Posted by EvilDragon View Post
Great work (as always) mpl, but man, wouldn't it be so much easier if this was just built into Reaper, no fussing with JSFX or anything?
as huge amount of different scripts here and there ><
Stevie is offline   Reply With Quote
Old 05-31-2019, 12:57 AM   #88
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 2,554
Default

I recently added a @block offset compensation subtracted from time_precise(), so MIDI events now should be more precise.
__________________
SoundCloud | MPL Scripts discussion | ReaPack | Donate
mpl is offline   Reply With Quote
Old 07-06-2019, 10:40 AM   #89
deeb
Human being with feelings
 
deeb's Avatar
 
Join Date: Feb 2017
Posts: 2,497
Default

Quote:
Originally Posted by EvilDragon View Post
Great work (as always) mpl, but man, wouldn't it be so much easier if this was just built into Reaper, no fussing with JSFX or anything?
this would be so great as native! no preparation of track, always there for rescue : )

It happens to me so manny times no be able to reproduce and record what i just did ! both midi notes and automation.

Would be wonderful being able to do this:
- Load last cycle touched param
- Load last cycle midi (notes or automation)
- Merge last cycle touched param
- Merge last cycle midi (notes or automation)

Options:
-buffer size cycles: [1]
-buffer seconds ( if no cycle defined): [200]
- always try to paste all buffered midi data and adjust by offset: [true/false]

And for my real use case, i think would be enough that the buffer just keeps track of: last selected track and focused instrument or FX. But things could go crazy and track everything. Anyway! dreaming : )
deeb is offline   Reply With Quote
Old 07-09-2019, 12:10 AM   #90
zookthespook
Human being with feelings
 
Join Date: Mar 2015
Posts: 579
Default

Hello MPL,
Hope you are good !

I cannot seem to make the script work for some reason,

1. Installed the four scripts

2. Made a new track and ran the script " Script: mpl_Prepare selected track for
RetrospectiveRecord tracker.lua "

3. Assigned a hotkey to Script: mpl_Dump RetrospectiveRecord tracker log to selected
track.lua


4. Created a new track with a VSti. Played a few notes and hit the hotkey,

So after hitting the hotkey, the script drew and EMpty midi item box , but no midi events were dumped in it .


Is there something wrong i am doing here ?


i am on

Reaper 5.979 {x64}-Reapack 1.2.2 - sws 2.1


regards
zook
zookthespook is offline   Reply With Quote
Old 07-09-2019, 06:47 AM   #91
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 2,554
Default

Quote:
Originally Posted by zookthespook View Post
Hello MPL,
Hope you are good !

I cannot seem to make the script work for some reason,

1. Installed the four scripts

2. Made a new track and ran the script " Script: mpl_Prepare selected track for
RetrospectiveRecord tracker.lua "

3. Assigned a hotkey to Script: mpl_Dump RetrospectiveRecord tracker log to selected
track.lua


4. Created a new track with a VSti. Played a few notes and hit the hotkey,

So after hitting the hotkey, the script drew and EMpty midi item box , but no midi events were dumped in it .


Is there something wrong i am doing here ?


i am on

Reaper 5.979 {x64}-Reapack 1.2.2 - sws 2.1


regards
zook
Hmm try to inspect MIDI, maybe it is somehow shifted (try see in Midi editor with event list mode)
__________________
SoundCloud | MPL Scripts discussion | ReaPack | Donate
mpl is offline   Reply With Quote
Old 07-09-2019, 01:41 PM   #92
zookthespook
Human being with feelings
 
Join Date: Mar 2015
Posts: 579
Default

Quote:
Originally Posted by mpl View Post
Hmm try to inspect MIDI, maybe it is somehow shifted (try see in Midi editor with event list mode)
Sure will try that first thing in the morning and report back !
thank you

regards
zook
zookthespook is offline   Reply With Quote
Old 11-21-2019, 02:13 PM   #93
Supremo
Human being with feelings
 
Join Date: Mar 2019
Posts: 21
Default

Hi Mikhail!

I'm encountering an issue with your Retrospective Record script. It doesn't seem to work properly in my system. I have installed all required scripts including the 'Various_functions.lua' file and then:

1) I create a new track and call the action "Prepare selected track for Retrospective Record";
2) I create another track and add a VSTi;
3) I play some notes and trigger 'Dump Retrospective Record tracker log'.

However, nothing happens. Please see the link below:

https://imgur.com/a/3Ybj52X


I then try to add the 'Retrospective Record_tracker' JS plugin in the Input FX slot of that same track. Only a couple of random notes appear.

Here is the second link:

https://imgur.com/a/GfvbMtq#TCqP5pP


Could you please check if there is any bug there or is it me doing something wrong?

Thanks bro!
Supremo is offline   Reply With Quote
Old 11-21-2019, 08:01 PM   #94
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 2,554
Default

You have to enable correct MIDI input for prepared track and arm it once. It does designed to use only prepared track for storing data.
__________________
SoundCloud | MPL Scripts discussion | ReaPack | Donate
mpl is offline   Reply With Quote
Old 11-25-2019, 01:38 PM   #95
Supremo
Human being with feelings
 
Join Date: Mar 2019
Posts: 21
Default

Quote:
Originally Posted by mpl View Post
You have to enable correct MIDI input for prepared track and arm it once. It does designed to use only prepared track for storing data.
Sorry, Mikhail, but it doesn't seem to work properly. I tried so many various options: armed the prepared track, tried selecting different midi inputs, made the prepared track a parent to the instrument track, separated them, etc... All my attempts have failed.

When subordinating the instrument track to the prepared track only some random notes appear in the midi item with no sound.

UPD: The script happens to work correctly only with the virtual midi keyboard but not with the real keyboard.

Last edited by Supremo; 11-25-2019 at 01:45 PM.
Supremo is offline   Reply With Quote
Old 12-02-2019, 06:46 AM   #96
Stroudy
Human being with feelings
 
Join Date: Jul 2014
Posts: 391
Default

I'm not getting any meaningful data when using 'Dump Retrospective Record tracker log'

Sometimes I don't get any data, other times an empty item, other times notes I didn't play. totally random.

I wish I could give more info, but it really is that random.
Stroudy is offline   Reply With Quote
Old 12-07-2019, 08:53 PM   #97
ipopon
Human being with feelings
 
Join Date: Aug 2018
Posts: 1
Default

Same here.

I've installed 3 scripts: Clear, Dump, Prepare retrospective record.

It worked about 2 times, but after that the script seemed to start working randomly and a bit later stopped working at all. Tried, restarting Reaper, clearing, repreparing tracks, but no results.

Also, when I run "Prepare retrospective" on a track, it unchecks Route/"Master Send" and sets "record: disable (input monitoring only)".
ipopon is offline   Reply With Quote
Old 12-11-2019, 04:37 AM   #98
paaltio
Human being with feelings
 
Join Date: Aug 2011
Posts: 111
Default

Quote:
Originally Posted by EvilDragon View Post
Great work (as always) mpl, but man, wouldn't it be so much easier if this was just built into Reaper, no fussing with JSFX or anything?
Just chiming in here to point out Digital Performer v10.1 just added Retrospective Record and Cubase 10.5 recently had a big upgrade to its feature... *winks heavily in Justin and schwa’s direction*

Thanks for the great work mpl in the meantime!
paaltio is offline   Reply With Quote
Old 12-13-2019, 09:33 PM   #99
Yorkz
Human being with feelings
 
Yorkz's Avatar
 
Join Date: Jan 2007
Location: Canada
Posts: 117
Default

Quote:
Originally Posted by Supremo View Post
UPD: The script happens to work correctly only with the virtual midi keyboard but not with the real keyboard.
Same. Works fine with virtual keyboard. Entering notes via midi keyboard returns a glitchy midi clip.
Yorkz is offline   Reply With Quote
Old Yesterday, 12:49 PM   #100
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 2,554
Default

Not sure if it helps, but I removed offset decrement from JSFX code. So hopefully it will work better (but less precise). I guess I have to convert MIDI receive offset from PPQ to seconds, then decrement it from time precise, but I have bad JSFX skills to do it so I leave it as is.
__________________
SoundCloud | MPL Scripts discussion | ReaPack | Donate

Last edited by mpl; Yesterday at 12:57 PM.
mpl is offline   Reply With Quote
Old Yesterday, 08:38 PM   #101
Yorkz
Human being with feelings
 
Yorkz's Avatar
 
Join Date: Jan 2007
Location: Canada
Posts: 117
Default

Quote:
Originally Posted by mpl View Post
Not sure if it helps, but I removed offset decrement from JSFX code. So hopefully it will work better (but less precise).
Tried the new version and it works like a charm. Thanks!
Yorkz 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:15 PM.


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