Old 02-23-2017, 05:59 AM   #1
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 3,956
Default MPL scripts thread

Hi.
Feel free to discuss here any script I wrote.
All scripts are easily downloadable with awesome ReaPack manager extension. For any special needs you can take a look at source code.

There are a lot of stuff so here is very short overview of some:
  • Align takes - Aligning takes based on their level energy matching
  • Import Session Data - port of ProTools and StudioOne feature, parse RPP and allow to import some data without actual opening source project
  • InstrumentRack allow to quick access all instruments in current project
  • InteractiveToolbar an script displaing some information about different objects, also allow to edit them quickly without walking through menus and windows.
  • Isomorphic keyboard - special virtual keyboard for REAPER, support custom layouts/scales and microtones
  • LearnEditor - quick overview current parameter MIDI/OSC mappings and parameter modulation
  • Mapping Panel - advanced macro control beetween plugin parameters in project, support multiple linking, formulas and fixed auto learn macro controls to controller.
  • Peak Follower tools - utilities for creating envelopes based on audio signal
  • Quantize Tool - advanced groove quantisation of item positions, notes, stretch markers or envelope points to each other, also support SWS grooves
  • RS5k manager - handling ReaSamplomatic5000 instances on selected track
  • Sampling tool - dump played MIDI notes from some instrument to a RS5k sampler
  • SendFader - advanced sends control
  • Spectral editing tools - advanced spectral edits manipulation
  • StretchMarkerGuard - algorithm for transient protection peak-based stretch markers
  • Tempo detection - first available algorithm for tempo detection using pure lua + ReaScript API
  • VisualMixer - port of Izotope Neutron Visual Mixer
  • WiredChain - allow to route FX in a modular fashion



Channel for bug reports and feature requests related to scripts I wrote:

