Unable to add multiple potentiometer in Midi controller
Your logic is flawed here:

  int i;
  for (i = 0; i &lt; AnaPinsNum; i++)
    potIn[i] = analogRead(pot[i]) / 8;

  // potentiometer could be too sensitive and
  // give different (+-1) values.
  // send CC only when the difference between last value
  // is more than 1
  if ((potIn[i] - lastAnalogValue[i]) &gt; 1 || (potIn[i] - lastAnalogValue[i]) &lt; -1) {
    // value changed?
    if (potIn[i] != lastAnalogValue[i]) {
      // send serial value (ControlNumber 1, ControlValue = analogValue, Channel 1)
      // more info: http://arduinomidilib.sourceforge.net/a00001.html
      MIDI.sendControlChange(1, potIn[i], 1);
      lastAnalogValue[i] = potIn[i];
      }
    }


The first three lines read all three analog pins:

  int i;
  for (i = 0; i &lt; AnaPinsNum; i++)

    potIn[i] = analogRead(pot[i]) / 8;


However then, outside the loop, you are using the value of i which will now be 4, and outside the array bounds. You need to bracket the whole lot, eg.

  int i;
  for (i = 0; i &lt; AnaPinsNum; i++)
    {   // &lt;------------------------------- add this
    potIn[i] = analogRead(pot[i]) / 8;

    // potentiometer could be too sensitive and
    // give different (+-1) values.
    // send CC only when the difference between last value
    // is more than 1
    if ((potIn[i] - lastAnalogValue[i]) &gt; 1 || (potIn[i] - lastAnalogValue[i]) &lt; -1) 
      {
      // value changed?
      if (potIn[i] != lastAnalogValue[i]) 
        {
        // send serial value (ControlNumber 1, ControlValue = analogValue, Channel 1)
        // more info: http://arduinomidilib.sourceforge.net/a00001.html
        MIDI.sendControlChange(1, potIn[i], 1);
        lastAnalogValue[i] = potIn[i];
        }  // end of not same as before
      }   // end of value changed
    }   // &lt;----------------- add this





  If pot one is sending out Controller number 1 and channel number 1, 2nd pot should send Controller number 2 and channel no 2.


If I understand your question correctly:

Change:

MIDI.sendControlChange(1, potIn[i], 1);


to:

MIDI.sendControlChange(i, potIn[i], i);