Show Posts
Pages: [1]
1  Using Arduino / Audio / Re: is there other software for midi controller but not ableton or garageband? on: October 24, 2012, 07:22:59 pm
A pretty good one thats free opensource, and works on all three major os's so dont let the name fool you, I run it on windows is:
LMMS - Linux MultiMedia Studio http://lmms.sourceforge.net/

MMS is a free cross-platform alternative to commercial programs like FL Studio®, which allow you to produce music with your computer. This includes the creation of melodies and beats, the synthesis and mixing of sounds, and arranging of samples. You can have fun with your MIDI-keyboard and much more; all in a user-friendly and modern interface.
Features

    Song-Editor for composing songs
    A Beat+Bassline-Editor for creating beats and basslines
    An easy-to-use Piano-Roll for editing patterns and melodies
    An FX mixer with 64 FX channels and arbitrary number of effects allow unlimited mixing possibilities
    Many powerful instrument and effect-plugins out of the box
    Full user-defined track-based automation and computer-controlled automation sources
    Compatible with many standards such as SoundFont2, VST(i), LADSPA, GUS Patches, and MIDI
    Import of MIDI and FLP (Fruityloops┬« Project) files
2  Using Arduino / Audio / Re: Still unable to send CC using MIDI Library on: October 24, 2012, 08:46:25 am
Do you have any other brands to try, I went through a whole lot b4 i figured out it was the pots, I ha even checked mine with a ohm meter, and they seemed stable enough, but, in the end that's what it was for me. but, im using abelton, as nantoons who is a very helpful person has shown me that the code, I was using which I believe was based on yours worked for me on the software, but not one the hardware, he just posted, some code for me on the other post on here, I believe you started that one, as well, I just did a reply, so it should be towards the top, maybe some of the code he gave me will benefit you? good luck, who would have thought this simple task would end up being so difficult.
 Ive built extremely more complex projects with lcds, and composite tv output with customized "text and video", temperature controlled 110vac window fan, "night" lights using 110v ac & relays,  temp,humidity,altitude,and Barometric Pressure all displayed on a lcd, digital tape measures using sonar, and another one using Ir witch can also me used as safety or proximity sensor/ switches in a production plant, Infrared heat and motion detection alarm systems, an electric tuba, a synthesizer,base and treble visual Via Led volume meters, MORE...and then these dang  midi controllers, for some reason, have really been tough and compared to the others these should be a walk in the park, and for me it ended up being the dang pots, who would have thought?
3  Using Arduino / Audio / Re: Problem with sending MIDI CC messages on: October 24, 2012, 08:03:53 am
man I just wrote this big reply , and I accidentally hit the back button on my mouse, and lost it all.
I did get the code i posted on here last to work, I found out after buying some new pots for a different project, that all the pots i bought were garbage!, they seem to be pretty smooth with an ohm meter, but? while hooking those up, i had 5 ports working fine with various pot sizes, from 1k up to 20k and even a slider that I don't remember what the resistance value was, I had a button but it appears that it was an always on, so didn't work correctly. so I believe it was the pots, and that also answers the question of does it matter what size pot to use basically no but dont just buy the 10 for a dollar ones!
I believe one reason why the code that works for me doesn't work for you, and the code you give me doesn't work for me, maybe because your using hardware, and im using software (abelton), that's just a guess, but the code does work for me now that i have different pots, but  if i can use your code, and it will still work, then i know its ready for further projects, im waiting on a new patch cable, so i can hook it to my keyboard as we speak.
What was the reason it did not work with the mega? was it because of the location of the midi (din) plugs, or was it another issue?
Im also curious as what to do now that ive used up my six analog inputs, I want to add a few buttons and if possible maybe even more pots? what sort of code is needed to add them on digital pins can I just ad more inputs, at the top of my code and add more CC #'s and use the non-PWM pins, or would I need more code as well?
I am sorry to ask so many questions, but i know that this will help many others as well, because I tried to contact the manufacturers with my code, and they would not even give me a single pointer about any of it they said sorry we do not give code support, yet they don't have much for instructions other than only one jumper in each row, and two sample sketches, witch, are not very helpful.
If you search Google for the rugged circuits flexible midi shield you get their store, these postings, and a you tube video of a guy showing of the rotator, witch he made very nice, but it is just to show his finished piece no code, no explanations etc. so basically their is no support although I did ask we shall see if anything comes of it.
 so I do not even know what is specifically required in the code, and I haven even started on the midi in witch would not be part of this project anyway, so Again I thank you for your help.
