Old 02-15-2019, 10:35 PM   #1
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 3,941
Default MPL Dump Retrospective Record log (no JSFX required)

UPD 08.04.23: the script is no longer supported, since REAPER has this feature natively.




================================================== =============
Concept: dump all incoming MIDI events into project MIDI data without actully recording it.

Before 2021 it was implemented using custom JSFX tracker.
After 2021 REAPER 6.39+ has native way to do this.

Instructions: 1) play something on your MIDI device connected to REAPER, 2) run script. Result: incoming MIDI is inside selected track new take at edit cursor.

Here is bunch of scripts from ReaPack:

Free version: mpl_Dump Retrospective Record log (old version). No dependencies and mostly built around Justin`s code.
Paid version:
  • mpl_Dump Retrospective Record log.lua kinda general script, uses optimized settings, including breaks to not get previous added data and obey looped recordings as multiple takes
  • mpl_Dump Retrospective Record log (notes only).lua
  • mpl_Dump Retrospective Record log (only data at playing).lua - event put into their played positions
  • mpl_Dump Retrospective Record log (only data at stop).lua - start from edit cursor to a event list length
  • mpl_Dump Retrospective Record log (everything recorded from last REAPER start).lua - collect everything without any filters
  • mpl_Dump Retrospective Record log (everything from last 5 minutes).lua - ignore break, dump everything based on time limit
  • mpl_Dump Retrospective Record log (everything from last 10 minutes).lua
  • mpl_Dump Retrospective Record log (everything from last 30 minutes).lua
  • mpl_Dump Retrospective Record log (everything from last hour, obey stored data break).lua

These scripts use VariousFunctions package 2.62+ from my repository (which is paid).
They have different (better) way of handling/sorting data, also they are easier to extend so any suggestions welcome.




old post:


Eugen made previously a JSFX writing MIDI data during playing project, and the script dumping this data as new item.

gmem API allows to share memory across JSFX and Reascript, so what I did is easier to think through and code.

Here are parts of making this real:
  • RetrospectiveRecord_tracker.jsfx is a JSFX sitting at some fixed track FX Chain to receive MIDI data for further translating it into ReaScript.
  • mpl_Prepare selected track for RetrospectiveRecord tracker.lua
    Eugen`s script search for track where tracker is inserted and add/hide it automatically if not found. I personally don`t like such things, so I made this action going manual. The script add RetrospectiveRecord tracker, disable parent send, enable monitoring, record arm, set input to all channels all MIDI devices, disable record). You can hide this track, add to default project template and forget.
  • mpl_Dump RetrospectiveRecord tracker log to selected track.lua 1) dump raw MIDI log into new item/take on selected track at edit cursor. Since tracker write system timestamps (not related to playing state), script just put whole buffer data as is, not syncronized to project, if you played while playing project; 2) reset buffer data.

Buffer is limited to 3.500.000 messages (it wraps if buffer filled).

Requirements:
Require REAPER 5.97+.
ReaPack 1.2+
Download: ReaPack.com (MPL`s repository is embedded into default ReaPack configuration)

Install:
  • run ActionList > ReaPack: Browse packages...
  • navigate and install Various_functions.lua, RetrospectiveRecord_tracker.jsfx, mpl_Prepare selected track for RetrospectiveRecord tracker.lua, mpl_Dump RetrospectiveRecord tracker log to selected track.lua packages

Last edited by mpl; 04-08-2023 at 05:17 AM.
mpl is offline   Reply With Quote
Old 02-16-2019, 06:11 AM   #2
vitalker
Human being with feelings
 
vitalker's Avatar
 
Join Date: Dec 2012
Posts: 13,322
Default

Wow, what a cool script. Thank you!
vitalker is offline   Reply With Quote
Old 02-16-2019, 07:27 AM   #3
EvilDragon
Human being with feelings
 
