Show Posts
Pages: 1 2 [3]
31  Forum 2005-2010 (read only) / Interfacing / Re: Arduino Midi Questions on: December 05, 2010, 06:07:24 pm
I just wanted to test the MidiVox Shield.. it doesnt work. I did everything like i should.. double checked solder points, pins, uploaded several times like in the instructions. The Power LED lights up but it doesnt receive any midi. The Midi Input is also ok.. it works on my other equipment. I will order another 6N139 OptoCoupler maybe this one is not all right ?

Also the delay unit produces "ground noises".. dont know the exact word in english. The Speaker and the amp inside my unit dont make those noises, i cant test the midivox sound output yet, so i cant tell you about how the midivox sounds.

This is starting to bug me.. damnit..  :-/
32  Forum 2005-2010 (read only) / Interfacing / Re: Arduino Midi Questions on: December 04, 2010, 12:34:59 pm
Hey guys.. just did my first coding steps..

I almost finished the part where a Dimming/Flashing (looks really nice and dims-flashes perfect) LED Tells me how high the Current Midi CC Setting is 0-127.
I got my Encoder working with the Quadrature Lib.

In the next days i will start working on the Page Switching.
Heres the code.

 IZZE BOX first Steps...

#include "Quadrature.h"
#undef int                    
#undef abs
#undef double
#undef float
#undef round

Quadrature quad1(8, 10); /* Thank God that my Encoder works */
int ledPin = 11; /* Dimm-Flash LED */
int enctime;