I have seen the new "arm-duinos" some are even dual core etc, wow the power differences.... plus the built in capabilities, im still learning the basics b4 I jump to those, plus don't have the cash.
One last thing, before you toss your shield in the parts bin, do you have any sketches or code, you'd be willing to share, whether it be 1 or 100 I have a server and a site rduino.com , we can figure out details of how to transfer if ur willing to share, but I figure its worth an ask, before they end up deleted. even if I am the only one who owns this shield it would still be helpful to me and id make them available to all if you so wish.
Anyway thank you again for your time, It is very much appreciated, and even though I believe I have my issue figured out, I am going to study / try your code, as ideally i would like to have a hardware and software suitable code. Plus I hope to learn, thats what its all about smiley
Thanks again For your time and effort
HANKENSTIEN
P.S. I gave ya some karma point not sure what you can do with them but, Again thanks
4  Using Arduino / Audio / Re: Still unable to send CC using MIDI Library on: October 24, 2012, 07:09:15 am
For what its worth, I have been following this and one of your other posts, as I was having very similar issues. Nantoons was quite help ful there as well, for me my issue, as best as I can tell is that the pots I had were garbage, thy were new, or at least as far as I know,  bought them Very cheap of ebay. so i need a different pot for another project, so I had gotten some more, and it seems like that was my issue! and the strange thing is that i got the same stable results from a 1k and a 20k pot so that answers my question if it maters on the pots resistance, as I was using 5k pots, and though maybe I needed 10k  only because it seems like that's what is in many tutorials, I do think it would be a good size to use though.
In one of your questions you asked if you should solder your midi port, in my experience, any wiggle room will send all sorts of garbage thru so you may want to do that or if you are still needing it to be in the bread board, find some nice tight holes if you can and if it seems suspect you can always wiggle it around a little. and as a side note, I am using slightly modified version of your other code, combined with a couple lines  of nantoons, because, I picked up a midi shield to eliminate wiring problems, and then realized that i still had the same issues, but, that it was the same shield that nantoons was using.
Good luck, and post your results
HANKENSTIEN
5  Using Arduino / Audio / Re: MIDI to relay help... (glockenspiel pde) on: October 24, 2012, 06:52:54 am
Glad you figured ut out!, I am learning some midi stuff myself, and the theory of relays is interesting, glad I could help even if just a little.
Most important to me is that you got it figured out, and posted results. People forget that when you get your project fix, or figured out to post how you did it, just think of all the people your answer might help. To me nothing worse, then when Im reading a forum post, and i see all my similar issues, and the last post is, never mind i figured it out, no schematic like you posted, or any hint! It would be cool, if you ever end up putting it on you tube or anywhere to post a link, id be interested in your finished project. Or feel free to do an article or example on my site rduino.com I have been very slow at posting to it. mostly because I do not document man of my projects!
HANKENSTIEN
rduino.com
6  Using Arduino / Audio / Re: Problem with sending MIDI CC messages on: October 21, 2012, 11:21:34 pm
OK, After frying the other board, im starting over, and i decided, to pick up a midi shield, to save time, and get something to work then reverse from there to make my own (eventualy), Anyway I picked up the RUGGED CIRCUITS " FLEXIBLE MIDI SHIELD" so "Nantonos" , I appreciate all of your help before, and I realize after going back through this stuff it is the same shield you were talking about. I used your code, and it would only send a note no Potentiometer wipes, so i combined the two codes, and now have it correctly allowing the use of a potentiometer, But it is still erratic, for example To make this code I used the first part of the code shown at the top, and add the define pin 12 and the require midi.h.
 it works, but very erratic, when i say erratic, if i plug in 1 potentiometer it works fine, if i plug the pot into the next analog port, it will control both ports jumping between 22, and 23, no mater what numbers i give and how many "spots" i add the 1 pot controls everything at once, I want to be able to assign pot 1 to volume on track 1,  and pot 2 to volume on track 2 , and once i get stuff working, even assign them to effects or whatever , im using abelton so it is very easy to assign a pot to a location, but in the end its like it all sends the same data, while programing. when i have one pot programed, and I try to program the next as i turn the knob, it will move thru the CC's like 23,24,25 etc while programing. doesn't make sense, this is with just 2 pots wired directly to plus 5 ground and one in A0 and on in A1, In the end, either pot will control everything programed at the same time..