EvilDragon's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 24,769
Default

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?
EvilDragon is offline   Reply With Quote
Old 02-16-2019, 08:14 AM   #4
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 3,941
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?
Absolutely agree. This one was made only as a temporary solution. I remember I asked Justin for having global incoming MIDI data log as accessible text (like OSC messages log in OSC setup window). Not sure is that so complex to implement (probably because of MIDI control/input data handling difference) on the Reaper side though.
mpl is offline   Reply With Quote
Old 02-16-2019, 09:52 AM   #5
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Location: Black Forest
Posts: 4,999
Default

Pretty cool mpl, what a masterpiece!

Two things:

- in case of recording during playback, would it be possible to create the item at the start time of the playback, instead of the edit cursor location?

- often, I'm doing overdubs, like doing a 2nd pass for the CCs. Would it be possible to merge the CC item with the pre-existing item? Maybe as a preference. Not sure if everyone would like that behavior. But to me it would absolutely make sense to merge the recording with the underlaying item.
__________________
My Reascripts forum thread | My Reascripts on GitHub
If you like or use my scripts, please support the Ukraine: Ukraine Crisis Relief Fund | DirectRelief | Save The Children | Razom
_Stevie_ is offline   Reply With Quote
Old 02-16-2019, 01:41 PM   #6
Breeder
Human being with feelings
 
Breeder's Avatar
 
Join Date: Nov 2010
Posts: 2,433
Default

Quote:
Originally Posted by _Stevie_ View Post
- often, I'm doing overdubs, like doing a 2nd pass for the CCs. Would it be possible to merge the CC item with the pre-existing item? Maybe as a preference. Not sure if everyone would like that behavior. But to me it would absolutely make sense to merge the recording with the underlaying item.
Just glue them together!
Breeder is offline   Reply With Quote
Old 02-16-2019, 04:14 PM   #7
Klangfarben
Human being with feelings
 
Join Date: Jul 2016
Location: Los Angeles, CA
Posts: 1,700
Default

Quote:
Originally Posted by _Stevie_ View Post
- in case of recording during playback, would it be possible to create the item at the start time of the playback, instead of the edit cursor location?

- often, I'm doing overdubs, like doing a 2nd pass for the CCs. Would it be possible to merge the CC item with the pre-existing item? Maybe as a preference. Not sure if everyone would like that behavior. But to me it would absolutely make sense to merge the recording with the underlaying item.
Yes, would really love these two things as well.

Thanks so much for the fantastic work!
Klangfarben is offline   Reply With Quote
Old 02-18-2019, 12:55 PM   #8
TonE
Human being with feelings
 
Join Date: Feb 2009
Location: Reaper HAS send control via midi !!!
Posts: 3,965
Default

Quote:
Originally Posted by EvilDragon View Post
... but man, wouldn't it be so much easier if this was just built into Reaper, no fussing with JSFX or anything?
Of course, but imagine Reaper would be Krüppelmididaw Ableton Live or Steinzeitdaw Cubase, no extension at all, here users have unlimited scripting options, lua, python, autohotkey, actually you can use any programming language which can work on audio or midi, just trigger that tool via python. I gave autohotkey because of this as one example. I mean really, full autohotkey scripts triggered as Reaper actions, full reaper actions. Something like:
PHP Code:
reaper action python triggering autohotkey script result is anything what is possible with autohotkey 
What for example? Also crazier stuff, like pixelsearch, then moving the mouse there, doing something there. Or switching to reaper forum, writing a post, coming back to reaper. Or doing OCR, then typing in required numbers for freeing plugins which try to put limitations like Venom VB-303 in midi mode. Or anything what is normally not possible but somehow possible using some tricks.

https://www.youtube.com/watch?v=ZDipw_F-VD8
TonE is offline   Reply With Quote
Old 02-22-2019, 07:26 AM   #9
HammyHavoc
Human being with feelings
 
HammyHavoc's Avatar
 
Join Date: Jun 2018
Location: Liverpool, United Kingdom
Posts: 58
Default

This works flawlessly. Superb work.
__________________
Hammy Havoc | Split An Atom
HammyHavoc is offline   Reply With Quote
Old 02-22-2019, 09:43 AM   #10
mccrabney
Human being with feelings
 
mccrabney's Avatar
 
Join Date: Aug 2015
Posts: 3,639
Default

mpl, thanks and great work on retrospective record.

