Old 08-06-2019, 01:01 PM   #1
sramsay
Human being with feelings
 
Join Date: Jan 2015
Posts: 37
Default Play a MIDI note Forever?

Is there some REAPER gadget that will allow me to play one continuous MIDI note? Looping a MIDI note is easy enough, but I don't want a note off. I want it to behave as if I have a key taped down on the controller.

I'm sure this is answered somewhere, but any search term I try ends up leading me to posts either about CCs ("continuous") or about stuck notes and other kinds of MIDI problems.
sramsay is offline   Reply With Quote
Old 08-06-2019, 01:25 PM   #2
lunker
Human being with feelings
 
lunker's Avatar
 
Join Date: Nov 2007
Location: Lucas, TX, USA (via Luleň, Sweden)
Posts: 923
Default

Depending on what you are doing with it, this may or may not suit your needs.

When I have wanted a hands-free infinitely long note without having to create a gigantically long MIDI item, I route MIDI-Ox to Reaper, and manually send a "note on" message from MIDI-Ox. It plays in Reaper until I manually send a "note off" event" from MIDI-Ox (or until I shut down one of the programs).

I'm not sure if it would be efficient for a live performance, but I find it great for tweaking a VSTi preset, since it just plays on and on and I have both hands free to twiddle knobs and such.
__________________
Best Regards, Ernie "lunker" Lundqvist
REAPER (non commercial license)
BDSM (Bad Dog Studio Musicians)
lunker is offline   Reply With Quote
Old 08-06-2019, 02:10 PM   #3
sramsay
Human being with feelings
 
Join Date: Jan 2015
Posts: 37
Default

Well, that pretty much does exactly what I want, but it looks Windows-only and I'm on a Mac.
sramsay is offline   Reply With Quote
Old 08-06-2019, 02:45 PM   #4
lunker
Human being with feelings
 
lunker's Avatar
 
Join Date: Nov 2007
Location: Lucas, TX, USA (via Luleň, Sweden)
Posts: 923
Default

Bummer ... hopefully a Mac user can point you to something similar to MIDI-Ox.
__________________
Best Regards, Ernie "lunker" Lundqvist
REAPER (non commercial license)
BDSM (Bad Dog Studio Musicians)
lunker is offline   Reply With Quote
Old 08-06-2019, 08:37 PM   #5
preferred.nomenclature
Human being with feelings
 
Join Date: Dec 2014
Posts: 352
Default

I see these potentially useful JSFX which I'm fairly certain came with Reaper:
  1. Holds a chord until the next chord is pressed
  2. Latched keys hold until next keypress
preferred.nomenclature is offline   Reply With Quote
Old 08-07-2019, 04:44 AM   #6
mccrabney
Human being with feelings
 
mccrabney's Avatar
 
Join Date: Aug 2015
Location: Bamboozle, North Carolina
Posts: 1,924
Default

you'll have to somehow filter out all of the cc120/123 that REAPER sends to all midi outs on stop/pause/cursor position change.

I find bidule to be excellent (essential) partner software for REAPER, for those of us who go further into midiland - especially if you're not a very good programmer (I certainly am not)
__________________
░ using REAPER as host/arranger/sequencer to write instrumental beat music.
░ striving for a loop-based, controller-centric midi recording/editing workflow.
░ reluctantly switched to using Ableton for live performance and actually enjoying it
mccrabney is offline   Reply With Quote
Old 08-07-2019, 01:16 PM   #7
hopi
Human being with feelings
 
hopi's Avatar
 
Join Date: Oct 2008
Location: Right Hear
Posts: 14,926
Default

how long is forever?

simple idea:

make a one bar item with the note you want

drag it out to the length of the project
use glue to make it an item as long as the project
open it in MIDI ED., select all, use action join notes

you'll get on note the full lenght
__________________
...should be fixed for the next build... http://tinyurl.com/cr7o7yl
https://soundcloud.com/hopikiva/angel-rain
hopi is offline   Reply With Quote
Old 08-07-2019, 01:44 PM   #8
Philbo King
Human being with feelings
 