here is sample code.

Code:
#include <MIDI.h>
// MIDI enable pin, avoids conflict of Serial between USB for programming and DIN MIDI I/O
#define MIDI_ENABLE 12

// Variables:
int input_nb = 2; // select number of desired analog inputs (max 6)
int AnalogValue[2] = {0,0}; // define variables for the controller data
int lastAnalogValue[2] = {0,0}; // define the "lastValue" variables
int midiCCselect[2] = {22,23}; // select the midi Controller Number for each input (22 to 31 are free)
int thresh[2] = {1,1}; // select threshold for each analog input

void setup() {
    // enable MIDI
  pinMode(MIDI_ENABLE, OUTPUT);
  digitalWrite(MIDI_ENABLE, HIGH);
  //  launch MIDI
  MIDI.begin();
}

void loop() {
  for (int i =0; i < input_nb; i++) {
    //  My potentiometer gave a range from 0 to 1023:
    AnalogValue[i] = analogRead(i);
    //  convert to a range from 0 to 127:
    int cc = AnalogValue[i]/8;

    // check if analog input has changed
    if (cc != lastAnalogValue[i] ) {
      //send control change on cc#i
      midiCC(0xB0, midiCCselect[i], cc);
      //Serial.println(String(midiCCselect[i])+": "+String(cc));
      // update lastAnalogValue variable
      lastAnalogValue[i] = cc;
    }

  }  //  endfor
}

// sends a Midi CC.
void midiCC(byte CC_data, byte c_num, byte c_val){
  Serial.write(CC_data);
  Serial.write(c_num);
  Serial.write(c_val);
}

It has taken me awhile to figure out how to combine the codes, as I cannot find ANY code sources, for the rugged circuits midi shield, except what is on there website, and what you had here, but nothing about building your own "mixer" the whole idea is simple, and some pots to analog ins, and it should work, Nope, I even have a brand new arduino r3 as trying all the other suggestions from before fried my board.
so to anyone where can I find some sketches or what is wrong with either code. remember im using the rugged circuits flexible midi shield witch I thought would make thing easier, but Im no better of then b4 except now i have to add extra code that I cannot find Info on to make the shield work correctly. 
What a cluster f#c^

AGAIN "Nantonos"
I KNOW YOU PROBABLY HAVE SOME INFO HERE AS I SAID I NOTICED YOU HAVE THE SAME SHIELD< IT SEEMS LIKE WE ARE THE ONLY 2? I CANT FIND HELP ON IT ANYWHERE!
Thanks for reading, and yes i did try adding the byte parts to the end of the sketch made no difference either way.
Thanks for your time
Hankenstien
7  Using Arduino / Audio / Re: MIDI to relay help... (glockenspiel pde) on: October 12, 2012, 09:16:17 am
Well looks like you got the hang of fritzing! it a good tool, Now im just making sure that you do relize that where you have the D2 pin on the output of the arduino, you will need to hook each Dpin up to a relay IN so you have 4 relays you will need 4 more relays 8 in total if your going to use all 8 solenoids and all 8 Digital outputs D2~D9, right now you only have 1 active solenoid (D2 to IN1).
You may already know all this and just did a basic example on fritzing, but as you said you are new to this so you may not know? Ive been at it for about 6 months so im no guru but you will learn quickly. does that make sense to you so far you would use another wire to do from arduino D3 to IN2 on your relay board, and so on until you get to IN4 on your relay board, at witch point you will need more relays.

One other thing that makes me wonder is how much current the solenoids use, and if your powering them from a different power source, because you may be pushing the limits of a USB or even a 9 volt for that mater, depending on the power requirements of the solenoids.