apologies for the off topic, but i see possible similarities here and this has been a FR of mine for a long time:

FR - could elements from this script be used in a sister script that [does stuff] to most recently recorded midi?

example:
1- toggle RECORD ON.
2- engage script
3- record midi into an item
4- toggle RECORD OFF.
5- script selects midi data recorded between steps 1 and 4
__________________
mccrabney scripts: MIDI edits from the Arrange screen ala jjos/MPC sequencer
|sis - - - anacru| isn't what we performed: pls no extra noteons in loop recording
| - - - - - anacru|sis <==this is what we actually performed.
mccrabney is offline   Reply With Quote
Old 05-31-2019, 12:39 AM   #11
Stevie
Human being with feelings
 
Stevie's Avatar
 
Join Date: Feb 2015
Location: Ukraine, Russia
Posts: 254
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   #12
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 3,941
Default

I recently added a @block offset compensation subtracted from time_precise(), so MIDI events now should be more precise.
mpl is offline   Reply With Quote
Old 07-06-2019, 10:40 AM   #13
deeb
Human being with feelings
 
deeb's Avatar
 
Join Date: Feb 2017
Posts: 4,805
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 12-11-2019, 04:37 AM   #14
paaltio
Human being with feelings
 
Join Date: Aug 2011
Location: Los Angeles, CA
Posts: 307
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 02-16-2019, 07:28 AM   #15
Breeder
Human being with feelings
 
Breeder's Avatar
 
Join Date: Nov 2010
Posts: 2,433
Default

Does it work if playback is NOT engaged? Previous version by Eugen requires playback to be active. Just yesterday I wanted to point this out in another thread and now you post this! Awesome work - I'm gonna test this immediately!

Edit: YES IT WORKS EVEN WHEN PLAYBACK IS NOT ENGAGED. AWESOME!!!

So, I put JSFX in input FX chain in all of my track templates now and it all works. Thank you MPL - you just made my day! No more losing best performances!

Last edited by Breeder; 02-16-2019 at 07:51 AM.
Breeder is offline   Reply With Quote
Old 05-22-2022, 07:18 AM   #16
grandfougue
Human being with feelings
 
grandfougue's Avatar
 
Join Date: Sep 2016
Posts: 479
Default

Hi how to get the paid version please I don't understand ?

There is no action for audio, you have to use Eugen's version. That's it ?
grandfougue is offline   Reply With Quote
Old 05-22-2022, 11:36 AM   #17
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 3,941
Default

Quote:
Originally Posted by grandfougue View Post
Hi how to get the paid version please I don't understand ?

There is no action for audio, you have to use Eugen's version. That's it ?
All scripts are free (donation is welcome but it seems not possible to donate). There is no version for audio until there isn't API function for this (I don't like jsfx workarounds just like Eugen did).
mpl is offline   Reply With Quote
Old 05-22-2022, 12:06 PM   #18
grandfougue
Human being with feelings
 
grandfougue's Avatar
 
Join Date: Sep 2016
Posts: 479
Default

Tank for your responce The same for audio by Eugen No Other solution you know at time ?
grandfougue is offline   Reply With Quote
Old 06-04-2022, 10:50 AM   #19
Hando
Human being with feelings
 
Join Date: Jul 2020
Posts: 2
Default

This looks excellent. I'm trying to use it but it says:

Script/Functions/mpl_Various_functions.lua not found. You should have ReaPack installed. Right click on ReaPack and click Install, then Apply.

I've followed this step but it's still coming up each time. Any ideas on what I need to do?

Thanks
Hando is offline   Reply With Quote
Old 06-04-2022, 10:15 PM   #20
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 3,941
Default

Quote:
Originally Posted by Hando View Post
This looks excellent. I'm trying to use it but it says:

Script/Functions/mpl_Various_functions.lua not found. You should have ReaPack installed. Right click on ReaPack and click Install, then Apply.

I've followed this step but it's still coming up each time. Any ideas on what I need to do?

Thanks
see first post: https://forum.cockos.com/showpost.ph...30&postcount=1
mpl 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 01:05 PM.


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