Old 05-18-2008, 02:27 PM   #1
xackley
Human being with feelings
 
Join Date: Feb 2007
Posts: 1,120
Default MIDI CC Pitch

This one converts a Control to PitchBend.

Has a Controller Learn too.
Attached Files
File Type: txt MIDI_CC_Pitch_v1.0.txt (680 Bytes, 413 views)
__________________
^^^^^^^^^^
Ignore this post.
xackley is offline   Reply With Quote
Old 05-20-2008, 06:22 PM   #2
xackley
Human being with feelings
 
Join Date: Feb 2007
Posts: 1,120
Default v1.1

Added slider for midi channel. Changing sliders means new version.

BTW the Min,Max defaults of 32,96 limits the Bend to 1 Step in most Synths.
Attached Files
File Type: txt MIDI_CC_Pitch_v1.1.txt (1.8 KB, 403 views)
__________________
^^^^^^^^^^
Ignore this post.
xackley is offline   Reply With Quote
Old 01-19-2011, 05:21 PM   #3
Adam Fulara
Human being with feelings
 
Adam Fulara's Avatar
 
Join Date: Jan 2011
Posts: 48
Default

I need this to add Pitch bend with my Behringer FCB 1010 connected to Reaper together with Yamaha PSR 270.

I have to upgrade BIOS in FCB1010 since original doesn't support playing keyboard (midi thru-in) together with expressions pedals (with CC), now I'm waiting for new EPROM.

But I did code optimization, and corrected 2 errors in this plugins, I hope you don't mind:
1. audio IN OUT disabled (code optimization)
2. BLOCK section for MIDI instead of SAMPLE
3. IF inside WHILE should return always true to avoid loosing of some MIDI events ("1;")
5. some small optimimalization of the "if" code inside.

Code:
// name: MIDI_CC_Pitch,  xackley 05-18-2008
// modified by Adam Fulara, Jan 2011, www.adam.fulara.com
desc: MIDI CC to Pitch Bend ver. 1.2af
in_pin:none;
out_pin:none;
slider1:0<0,15,1{0 Any,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16}>MIDI Channel
slider2:10<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}>Controller
slider3:0<0,1,1{No,Yes}>Learn
slider4:32<0,127,1>Min Value
slider5:0<0,127,1>Max Value

@init
Invelo =64;

@slider
slider4>slider5 ? slider5=slider4;

@block
while ( midirecv(ts,msg1,msg23) ? (
  InMess = msg1 & 240;
  InChan = msg1 & 15;
  InVelo = (msg23/256)|0;
  InNote = msg23 & 127;
  
  OKChan = Slider1 == 0 || slider1-1 == inchan;
  
  Inmess==176 && InNote==slider2 && OKChan || slider3==1 ? (
    Value= Invelo >= slider5 ? slider5 : Invelo <= slider4 ? slider4 : InVelo;
    midisend(ts,224+Inchan,Value*256);
  ) : midisend(ts,msg1,msg23);
         
  slider3 ? Inmess == 176 ? (
    slider2=InNote;
    slider1=InChan+1;
    );
  1;
  );  
);

Last edited by Adam Fulara; 01-21-2011 at 03:26 AM.
Adam Fulara 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 05:19 PM.


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