Also if your just using one solenoid for now to try and get things running, looking at the code it says 2008, sometimes sketches work differently with different versions of the arduino IDE, if your using the newest version, V1.01 or even V1.0 I find V023 is a good stable version, and use it quite a bit, actually. you may even go back a little bit further and try V019 or so. If your using windows 7 some where around version 018~016 it stops working, I had some code I wanted to use, and it was based on V014 and would not load, so I downloaded every version up to about 017 I think b4 it would actually load up on windows 7 and the code was not compatible. I mention this because ive had programs compile with no errors, and not work in real life, then I would try it on a different version and it would work.

So their is some more ideas for you,and im sure others will chime in eventually with more help, I would look  to see what version of the IDE the code is working on for others sometimes the mention it in their posts.

Hope this may have helped. If not maybe you learned something?
Good luck
8  Using Arduino / Audio / Re: MIDI to relay help... (glockenspiel pde) on: October 12, 2012, 12:13:26 am
My guess is that you need to start with just one relay at a time. Hook up your ins ground Vcc and in1 should be your midi output signal, to create that signal you will need your code to signal a message to turn on in1. Showing your code would definitely help. but usually in midi the basic is that an input trigger with a 10k resister to an analog input will send a message. but this is all very general info, you can also use the digital inputs it all depends on your code, also notice the the 3 outputs of each relay one is always closed and one is always open and closed only when activated. so post your code you should get more help and your schematic if you can, if you haven't found it already there's a free product called fritzing easily found on Google to help you build circuits using actual parts, and then creates a schematic for you, and will even allow you to pay them to make you a pcb board, which i here is pretty good quality, but its a nice program, if you don't have it, I believe its cross platform and its opensource. Hope I may have helped a little, and with some more info, im sure some one with more experience will help, good luck!
9  Using Arduino / Audio / Re: simple audio input for arduino on: October 11, 2012, 11:56:11 pm
That is pretty cool looking, ive made a single row / double row of 12 leds's for a volume level.
First place i would check is the code, maybe try and ask the person in that video or others like it for their code.
Double check your resistors that their the right value, a quick check is by just visually checking color values.
The only issue I had is that mine would get stuck at a level like half way up(and halfway up would stay light up even with volume down or stereo of even a reset would not fix, I had to disconnect power), or if i maxed it out, it would get stuck their also, I fixed that, with a resistor across the +/- input. but again i was only using 1 or 2 rows of leds,  When I did make another row, and used a crossover from a speaker box so i had a 2 rows lows and mids, and if i had enough parts, i could have used the Highs as another row aswell, but that only gives 3 rows.
For yours Im not sure I would suggest you post your code, and someone may notice something, a simple extra space somewhere, or a wrong value can still compile, but give strange results. Hope this helps some or at least gets you thinking?
Good luck.
10  Using Arduino / Audio / Re: Problem with sending MIDI CC messages on: October 11, 2012, 11:35:04 pm
Well I Figured out the problem, or at least caused one? smiley-confuse
So while tacking each section apart trying to figure out where alll the " noise" was coming from in my pots, and why signals wer jumping from one pot to another, even though im using the 3 pin setup, first of all i disconnected all the pots, and it was still sending random noise occasional, odd, while trying to figure this out I used a shield with pins and so I could hook different pots up with the 3 pin connect quickly and buttons, no difference, except after removing the shield I tried hooking up the wipe to the analog ports again rally pointless at hthis point because, I know it does not do anything, then it finally happened that familiar smell of burnt electronics. while it still lights up and gives pull power to 5v and 3.3 to 3.3 the red led lights up, so i uploaded, the simple blinky no nlink, so i added an led, in case the internal or a resistor blew, still nothing, but i figure if all the power is ok at the various voltages, that it must be the chip, so I ran the loop back test I think its called, and that worked so WTF? i then tried the basic sketch that auto fades an led on pin 9 nothing, so i pulled the nano from my ir intrusion alarm, and used the same code "fade" worked fine, I then uploaded it again to my uno and nothing, so after reading the info I could fine everything points to atmega328 so I have ordered a new one. anyone else have any other thoughts on this? or something else it could be, to me it seems to be the weakest link, especially when the power system works and the voltage regulators, the only thing that makes me worry some what that it may be something else, is the fact that it will act like its uploading code I would think their would be an error their using version 1.0 of the IDE. This was my first arduino i ever bought, and so it been through quite a bit, while learning, so Im guessing that the beginners mistakes that have been made and things like that its probably a miracle it lasted this long infact i had already ordered some new header standoff pins as a few have gotten worn out, none related to this project, but still needed to be done. Maybe it burning out was actually a good thing, and the cause of all my strange problems with the pots and the midi channels finally had a reason the chip was on its last leg? lets hope a new chip fixes it.
Thanks to those who have been following this misadventure, now any input on chip failure would be helpful....
11  Using Arduino / Audio / Re: Problem with sending MIDI CC messages on: October 08, 2012, 04:01:02 pm
OK, so after switching the tx and the +5 thanks again "Nantonos" it actually does some stuff, but its not reliable at all, granted, i didn't solder anything yet, but for few Minuets every knob works perfect right up the row 22,23,24,25,26,and the switch 27 all worked 0-127!
 then it started jumping all around, i double checked and re tightened the connections, no difference 22, still works 0-127, 23 goes from 10 to 100 instead of 0-127, 24 goes from being 24 to also Chanel 25, 25, and also the number moves from aprox 33~51~ not 0-127, 25 is completely random at what it will do, 26 works 60-110~, and 27 the switch many times does nothing? then i checked the ground wire and made another connection and it worked fine for a little while then quit.
 then ill un plug it to reset every thing and all kinds of random stuff is generated then it acts similar to as I described.
 but the good news is I am getting SOME messages out, but their not correct, only sometimes rarely, but usually not? WTF?