Philbo King's Avatar
 
Join Date: May 2017
Posts: 1,543
Default

Put a brick on the sustain pedal. Won't be forever, but it'll go till you stop paying your electrcity bill...
__________________
Tangent Studio - Philbo King
www.soundclick.com/philboking - stream music
www.facebook.com/philboking - gigs and news
Philbo King is offline   Reply With Quote
Old 08-09-2019, 08:42 AM   #9
Xasman
Human being with feelings
 
Xasman's Avatar
 
Join Date: Jun 2009
Posts: 259
Default

It sounds like what you need is a JSPlugin called "MIDI Note Hold" (which is the virtual equivalent of putting a brick on the sustain pedal ). Run a search in the FX browser (AFAIK it's installed with REAPER by default).

OR... (even easier) you could use this ludicrously simple JS plugin I just wrote for you (copy & paste into a text file, then save as MIDI Virtual Sustain Pedal without any text extension into your REAPER>effects folder:

Code:
 This version was flawed. See post 21 instead for a correctly working solution.

Last edited by Xasman; 08-27-2019 at 12:47 PM. Reason: This version was flawed. See post 21 instead
Xasman is offline   Reply With Quote
Old 08-11-2019, 04:29 PM   #10
Xasman
Human being with feelings
 
Xasman's Avatar
 
Join Date: Jun 2009
Posts: 259
Default

Here's a slightly improved version (this one allows a choice of MIDI output channel):

Code:
See post #21

Last edited by Xasman; 08-27-2019 at 12:48 PM.
Xasman is offline   Reply With Quote
Old 08-12-2019, 07:06 AM   #11
sramsay
Human being with feelings
 
Join Date: Jan 2015
Posts: 37
Default

Quote:
Originally Posted by Xasman View Post
Here's a slightly improved version (this one allows a choice of MIDI output channel):
Dying to try this! Will report back.

Steve
sramsay is offline   Reply With Quote
Old 08-13-2019, 12:36 AM   #12
talustalus
Human being with feelings
 
Join Date: Dec 2018
Posts: 343
Default

Quote:
Originally Posted by Xasman View Post
Here's a slightly improved version (this one allows a choice of MIDI output channel):

Code:
desc:MIDI Virtual Sustain Pedal
//tags: MIDI processing routing

slider1:0<0,1,1{Off,On}>Sustain
slider2:0<0,15,1{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16}>MIDI channel

in_pin:none
out_pin:none

@init
cc = $xB0;

@slider
sustain = slider1*127;
channel = slider2;

@block
    midisend(0,cc+channel,64,sustain);

Hi , thank you for this, I will also find a use for it.

Just how do we get it into Reaper's FX browser list?

Or should it be added as a script - which Reaper won't allow me to do.

Thx
talustalus is offline   Reply With Quote
Old 08-13-2019, 09:47 AM   #13
Xasman
Human being with feelings
 
Xasman's Avatar
 
Join Date: Jun 2009
Posts: 259
Default

Quote:
Originally Posted by talustalus View Post
Hi , thank you for this
You're welcome

Quote:
Originally Posted by talustalus View Post
Just how do we get it into Reaper's FX browser list?
It's a JS (Jesusonic) plugin, not a script, so;

1. Copy and paste the code above into a simple text editor. Leave it open for now.
2. With REAPER running, go to Options->Show REAPER resource path in Explorer/Finder.
3. In the window that opens, open the Effects folder.
4. Go back to the text editor and Save as "MIDI Virtual Sustain Pedal" into the Effects folder. Make sure you save it without any file extension.
5. Close both the text editor and the REAPER resource path window.
6. In REAPER, open the FX window and hit F5 to rescan for new plugins.
7. Now you should be able to see the new plugin "under JS plugins"
8. Double-click or drag and drop the effect to the track or item (or input fx).
9. Sustain away!
Xasman is offline   Reply With Quote
Old 08-13-2019, 11:38 AM   #14
Rednroll
Human being with feelings
 
Join Date: Jan 2006
Posts: 1,225
Default

I'm unfamiliar with Reaper's midi capabilities but have done this with other programs which included a midi list editor, where you just needed to delete the midi release and note stop events which then becomes the equivalent of pressing a key on a keyboard and holding it down forever.
Rednroll is offline   Reply With Quote
Old 08-13-2019, 12:19 PM   #15
Xasman
Human being with feelings
 
Xasman's Avatar
 
Join Date: Jun 2009
Posts: 259
Default

Quote:
Originally Posted by Rednroll View Post
I'm unfamiliar with Reaper's midi capabilities but have done this with other programs which included a midi list editor, where you just needed to delete the midi release and note stop events which then becomes the equivalent of pressing a key on a keyboard and holding it down forever.
Not sure what you mean by "MIDI release" events, but you certainly don't need (or want) to remove MIDI note off events to do this (it would lead to hanging-note hell!). When you release a sustain pedal, all the notes stop immediately. What you describe is possible, but sounds like a horrible load of faffing about just in order to do something that should be quick and easy. Also, doing what you describe means you'd need to have already recorded the note (or notes) you want to sustain. The advantages of using a plug-in instead (which controls cc64) is that:

1. It can work in real time (i.e. you don't need to record anything first)
2. Any sustained notes will stop playing when the pedal is released (or turned OFF in the plugin).
3. It can work at either the track, item or input levels
4. You don't need to balance a brick on a physical sustain pedal or fiddle about in a MIDI editor (though of course you could still record it if you wanted to.
Xasman is offline   Reply With Quote
Old 08-13-2019, 02:26 PM   #16
Rednroll
Human being with feelings
 
Join Date: Jan 2006
Posts: 1,225
Default

Quote:
Originally Posted by Xasman View Post
Not sure what you mean by "MIDI release" events, but you certainly don't need (or want) to remove MIDI note off events to do this (it would lead to hanging-note hell!). When you release a sustain pedal, all the notes stop immediately. What you describe is possible, but sounds like a horrible load of faffing about just in order to do something that should be quick and easy. Also, doing what you describe means you'd need to have already recorded the note (or notes) you want to sustain. The advantages of using a plug-in instead (which controls cc64) is that:

1. It can work in real time (i.e. you don't need to record anything first)
2. Any sustained notes will stop playing when the pedal is released (or turned OFF in the plugin).
3. It can work at either the track, item or input levels
4. You don't need to balance a brick on a physical sustain pedal or fiddle about in a MIDI editor (though of course you could still record it if you wanted to.
A midi release event is the message which contains the information of how quickly you released the key that was originally pressed on the keyboard. It's similar to how hard you pressed a key(ie velocity/attack) but in the opposite direction. The midi off message turns the note off. Just because you don't seem to understand what I described doesn't make it faffling or difficult. It's actually very easy and much easier than what you described and doesn't require additional plugins. I've done it in many midi sequencers which contained a midi list editor. Now if Reaper contains a midi list editor or not, that's another conversation. I see one was suggested quite awhile back and for those of us who have used a midi list editor which allows you to edit a notes parameter values and recorded performance messages, it's quite simple to do what I described. I was able to do this in midi sequencers going back to the 1990's pretty easily including Akai MPC drum machines where there was no such thing as a JSPlugin. It would function exactly the same as if you had dragged the note duration out forever....the same as putting your finger on a keyboard key and leaving it there forever. Exactly what the OP described and was requesting.

https://forums.cockos.com/showthread.php?t=9590

Last edited by Rednroll; 08-13-2019 at 02:41 PM.
Rednroll is offline   Reply With Quote
Old 08-13-2019, 02:51 PM   #17
Xasman
Human being with feelings
 
Xasman's Avatar
 
Join Date: Jun 2009
Posts: 259
Default

Quote:
Originally Posted by Rednroll View Post
Just because you don't seem to understand what I described doesn't make it faffling or difficult.
I understand perfectly well what you proposed but sorry, I still disagree. Bear in mind that the OP (sramsay) specifically (and understandably) stated that he did not want solutions involving note-off messages. I'm really not trying to be argumentative about this, but please ask yourself exactly how your method is more efficient or useful to the OP's needs than a simple plugin which acts as a sustain pedal toggle switch.
Xasman is offline   Reply With Quote
Old 08-13-2019, 06:22 PM   #18
Rednroll
Human being with feelings
 
Join Date: Jan 2006
Posts: 1,225
Default

Quote:
Originally Posted by Xasman View Post
I understand perfectly well what you proposed but sorry, I still disagree. Bear in mind that the OP (sramsay) specifically (and understandably) stated that he did not want solutions involving note-off messages. I'm really not trying to be argumentative about this, but please ask yourself exactly how your method is more efficient or useful to the OP's needs than a simple plugin which acts as a sustain pedal toggle switch.
I didn't realize this was a competition for you. I always thought user forums were meant for discussing and providing multiple solutions to the same problem and the person asking the question could weigh each option out and make an informed decision of which solution worked best for their purposes.

If it helps your obviously fragile ego any. YOU WIN!
Rednroll is offline   Reply With Quote
Old 08-13-2019, 09:32 PM   #19
talustalus
Human being with feelings
 
Join Date: Dec 2018
Posts: 343
Default

Quote:
Originally Posted by Xasman View Post
You're welcome



It's a JS (Jesusonic) plugin, not a script, so;

1. Copy and paste the code above into a simple text editor. Leave it open for now.
2. With REAPER running, go to Options->Show REAPER resource path in Explorer/Finder.
3. In the window that opens, open the Effects folder.
4. Go back to the text editor and Save as "MIDI Virtual Sustain Pedal" into the Effects folder. Make sure you save it without any file extension.
5. Close both the text editor and the REAPER resource path window.
6. In REAPER, open the FX window and hit F5 to rescan for new plugins.
7. Now you should be able to see the new plugin "under JS plugins"
8. Double-click or drag and drop the effect to the track or item (or input fx).
9. Sustain away!
Awesome. Thanks!
talustalus is offline   Reply With Quote
Old 08-13-2019, 11:07 PM   #20
Xasman
Human being with feelings
 
Xasman's Avatar
 
Join Date: Jun 2009
Posts: 259
Default

Quote:
Originally Posted by talustalus View Post
Awesome. Thanks!
My pleasure - hope you find it useful.
Xasman is offline   Reply With Quote
Old 08-23-2019, 02:13 PM   #21
Xasman
Human being with feelings
 
Xasman's Avatar
 
Join Date: Jun 2009
Posts: 259
Default

Here's a revised version (the previous version spat out continuous sustain pedal messages - not ideal!). This one only sends a sustain pedal message each time the pedal status changes (or if the MIDI channel slider is moved):

Code:
// MIDI Virtual Sustain Pedal
// Version: 1.1

// Author: Xasman 2019
// Copyright 2019
// Adapted from code by Dark Star and Ernie 'lunker' Lundqvist:
// DS_Auto_CC => http://forum.cockos.com/showthread.php?t=109379
// PB Automation => https://forum.cockos.com/showthread.php?t=114977
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License (http://www.gnu.org/licenses/)for more details.
desc:MIDI Virtual Sustain Pedal
//tags: MIDI processing routing

in_pin:none
out_pin:none

slider1:1<1,16,1>MIDI channel
slider2:0<0,1,1{Off,On}>Sustain

@init
    
    ccCmd = $xB0;  //Set to Continuous Controller ($xB0)
    ccNum =   64;  //Set to MIDI Hold (sustain)
    ccChn =    1;  //Default MIDI channel
    ccVal =    0;  //Default Sustain position (off)

    NO  = 0;
    YES = 1;

@slider
    
    ccChn != slider1      ? susMsg = YES; //send if slider 1 changes and 
                                          //set MIDI output channel
    ccChn  = slider1;
    
    ccVal != slider2*127  ? susMsg = YES; //send if slider 2 changes and
                                          //set CC parameter2 (Off/On only: 0 = Off, 127 = On)
    ccVal  = slider2*127;

@block
    
    susMsg == YES ? (
        midirecv(offset,msg1,msg2,msg3);
        susMsg = NO;
        msg1   = ccCmd | ccChn -1;
        msg2   = ccNum;
        msg3   = ccVal;
        midisend(offset,msg1,msg2,msg3);
    );
With thanks to Dark Star and lunker, whose code I adapted to produce this version.

Last edited by Xasman; 08-25-2019 at 12:24 PM.
Xasman is offline   Reply With Quote
Old 08-23-2019, 04:40 PM   #22
lunker
Human being with feelings
 
lunker's Avatar
 
Join Date: Nov 2007
Location: Lucas, TX, USA (via Luleň, Sweden)
Posts: 923
Default

Nice update! I will use this.

Was surprised to see kudos aimed in my direction. Everything I know about JSFX and Lua I learned on this forum from people like DarkStar and others.
__________________
Best Regards, Ernie "lunker" Lundqvist
REAPER (non commercial license)
BDSM (Bad Dog Studio Musicians)
lunker is offline   Reply With Quote
Old 08-24-2019, 12:30 PM   #23
Xasman
Human being with feelings
 
Xasman's Avatar
 
Join Date: Jun 2009
Posts: 259
Default

Quote:
Originally Posted by lunker View Post
Nice update! I will use this.

Was surprised to see kudos aimed in my direction. Everything I know about JSFX and Lua I learned on this forum from people like DarkStar and others.
Thanks. Well, in any case the kudos is well deserved, especially as your PB Automation plugin was actually the first thing I came across that inspired this version.

I feel genuinely honoured that you want to use it.
Xasman is offline   Reply With Quote
Old 08-27-2019, 10:26 AM   #24
sramsay
Human being with feelings
 
Join Date: Jan 2015
Posts: 37
Default

Well that was quite rude of me! I posted a question, several people offered solutions, I said I'd give it a go, and fell into complete silence.

I want to thank everyone who contributed to this thread (especially Xasman!). This is exactly what I needed (and now you're all inspiring me to dig into JSFX).

Thanks again!
sramsay is offline   Reply With Quote
Old 08-27-2019, 12:52 PM   #25
Xasman
Human being with feelings
 
Xasman's Avatar
 
Join Date: Jun 2009
Posts: 259
Default

Quote:
Originally Posted by sramsay View Post
Well that was quite rude of me! I posted a question, several people offered solutions, I said I'd give it a go, and fell into complete silence.

I want to thank everyone who contributed to this thread (especially Xasman!). This is exactly what I needed (and now you're all inspiring me to dig into JSFX).

Thanks again!
No worries at all - most of us have busy lives to lead so it's totally cool. I'm just very glad that you found my humble efforts here useful.
Xasman is offline   Reply With Quote
Old 08-27-2019, 01:54 PM   #26
ReaperMadness
Human being with feelings
 
ReaperMadness's Avatar
 
Join Date: Aug 2011
Location: Great Lakes, N. A.
Posts: 1,792
Default

Quote:
Originally Posted by sramsay View Post
Well that was quite rude of me! I posted a question, several people offered solutions, I said I'd give it a go, and fell into complete silence.

I want to thank everyone who contributed to this thread (especially Xasman!). This is exactly what I needed (and now you're all inspiring me to dig into JSFX).

Thanks again!
It took you, like... 4-EV-rrrrrrrrrrr.

__________________
= Private Winter =
ReaperMadness 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 AM.


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