Old 04-23-2019, 04:57 AM   #81
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Posts: 2,453
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 offline   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: 7,280
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,064
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,064
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: 7,280
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,064
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: 189
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,465
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,224
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: 518
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,465
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: 518
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
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 09:41 AM.


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