Go Down

Topic: 64 knob MIDI controller prototype (Read 4939 times) previous topic - next topic

monoLab

Knobby knob midi controller project prototype number 2. 64 knobs working smooth as eggs. Refined the code a bit to achieve said smoothness and accommodate new multiplexing board I built that handles the 64 knobs (256 knobs is possible with this design, but that's just crazy). Multiplexing board was built from scratch by designing circuit layout with CAD -- printing layout onto transparency paper and exposing and developing light sensitive board with pattern. This one was really rough, but honestly super surprised it worked on first attempt. Next step will be coming up with ideas for a nice enclosure.

Code: [Select]
byte muxSelect[64] = {
  B00000000,
  B00000000,
  B00000000,
  B00000000,
  B00000000,
  B00000000,
  B00000000,
  B00000000,
  B00000000,
  B00000000,
  B00000000,
  B00000000,
  B00000000,
  B00000000,
  B00000000,
  B00000000,
  B00000001,
  B00000001,
  B00000001,
  B00000001,
  B00000001,
  B00000001,
  B00000001,
  B00000001,
  B00000001,
  B00000001,
  B00000001,
  B00000001,
  B00000001,
  B00000001,
  B00000001,
  B00000001,
  B00000010,
  B00000010,
  B00000010,
  B00000010,
  B00000010,
  B00000010,
  B00000010,
  B00000010,
  B00000010,
  B00000010,
  B00000010,
  B00000010,
  B00000010,
  B00000010,
  B00000010,
  B00000010,
  B00000011,
  B00000011,
  B00000011,
  B00000011,
  B00000011,
  B00000011,
  B00000011,
  B00000011,
  B00000011,
  B00000011,
  B00000011,
  B00000011,
  B00000011,
  B00000011,
  B00000011,
  B00000011};  //set array of port values

byte muxRead[64] = {
  B00000000,
  B00010000,
  B00100000,
  B00110000,
  B01000000,
  B01010000,
  B01100000,
  B01110000,
  B10000000,
  B10010000,
  B10100000,
  B10110000,
  B11000000,
  B11010000,
  B11100000,
  B11110000,
  B00000000,
  B00010000,
  B00100000,
  B00110000,
  B01000000,
  B01010000,
  B01100000,
  B01110000,
  B10000000,
  B10010000,
  B10100000,
  B10110000,
  B11000000,
  B11010000,
  B11100000,
  B11110000,
  B00000000,
  B00010000,
  B00100000,
  B00110000,
  B01000000,
  B01010000,
  B01100000,
  B01110000,
  B10000000,
  B10010000,
  B10100000,
  B10110000,
  B11000000,
  B11010000,
  B11100000,
  B11110000,
  B00000000,
  B00010000,
  B00100000,
  B00110000,
  B01000000,
  B01010000,
  B01100000,
  B01110000,
  B10000000,
  B10010000,
  B10100000,
  B10110000,
  B11000000,
  B11010000,
  B11100000,
  B11110000};  //set array of port values

int chanVal[64]; //initialize array to hold all 64 values to compare with old values
int oldChanVal[64];  //initialize array to hold all 64 old values to compare with new values

void setup(){

  DDRB = B00001111;  // set PORTB (digital pins 8-11) to output
  PORTB = B00000000;  // set PORTB to LOW
  DDRD = DDRD | B11110000;  // set PORTD (digital pins 4-7) to output while making sure not to change pins 0 and 1 (TX and RX)
  PORTD = B00000000;  // set PORTD to LOW

  Serial.begin(31250);  //set this to 31250 for MIDI
}

void loop(){

  for(int a=0; a < 64; a++){  //loop through all 64 channels

    PORTB = muxSelect[a];
    PORTD = muxRead[a];
    chanVal[a] = map(analogRead(A0), 0, 1023, 0, 127); 

    if(abs(chanVal[a] - oldChanVal[a]) > 1){  //test to see if any of the values in the chanVal array have changed by more than one -- if so, print
      Serial.write(0xB0);
      //Serial.print("::");
      Serial.write(a);
      //Serial.print("::");
      Serial.write(chanVal[a]);
    }
    oldChanVal[a] = chanVal[a]; //assign chanVal values to oldChanVal before starting over
  }
  delay(64);
}


strykeroz

Wow.  I'm subbing here for the eventual link to your performance video  : )

Next step will be coming up with ideas for a nice enclosure.
I'm a fan of the Cisco router case featured in those photos - does it all fit back in there?

Geoff
"There is no problem so bad you can't make it worse" - retired astronaut Chris Hadfield

monoLab


Wow.  I'm subbing here for the eventual link to your performance video  : )

Next step will be coming up with ideas for a nice enclosure.
I'm a fan of the Cisco router case featured in those photos - does it all fit back in there?

Geoff


Videos coming soon...   XD

Yea it does all fit in the case.  I would need to drill holes and get standoffs for the mux board though.  My goal for the final revision is to have the programed ATmega chip, USB, and multiplexer chips on one board.

monoLab

#3
Jan 27, 2013, 05:54 am Last Edit: Jan 27, 2013, 10:25 pm by monoLab Reason: 1
Here's a 30 sec. clip of me trying to demonstrate the smoothness of the resolution...  Using FRAPS for screen capture -- any recommendations for something better?

http://www.youtube.com/watch?v=JzOOurbTxeY

Giò LFZ

What kind of pots did you use???

100k??? 10k??? 1m???

nice work man :)

monoLab


What kind of pots did you use???

100k??? 10k??? 1m???

nice work man :)


10K pots.  I bought the cheapest ones I could find and they are a little noisy...   :smiley-red:

naut

nice! Could you post the schematics?

Bspace

Really nice prototype !  I have been trying to get it running.

Are you using a serial to midi converter program? If so which one?

It would be really great to see the pic out of how you interfaced the mux boards pin out or the file you used for your schematic. 

This project would be so great to get running there is no other 64 pot plus midi controller out ther for arduino please consider revisiting this thread

Thanks so much

256k

this thread seems dead, but i'll bump it.

first i want to say how awesome this project is. and how cool the knobs/enclosure seem.

for what it's worth for the guy asking about midi and stuff i'm now experimenting with multiplexing knobs for a midi controller... always felt that having such a limited analog input was a shame...

now im fairly new to the world of arduino programming so im still learning as i go, i already got the basic midi stuff down (built a midi converter sketch to take midi notes and convert it to cc values for the volca sample to play samples chromatically)

now i want to experiment with inputs and midi....

i tried reading the provided code but im still confused so i decided to try and write the code myself from scratch and maybe later into it i'll understand it more. i didnt think of making a 64 knob controller like that honestly but i figure why the heck not, if i find it stable enough i could carry the torch of this guy and make it all into a single board that sends midi out through a midi din port.

if anyone wants to help me with the code feel free to share your knowledge, once i get it going i'll upload the sketch as well and try to make it as open source as possible. :)

Grumpy_Mike

Quote
this thread seems dead, but i'll bump it.
So read the rules and don't:-
How to use this forum

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy