02-10-2018, 03:02 PM | #81 | |
Human being with feelings
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,688
|
Quote:
I never understood the "input track" stuff in LiveConfigs. Hence I never used it (and failed to describe it in the User Guide). Now finally I can update that part of the Guide. Thanks a lot !! (Even though to me, this "input track" feature seems like another shortcut that just adds confusion - similar to the "control channel" checkbox in the midi device setup (for complex projects) ) . But as you see with my setup, "input track" is not necessary. So - as far as I understand your desired "instrument" - just kill the "input track" (and the "mute/unmute track") options in LiveConfigs and do all the switching via the "Midi Volume" plus "Slider To CC0" JSFXes, doing the routing from your audio input track to your FX chain tracks statically be Reaper means. -Michael Last edited by mschnell; 02-10-2018 at 03:22 PM. |
|
02-10-2018, 06:18 PM | #82 |
Mortal
Join Date: Jan 2006
Location: Wickenburg, Arizona
Posts: 14,047
|
oooh, I'm starting to get it now
I need to optimize to get rid of some crashes and glitches, so that I can use volume instead of muting...maybe I can figure a way to mute the track after the volume switch is done |
02-11-2018, 12:10 AM | #83 | |
Human being with feelings
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,688
|
Quote:
Supposedly it would need same "manual" work. E.g. - create a JSFX that on a midi messages creates another Midi message after some delay - route that message to the Reaper Control Path - fetch that message (e.g.) by an action that does the muting. I also could add a feature to "Midi Volume" to send a Midi message when the volume has gone to zero. -Michael |
|
02-11-2018, 01:56 AM | #84 |
Mortal
Join Date: Jan 2006
Location: Wickenburg, Arizona
Posts: 14,047
|
oh man that would be something. I guess I should draw out what would be ideal in my guess. Really struggling with what's possible, vs what is reliable to not have dropouts, but ideally, things would fade in pretty fast, but slow enough to ditch the glitch, but patches with tails would fade out for a few seconds, but with their inputs muted.....grrr...I need to think this thru
Or maybe its all on the inputs, which since i don't think we could directly control the send and receive fade, would mean one more set of routing tracks, one more set of glitches.....its all so confusing! |
02-11-2018, 02:32 AM | #85 | |
Human being with feelings
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,688
|
Quote:
Please test ! -Michael Code:
desc:Pipe Midi Filter author: Michael Schnell (mschnell@bschnell.de) version: 2.0 changelog: initial release donation: United Nations Foundation http://www.unfoundation.org/ about: ## Description Pipe ## Limitations Pipe // Author: Michael Schnell, based on a work of Time Waster (M. Smith) // License: LGPL - http://www.gnu.org/licenses/lgpl.html // slider1:0<0,15,1{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16}>MIDI Channel slider2:1<0,127,1{0 Bank Sel M,1 Mod Wheel M,2 Breath M,3,4 Foot P M,5 Porta M,6 Data Entry M,7 Vol M,8 Balance M,9,10 Pan M,11 Expression M,12 Ctrl 1 M,13 Ctrl 2 M,14,15,16 GP Slider 1,17 GP Slider 2,18 GP Slider 3,19 GP Slider 4,20,21,22,23,24,25,26,27,28,29,30,31,32 Bank Sel L,33 Mod Wheel L,34 Breath L,35,36 Foot P L,37 Porta L,38 Data Entry L,39 Vol L,40 Balance L,41,42 Pan L,43 Expression L,44 Ctrl 1 L,45 Ctrl 2 L,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64 Hold P sw,65 Porta sw,66 Sustenuto sw,67 Soft P sw,68 Legato P sw,69 Hold 2 P sw,70 S.Variation,71 S.Timbre,72 S.Release,73 S.Attack,74 S.Brightness,75 S.Ctrl 6,76 S.Ctrl 7,77 S.Ctrl 8,78 S.Ctrl 9,79 S.Ctrl 10,80 GP B.1 sw,81 GP B.2 sw,82 GP B.3 sw,83 GP B.4 sw,84,85,86,87,88,89,90,91 Effects Lv,92 Trem Lv,93 Chorus Lv,94 Celeste Lv,95 Phaser Lv,96 Data B. Inc,97 Data B. Dec,98 NRP L,99 NRP M,100 RP L,101 RP M,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127}>CC Input slider3:2<1,127,1{0 Bank Sel M,1 Mod Wheel M,2 Breath M,3,4 Foot P M,5 Porta M,6 Data Entry M,7 Vol M,8 Balance M,9,10 Pan M,11 Expression M,12 Ctrl 1 M,13 Ctrl 2 M,14,15,16 GP Slider 1,17 GP Slider 2,18 GP Slider 3,19 GP Slider 4,20,21,22,23,24,25,26,27,28,29,30,31,32 Bank Sel L,33 Mod Wheel L,34 Breath L,35,36 Foot P L,37 Porta L,38 Data Entry L,39 Vol L,40 Balance L,41,42 Pan L,43 Expression L,44 Ctrl 1 L,45 Ctrl 2 L,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64 Hold P sw,65 Porta sw,66 Sustenuto sw,67 Soft P sw,68 Legato P sw,69 Hold 2 P sw,70 S.Variation,71 S.Timbre,72 S.Release,73 S.Attack,74 S.Brightness,75 S.Ctrl 6,76 S.Ctrl 7,77 S.Ctrl 8,78 S.Ctrl 9,79 S.Ctrl 10,80 GP B.1 sw,81 GP B.2 sw,82 GP B.3 sw,83 GP B.4 sw,84,85,86,87,88,89,90,91 Effects Lv,92 Trem Lv,93 Chorus Lv,94 Celeste Lv,95 Phaser Lv,96 Data B. Inc,97 Data B. Dec,98 NRP L,99 NRP M,100 RP L,101 RP M,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127}>CC Output slider4:10<0,127,1>Threshold slider5:5<0,64,1>Hysteresis slider6:0<0,500,10>dwell time (msek) slider7:0<0,1,1{straight,invert}>Output slider8:0<0,1,1{straight,stretch}>original CC @init out = 0; outo = 0; in = 0; delay = 0; @slider inChannel = slider1; inCC = slider2; outCC = slider3; thh = slider4; thl = thh - slider5; dt = slider6; invert = slider7; enhance = slider8; thl < 1 ? thl = 1; invert ? ( outh = 0; outl = 127; ) : ( outh = 127; outl = 0; ); msg1o = $xB0 + inChannel; @block while (midirecv(offset, msg1, msg2, msg3)) ( status = msg1 & $xF0; // Extract message type channel = msg1 & $x0F; channel == inChannel ? ( // Is it on our channel? status == $xB0 ? ( // Is it a controller event? msg2 == inCC ? ( // Is it the right CC? in = msg3; in > thh ? ( out = outh; ) : msg3 < thl ? ( out = outl; ); out != outo ? ( outo = out; f = srate / samplesblock; // calls per second f = f * dt / 1000; // minimum calls f = 0 | f; delay = f+1; ); enhance ? ( msg3 -= thl; msg3 /= 127-thl; // 0...1) msg3 *= 127; msg3 < 0 ? msg3 = 0; ); ); ); ); midisend(offset, msg1, msg2, msg3); // pass through ); delay ? ( delay -= 1; !delay ? ( outv != outo ? ( outv = outo; midisend(offset, msg1o, outCC, outo); // pass through ); ); ); @gfx 640 400 gfx_r=gfx_g=gfx_b=0; gfx_a=1; gfx_x=gfx_y=0; gfx_rectto(gfx_w,gfx_h); q1 = gfx_w / 128; outv>64 ? ( gfx_r = 1; gfx_g = 1; gfx_b = 0; gfx_x = 0; gfx_y = 0; gfx_rectto(gfx_w, gfx_h/2); ); gfx_r=gfx_g=gfx_b=1; gfx_r = 0; gfx_g = 0; gfx_b = 1; gfx_x = thh*q1; gfx_y = 0; gfx_lineto(gfx_x, gfx_h); gfx_x = thl*q1; gfx_y = 0; gfx_lineto(gfx_x, gfx_h); gfx_r = 1; gfx_g = 0; gfx_b = 0; gfx_y = 0; gfx_x = 1+in*q1; gfx_lineto(gfx_x, gfx_h); Last edited by mschnell; 02-11-2018 at 02:58 AM. |
|
02-11-2018, 03:52 AM | #86 |
Mortal
Join Date: Jan 2006
Location: Wickenburg, Arizona
Posts: 14,047
|
I think, the end scheme of all of this, in order to prevent clicks and pops, allow spillover and still preserve CPU, would be something like this
|
02-11-2018, 04:13 AM | #87 |
Human being with feelings
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,688
|
AFAIU, only muting the track would allow for preserving CPU. Muting the "send" will not do anything on that behalf.
Do you want me to add the "send CC when output is muted" feature to MidiVolume ? No it is not. Now the structure you want is very clear. - Use an "input" track (not in LiveConfigs ! This just is the name) - route same to 8 "worker" tracks - mix those down for your output Each worker track - starts with a "Slider To CC0" and then a "Midi Volume" plugin - after this you place your effects. LiveConfigs pushes appropriate presets onto the appropriate "Slider To CC0" instance when entering and leaving a row to trigger the smooth routing and "spillover". Optionally (not when using spillover) - Midi Volumes sends out a CC when the ouput is completely muted - same is propagated to the control path by MidiToReaControlPath - an Action learned to that CC mutes the tracks (saving CPU) - to unmute such a track LiveConfigs needs to trigger an appropriate action when a row is entered - beware that the CPU saving option stops the track in action. Hence any "spillover" will occur when it is ummuted a long time later ! So this might not be a great idea, at all. -Michael Last edited by mschnell; 02-12-2018 at 12:29 AM. |
02-11-2018, 06:50 AM | #88 | |
Human being with feelings
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,688
|
Quote:
-Michael Code:
desc:Pipe Midi Filter author: Michael Schnell (mschnell@bschnell.de) version: 2.2 changelog: initial release donation: United Nations Foundation http://www.unfoundation.org/ about: ## Description Pipe ## Limitations Pipe // Author: Michael Schnell, based on a work of Time Waster (M. Smith) // License: LGPL - http://www.gnu.org/licenses/lgpl.html // slider1:0<0,15,1{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16}>MIDI Channel slider2:1<0,127,1{0 Bank Sel M,1 Mod Wheel M,2 Breath M,3,4 Foot P M,5 Porta M,6 Data Entry M,7 Vol M,8 Balance M,9,10 Pan M,11 Expression M,12 Ctrl 1 M,13 Ctrl 2 M,14,15,16 GP Slider 1,17 GP Slider 2,18 GP Slider 3,19 GP Slider 4,20,21,22,23,24,25,26,27,28,29,30,31,32 Bank Sel L,33 Mod Wheel L,34 Breath L,35,36 Foot P L,37 Porta L,38 Data Entry L,39 Vol L,40 Balance L,41,42 Pan L,43 Expression L,44 Ctrl 1 L,45 Ctrl 2 L,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64 Hold P sw,65 Porta sw,66 Sustenuto sw,67 Soft P sw,68 Legato P sw,69 Hold 2 P sw,70 S.Variation,71 S.Timbre,72 S.Release,73 S.Attack,74 S.Brightness,75 S.Ctrl 6,76 S.Ctrl 7,77 S.Ctrl 8,78 S.Ctrl 9,79 S.Ctrl 10,80 GP B.1 sw,81 GP B.2 sw,82 GP B.3 sw,83 GP B.4 sw,84,85,86,87,88,89,90,91 Effects Lv,92 Trem Lv,93 Chorus Lv,94 Celeste Lv,95 Phaser Lv,96 Data B. Inc,97 Data B. Dec,98 NRP L,99 NRP M,100 RP L,101 RP M,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127}>CC Input slider3:2<1,127,1{0 Bank Sel M,1 Mod Wheel M,2 Breath M,3,4 Foot P M,5 Porta M,6 Data Entry M,7 Vol M,8 Balance M,9,10 Pan M,11 Expression M,12 Ctrl 1 M,13 Ctrl 2 M,14,15,16 GP Slider 1,17 GP Slider 2,18 GP Slider 3,19 GP Slider 4,20,21,22,23,24,25,26,27,28,29,30,31,32 Bank Sel L,33 Mod Wheel L,34 Breath L,35,36 Foot P L,37 Porta L,38 Data Entry L,39 Vol L,40 Balance L,41,42 Pan L,43 Expression L,44 Ctrl 1 L,45 Ctrl 2 L,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64 Hold P sw,65 Porta sw,66 Sustenuto sw,67 Soft P sw,68 Legato P sw,69 Hold 2 P sw,70 S.Variation,71 S.Timbre,72 S.Release,73 S.Attack,74 S.Brightness,75 S.Ctrl 6,76 S.Ctrl 7,77 S.Ctrl 8,78 S.Ctrl 9,79 S.Ctrl 10,80 GP B.1 sw,81 GP B.2 sw,82 GP B.3 sw,83 GP B.4 sw,84,85,86,87,88,89,90,91 Effects Lv,92 Trem Lv,93 Chorus Lv,94 Celeste Lv,95 Phaser Lv,96 Data B. Inc,97 Data B. Dec,98 NRP L,99 NRP M,100 RP L,101 RP M,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127}>CC Output slider4:10<0,127,1>Threshold slider5:5<0,64,1>Hysteresis slider6:0<0,500,10>dwell time (msek) slider7:0<0,1,1{straight,invert}>Output slider8:0<0,1,1{straight,stretch}>original CC @init out = 0; outo = 0; in = 0; delay = 0; @slider inChannel = slider1; inCC = slider2; outCC = slider3; thh = slider4; thl = thh - slider5; dt = slider6; invert = slider7; enhance = slider8; thl < 1 ? thl = 1; invert ? ( outh = 0; outl = 127; ) : ( outh = 127; outl = 0; ); msg1o = $xB0 + inChannel; @block while (midirecv(offset, msg1, msg2, msg3)) ( status = msg1 & $xF0; // Extract message type channel = msg1 & $x0F; channel == inChannel ? ( // Is it on our channel? status == $xB0 ? ( // Is it a controller event? msg2 == inCC ? ( // Is it the right CC? in = msg3; in > thh ? ( out = outh; ) : msg3 < thl ? ( out = outl; ); out != outo ? ( outo = out; f = srate / samplesblock; // calls per second f = f * dt / 1000; // minimum calls f = 0 | f; delay = f+1; ); enhance ? ( msg3 -= thl; msg3 /= 127-thl; // 0...1) msg3 *= 127; msg3 < 0 ? msg3 = 0; mm = msg3; ); ); ); ); midisend(offset, msg1, msg2, msg3); // pass through ); delay ? ( delay -= 1; !delay ? ( outv != outo ? ( outv = outo; midisend(offset, msg1o, outCC, outo); // pass through ); ); ); @gfx 640 400 gfx_r=gfx_g=gfx_b=0; gfx_a=1; gfx_x=gfx_y=0; gfx_rectto(gfx_w,gfx_h); q1 = gfx_w / 128; outv>64 ? ( gfx_r = 0; gfx_g = 1; gfx_b = 0; gfx_x = 0; gfx_y = 0; gfx_rectto(gfx_w, gfx_h/2); ); gfx_r=gfx_g=gfx_b=1; gfx_r = 0; gfx_g = 0; gfx_b = 1; gfx_x = thh*q1; gfx_y = 0; gfx_lineto(gfx_x, gfx_h); gfx_x = thl*q1; gfx_y = 0; gfx_lineto(gfx_x, gfx_h); gfx_r = 1; gfx_g = 0; gfx_b = 0; gfx_y = 0; gfx_x = 1+in*q1; gfx_lineto(gfx_x, gfx_h); enhance ? ( gfx_r = 1; gfx_g = 1; gfx_b = 1; gfx_y = gfx_h-1; gfx_x = 0; x = thl / 127 * gfx_w; gfx_lineto(x, gfx_y); gfx_lineto(gfx_w, 0); gfx_r = 1; gfx_g = 1; gfx_b = 0; gfx_y = gfx_h - 1 - (mm / 127 * gfx_h); gfx_x = 0; gfx_lineto(gfx_w, gfx_y); ) |
|
02-11-2018, 07:38 PM | #89 |
Mortal
Join Date: Jan 2006
Location: Wickenburg, Arizona
Posts: 14,047
|
[QUOTE=mschnell;1952860
Optionally (not when using spillover) - Midi Volumes sends out a CC when the ouput is completely muted -Michael[/QUOTE] How do I make MIDI Volumes send out that CC after its done turning down the volume? |
02-12-2018, 12:28 AM | #90 | |
Human being with feelings
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,688
|
Quote:
That would be rather easy to do, but (as said) I am not really convinced that the stuff I described above really would work decently. If you you (after everything else works nicely) are convinced and want me to, I'll add that option. Please do check out how this would fit in your setup (i.e. unmute the track that had been muted by means of "Midi Volume" having turned it down) and whether or not this might lead to an acceptable outcome - regarding how your plugins react on freezing them by muting the track they reside in. -Michael Last edited by mschnell; 02-12-2018 at 01:19 AM. |
|
02-12-2018, 03:10 AM | #91 |
Mortal
Join Date: Jan 2006
Location: Wickenburg, Arizona
Posts: 14,047
|
I was pretty sick today, but tried a few times to drive to work because I was so excited to try this. I finally gave up after the third try,b it I will hopefully get it started tomorrow. I was wondering if there were some way to flush the track buffers after a mute.
I did get to try it on a delay and I see what you mean, I would have thought that it would just reflect what would have happened after all that time when you unmetered, but like you said, could be ten minutes later, when you unmetered you get the delays and junk from ten minutes ago The plugins that are giving me the most trouble if all left unamused wouldn’t be the ones on a spillover track, so it might be ok, but maybe there’s another trick |
02-12-2018, 03:26 AM | #92 |
Human being with feelings
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,688
|
Hope you are well soon !!!
AFAIK, the VST spec provides an API to reset a plugin. AFAIK, this is used by Reaper in certain situations. But I don't know if there is a way to send this command to a dedicated VST from any kind of user provided code. You would need to ask in the "developr's" forum if anybody has any knowledge about this. -Michael |
02-12-2018, 06:53 AM | #93 |
Human being with feelings
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,688
|
It seems we are close to be ready to provide a kind of toolbox for a Reaper based versatile and hopefully rather easy to use - Guitar Rick framework:
- some "channels" that can be equipped with arbitrary plugins. The plugins would be able to receive CC messages for realtime modulation of their behavior - means to switch smoothly without dropouts between these channels - a prototype implementation (providing some usable tools) for preprocessing of midi messages from external controllers to be used for channel switching and setting up messages to the plugins. What do you think ? -Michael Last edited by mschnell; 02-12-2018 at 12:39 PM. |
02-12-2018, 01:29 PM | #94 |
Mortal
Join Date: Jan 2006
Location: Wickenburg, Arizona
Posts: 14,047
|
When you are in the reascript editor window from the actions menu, I see a way to save, but is there a way to save as new?
|
02-12-2018, 01:47 PM | #95 |
Mortal
Join Date: Jan 2006
Location: Wickenburg, Arizona
Posts: 14,047
|
How do I change which CC# I want to use in Slider to MIDI CC?
|
02-12-2018, 01:49 PM | #96 | |
Human being with feelings
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,688
|
Quote:
mes2 = 0; // CC # you just replace the zero by the CC # you want to send. -Michael |
|
02-12-2018, 02:19 PM | #97 |
Mortal
Join Date: Jan 2006
Location: Wickenburg, Arizona
Posts: 14,047
|
Awesome!
Ok, I was able to make it where activate action was to send a cc to turn on the channel and deactivate turned it off. No glitches! Kickass I figured it would probably be better to combine it so that one actions sent one channel to 0 while it sent the other channel to 127, but it didnt seem to make the switch any better. Either way, it seems like the ramp up doesnt start till the ramp up was almost all the way down. It would be nice to switch faster, but this is usable as is. Setting it so that both sliders of MIDI Volume control were at max seemed best. I figured also that this would work better at the end of the chain, owing to the nature of distorted guitar sounds, but it still seems better on input. IF and kind of big if, but if the computer could handle all the channels being unmuted, this is the end of story (aside from possibly faster switching). It would be nice to have more action slots but macros certainly work, if not as conveniently It seems to me like the two big killers here are unmuted tracks and routing. The more layers in the routing chains (track 1 sends to track 2 sends to track 3) the higher "RT longest-block" grows, which seems to be the indicator of when problems are going to happen. Also there are tracks with tails and tracks without, tracks without tails seem to be perfectly suited to muting after the volume goes out. Tracks with tails are the problem ones, so they could remain unmuted |
02-12-2018, 03:50 PM | #98 |
Mortal
Join Date: Jan 2006
Location: Wickenburg, Arizona
Posts: 14,047
|
I got an 8 patch setup going now. Noticing the same volume boost during switching as with gig performer, thinking about sticking the volume after the channel on the distorted tracks, lets see
|
02-12-2018, 04:06 PM | #99 |
Mortal
Join Date: Jan 2006
Location: Wickenburg, Arizona
Posts: 14,047
|
Seems weird that putting the Midi Volume after shouldn't work the best, especially with distortion sounds. Its gotta be the timing of when the gain happens. I guess I need to experiment with more fade shapes, but I'm not sure what to modify
Doing manual fades after two distorted tracks works as I would expect it, so I'm not sure if its the shape or timing or what |
02-12-2018, 04:13 PM | #100 |
Mortal
Join Date: Jan 2006
Location: Wickenburg, Arizona
Posts: 14,047
|
So it looks like I have plenty of plugins where the mute will be ok with, some seem to flush, some don't.
That would mean that one action would have to unmute then start fading in and the other direction would have to fade out then mute. I think |
02-12-2018, 04:20 PM | #101 | |
Human being with feelings
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,688
|
Quote:
(Edit: The curve does not matter here, as the input is only either 0 or 127). You also can type in a larger value for the "max step" value, until there might be a popping noise when switching. -Michael Last edited by mschnell; 02-12-2018 at 10:28 PM. |
|
02-12-2018, 04:25 PM | #102 | |
Human being with feelings
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,688
|
Quote:
But how are you going to unmute the appropriate track ? ( I did ask in the developer's forum for a means to send a reset to a VST. ) -Michael |
|
02-12-2018, 04:55 PM | #103 |
Mortal
Join Date: Jan 2006
Location: Wickenburg, Arizona
Posts: 14,047
|
I guess I could send an unmute command before the midi volume command
Select all tracks in track group unmute tracks I think Let me see what happens with manual values in the volume control for the xfade. |
02-12-2018, 05:13 PM | #104 |
Mortal
Join Date: Jan 2006
Location: Wickenburg, Arizona
Posts: 14,047
|
Still seems like the ramp up starts WAY after the ramp down, like when the ramp down is almost all the way out
|
02-12-2018, 09:17 PM | #105 |
Mortal
Join Date: Jan 2006
Location: Wickenburg, Arizona
Posts: 14,047
|
I tried a few things of just leaving a delay for the spillover, and doing PC changes on it. I think it works! Ready for the mutes!
|
02-12-2018, 10:57 PM | #106 |
Human being with feelings
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,688
|
Here you are: Midi Volume Control V 2.0
-Michael Code:
// Author: Michael Schnell, based on a work of Time Waster (M. Smith) // License: LGPL - http://www.gnu.org/licenses/lgpl.html // // The midi CC values 0 ... 127 are mapped to an "amplifier" curve that consists of a linear and an exponential part // in a way, that with CC = 0 the amplification is 0 (-inf dB) and with CC = 127 the amplification is 1 (0db) // A slider defines the amount (in dB), the amplification is reduced with each CC step. // According to that, the breakpoint between the exponential and the linear part is set so that // at this point the value and the slope of the curves match. // Below the breakpoint, a linear curve is used so that with CC = 0 the amplification is Zero (-infinity dB). // Another slider defines the maximum speed the amplification is modulated. This is set in dB per modulation step. // (Moreover the maximum speed used is reaching a new defined level in as many steps a samples in a block) // A graph shows as well the curve (Amplification vs CC steps), as the dynamic movement of the amplification level. desc:Midi Volume Control version: 2.0 slider1:0<0,15,1{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16}>MIDI Input Channel slider2:1<0,127,1{0 Bank Sel M,1 Mod Wheel M,2 Breath M,3,4 Foot P M,5 Porta M,6 Data Entry M,7 Vol M,8 Balance M,9,10 Pan M,11 Expression M,12 Ctrl 1 M,13 Ctrl 2 M,14,15,16 GP Slider 1,17 GP Slider 2,18 GP Slider 3,19 GP Slider 4,20,21,22,23,24,25,26,27,28,29,30,31,32 Bank Sel L,33 Mod Wheel L,34 Breath L,35,36 Foot P L,37 Porta L,38 Data Entry L,39 Vol L,40 Balance L,41,42 Pan L,43 Expression L,44 Ctrl 1 L,45 Ctrl 2 L,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64 Hold P sw,65 Porta sw,66 Sustenuto sw,67 Soft P sw,68 Legato P sw,69 Hold 2 P sw,70 S.Variation,71 S.Timbre,72 S.Release,73 S.Attack,74 S.Brightness,75 S.Ctrl 6,76 S.Ctrl 7,77 S.Ctrl 8,78 S.Ctrl 9,79 S.Ctrl 10,80 GP B.1 sw,81 GP B.2 sw,82 GP B.3 sw,83 GP B.4 sw,84,85,86,87,88,89,90,91 Effects Lv,92 Trem Lv,93 Chorus Lv,94 Celeste Lv,95 Phaser Lv,96 Data B. Inc,97 Data B. Dec,98 NRP L,99 NRP M,100 RP L,101 RP M,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127}>CC Input slider3:-0.3<-1,-0.1,0.01>Attenuation per CC step slider4:0.003<0.0005, 0.01, 0.0001>max step(dB) //slider5:0<0,1,0.01>Factor (Test) slider6:0<0,127,1{None,0 Bank Sel M,1 Mod Wheel M,2 Breath M,3,4 Foot P M,5 Porta M,6 Data Entry M,7 Vol M,8 Balance M,9,10 Pan M,11 Expression M,12 Ctrl 1 M,13 Ctrl 2 M,14,15,16 GP Slider 1,17 GP Slider 2,18 GP Slider 3,19 GP Slider 4,20,21,22,23,24,25,26,27,28,29,30,31,32 Bank Sel L,33 Mod Wheel L,34 Breath L,35,36 Foot P L,37 Porta L,38 Data Entry L,39 Vol L,40 Balance L,41,42 Pan L,43 Expression L,44 Ctrl 1 L,45 Ctrl 2 L,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64 Hold P sw,65 Porta sw,66 Sustenuto sw,67 Soft P sw,68 Legato P sw,69 Hold 2 P sw,70 S.Variation,71 S.Timbre,72 S.Release,73 S.Attack,74 S.Brightness,75 S.Ctrl 6,76 S.Ctrl 7,77 S.Ctrl 8,78 S.Ctrl 9,79 S.Ctrl 10,80 GP B.1 sw,81 GP B.2 sw,82 GP B.3 sw,83 GP B.4 sw,84,85,86,87,88,89,90,91 Effects Lv,92 Trem Lv,93 Chorus Lv,94 Celeste Lv,95 Phaser Lv,96 Data B. Inc,97 Data B. Dec,98 NRP L,99 NRP M,100 RP L,101 RP M,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127}>Muting Notofication CC @init modval = 0; // prelevel = 0; maxCCvalue = 127; r4 = log(10)/20; outval = 0; function f (x) ( x < limit ? ( x*r3; ) : ( exp((maxCCvalue-x) * r5); ); ) @slider inChannel = slider1; modcc = slider2; dbperstep = slider3; db20perstep = dbperstep/20; p1 = 1 / log(10) / db20perstep; p2 = 1 / maxCCvalue; p3 = p1 + p2; limit = (-p3+0.5) |0; r1 = (maxCCvalue-limit) * dbperstep; r2 = exp(log(10)*r1/20); r3 = r2 / limit; r5 = dbperstep*r4; s1 = exp(log(10)*slider4/20); s2 = 1 / s1; f1 = f(1); outcc = slider6-1; @block while (midirecv(offset, msg1, msg2, msg3)) ( status = msg1 & $xF0; // Extract message type channel = msg1 & $x0F; channel == inChannel ? ( // Is it on our channel? status == $xB0 ? ( // Is it a controller event? msg2 == modcc ? ( // Is it the right CC? modval = msg3; modval ? ( outlevel < f1 ? outlevel = f1; ); modlevel = f(modval); // slider5 = modlevel; // test ); ); ); midisend(offset, msg1, msg2, msg3); // pass through ); modval ? ( modstep = exp( log(modlevel / outlevel) / samplesblock); modstep == 1 ? ( stepping = 0; ) : ( modstep > s1 ? ( modstep = s1; ) : modstep < s2 ? ( modstep = s2; ); stepping = 1; ); ) : ( modstep = s2; ); outcc >= 0 ? ( outlevel <= f1 ? ( outval ? ( outval = 0; midisend(offset, inChannel+$xB0, outcc, outval); // pass through ); ) : ( !outval ? ( outval = 127; midisend(offset, inChannel+$xB0, outcc, outval); // pass through ); ); ); @sample outlevel *= modstep; spl0*=outlevel; spl1*=outlevel; @gfx 640 400 gfx_r=gfx_g=gfx_b=0; gfx_a=1; gfx_x=gfx_y=0; gfx_rectto(gfx_w,gfx_h); outcc >= 0 ? ( outval ? ( gfx_r = 0; gfx_g = 1; gfx_b = 0; gfx_x = 0; gfx_y = 0; gfx_rectto(gfx_w, gfx_h/2); ); ); q1 = gfx_w / maxCCvalue; q2 = gfx_h; //gfx_line(); gfx_r=gfx_g=gfx_b=1; gfx_y = 0; gfx_x = 0; x = 0; while (x<=maxCCvalue) ( a = x*q1; b = gfx_h - f(x)*q2; gfx_lineto(a, b, 1); x = x+1; ); gfx_y = 0; gfx_x = modval*q1; gfx_lineto(gfx_x, gfx_h); gfx_x = 0; gfx_y = gfx_h-outlevel*q2; gfx_lineto(gfx_w, gfx_y); |
02-12-2018, 11:39 PM | #107 |
Mortal
Join Date: Jan 2006
Location: Wickenburg, Arizona
Posts: 14,047
|
AWESOME!!! Trying to figure out how to assign the mute CC out to a mute. We can;t directly assign a lot of things that can be learned
I'm still on the hunt for a virtual pedalboard so I can send midi messages to reaper's learn for functions that can't be directly assigned and have to be learned |
02-12-2018, 11:48 PM | #108 |
Mortal
Join Date: Jan 2006
Location: Wickenburg, Arizona
Posts: 14,047
|
Crap, I see "set mute for track 0x" not sure if that will end up in a backwards toggle state
|
02-12-2018, 11:57 PM | #109 |
Mortal
Join Date: Jan 2006
Location: Wickenburg, Arizona
Posts: 14,047
|
Ok, I got it, but I think I need to send value of 127 instead of 0 in order to mute, I can't modify the learn (we really need a way to do more with the learnable midi stuff, bugging Justin now)
|
02-13-2018, 12:11 AM | #110 |
Mortal
Join Date: Jan 2006
Location: Wickenburg, Arizona
Posts: 14,047
|
Might have it anyway, but it seems like I have to put MIDI to ReaControl Path on each track that has MIDI Volum 2.0 on it, should that be right?
|
02-13-2018, 12:25 AM | #111 |
Mortal
Join Date: Jan 2006
Location: Wickenburg, Arizona
Posts: 14,047
|
Ok, here's how I'm trying it.
For track 1 the activate action is: Group:select all tracks in group 01 Track: unmute tracks Script:Send CHannel 2 cc1 value 127 The deactivate action is: Script: Send Channel 2 CC1 Value 0 Midi volume control is set: MIDI input Channel 2 CC Input 1 Muting Notofication: 11 MIDI channel 2 CC 11 is learned by macro: Select all tracks in group 01 Mute tracks What am I doing wrong? |
02-13-2018, 12:45 AM | #112 |
Mortal
Join Date: Jan 2006
Location: Wickenburg, Arizona
Posts: 14,047
|
I wonder if it needs to send a different cc# for muted than unmuted...I wish we could set the values in this learn stuff
|
02-13-2018, 12:46 AM | #113 | |
Human being with feelings
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,688
|
Quote:
The CC is sent to the Midi Bus in the Track's FX chain. The muting is done (supposedly via an action) in the "guts" of Reaper (i.e. the Reaper Control Path). So MIDIToReaControlPath is necessary to do the routing. Sorry, but my knowable about "Midi Learning", Action processing and ReaScripts is very limited . In fact I only know for rather sure that in Reaper, "Midi Learn" is a synonym for "Listen on the ReaControlPath". I have no idea what happens to the CC value, when a CC # is "learned". -Michael Last edited by mschnell; 02-13-2018 at 12:51 AM. |
|
02-13-2018, 01:20 AM | #114 |
Mortal
Join Date: Jan 2006
Location: Wickenburg, Arizona
Posts: 14,047
|
I'm not sure what to do here. The volume up action also seems to trigger the mute, maybe would it be possible to only send a 127 or only a 0, after the volume goes all the way down and to send nothing when it goes back up?
I'm not even sure if that needs to be a 127 or a 0, might need the option to do both, unless you can think of a different way to mute and unmute the track? |
02-13-2018, 02:27 AM | #115 |
Mortal
Join Date: Jan 2006
Location: Wickenburg, Arizona
Posts: 14,047
|
watching what happens in reacontrol midi, it looks like it just needs to not send that 127 value when the volume control goes back up to the top
|
02-13-2018, 07:32 AM | #116 | ||
Human being with feelings
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,688
|
Quote:
I'll implement that option tonight, anyway. Quote:
I'll implement that option tonight. -Michael |
||
02-13-2018, 01:04 PM | #117 |
Mortal
Join Date: Jan 2006
Location: Wickenburg, Arizona
Posts: 14,047
|
It seems like we need better ways of handling ccs in general in reaper. Really I would love to see whatever midi volume sends at the top unmetered, whatever it sends at the bottom mute, but that isn’t how the existing actions want to work. Maybe a script could be made to work alongside this
The only way I can figure on it working at the moment is to only have it send that mute cc when the vol7me goes down and to send noth8ng when it goes uo |
02-13-2018, 01:07 PM | #118 |
Mortal
Join Date: Jan 2006
Location: Wickenburg, Arizona
Posts: 14,047
|
Also, I couldn’t tell for sure, but when the volume is going up, when does that plugin send the mute cc? After it’s up? Or before it starts turning up? Or does it send one before it starts and one after it finishes?
|
02-13-2018, 01:26 PM | #119 |
Mortal
Join Date: Jan 2006
Location: Wickenburg, Arizona
Posts: 14,047
|
What if these were two scripts instead of one jsfx
Activate action could be Select tracks in group x Unmute tracks Turn up the volume And deactivate action could be Select tracks in group x Turn down the volume Mute tracks |
02-13-2018, 03:00 PM | #120 |
Human being with feelings
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,688
|
I have close to no knowledge about ReaScripts.
-Michael |
Thread Tools | |
Display Modes | |
|
|