pitch bend wheel

please anyone give pitch bend wheel code,

Hi
We need more information, what is a pitch bend wheel and is it used for?
Can you post a link to more information please.

Tom... :slight_smile:

you 'bend' a note on a guitar by holding down and stretching a plucked string across the fret, it changes the pitch. This is very common in blues guitar and its successors (i.e. rock & roll).

A pitch bend wheel is a type of synthesizer which you can electronically bend a note on any amplified instrument (e.g. organ or electric guitar)

nickyrose:
please anyone give pitch bend wheel code,

Are you talking about some MIDI application?

The "Pitch Wheel" bytes handling (create unsigned integer from 2 bytes) accordingly to MIDI standard is explained here:
http://www.blitter.com/~russtopia/MIDI/~jglatt/tech/midispec/wheel.htm

thank very much for your replies. i have casio ctk 1100 model keyboard, i plan to convert midi keyboard so i brought arduino, potentiometer, midi to usb cable. i successfully connect to computer and keys are working fine. but i need pitch bend, modulation wheel to control midi software, i tried connect potentiometer to arduino and got some code from internet, the wheel change manually pitch very perfectly but i take out my hand from pitch bend its little bit flickering on the pitch bend, so i tried to connect on midi ox software and watch on the montior-input the data's are automatically functioning. here the video - YouTube
please anyone help me. thank you all

Hi,

thank very much for your replies.
i have casio ctk 1100 model keyboard,
i plan to convert midi keyboard so i brought arduino, potentiometer, midi to usb cable.
i successfully connect to computer and keys are working fine. but i need pitch bend, modulation wheel to control midi software,
i tried connect potentiometer to arduino and got some code from internet,
the wheel change manually pitch very perfectly but i take out my hand from pitch bend its little bit flickering on the pitch bend,
i tried to connect on midi ox software and watch on the montior-input the data's are automatically functioning.
here the video https://www.youtube.com/watch?v=oXPsmAiL8So&feature=youtu.be
please anyone help me.
thank you all

We will try..

Tom...... :slight_smile:

i finally find this code its working great, and pitch wheel working well. here the code
#include <MIDI.h>
MIDI_CREATE_DEFAULT_INSTANCE();

int lastWheel1 = 100000;
const int numReadings = 30;
int index=0;
int readings1[numReadings];
int wheel1Total = 0;
int wheel1Avg = 0;

void setup() {
Serial.begin(31250);
}
void loop ()
{
wheel1Total = wheel1Total - readings1[index];
readings1[index] = analogRead(A0);
wheel1Total = wheel1Total + readings1[index];
index = index + 1;
if(index >= numReadings){
index=0;
}
wheel1Avg = wheel1Total / numReadings;
int mappedWheel1 = map(wheel1Avg, 0, 1023, 0, 127);
if(mappedWheel1>124) mappedWheel1 = 127;
if(mappedWheel1<5) mappedWheel1 = 0;
if(mappedWheel1>lastWheel1+2||mappedWheel1<lastWheel1-2){
lastWheel1=mappedWheel1;
{
MIDI.sendControlChange(1, mappedWheel1, 1);
}
}
{
Serial.write(0xE0);
}
}

but how to add modulation wheel code to this? anyone help me?
thank you all