'Various_functions not found' error
  • Various_functions is a special ReaPack package contains functions (UI stuff, math, some pre-build elements for faster interaction with REAPER) used by my scripts. This is a must have package if you using my scripts. Unfortunately ReaPack doesn`t allow to install it with a single script, so it requred to be separately installed (if not yet installed);
  • How to install Various_functions package: run ActionList -> ReaPack: Browse packages... -> navigate and install Various_functions package (right click - install) -> click Apply

Last edited by mpl; 10-22-2023 at 06:47 AM.
mpl is offline   Reply With Quote
Old 02-23-2017, 06:51 AM   #2
J Reverb
Human being with feelings
 
Join Date: Jul 2009
Posts: 1,071
Default

Re SendFader .

First of all, great idea centralizing your scripts thread.

Quote:
Originally Posted by mpl View Post
If I understood you right it is because of ReaScript internal update rate (something about 30 times a second + it is reduced by me for some elements to prevent hard CPU usage when redrawing graphics).
Is this something that can be an option for writing envelopes perhaps?
J Reverb is offline   Reply With Quote
Old 02-23-2017, 08:14 AM   #3
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,866
Default

@mpl
Nice to have a thread to promote your main ReaScript achievements !

You are one of the most generous and dedicated scripter out there,
Thank you for all your work... and for sharing !!

Be sure you work DO contribute to make REAPER, and its community, better

I hoep people will find ways to thank you back, you deserve it.

Cheers man !
X-Raym is offline   Reply With Quote
Old 02-23-2017, 10:45 AM   #4
J Reverb
Human being with feelings
 
Join Date: Jul 2009
Posts: 1,071
Default

broken
mpl_SendFader.lua:1421: attempt to index a nil value (field 'send_t')

sorry just got in
J Reverb is offline   Reply With Quote
Old 02-23-2017, 11:20 AM   #5
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 3,956
Default

hmm check for send table...Added an additional check to this line, hopefully fixed the problem.
mpl is offline   Reply With Quote
Old 02-23-2017, 11:59 AM   #6
J Reverb
Human being with feelings
 
Join Date: Jul 2009
Posts: 1,071
Default

yup fixed ! can we go any faster ? much better on writing thank you ..

sorry you said it was fixed to 30 .. devs increase ?
J Reverb is offline   Reply With Quote
Old 02-23-2017, 12:09 PM   #7
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 3,956
Default

It is bad idea. It will increase CPU usage way much, especially for scripts with a lot of buffers, internal calculated graphics etc like mine. I tested in empty project, but I have performance meter always open to see thing go right. So higher update frequency can add potential problems with big projects.
mpl is offline   Reply With Quote
Old 02-23-2017, 12:15 PM   #8
musicbynumbers
Human being with feelings
 
musicbynumbers's Avatar
 
Join Date: Jun 2009
Location: South, UK
Posts: 14,214
Default

Subscribing and your scripts are amazing! thanks
__________________
subproject FRs click here
note: don't search for my pseudonym on the web. The "musicbynumbers" you find is not me or the name I use for my own music.
musicbynumbers is offline   Reply With Quote
Old 02-23-2017, 12:42 PM   #9
J Reverb
Human being with feelings
 
Join Date: Jul 2009
Posts: 1,071
Default

can we do a write mode button maybe ? high resolution just for realtime ? is this possible? i know experimental...
and not stable hehe
J Reverb is offline   Reply With Quote
Old 03-11-2017, 05:09 AM   #10
sonicowl
Human being with feelings
 
sonicowl's Avatar
 
Join Date: Oct 2015
Posts: 739
Default

mpl, FX window is not closing here after inserting FX. I run action, drag fx to track, and FX window remains open.
sonicowl is offline   Reply With Quote
Old 03-11-2017, 05:36 AM   #11
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 3,956
Default

I just updated and hopefully fixed some strange behaviour (happened to me sometimes).
mpl is offline   Reply With Quote
Old 03-11-2017, 06:01 AM   #12
sonicowl
Human being with feelings
 
sonicowl's Avatar
 
Join Date: Oct 2015
Posts: 739
Default

Quote:
Originally Posted by mpl View Post
I just updated and hopefully fixed some strange behaviour (happened to me sometimes).
Yes, works now. But only for drag/drop. Doubleclick on FX reopens FX Browser and keeps it open for every next doubleclick on FX, until last FX is dragged - then it closes. Is that intended behavior?
sonicowl is offline   Reply With Quote
Old 03-11-2017, 06:13 AM   #13
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 3,956
Default

Very strange. If put closing FX browser into exit function it opens FX browser again (wtf?). I placed FX browser closing before exit function, tested and seems fine both for dc and dragndrop.
mpl is offline   Reply With Quote
Old 03-13-2017, 05:58 PM   #14
Arthur McArthur
Human being with feelings
 
Arthur McArthur's Avatar
 
Join Date: Sep 2016
Location: Toronto
Posts: 744
Default

Hey mpl,

I'm using "delete bypassed and offline fx from selected tracks" and it's leaving the fx alone but deleting the items on the track
Arthur McArthur is offline   Reply With Quote
Old 03-13-2017, 08:12 PM   #15
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 3,956
Default

Can you attach simple project where it happens (before applying script)?
mpl is offline   Reply With Quote
Old 03-14-2017, 12:17 AM   #16
Arthur McArthur
Human being with feelings
 
Arthur McArthur's Avatar
 
Join Date: Sep 2016
Location: Toronto
Posts: 744
Default

Did some further testing and under normal conditions it works fine for me. It turns out the issue comes up when using lb0's "stripper" script. Attached is a project with plugins added by the stripper. Here's a link to the project: https://ufile.io/90ca6
Arthur McArthur is offline   Reply With Quote
Old 06-26-2017, 01:37 PM   #17
Luster
Human being with feelings
 
Luster's Avatar
 
Join Date: Nov 2015
Posts: 642
Default

Impressive scripts you developed! Thanks for the hard work.

If I may make one proposal for those:
mpl_Toggle show tracks if edit cursor crossing any of their items.lua
and
mpl_Toggle show tracks if time selection crossing any of their items.lua

Right now the scripts ignore the hidden state of tracks before running. When you have some backup (archived) or utility (e.g. video) tracks which you don't want to use or see - they get visible with those scripts. Even those without items in it when "backtoggling". I believe I could make a custom action with the me2beats "restore saved track selection" scripts but believe that this functionality is better integrated directly in the script - it feels more complete then IMHO.
What do you think?
Luster is offline   Reply With Quote
Old 06-26-2017, 02:06 PM   #18
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 3,956
Default

This goes impossible since script doesn't know which tracks you hidden for different purposes and which were hidden by this script (it can be remembered, but I don't think it is a good idea for such a simple script). So from script side I can add excluding tracks via manipulating with track name. For example I can prevent script to show/hide tracks, started from "*" symbol in their names.

Last edited by mpl; 06-26-2017 at 08:42 PM.
mpl is offline   Reply With Quote
Old 06-26-2017, 02:45 PM   #19
Luster
Human being with feelings
 
Luster's Avatar
 
Join Date: Nov 2015
Posts: 642
Default

Well, I believe it is possible.

I will try in Cycle action editor then - something like this:
1. Select all tracks (which are visible)
2. Save track selection

3. your script

4. Hide all tracks
5. Recall track selection and make visible

Maybe we misunderstood a little.

Edit: Hmm, still the script would unhide those hidden not necessary tracks. Maybe the simple point is that script should just hide tracks.

Edit2: Got it working somehow with the Cycle Action Editor but still it unhides unnecessary tracks. When looking through all those script code lines I try to understand but no chance. This isn't my territory.

Last edited by Luster; 06-26-2017 at 03:17 PM.
Luster is offline   Reply With Quote
Old 06-28-2017, 01:40 AM   #20
Gianfini
Human being with feelings
 
Join Date: Jan 2015
Posts: 794
Default

Great idea to start this thread about your top scripts... do you have any plan to update/adjust the Quantize tool so that it can use the "snap offset" to align items instead than using only the beginning of the item?

It would be greatly beneficial, because at the moment I cannot use it without this feature

thanks in advance
g
Gianfini is offline   Reply With Quote
Old 07-05-2017, 04:23 AM   #21
mehmethan
Human being with feelings
 
mehmethan's Avatar
 
Join Date: Jun 2011
Posts: 603
Default

Hi Mpl

"Script: mpl_Delete bypassed and offline fx from selected tracks.lua"

This script is working only for bypassed fx here. Nothing happens for offline fx.
mehmethan is offline   Reply With Quote
Old 07-05-2017, 03:00 PM   #22
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 3,956
Default

I recoded "delete bypass/offline fx" completely, should works safe and faster now (used direct SWS APIs).
mpl is offline   Reply With Quote
Old 07-05-2017, 06:01 PM   #23
mehmethan
Human being with feelings
 
mehmethan's Avatar
 
Join Date: Jun 2011
Posts: 603
Default

..._Delete bypassed and offline fx from selected tracks.lua:24: attempt to call a nil value (global 'msg')


I'm having this error now.

Reaper 5.50 x64 SWS 2.9.4 win 10 - 64 bit


note : I have 8 fx on the selected channel. first fx is active, the othe 7 are offline
mehmethan is offline   Reply With Quote
Old 07-05-2017, 08:20 PM   #24
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 3,956
Default

It is version issue, I fixed it yesterday, but seems Github didn't refreshed yet (the code on Github is right). The final version is 1.12, I think it will go away after next update.

Last edited by mpl; 07-07-2017 at 11:11 AM.
mpl is offline   Reply With Quote
Old 07-06-2017, 11:45 AM   #25
Don Solaris
Human being with feelings
 
Don Solaris's Avatar
 
Join Date: Apr 2017
Posts: 12
Default

Mihail, any chance of adding / modifying the 'List next sample in directory for RS5k' script for the OSX Mavericks?

I have this project with hundreds and hundreds of drums, and as you probably know, RS5k on OSX doesn't let you move cursor keys for the previous / next sample. Instead you have to use mouse and click manually which for near thousand samples would mean clicking it thousand times. Yikes!

I was happy to see your script and thought i found the solution to the problem. But for some unfortunate reason, the script doesn't move to the next sample. I have the latest Reaper 5.40 64bit running on OSX Mavericks. I have Reapack up and running. No issues there.

Hey, I'd be glad to toss in some cash for the beers if you can make that script work on Mavericks (FTW!). Cheers!!!
Don Solaris is offline   Reply With Quote
Old 07-07-2017, 11:35 AM   #26
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 3,956
Default

Don Solaris,
didn`t heard about any issues with this script (it almost doesnt touch any possible win/osx differences, I`m on windows) and about mentioned issues with listing samples in RS5K.

Maybe I didn`t named it properly (as usual, unfortunately my English is still bad). "List next/previous sample in directory for RS5k" was designed to list samples for RS5k instance on selected track (like you play and hear arrange and list samples without actual opening track FX chain and selecting RS5k instance). In case you want to replace native function seems you need different script. You can test this piece of code below. If it works for you, I can make version for ReaPack for assigning with shortcut or mousewheel (but bug report to Justin or Schwa of course better).


(test_List next sample for focused RS5k)
Code:
  function main()
    local ret, tracknumberOut, _, fxnumberOut = reaper.GetFocusedFX()
    local track = reaper.CSurf_TrackFromID( tracknumberOut, false )
    if not track then return end
    ret, fn = reaper.TrackFX_GetNamedConfigParm(track, fxnumberOut, "FILE0")
    if not ret then return end
    fn = fn:gsub('\\', '/')
    
    path = fn:reverse():match('[%/]+.*'):reverse():sub(0,-2)
    cur_file =     fn:reverse():match('.-[%/]'):reverse():sub(2)
    -- get files list
      local files = {}
      local i = 0
      repeat
      local file = reaper.EnumerateFiles( path, i )
      if file then
        files[#files+1] = file
      end
      i = i+1
      until file == nil
      
    -- search file list
      local trig_file
      if #files < 2 then return end
      for i = 2, #files do
        if files[i-1] == cur_file then trig_file = path..'/'..files[i] break end
      end
      
      if trig_file then 
        reaper.TrackFX_SetNamedConfigParm(track, fxnumberOut, "FILE0", trig_file)
        reaper.TrackFX_SetNamedConfigParm(track, fxnumberOut, "DONE", "")
      end
  end


  reaper.Undo_BeginBlock()
  main(track)
  reaper.Undo_EndBlock('test_Next focused RS5k smpl', 1)

Last edited by mpl; 08-01-2017 at 11:25 PM.
mpl is offline   Reply With Quote
Old 07-09-2017, 01:24 AM   #27
Don Solaris
Human being with feelings
 
Don Solaris's Avatar
 
Join Date: Apr 2017
Posts: 12
Default

That works perfectly!

And i've sent you 30 notes for some beers.

Can you just tell me which line to modify to have 'list previous sample' option as well? So that i can add that to the other script.

Cheers!
Don Solaris is offline   Reply With Quote
Old 07-09-2017, 02:21 AM   #28
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 3,956
Default

Big thanks for donation!

Check ReaPack for:
- mpl_List next sample in directory for focused RS5k
- mpl_List previous sample in directory for focused RS5k
- mpl_List samples in directory for focused RS5k (MIDI, OSC, Mousewheel)

These scripts are also use wrapping indexes (so they getting last sample in directory if you trigger 'list previous sample' for the first sample in directory). The only thing is for some reason script for mousewheel binding works only if you have opened RS5k but common focus on arrange. MIDI/OSC binding works ok for me:


Last edited by mpl; 07-09-2017 at 02:54 AM.
mpl is offline   Reply With Quote
Old 07-09-2017, 04:23 AM   #29
EvilDragon
Human being with feelings
 
EvilDragon's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 24,785
Default

Don, finally awesome workflow for you. Enjoy!
EvilDragon is offline   Reply With Quote
Old 07-09-2017, 07:52 AM   #30
Don Solaris
Human being with feelings
 
Don Solaris's Avatar
 
Join Date: Apr 2017
Posts: 12
Default

Yes! And for all the others who have suffered with RS5k on OSX.

RS5k is an excellent sampler, particularly for drums - due to simplicity and fast workflow!

And thanks to Mihail!
Don Solaris is offline   Reply With Quote
Old 07-09-2017, 09:02 AM   #31
Gavinchan
Human being with feelings
 
Join Date: Mar 2013
Posts: 70
Default mpl_Select tracks with SWS Notes problem.

Hi, big fan of your work!

I'm having trouble with the "mpl_Select tracks with SWS Notes" script available in the ReaPack repository. It doesn't seem to work at all.

The trouble appears to be in actually finding and matching the track_guid string in the project file.

I've done some crude debugging with my very limited lua coding knowledge and it seems that it only works if you limit the track_guid to the first 11 characters of the string, then it finds it and selects the correct tracks. I can't for the life of me figure out why it isn't comparing strings correctly. Any help?
Gavinchan is offline   Reply With Quote
Old 07-10-2017, 06:55 AM   #32
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 3,956
Default

fixed in Github, reapack index comes later today. String matching pattern issue (or I guess, catching '-' sigh in track GUID as magic character)

Last edited by mpl; 07-29-2017 at 06:48 PM.
mpl is offline   Reply With Quote
Old 07-30-2017, 03:59 AM   #33
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 3,956
Default

Added Parameter Modulation Viewer (instead of obsolete Store source for further modulation from last touched parameter and Create modulation link on same track from stored buffer). This allow to quick overview paramter modulation inside selected track.



Also added light MacroControl panel (works for regular FX parameters, track volume, track pan, track width and send volume).

mpl is offline   Reply With Quote
Old 07-30-2017, 09:54 AM   #34
deeb
Human being with feelings
 
deeb's Avatar
 
Join Date: Feb 2017
Posts: 4,812
Default

Quote:
Originally Posted by mpl View Post



Also added light MacroControl panel (works for regular FX parameters, track volume, track pan, track width and send volume).


very nice! I did't try it, by what it seems i can see two versions of this: a per track based and a global one. This seems global, per track is like cubase does with quick controls, same 8 knobs holding different parameters per and from the selected track. Sorry if i am saying non sense , i still didn't try , i am excited and i am at 0.01% on reaper knowledge!
deeb is offline   Reply With Quote
Old 08-01-2017, 05:09 AM   #35
Ivannn Bennnettt
Human being with feelings
 
Join Date: Feb 2017
Posts: 305
Default

Thank you that you still do this stuff

Quote:
Originally Posted by mpl View Post
Added Parameter Modulation Viewer (instead of obsolete Store source for further modulation from last touched parameter and Create modulation link on same track from stored buffer). This allow to quick overview paramter modulation inside selected track.
What about "List Parameters Modulation Viewer" as for whole project as for selected track and item? (and in advance if it possible to do legacy of colour track/item to one)

Quote:
Also added light MacroControl panel (works for regular FX parameters, track volume, track pan, track width and send volume).
Would be not bad to see param name and value of it under (or above) knob. And I'd found quite handier if "learn" also will work as just touch.

Anyway keep it up!

Last edited by Ivannn Bennnettt; 08-01-2017 at 07:21 AM.
Ivannn Bennnettt is offline   Reply With Quote
Old 08-01-2017, 10:00 PM   #36
Anton9
Human being with feelings
 
Anton9's Avatar
 
Join Date: Jun 2009
Location: Earth
Posts: 1,340
Default

MPL,

Thank you for MPL Modulation Viewer, it ROCKS!
Could you please add what NextLevel suggested in that thread?
1. Un-link last touched parameter.
2. Un-link all parameters of current track.

What would be super cool. Is for the script to list all modulation links for current track with a check box next to each that could be used to just bypass certain links.

Thank you!
Anton9 is offline   Reply With Quote
Old 08-02-2017, 08:56 AM   #37
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 3,956
Default

"Remove PM from last touched parameter" added. Versions for focused FX and selected tracks will come later.
mpl is offline   Reply With Quote
Old 08-02-2017, 10:07 AM   #38
Anton9
Human being with feelings
 
Anton9's Avatar
 
Join Date: Jun 2009
Location: Earth
Posts: 1,340
Default

Awesome! Thank you.
Anton9 is offline   Reply With Quote
Old 08-02-2017, 10:35 AM   #39
Anton9
Human being with feelings
 
Anton9's Avatar
 
Join Date: Jun 2009
Location: Earth
Posts: 1,340
Default

Was hoping that the remove parameter modulation function would be in the MPL Modulation Viewer as a separate button or maybe as right-click on the link button.
Would be nice to have option to not show the delete confirm dialog message.

Thank you
Anton9 is offline   Reply With Quote
Old 08-03-2017, 10:45 AM   #40
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 3,956
Default

Added 'remove PM' for focused fx, selected tracks, removed confirm dialog from last touched fx. Adding to PM viewer seems bad for me to get all stuff up-to-date. Feel free to modify code if you need (buttons, functions, etc).
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 02:53 AM.


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