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
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.
- 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.
- 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.
- 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.
... 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.
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.
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 : )
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*
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!
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).