Old 05-13-2019, 12:37 PM   #1
Neutronic
Human being with feelings
 
Neutronic's Avatar
 
Join Date: Sep 2013
Posts: 657
Default MIDI plug and play (v1.0 - May 13 2019)

The "MIDI plug and play" script adds automatic MIDI controller initialization to REAPER.

It means when you plug a controller while REAPER is already running you will not have to manually reset your MIDI devices anymore to use the said controller.

It comes in handy in every situation where your peripherals are not connected to your computer all the time.

How to use it
This is a background (super light-weight) script and you have two options:
1. Add it to either your global startup action (SWS) or __startup.lua (SWS independent). This way the script will run automatically every time you open REAPER.
2. Run it manually whenever you need it.

Once it is run, it may seem as if nothing happened but the script is listening now.



There is also a notification feature in the script - you will get a hint in the help corner when and which controller gets connected / disconnected.



I have been using it for more than a year now and hope you will enjoy it as well!

The script is free, but donations are appreciated.

Direct download link (Right-click --> Save As...)

My repository index for ReaPack:
https://github.com/Neutronic/ReaScripts/raw/master/index.xml

Last edited by Neutronic; 07-20-2019 at 06:06 PM.
Neutronic is offline   Reply With Quote
Old 05-14-2019, 01:10 AM   #2
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,902
Default

Intersting way to solve this !


This kind of feature should really be native IMHO.
X-Raym is offline   Reply With Quote
Old 05-14-2019, 07:16 AM   #3
Neutronic
Human being with feelings
 
Neutronic's Avatar
 
Join Date: Sep 2013
Posts: 657
Default

Thanks!

Yeah, though the second best is still better than nothing. Plus, once a user takes a moment to set the script run automatically - it will feel just like a native feature would. I've been using the script for more than a year and can't imagine REAPER any other way now.
Neutronic is offline   Reply With Quote
Old 05-14-2019, 10:09 AM   #4
TonE
Human being with feelings
 
Join Date: Feb 2009
Location: Reaper HAS send control via midi !!!
Posts: 4,032
Default

Thanks for sharing this, you seem to develop only genius universal solutions. Great.
TonE is offline   Reply With Quote
Old 05-14-2019, 11:45 AM   #5
Neutronic
Human being with feelings
 
Neutronic's Avatar
 
Join Date: Sep 2013
Posts: 657
Default

Thanks TonE! I'm glad it is useful to you.
Neutronic is offline   Reply With Quote
Old 08-17-2019, 12:16 PM   #6
Neutronic
Human being with feelings
 
Neutronic's Avatar
 
Join Date: Sep 2013
Posts: 657
Default

A little PSA for Mac users: thanks to the automatically rescan MIDI hardware on device change notifications fix in REAPER v5.982, the script now properly operates on macOS.

Neutronic is offline   Reply With Quote
Old 05-11-2021, 07:26 AM   #7
deseipel
Human being with feelings
 
Join Date: Jul 2020
Posts: 56
Default

Quote:
Originally Posted by Neutronic View Post
The "MIDI plug and play" script adds automatic MIDI controller initialization to REAPER.

It means when you plug a controller while REAPER is already running you will not have to manually reset your MIDI devices anymore to use the said controller.

It comes in handy in every situation where your peripherals are not connected to your computer all the time.

How to use it
This is a background (super light-weight) script and you have two options:
1. Add it to either your global startup action (SWS) or __startup.lua (SWS independent). This way the script will run automatically every time you open REAPER.
2. Run it manually whenever you need it.

Once it is run, it may seem as if nothing happened but the script is listening now.



There is also a notification feature in the script - you will get a hint in the help corner when and which controller gets connected / disconnected.



I have been using it for more than a year now and hope you will enjoy it as well!

The script is free, but donations are appreciated.

Direct download link (Right-click --> Save As...)

My repository index for ReaPack:
https://github.com/Neutronic/ReaScripts/raw/master/index.xml
update: I had to put it in the correct scripts folder, in my case 'C:\Users\User\AppData\Roaming\REAPER\Scripts'
I've put this in my Scripts folder and renamed it "__startup.lua" but how do I verify its working? it didn't do anything when I shut off one of my midi controllers.

Last edited by deseipel; 05-11-2021 at 07:36 AM.
deseipel is offline   Reply With Quote
Old 05-11-2021, 04:01 PM   #8
Neutronic
Human being with feelings
 
Neutronic's Avatar
 
Join Date: Sep 2013
Posts: 657
Default

Quote:
Originally Posted by deseipel View Post
update: I had to put it in the correct scripts folder, in my case 'C:\Users\User\AppData\Roaming\REAPER\Scripts'
I've put this in my Scripts folder and renamed it "__startup.lua" but how do I verify its working? it didn't do anything when I shut off one of my midi controllers.
hmm I'm not sure if I got you right, but it sounds like you renamed neutronic_MIDI plug and play.lua to __startup.lua and then put the file in the REAPER Scripts folder. If so, then it's not how it should be installed and that's why it doesn't work.

Here's a step-by-step setup guide:

1. Install the plug and play script by either
  1. (recommended) importing my repository into ReaPack, searching for the script there and installing it. This way the script will automatically appear in the Actions list.
  2. download the script through the direct link in my original post, put it in your REAPER Scripts folder and add it to the REAPER Actions list (New Action --> Load ReaScript...)

After you successfully did any of the above and you can find Script: neutronic_MIDI plug and play.lua among REAPER actions, go ahead and run it to see how it works.

You can check if it's running by expanding the Actions file menu entry and see if it's there:



If it is, you can now plug your MIDI controllers and they should be automatically initialized.

2. If you wish the script to run automatically every time you open REAPER you can either
  1. use the SWS global startup action functionality
  2. create __startup.lua file right in the root of the REAPER Scripts folder and then put in the file an API call that will inform REAPER to run the plug and play script automatically.

Example:
Code:
local plug_play_script_id = reaper.NamedCommandLookup("_RS3b3b25e3431ec478e2b0f38af56ad3828a8730f5")
reaper.Main_OnCommand(plug_play_script_id, 0)
If you installed the plug and play script through ReaPack, the above code should work as is, otherwise you might need to replace _RS3b3b25e3431ec478e2b0f38af56ad3828a8730f5 (keep the quotes) with the relevant command ID that you can retrieve by right-clicking the script name in the Action list and selecting the "Copy selected action command ID" option.

Neutronic 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:36 PM.


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