void setup() {
  quad1.position(60); /* Got to first find out which start amount is best for MidiCC */
void loop() {
  int encoder = quad1.position();
  encoder= encoder % 128; /* Restrict it to 128 Steps */
  enctime = map(encoder, 0, 127, 20, 1); /* Mapping it to a useful time amount */
  if (encoder >= 127) {
    encoder=127; /* Stops it from Skipping to Zero somehow? */
      encoder=encoder; /* That was somehow clear huh ? haha */
  for(int fadeValue = 0 ; fadeValue <= 255; fadeValue +=10) {
  analogWrite(ledPin, fadeValue);        
  delay(enctime);    }
  for(int fadeValue = 255 ; fadeValue >= 0; fadeValue -=10) {
  analogWrite(ledPin, fadeValue);      

I just wonder how can i make the Steps on the Encoder faster ? Takes forever to come from 0 to 127..
It would be cool if it would act like a potentiometer.. so lets say 1 or maximum 2 full turns should bringt it from 0 to 127.

What would the code look like if i want to switch pages with a button.
Because the button first says HIGH and i dont want it to switch on the HIGH status, because it would switch even while still holding the button down. I only want to switch after button is pressend and released.

Thanks guys
33  Forum 2005-2010 (read only) / Interfacing / Re: Arduino Midi Questions on: December 03, 2010, 01:34:57 pm
Yeah i bought that rainbox ribbon cable for my MidiBox Sid MB-6582 project. Still have some left, its perfect for every DIY Project.
Just ruined a potentiometer for my Delay Unit while fitting the knobs again.. damnit.. those are hard to get smiley-sad

Hopefully i can fix the Vacuum Speaker, because i dont wanna buy that one again too.

Slim fits are always a little "part consuming"  smiley-wink

I got some cool ideas for the LEDs.. hope i can ask you if i got problems ? Thanks
34  Forum 2005-2010 (read only) / Interfacing / Re: Arduino Midi Questions on: December 03, 2010, 12:02:49 pm
Hello.. Project is right under construction at the moment.. Will have to make the Hardware mounting first, and then start coding. Hopefully i will figure it out.
This is what it looks at the moment.
I will not use a LCD anymore.. i want to display it with LEDs.. I use the LCD Windows to look inside the case where it will be illuminated by an LED (different colour every time you change the Page of the Settings).

I made a quick measuring test. Everything should fit inside this small sucker, i dont know how but it does somehow, not even a small ant could fit in anymore if all the parts are in.. haha.. Still waiting for my Li-Po Battery.

I am off to work now.. hear you all later.. sorry for the bad and messy pics, no time to clean up the acryl  :-[
35  Forum 2005-2010 (read only) / Interfacing / Re: Arduino Midi Questions on: November 26, 2010, 06:00:33 pm
The case is currently shipping.. so i havent received it yet. The Ponoko Site is really good and tells you whenever you got some errors inside your vector graphic.

I didnt set it to public because its a prototype that is just for testing purposes.

I will have to redesign as soon as i know how much buttons, potentiometers, LEDs and so on i will have on my final box.

I see endless possibilities with arduino..
I could make LFOs, Arpeggiators and Sequencers just with rewriting the software once i have built it completely (no more opening).

Which adds a lot of comfort to my musical hobby. I may spent 300 dollars now, but after that, every feature that is added is priceless, and increases with my skills. That is something that really satisfies me about Arduino.

I heard about Arduino a year ago, but didnt read into detail.
About 2 weeks ago i read that you actually can built your own musical equipment and stuff, so Arduino got me  8-)

Hopefully i will have success.

Your project seems really interesting, be sure to keep me updated. Servo Controlled midi seems so cool you could have a whole band play on drums and even piano. The Arduino Big Band  ;D
36  Forum 2005-2010 (read only) / Interfacing / Re: Arduino Midi Questions on: November 26, 2010, 05:29:27 pm
Hey NoMuse.. thanks for your input.

As far as charging a 9V via USB, i found a better Method that is far better.

I bought a Li-Po Battery with 7.4 Volts and 3000 mAH and a charger.
I used a 5V Regulator to get it down to 5 Volt. 5 Volt drives my Speaker with integrated Amplifier. I also plan on putting a Dual USB-A Socket on the Backside to charge any kind of USB device when i am not at home (because the 3000 mAh Li-POs are strong enought to handle that). Because my box should be fully portable and capable of some things that could be quite handy.

I then just connect the charger to my device (the charger got a protection for overcharging which is a far better idea than just letting it hang somewhere for hours without knowing the actual status).

I drive the cooling fan inside my case with the 7,4 Volt. Also the Arduino. I may need a Step Up Converter for the Delay Effect unit i build into the case (it looks like i designed the Ponoko Acrylic Case too small to actually make the effect PCB fit in, but well its a prototype  smiley-grin)

I think i will use a lot of LEDs at first because i ordered the Arduino Mega and i have enough free Pins and it makes a lot of things easier at first i think (i got like a 400 LEDs spare in different colours and sizes from earlier projects).

This is my homestudio at the moment.. it is awaiting the arrival of my first selfmade device, hope that it works out. But i guess its a good thing that the arduino is not here yet so i can really focus on learning coding at first.


Wishing you all the best, greets from tyrol / austria  smiley
37  Forum 2005-2010 (read only) / Interfacing / Re: Arduino Midi Questions on: November 26, 2010, 04:48:25 pm
Hello! Thanks for the example.
I want to use the MidiUart Library as it is easier for me as a complete newbie to arduino. I think i get the Idea behind your example.
So on every Button press it is going one Case up ?! am i right ?
So i could define a MidiCC Channel Change inside those "cases" ?
Well i guess the easiest way is to try it when i get my arduino.. Can anyone recommend a got read on the topic Midi Controlling via Arduino or Sound synthesis ? Because i have to stay on the theoretical side for another 2-3 weeks till the package from china arrives.

I finished the Power supply, Charging, Battery, Case, Speaker, integrated amplifier planning stuff, so there is "only" coding and building left.

So if i want to have multiple functions for a Button (digital) or Potentiometer (analog) i can use something like the example above ?
If the LCD should display where i am at the moment, i have to type the lcd.print inside the corresponding Case ?

Thanks for your time @ all
38  Forum 2005-2010 (read only) / Interfacing / Re: Arduino Midi Questions on: November 26, 2010, 12:10:51 pm
Hello.. thanks for your reply.. I am from Austria. I made a mistake, i thought i would get it cheaper in china (which actually is true) but they told me that it would take 25 days to ship after i already payed for it. I got to wait a little longer, so long i am reading the Ebook. I found something that might help me.
The only thing that i cant find on google or on the forum is how can i Control different Midi CC lets say... 12 Midi CC with just 4 Potentiometers ? There is something like "switching pages" but i havent found an example. I want to place a Button that changes "Pages" everytime i press it. The LCD Should display on which page i am currently. something like this:
This is the LCD Display when button hasnt been pressed yet and you made some changes with one of the potentiometers

  SAW   64    30   127

after pressing the button it switches to something like this:

    10    20   12     0

This is the code from the book:

// Einbinden der Debounce-Library
#include <Debounce.h>
// Einbinden der MidiDuino-Library
#include <MidiUart.h>
#include <Midi.h>
MidiClass Midi;
// Speichern der aktuellen Potentiometerwerte
int potValues[4];
// Die LEDs sind an die Pins 10 und 11 angeschlossen.
int ledPins[2] = { 10, 11 };
// Konfigurieren der Buttons, die an die Pins 12 und 9
// angeschlossen sind
Debounce debounce1(20, 12);
Debounce debounce2(20, 9);
// Speichern der vorigen Tasterwerte
byte prevButtons[2] = { HIGH, HIGH };
// Speichern der aktuellen Tasterwerte
byte newButtons[2];
// MIDI-Tonhöhen, die beim Drücken eines Tasters gesendet werden
int buttonNotes[2] = { 60, 61 };
// Speichern der Controllernummern
int ccNumbers[4] = { 10, 11, 12, 13 };
void setup() {
// Initialisieren der MIDI-Schnittstelle
// Konfigurieren der LED pins als Ausgang
pinMode(ledPins[0], OUTPUT);
pinMode(ledPins[1], OUTPUT);
// Konfigurieren der Buttonpins als Eingänge, mit Pull-up-
// Widerständen

pinMode(12, INPUT);
pinMode(9, INPUT);
digitalWrite(12, HIGH);
digitalWrite(9, HIGH);
void loop() {
// Einlesen der Tasterwerte
newButtons[0] =;
newButtons[1] =;
int i;
for (i = 0; i < 4; i++) {
// Auslesen des Potentiometerwertes
int value = analogRead(i);
// Konvertieren des analogen Wertes in den MIDI-Wertebereich
value = map(value, 0, 1023, 0, 127);
// Erkennen, ob der Potentiometer bewegt wurde
if (abs(value – potValues[i]) >= 2) {
// Speichern des neuen Potentiometerwertes
potValues[i] = value;
// Senden der Control Change-Nachricht
MidiUart.sendCC(ccNumbers[i], value);
for (i = 0; i < 2; i++) {
// Hat sich der Tasterwert gegenüber dem vorigen Wert
// geändert, dann wurde der Taster gedrückt oder
// losgelassen.
if (newButtons[i] != prevButtons[i]) {
if (newButtons[i] == LOW) {
// der Taster wurde gedrückt, Note senden und LED
// anschalten
MidiUart.sendNoteOn(buttonNotes[i], 100);
digitalWrite(ledPins[i], HIGH);
} else {
// der Taster wurde losgelassen, Note stoppen und LED
// ausschalten
digitalWrite(ledPins[i], LOW);
// Speichern der neuen Tasterwerte
prevButtons[i] = newButtons[i];

If you could just give me a hint what it would look like i think i can figure the rest out, will search more on google but i dont really know for what to search (how is this page switching called?)
Can i place LCD.PRINT right under the MidiUart.SendCC with something like this:

lcd.setCursor(0, 0)
lcd.setCursor(1, 0)

or am i completely wrong ? I hope that i dont bother anyone here..

Greets from the snow covered austria.
39  Forum 2005-2010 (read only) / Interfacing / Re: Arduino Midi Questions on: November 26, 2010, 12:03:54 am
I think i got a start..
I will just let th MidiVox receive Midi Signals and dont modify the code.. But i will try to get my Potentiometers to send CC Signals and connect the Midi Out directly to the Midivox MIDI IN. This should work, this way i can write my own stuff without the need to modify the Midivox Source and without losing the external Midi Control Ability.
Will take some more weeks till i finally get my Arduino from china (this is the last time i order something from china..)

I will read a little more into my ebook as i start figuring out how Midi actually works. I think i can make faster progress as soon as i got the arduino to directly test anything i modify and try.

It is so hard to wait for it to arrive.. i almost explode .
Will keep you updated on my progress, and i hope i can ask if there are some problems. Thanks
40  Forum 2005-2010 (read only) / Interfacing / Re: Arduino Midi Questions on: November 25, 2010, 09:17:39 am
Hello Nomuse thanks for your reply.

I know that i have to split projects up in little sub projects, i did so in the past. I studied the source of the Arduino Piano Squealer (which uses 3 Pots to control the Filter/Waveform/ and so on insted of 0-10 Midi CC from Midi IN) It uses it like this:

"Since the Pocket Piano has only 3 potentiometers available for control (the 4th one being hardwired to the volume), I use a “page” system to implement series of 3 parameters to fiddle with. To switch “page”, use the rightmost note of the A.P (NOT the one under the led, the one left to to it)."

The Midivox is a project made from the Code of the Piano Squealer but uses Midi CC Signals. I tried to find the differences in the code but i dont get it... i am too dumb it seems.
I cant find shematics for the Piano Squealer but it uses Shift Registers for the Note Buttons (maybe for the Potentiometers too ?) So i think i would only have a chance if i could find shematics, copy some of it, and as soon as i got one button working, start from there.

But all i got at the moment is nothing because the Midivox has his focus on Midi IN controlling. I will have to read the Arduino Ebook i have because i just cant find the logical defintion behind the code.

On the Piano Squealer you press a Button and then use the potentiometers.. that is just too much for me to ever find out without knowing where to look at. I tried to google almost every word in the code to find out where those button press could be defined and can be modified, but i just dont get it. I will start building the Hardware side, and then try to find out, shipping till take little longer so i thought i could just start getting into coding, but this doesnt work out without the hardware as far as i can tell.

Thanks to anyone who replied.
*depressed*  :-?
41  Forum 2005-2010 (read only) / Interfacing / Re: Arduino Midi Questions on: November 23, 2010, 05:34:03 pm
Thanks i ordered the MidiVox.. I saw that it is controlled by CC Midi Signals. Would it be a problem to rewrite the Code so that i Control the Settings via Potentiometers ? Or is it too difficult for a newbie ? I also want to use normal Buttons for triggering notes because it should be Portable. <-- Theres the source.. I read through all of the Sources but i dont really get where to modifiy yet.
It will take some time till it arrives. Will have to learn more, i am afraid that it will take a year till i am able to realize what i have planned.
Anyone got a clue ?
42  Forum 2005-2010 (read only) / Interfacing / Arduino Midi Questions on: November 20, 2010, 01:33:18 pm
Hello all, i recently posted on the german forum.Because there are so many talented english speaking members i want to ask my question here also.

I want to build a box.. Powered by 6xAA Accus (6x 2300 mAh should be about 8-8.5 Volts fully charged) which i charge VIA Usb and a 7805 Voltage Regulator.

The Device itself should have a Menu to choose from at the beginning.. something like that:

1. Midi Sequencer
2. Midi Player
3. System Info
4. Save/Load Data

I got some 24LC512 that i saved from another project (MB-6582).
I am a complete newbie to coding and arduino, so i am currently reading Ebooks and trying to figure out what its all about.

I found a page with a 8 Step Sequencer but i want to have a 16 Step one, maybe where you can save and load the sequences you made to a 24LC512?! Is this possible ?

On the Midi Player part of the device i am not quite sure because i havent found anything on google that someone made a Midi Player (that plays .mid files) and sends it out via Midi Out ?

On the System Info Part i want to measure the Voltage of the Accus, or at least some number that tells me if its fully loaded or completely down.

I know this is alot of stuff for someone who has no clue what he is talking about, but that is just my goal, achieving it will take some time but maybe some of you have got a clue so that i can start reading through the theoretical parts.

My Arduino Mega 1280 should arrive in 2-3 weeks. I ordered a HD 44780 compliant 20x4 LCD. I planned a case with 6 buttons, 3 pots and 1 encoder.. I dont know if i can maybe use the pots to tweak the midi signals live ? The encoder should be used to change settings inside the menu or the sequencer.

Any help would be very appreciated, i want to learn, but i am better in building stuff than in "planning" and "coding" it.. havent done something familiar yet.. Only build a Midibox SID MB-6582 and a X0xb0x and some little stuff like a small audio amplifier.

Thanks guys.. have a nice weekend
Pages: 1 2 [3]