sounds like a short or a lose wire, but i checked everything even re flashed the chip. ahhh now what it like I need to completly start over from scratch. This should be so simple compared to many other ive done web server that controlled radio controlled car,s sonar sensors with distance and temp and humidity out put to lcd, servo projects, IR remote control 110v relays for wall Outlet, in light socket rf relay socket control ect, the MINI-Synth,the "trombone" the tv out with custom graphics and text and fonts, to name a few, those all took a great deal more info, parts, code, and time, this one is just my Nemesis!
BUT I JUST FOUND A PLACE WITH LOTS OF LINKS THAT MAY HELP
http://arduino.cc/forum/index.php/topic,22336.0.html
12  Using Arduino / Audio / Re: Problem with sending MIDI CC messages on: October 07, 2012, 11:16:33 pm
ON ANOTHER PAGE i FOUND THIS PIC

and if im correct at looking at his we are looking thru the port so the +5 would be the 2nd pin up from the bottom wich means mine should be in alignment, that is of course its not from the back side, that is my issue.

(EDIT A FEW MIN'S LATER)
BUT.......
Then I found a pdf with another schematic, and I copied, and cropped it then put it on my server.

 Its from the same source as the other post, but, now makes me believe, that my lines are backwards, So i think im going to just have to take it all apart unsolder and re solder re solder everything just to test, and hope i dont fry my board, if i haven't already if it was hooked up wrong no actually I think it would have fried the keyboard or the usb to midi adapter first.
I hope some one can shed some light on this for me, I feel dumb, Ive done so many project with the arduino I have all 3 types, and a stupid connector has got me baffled! duhh! but We all live and learn right, so here is another PIC and although this is a plastic the pins are the same, and this one seems to show the 2 extra ground pins in the front which makes me believe im looking at it through the connector, and that i do in fact have my TX and 5V crossed, but the odd thing of this one is that it says to put the resistor a 240 not 220 on the TX  I cant imagine that the difference in 220 to 240 is all that much but they do not show too put one on the positive side, witch every other schematic shows?
13  Using Arduino / Audio / Re: Problem with sending MIDI CC messages on: October 07, 2012, 11:01:51 pm
"Nantonos" Thank you for your reply's i admit some of these functions and codes confuse me, but ive never touched c code before this im using what i know from HTML Perl and PHP,and with those I know enough to get some things worcking and change variables configs etc, I can usually figure out a proublem or get evrything to talk to each other like MYSQL ect. , except HTML i know most of that,but, I must admit in your first quote on the write() Function in relation to the 3 lines you cited.   
I do not understand what you mean.  maybe a little more info or an example?
In fact im not even sure at all what this top line is about.
Code:
byte AnalogValue[6] = {0,0,0,0,0,0}; // define variables for the controller data
this next line as I understand it is the last vallu of the message being 0 a return to off or o out of 127 if you will.
Code:
byte lastAnalogValue[6] = {0,0,0,0,0,0}; // define the "lastValue" variables
And these I understand to be the actual program number being sent like a number 7 is reserved for volume.
Code:
byte midiCCselect[6] = {22,23,24,25,26,27}; // select the midi Controller Number for each input (22 to 31 are free)
But this is just what I am assuming from the code i got from the top of the page, also I noticed that their is a descripancy on how my midi id hooked up, ive looked at a few of the different schematics and some show what is above, but even in thhose 2 pictures the fritzing pic does not match the schematic the fritzing has or at least from the looks of it the bottom pin going to 5+ but its labeled 2? I have mine wired like this pic


I alsso have own more concern why maybe none of this is working for me at all, im wondering if according to the schematic shown above I have it connected exactly as shown assuming that your looking at the back of the midi terminal, and it occurs to me that MAYBE they are showing the front of the terminal, but the lugs are on the back, so my plus and (TX) should be switched.
See, i do not know what pin number is what, none of my connectors are numbered, SO this has just occurred to me. mine is wired so that looking at the back of the terminal mine is the all metal kind with 2 screw holes, not the pcb type so looking at the back at the solder terminals top middle is not used 1st down on left and right side are not used.  2nd pin down on the left goes to 1(tx) middle and if im correct this is where you suggested I also need a 220 resistor. The bottom pin goes to ground, and 2nd pin down on right goes to 220 ohm then 5+ remember as I did this im looking at the back, but maybe the schematic shows the front witch would make my positive and my digital out (TX) backwards or hooked to the wrong side, can anyone confirm this? how do they describe the pin #'s by looking at the front of the plug as in where you would plug in or the back as it looks like in the schematic. because somethings wrong, I cannot get this thing to do any examples from the Example sketches from V023 or V1 of the IDE If everything wasn't soldered up, id just switch them and see, but as I mentioned, most of this was already in an enclosure all soldered up, for a different project an being this was such a simple change, i only need to remove a few wires, and ad a few.Plus the box is its metal, so I even got heat shrink on some of the positive leads, and the whole board is covered in Chrysler build tape so nothing shorts out being in the metal box and all.
 so if anyone can answer the pin out question first of all.
I just want to hear one sound come out or one control move, even if its the wrong one, ill know Im getting SOMEWHERE, and then i can move on to the code issue "Nantonos" suggested above, or maybe that's what i need? im at a loss Ive built way more complex thing with the arduino, and this should be simple, and I know its usually the simple things you overlook, that's what made me think of the opposite sides of the pi out because looking at the 2 pics I posted before those were right next to each other in the same tutorial, and those don't match to one another either? AS ALWAYS ANY INFO OR HELP ALWAYS APPRECIATED! THANKS FOR READING.
14  Using Arduino / Audio / Re: Problem with sending MIDI CC messages on: October 04, 2012, 07:29:01 am
Hello, And thank you you to all who can help, and hopefully I WE can help others as well and eventually turn this into a tutorial, so its Pretty thorough.
 I have been trying to get my home brew midi controller to work for a little while now, and this seems like the best code yet ay least for me. I use Arduino IDE V0.23 or V1.0
Code:
// Variables:
int input_nb = 6; // select number of desired analog inputs (max 6)
int AnalogValue[6] = {0,0,0,0,0,0}; // define variables for the controller data
int lastAnalogValue[6] = {0,0,0,0,0,0}; // define the "lastValue" variables
int midiCCselect[6] = {22,23,24,25,26,27}; // select the midi Controller Number for each input (22 to 31 are free)
int thresh[6] = {1,1,1,1,1,1}; // select threshold for each analog input

void setup() {
  //  Set MIDI baud rate:
  Serial.begin(31250); // 31250
}

void loop() {
  for (int i =0; i < input_nb; i++) {
    //  My potentiometer gave a range from 0 to 1023:
    AnalogValue[i] = analogRead(i);
    //  convert to a range from 0 to 127:
    int cc = AnalogValue[i]/8;

    // check if analog input has changed
    if (cc != lastAnalogValue[i] ) {
      //send control change on cc#i
      midiCC(0xB0, midiCCselect[i], cc);
      //Serial.println(String(midiCCselect[i])+": "+String(cc));
      // update lastAnalogValue variable
      lastAnalogValue[i] = cc;
    }

  }  //  endfor
}

// sends a Midi CC.
void midiCC(byte CC_data, byte c_num, byte c_val){
  Serial.write((byte)CC_data);
  Serial.write((byte)c_num);
  Serial.write((byte)c_val);
}
I have also tried cesarferrolho;s code, and that doesn't seem to change anything
Code:
Code:

void midiSend(char status, char data1, char data2) {
  Serial.print(status, BYTE);
  Serial.print(data1, BYTE);
  Serial.print(data2, BYTE);
}
I am using (5) 5k potentiometer and (1) 10k switch/button all to analog ins, but I still cannot get it to work. I do get some info on the serial terminal, but of course its just a bunch of gibberish, and I'm sure part of that is not being able to listen at a  baud rate: of Exactly 31250 but each individual knob sends out a different type of "word" or "letters" of gibberish, and each individual knob generally sends the same gibberish each time.

 In the first few lines of the original code that's on here every thing was related to 2 controls so when I added the
int input_nb = 6; [/i] instead of int input_nb = 2; [/i] It would not compile.
So I added the int midiCCselect[6] = {22,23,24,25,26,27}; [/u]  again It would not compile (The errors all pointed me to these areas) so I figured I OK I get the idea and made every thing in The first 5 lines of the code into a set of (6) .

  I even played around with the numbers from a chart i found that lists all the midi control number and tried plugging some of those in like 7 or 11 witch are for volume. I also tried 64 I think it was for sustain pedal, because I was trying this on my Keyboard,and separately my computer using software like Puredata (PD), hydrogen, and even got a trial of abelton witch is what everyone seems to use in tutorials on YouTube. It still did not change anything.
 I'm using a cheap USB to midi adapter and if I hook the keyboard up to the PC I can make some stuff happen.I was suspect of the USB to midi device it self, so I finally rewired and fixed my keyboard to get confirmation that it was not the USB Device. SO I do know that the USB device works and it lights up green for receive message and blue for send when I try my home made device nothing lights up. My device is similar to what you see in these pics

These images are from http://itp.nyu.edu/physcomp/Labs/MIDIOutput and I even tried to use code the on that page among others, nothing seems to work!

  The difference in the schematic is I have (5) 5k pots with their center / wipe / sens pin connected separately at A0 through A5 , but no resistors inline with the pots. Just a 220 ohm at the 5v midi connector, and a 10k at the switch and all the proper grounds. I've read that you can use any value above 1k for potentiometers for midi. also all the connections on the pots are soldered in Parallel with the wipes or sens (Middle wire) each going to a different analog in port A0~A5, and all the connections to the midi jack are soldered as well just to be sure of secure connection, the reason being is that this was a different project at one time where I used the 5 pots and a headphone out as a simple synth it's the common one you see floating around every where on youtube, Instructibles, Fritzing, and  my site Rduino.com

ANY AND ALL HELP WILL BE APPRECIATED TO GET THIS TO WORK I HAVE BUILT MUCH MORE COMPLICATED THINGS,
THIS ONE JUST WILL NOT DO ANYTHING BUT BE A PAPERWEIGHT!
Thank you for your time and effort in at least reading this please feel free with ideas im about out, ive tried code from probably 10 sites nothing works!
2 thing's I thought of while typing all this is that:
  • 1. I'm only using USB power I'm not using any LED's or anything, but maybe it needs more power, do you guys find you need more power?
  • 2. is it necessary to use a 10k or even a 5k because my pots are 5k's as a pulldown to ground, other schematics do not use it, but I just re-noticed it on the pic's do you guys use pulldowns?

15  Using Arduino / Project Guidance / Re: 1 arduino +1 ethernet shield +1 relay shield, how to ? on: June 28, 2012, 01:15:05 am
HI I DID THE SAME THING.
A quick way and you can clean up code if neded, is to use the built in examples for turning the led on or off, but instead of the led hook up the "sens" pin to i believe its pin 4 in the code. Use a 5v arduino based or 5v ready relay. its real easy you would use a relay like you can find on here http://s.dealextreme.com/search/arduino+relay?r.22337885
Good luck
HANKENSTIEN
Rduino.com
Pages: [1]