Depends how you're looking to automate it I suppose. You could give IX's CCRider a shot - that can automate it using an LFO. As far as I know there aren't any plugs that give you a virtual pitch bend wheel to go with Reaper's virtual MIDI keyboard. Probably wouldn't be too hard to write one though.
Wobulator does pitch bend but it's just a sine curve so no use if you want anything more interesting. Are you trying to achieve any particular effect?
Didnt see that wobulator before think I'll have a go of that, in answer to your question I need a basic midi pitchbend plugin for pitch risers, downers and general pitch madness. I dont find drawing the pitch in the controller section of reaper too accurate compared to cubase even though you can draw the points in a straight line it keeps on missing some points also I would like to draw smooth curves and other shapes which you cant do in the controller section at the moment.
A simple +/- midi pitchbend plugin with enough accuracy should do the job and make me happy if anyone fancies having a bash of making one?
I would try but I dont dont know where to start with all this JS stuff.
I've actually always wanted one of those for times when I'm poking around with something and don't have my controller with me. I guess you pushed my motivation to build one over the top.
Give this a whirl and let me know what you think. Modulation wheel doesn't do anytyhing yet; I'll add that when I get a bit more time and perhaps after some feedback about how well the PB works or doesn't. To bend pitch, hold the left mouse down on the center of the wheel, and drag up or down. Releasing the mouse button will return to the center position.
Parameters MIDI Channel: determines the MIDI channel that PB messages are sent on PB Center Position: determines the continuous value of the PB in the center position (when you don't have the left mouse button down) PB Max Value: value of the pitch bend when you raise the wheel all the way up PB Min Value: value of the pitch bend when you drag the wheel all the way down
Last edited by HotDogWater; 07-05-2009 at 09:31 AM.
Reason: Fixed link
I've actually always wanted one of those for times when I'm poking around with something and don't have my controller with me. I guess you pushed my motivation to build one over the top.
Give this a whirl and let me know what you think. Modulation wheel doesn't do anytyhing yet; I'll add that when I get a bit more time and perhaps after some feedback about how well the PB works or doesn't. To bend pitch, hold the left mouse down on the center of the wheel, and drag up or down. Releasing the mouse button will return to the center position.
Parameters MIDI Channel: determines the MIDI channel that PB messages are sent on PB Center Position: determines the continuous value of the PB in the center position (when you don't have the left mouse button down) PB Max Value: value of the pitch bend when you raise the wheel all the way up PB Min Value: value of the pitch bend when you drag the wheel all the way down
Thanks a lot this is awesome just the sort of thing i was asking for havent had chance to use it much but had a little go and its working quite well at the moment.
I've actually always wanted one of those for times when I'm poking around with something and don't have my controller with me. I guess you pushed my motivation to build one over the top.
Give this a whirl and let me know what you think. Modulation wheel doesn't do anytyhing yet; I'll add that when I get a bit more time and perhaps after some feedback about how well the PB works or doesn't. To bend pitch, hold the left mouse down on the center of the wheel, and drag up or down. Releasing the mouse button will return to the center position.
Parameters MIDI Channel: determines the MIDI channel that PB messages are sent on PB Center Position: determines the continuous value of the PB in the center position (when you don't have the left mouse button down) PB Max Value: value of the pitch bend when you raise the wheel all the way up PB Min Value: value of the pitch bend when you drag the wheel all the way down
The link still works fine for me. Maybe try again - perhaps there was a momentary server glitch or smoething. If not let me know and I'll put it up on Stashbox.
The link still works fine for me. Maybe try again - perhaps there was a momentary server glitch or smoething. If not let me know and I'll put it up on Stashbox.
Sorry guys, fixed the link. That's the dangdest thing. I coulnd't see anything wrong with it until I edited the post. I guess IE7 magically transforms \s into /s if they're in a URL. Anyway, should work now.
I cant seem to get the pitch to rise or fall by moving the pitchbend knob. i pitch bend is inserted after reasynth and the pitchbend recognizes reasynths output.
I've never really messed with Reasynth. Apparently it doesn't. Tried it as described and it didn't work. Then replaced Reasynth with Synth1 and it worked great.
Great plugin, I don't have pitch bend and waiting for new FCB 1010 controler EPROM I use it as a keyboard pitch bend.
But I did several new things in that plugin.
What's new?
1. Reduced about 95% midi output messages generated by Wheel (now it transmit only 5% of previous version MIDI out messages amount) - only when wheel change position, less Midi traffic in chain and less CPU power needed.
2. Turn off Audio samples processing (code optimization)
3. Fixed: loosing some midi messages from input on output from time to time
4. Fixed: working with REASYNTH (!) more compatibility to other plugins
5. SPRING STRENGTH SLIDER (!) - After releasing wheel, it will get back "slowly" to mid position, like real spring-wheel. Don't have "jump" in sound when change fast position: from maximum to mid. Another way when you click then wheel will go slowly to the position of mouse. But, if you use MAX strength, you have sudden change of pitch like before.
6. Code optimalization (functional-programming-like) and fixed sending midi messages with -1 buffer offset.
7. Fixed: Neither low slider cannot be over "middle" position, nor High slider cannot be below "middle" Wheel position
8. You can use both Mouse buttons to control Wheel.
9. Fixed: was DETUNED in center position (1 cent, Wheel MIDI Position should be $x40).
New possibilities, and interesting sound you can get when SPRING strength is set to 1. It's very slow then, and it's a new kind of effect.
Now it's REALY much more useful (as I like ReaSynth). Although it's great idea from beginning.
Instruction: just download, and install JS plugin, then open it in FX chain-> EDIT -> delete whole text, and paste this text:
Code:
/*
Copyright 2008, Joe Filbrun
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted
provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions
and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions
and the following disclaimer in the documentation and/or other materials provided with the distribution.
The name of Joe Filbrun may not be used to endorse or promote products derived from this
software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
//Version 1.1af modified by Adam Fulara, jan 2011, www.adam.fulara.com
////////////////////////////////////////////////////////////////////////////////////////////
desc:Virtual Pitch Bend Spring Controller 1.1af
filename:0,PBModBG.png
in_pin:none
out_pin:none
////////////////////////////////////////////////////////////////////////////////////////////
slider1:0<0,15,1{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16}>MIDI Channel
slider2:64<1,126,1>PB Center Position
slider3:127<0,127,1>PB Max Value (full up)
slider4:0<0,127,1>PB Min Value (full down)
slider5:10<1,30,1>PB Wheel Spring Power
////////////////////////////////////////////////////////////////////////////////////////////
@init
CCfPitch = $xE0;
CCStatus = CCPitch + slider1;
prev_pitch=0;
new_pitch=0;
////////////////////////////////////////////////////////////////////////////////////////////
@slider
CCPitch=$xE0;
CCStatus = CCPitch + slider1;
pitch = slider2;
slider3<=slider2 ? slider3=slider2+1;
slider4>=slider2 ? slider4=slider2-1;
////////////////////////////////////////////////////////////////////////////////////////////
@block
while( midirecv(offset,msg1,msg23) ? (
midisend(offset,msg1,msg23);
1;
);
);
prev_pitch!=pitch ?
(
midisend(offset>=1 ? offset-1 : 0, CCStatus, (pitch*256) & $x7F00);
prev_pitch=pitch;
);
////////////////////////////////////////////////////////////////////////////////////////////
@gfx 270 203
gfx_x=80;gfx_y=0;
gfx_r=1; gfx_g=1;gfx_b=1; gfx_a=1;
gfx_blit(0,1,0);
gfx_x=135;gfx_y=110;
gfx_r=1; gfx_g=1;gfx_b=0; gfx_a=1;
gfx_rectto(160,130);
gfx_x=135;gfx_y=115;
gfx_r=0; gfx_g=0;gfx_b=0; gfx_a=1;
gfx_drawnumber(pitch,0);
mouse_cap ?
(
oldMouseY!=mouse_y || new_pitch!=pitch ?
(
new_pitch = mouse_y>190 ? slider4 :
mouse_y<40 ? slider3 :
slider4 + floor(((190-mouse_y)/150)*(slider3-slider4));
step = pitch-new_pitch;
pitch = abs(step)>slider5 && slider5<30 ? pitch - sign(step)*slider5 : new_pitch;
);
oldMouseY=mouse_y;
)
:
(
step = pitch-slider2;
pitch= abs(step)>slider5 && slider5<30 ? pitch - sign(step)*slider5: slider2;
);
Last edited by Adam Fulara; 01-23-2011 at 04:58 AM.
It's major update - because it has new "MOD WHEEL" working.
Version 2.0af
What's new?
1. Mod WHEEL working! Left mouse button=Pitch bend wheel, Right=MOD Wheel
2. Adjustable controler for MOD (usualy: No. 1)
3. New look + numbers are lighting when mouse tracking is active.
4. You can operate both wheels at a time pressing left+right mouse button
5. 2 hidden sliders for Pitch Bend and Mod Wheel Automation
New MOD wheel didn't get "spring", because I think it's not needed.
Code:
/*
Copyright 2008, Joe Filbrun
Version 2.0af modified by Adam Fulara,
feb 2011, www.adam.fulara.com/software
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted
provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions
and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions
and the following disclaimer in the documentation and/or other materials provided with the distribution.
The name of Joe Filbrun may not be used to endorse or promote products derived from this
software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
//////////////////////////////////////////////////////////////////////////////////////////////
desc:Virtual Pitch Bend Spring Controller 2.0af
filename:0,PBModBG.png
in_pin:none
out_pin:none
////////////////////////////////////////////////////////////////////////////////////////////
slider1:0<0,15,1{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16}>MIDI Channel
slider2:64<1,126,1>PB Center Position
slider3:127<0,127,1>PB Max Value (full up)
slider4:0<0,127,1>PB Min Value (full down)
slider5:10<1,30,1>PB Wheel Spring Power
slider6:127<0,127,1>Modulation Max Value (full up)
slider7:1<0,127,1{0 Bank Sel MSB,1 Mod Wheel MSB,2 Breath MSB,3,4 Foot P MSB,5 Porta MSB,6 Data Entry MSB,7 Vol MSB,8 Balance MSB,9,10 Pan MSB,11 Expression MSB,12 Ctrl 1 MSB,13 Ctrl 2 MSB,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 LSB,33 Mod Wheel LSB,34 Breath LSB,35,36 Foot P LSB,37 Porta LSB,38 Data Entry LSB,39 Vol LSB,40 Balance LSB,41,42 Pan LSB,43 Expression LSB,44 Ctrl 1 LSB,45 Ctrl 2 LSB,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}>Modulation Wheel Asign Controller
slider8:1<0,127,1>-Modulation Position for Automation
slider9:64<0,127,1>-PB Position for Automation
////////////////////////////////////////////////////////////////////////////////////////////
@init
CCPitch = $xE0;
CCMod = $xB0;
CCStatus = CCPitch + slider1;
CCModulation= CCMod+ slider1;
prev_pitch=0;
new_pitch=0;
modulation=0;
pitch=0;
////////////////////////////////////////////////////////////////////////////////////////////
@slider
CCPitch=$xE0;
CCStatus = CCPitch + slider1;
CCModulation= CCMod+ slider1;
pitch = slider2;
slider3<=slider2 ? slider3=slider2+1;
slider4>=slider2 ? slider4=slider2-1;
//pitch=slider6;
////////////////////////////////////////////////////////////////////////////////////////////
@block
while( midirecv(offset,msg1,msg23) ? (
midisend(offset,msg1,msg23);
1;
);
);
prev_pitch!=pitch ?
(
midisend(offset>=1 ? offset-1 : 0, CCStatus, (pitch*256) & $x7F00);
prev_pitch=pitch;
);
prev_modulation!=modulation ?
(
midisend(offset>=2 ? offset-2 : 1, CCModulation, ((modulation*256)+slider7) & $x7FFF);
prev_modulation=modulation;
);
////////////////////////////////////////////////////////////////////////////////////////////
@gfx 270 203
wys=gfx_h;
szer=gfx_w;
gfx_r=0.94; gfx_g=0.94;gfx_b=0.94; gfx_a=1;
gfx_x=0;gfx_y=0;
gfx_rectto(szer,wys);
gfx_x=80;gfx_y=0;
gfx_r=1; gfx_g=1;gfx_b=1; gfx_a=1;
gfx_blit(0,1,0);
gfx_x=135;gfx_y=115;
mouse_pitch=mouse_cap & 1; //Left mouse
mouse_mod=mouse_cap & 2; //Right mouse
gfx_r=1; gfx_g=1;gfx_b=1;
gfx_a=mouse_pitch ? 1 : 0.34;
gfx_drawnumber(pitch,0);
////Drawing modulation number:
gfx_x=250;gfx_y=115;
gfx_a=mouse_mod ? 1 : 0.34;
gfx_drawnumber(modulation,0);
mouse_pitch? //left mouse
(
oldMouseY!=mouse_y || new_pitch!=pitch ?
(
new_pitch = mouse_y>190 ? slider4 :
mouse_y<40 ? slider3 :
slider4 + floor(((190-mouse_y)/150)*(slider3-slider4));
step = pitch-new_pitch;
slider9 = pitch = abs(step)>slider5 && slider5<30 ? pitch - sign(step)*slider5 : new_pitch;
slider_automate(slider9);
);
oldMouseY=mouse_y;
)
:
(
step = pitch-slider2;
slider9 = pitch= abs(step)>slider5 && slider5<30 ? pitch - sign(step)*slider5: slider2;
slider_automate(slider9);
);
mouse_mod ? //right mouse
( //Modulation
slider8 = modulation = mouse_y>190 ? 0 :
mouse_y<40 ? slider6 :
floor(((190-mouse_y)/150)*slider6);
slider_automate(slider8);
);
I don't know if this solution has been posted but I ran across this when I was researching how to automate pitch bends:
Open midi item
Toggle bar at bottom left and drag up to view midi controller menu drop down bar.
There should be a graph window underneath midi note window where the piano keys are.
Select Pitch from drop down menu.
Draw a curve with your mouse on the graph window to make pitch bend.
Your curve will be as fine or coarse as the grid setting.
Go to your track bar on the main track window and select the envelope "trim" on your track.
Check "pitch bend" on the list assigned to your keyboard plug in.
You should be able to assign the range of your pitch bend on your track settings. You will have to fool around a bit on this, I'm still working on the exact settings for controlling this but this is the general approach to automating pitch bends.
Put ReaControlMIDI on your track.
Enable the 5 control change sliders.
On the TCP, open the envelope window. (the button looks like "^")
Check "pitch wheel" in thew section for ReacControlMIDI.
In the envelope that appears, you can use all the envelope tools to draw nice smooth curves. This also works for mod wheel and any other CC message.
Put ReaControlMIDI on your track.
Enable the 5 control change sliders.
On the TCP, open the envelope window. (the button looks like "^")
Check "pitch wheel" in thew section for ReacControlMIDI.
In the envelope that appears, you can use all the envelope tools to draw nice smooth curves. This also works for mod wheel and any other CC message.
You can also do this on empty midi items using item fx ReaControlMIDI, that way you can move them around, copy, stretch etc. I normally use a free track and route the midi to the instrument track in question.
You can also do this on empty midi items using item fx ReaControlMIDI, that way you can move them around, copy, stretch etc. I normally use a free track and route the midi to the instrument track in question.
OK, I'll try that but I'd like to be able to play the pitch wheel live whilst I am playing.
the code still works but the image is missing, does anyone happen to have the image, or maybe know how to convert it to just change the image into a pair of normal sliders?
the code still works but the image is missing, does anyone happen to have the image, or maybe know how to convert it to just change the image into a pair of normal sliders?
This is a pretty old thread, but this is just what I needed as well. It actually works without the graphic - just click in the blank area below the faders and drag with either the left or right mouse button down. To see what it is doing, you can put the MIDI Examiner plug-in after it to make sure it is working.
To add visual sliders, just remote the minus signs in front of Modulation Position for Automation and PB Position for Automation. However, be forwarned that dragging those sliders doesn't work. Only the left/right drags in the blank area send the controller values. But it is nice to have them to see what the values are.
I liked this handy plugin very much. I modified it to my taste and needs. Please note that currently the scroll response varies with audio device buffer. Use Scroll Sensitivity to change it to your taste.
PS: You can input this into the InputFX section and record it into the instrument track.
Code:
/*
Copyright 2008, Joe Filbrun
Version 2.0af modified by Adam Fulara,
feb 2011, www.adam.fulara.com/software
Version 2.7af modified by Suganthan,
May 1, 2021:
*so that the pitchbend all the way goes to 100% up
*Increase the resolution of the pitchbend
May 2, 2021:
*PB Stays in the min/max for minimum snap time (if the mousewheel is contantly applied, it will stay longer, but minimum snap time is the minimum time it will stay)
v2.7af
May 3, 2021:
*The fast the mousewheel moves, the accelerates towards min/max
funciton:
f\left(x\right)=\frac{30x}{x+sensitivity}
PB_acceleration = 30 * accumulative_mouse_count/ (accumulative_mouse_count + sensitivity) ;
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted
provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions
and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions
and the following disclaimer in the documentation and/or other materials provided with the distribution.
The name of Joe Filbrun may not be used to endorse or promote products derived from this
software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
//////////////////////////////////////////////////////////////////////////////////////////////
desc:Virtual Pitch Bend Spring Controller 2.7af
in_pin:none
out_pin:none
////////////////////////////////////////////////////////////////////////////////////////////
slider1:0<0,15,1{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16}>MIDI Channel
slider2:128<1,254,1>-PB Center Position
slider3:255<0,255,1>-PB Max Value (full up)
slider4:0<0,255,1>-PB Min Value (full down)
slider6:127<0,127,1>-Modulation Max Value (full up)
slider7:1<0,127,1{0 Bank Sel MSB,1 Mod Wheel MSB,2 Breath MSB,3,4 Foot P MSB,5 Porta MSB,6 Data Entry MSB,7 Vol MSB,8 Balance MSB,9,10 Pan MSB,11 Expression MSB,12 Ctrl 1 MSB,13 Ctrl 2 MSB,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 LSB,33 Mod Wheel LSB,34 Breath LSB,35,36 Foot P LSB,37 Porta LSB,38 Data Entry LSB,39 Vol LSB,40 Balance LSB,41,42 Pan LSB,43 Expression LSB,44 Ctrl 1 LSB,45 Ctrl 2 LSB,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}>Modulation Wheel Asign Controller
slider8:1<0,127,1>-Modulation Position for Automation
slider9:128<0,255,1>-PB Position for Automation
slider14:10<3,30,0.1>-Minimum Snap Time
slider15:2000<4000,1,1>Scroll Sensitivity
//Dev DBG tools,
slider12:0<0,1000,1>-count_snap
slider13:0<0,1000,1>-mousewheel-prevmousewheel
////////////////////////////////////////////////////////////////////////////////////////////
@init
CCPitch = $xE0;
CCMod = $xB0;
Fullfill = 0;
CCStatus = CCPitch + slider1;
CCModulation= CCMod+ slider1;
prev_pitch=0;
new_pitch=0;
modulation=0;
pitch=0;
count_snap=0;
////////////////////////////////////////////////////////////////////////////////////////////
@slider
CCPitch=$xE0;
CCStatus = CCPitch + slider1;
CCModulation= CCMod+ slider1;
pitch = slider2;
slider3<=slider2 ? slider3=slider2+1;
slider4>=slider2 ? slider4=slider2-1;
////////////////////////////////////////////////////////////////////////////////////////////
@block
while( midirecv(offset,msg1,msg23) ? (
midisend(offset,msg1,msg23);
1;
);
);
//mouse clicks
(mouse_left || mouse_right) != 0 ?
( //Modulation
slider8 = modulation = mouse_y>190 ? 0 :
mouse_y<40 ? slider6 :
floor(((190-mouse_y)/150)*slider6);
slider_automate(slider8);
);
//mouse wheel scroll
wheelval = mouse_wheel;
mouse_speed = wheelval - wheelval_pre ;
mouse_speed != 0 ?
( // executed whenever the mouse wheel is changed
//slider13 = mouse_speed;
dir = sign(mouse_speed);
go_flag = 1;
count_snap = slider14 ;
accumulative_mouse_count += abs(mouse_speed) ;
)
:
(
go_flag ? //if mousewheel was moved
(
dir ==1 ?
new_pitch = slider3 ://if it is up
new_pitch = slider4 ; //if it is down
pitch == new_pitch ? //if the PB hit the min/max,
(
count_snap < 1 ? //if the snapping time has been finished,
go_flag = 0 ://time to go home ie. center
count_snap -= 1; //else, keep counting the snapping time
);
):
( //else, if go_flag is off
pitch != slider2? //and if pitch is not yet have come to center
new_pitch = slider2 : //let's bring it to center
accumulative_mouse_count = 0 ; // else, take rest and do nothing
);
pitch != new_pitch ?
( //work towards and reach the new pitch
step = pitch-new_pitch;
PB_acceleration = 30 * accumulative_mouse_count/ (accumulative_mouse_count + slider15) ; //gives accelration to the scroll depending on how much mouse is scrolled
slider9 = pitch = abs(step)>PB_acceleration && PB_acceleration<30 ? pitch - sign(step)*PB_acceleration : new_pitch;
slider_automate(slider9);
);
);
wheelval_pre = wheelval;
//slider12 =count_snap;
//send midi data
prev_pitch!=pitch ?
(
Fullfill = pitch < 254 ? 0 : 127;
midisend(offset>=1 ? offset-1 : 0, CCStatus, ((pitch*128) & $x7F00)+Fullfill);
prev_pitch=pitch;
);
prev_modulation!=modulation ?
(
midisend(offset>=2 ? offset-2 : 1, CCModulation, ((modulation*256)+slider7) & $x7FFF);
prev_modulation=modulation;
);
////////////////////////////////////////////////////////////////////////////////////////////
@gfx 160 280
//gfx_set(0.33,0.0,0.75,0.5); gfx_x=0;gfx_y=0; gfx_rectto(160,280); ////BG Box
gfx_set(0.33,0.0,0.75,1); gfx_x=25;gfx_y=39; gfx_rectto(50,191); ////PB Box
gfx_set(0.33,0.0,0.75,1); gfx_x=85;gfx_y=39; gfx_rectto(110,191); ////MW Box
mouse_left=mouse_cap & 1; //Left mouse
mouse_right=mouse_cap & 2; //Right mouse
////Drawing Strings
gfx_set(1,0.7,1,1);
gfx_x=27; gfx_y=20; gfx_drawnumber(pitch/2,0); ////Drawing PB number
gfx_x=17; gfx_y=200; gfx_drawstr("PITCH");
gfx_x=87;gfx_y=20; gfx_drawnumber(modulation,0);////Drawing MW number
gfx_x = 87 ; gfx_y=200; gfx_drawstr("MOD");
gfx_set(0.5,1,1,1);
gfx_x=17; gfx_y=225 ; gfx_drawstr("Scroll");
gfx_x=87; gfx_y=225 ; gfx_drawstr("Click");
gfx_set(0.5,1,1,0.3); gfx_line(27,115,47,115);
////Drawing lines
pb_line_ypos = (160-(pitch/2))*1.2;
gfx_set(1,1,0.5,0.7); gfx_line(27,pb_line_ypos,47,pb_line_ypos);
mw_line_ypos = (160-(modulation))*1.2; gfx_line(87,mw_line_ypos,107,mw_line_ypos);