News:

SMF for DIYStompboxes.com!

Main Menu

Guitar-to-MIDI project article

Started by Mark Hammer, November 02, 2009, 01:07:26 PM

Previous topic - Next topic

jman 31

#60
OK, now I am embarrassed. It was the midi lines. I an not sure why, but the midi jack in Eagle cad was opposite of the actual drawing. I have used that jack in eagle before so I am not sure why it was that way. Anywho, it works awesome! Thanks for the help Potul!!!

potul

Murphy's law again... :)

It always happens to me, so if it doesn't work, I try reversing the MIDI out wires. I'm happy to see it works. LEt us know your experience.


jman 31

I had another question if you guys don't mind. I have designed midi driven lights for my electronic drums and I want to do the same for the guitar using this circuit. My light system will run 39 separate lights. Since I have the possibility of 144 notes on my guitar I am needing to double up some of the notes. My thought was to have every third octave trigger the same light or something along those lines so that the 39 lights would cover all of the guitar notes. Would it be possible to tailor the FW to do that? I don't need it to trigger anything on a computer (it's for live shows) so it doesn't matter if the notes are doubled up.

Potul, if it would work, would you be interested in doing it? (for a fee of course) :icon_cool:

potul

Sure, it should be easy to do. What octaves your lighting device uses?
By the way... the guitar does not have 144 notes. Take into account that most of the notes in the fretboard are repeated. In a 24 fret guitar of 6 strings you have only 49 notes. A possible approach would be to simply reduce the octave number of the 10 higher notes. This would give you 39 possible notes.

Regards,

Potul

jman 31

For some reason my lights will not flash if I use an octave. Say if I strum an open "E" and assign the midi value of 40 to it as you suggested it works fine. But if I move up to the 12th fret and strum that "E" the same light won't flash. That is why I assumed that it would require a different midi number. My lights use any note numbers 1-127 on the midi scale. I assign a number according to the note that I want to use and it will flash. Does any of that make sense? I wouldn't mind if the same light would flash for every "E" on the fret board, but it doesn't seem to work that way. I must be missing something. Here is a video of how my lights work.  http://www.youtube.com/watch?v=_zV3aN6SSNg

Thanks for the help Potul!!!

J

potul

Let me see if I understood. Your lighting device works so that you assign to each midi note a light to trigger, right? And have you can handle all 127 notes, but you have only 39 lights. (can you assign multiple notes to the same light?)

The way the midi interface works is you will get a midi note 40 with a low E (6th string open), but you will get a 52 at the 12th fret. You need to have both of them assigned (40 and 52) to something for the light to trigger.
If you want all "E" to trigger the same light (the one assigned to midinote 40), this can be done easily in the code, but then you will only be able to light 12 lights.

Am I missing how this works?....

To better understand the purpose of this. Are you trying to get some kind of light effects out of it? Is it  important the note assignment? (I mean,.. do you always want to trigger a given light with a given note, or is it not important?)

Potul

jman 31

Quote from: potul on July 15, 2010, 04:55:19 PM
Let me see if I understood. Your lighting device works so that you assign to each midi note a light to trigger, right? And have you can handle all 127 notes, but you have only 39 lights. (can you assign multiple notes to the same light?)

Yes that is exactly right. My coding and hardware is set up to handle 39 triggers. I can assign more than one light to a midi note, but I can't assign more than one note to a light.

Quote from: potul on July 15, 2010, 04:55:19 PM
The way the midi interface works is you will get a midi note 40 with a low E (6th string open), but you will get a 52 at the 12th fret. You need to have both of them assigned (40 and 52) to something for the light to trigger.
If you want all "E" to trigger the same light (the one assigned to midinote 40), this can be done easily in the code, but then you will only be able to light 12 lights.

Am I missing how this works?....

You seem to be understanding how it works, and I understand the 12 lights that you mentioned. This was my initial thinking in having every third octave or so trigger the same light. That way I could use more of the lights than just 12. Does that make sense? How does the 49 note variations figure in to all this?

Quote from: potul on July 15, 2010, 04:55:19 PM
To better understand the purpose of this. Are you trying to get some kind of light effects out of it? Is it  important the note assignment? (I mean,.. do you always want to trigger a given light with a given note, or is it not important?)

Yes I am using it with power LED's or LED strands to make interactive stage lighting. I will also be designing it for a keyboard and hopefully other midi instruments. I think the only way to do this would be for a given note (or notes) to trigger a given light.

Thanks again,
J


jman 31

#67
edited: accidental post, sorry.

potul

good, what I don't understand is why your E on the 12th fret is not working. Is it because you haven't mapped note 52 to any light?

What I would propose is to add a check so that if the midi note is higher than 76, we reduce it by 3 octaves. This way you will always have a  value between 40 and 76. And then you will need to map midi notes 40 to 76 to some lights.

Potul

jman 31

Yes, I had not mapped it to 52 which I'm sure will work. I also think I understand the 49 notes now and I am going to try some variations with that to see if it works.

I will get back to you today after I play around with that.

The idea that you presented may indeed be the way to go. Then I could use 36 of the lights right? I think you have a good grasp on what I am trying to do! :icon_cool:

Thanks for your patience,
J

potul

Ok, let me know your results. I will try to change the code during this weekend.

By the way, I was thinking... instead of 36 we can do 48 (12x4)... this would utilize almost all of your lights.

Have a nice weekend.

jman 31

I am not sure exactly what you mean by the 48. I only have 39 lights to work with. Am I missing something there? :icon_redface:

I tested the 49 note theory and it checks out. As long as the pitch is the same it will flash, so midi note 52 works for the 12th fret on the E string and also on the "E" on the A string and the D string and so on. So I actually just need to map the notes so that the 49 pitches will work with 39 lights. I would say that it would be best to map the single pitch notes to a corresponding same letter note, so say the low "E" string which only has one pitch note would be midi note 52 instead of midi note 40. See what I mean?

Please check your PM's when you get a chance.

You have a great weekend also!

J

jman 31

I charted out the 49 different pitches on a 24 fret guitar and I think it would actually be better to do it in octaves. Using the pitch method, some of the notes/pitches are repeated up to six times, and some as few as 1. That would make certain notes flash a lot more than others. What do you think?

potul

Quote from: jman 31 on July 16, 2010, 10:25:09 AM
I am not sure exactly what you mean by the 48. I only have 39 lights to work with. Am I missing something there? :icon_redface:

sorry... I messed up the numbers.... and for whatever reason I understood you had 49 lights...

I don't get the point on sending note 52 with the low E. I see 2 options

Option 1- Add a condition in the code, to do something like:

If midinote>76 then midinote=midinote-36

This way, you will have different midinotes in all the fret except when you reach the forth octave, and the midinotes start again at 40. You will havfe 36 different midinotes output.

Option 2 - Restrict output to one octave only. This way, all E in the fretboard will have the same note. But this means you will only have 12 different possible values.

Let me know your preference and I can implement the change. (I think easily)

jman 31

I think the first with the octaves will be he cleanest application. I am glad that it won' be a terrible amount of work for you! I look forward to testing what you come up with!

Thanks again,
j

jman 31

Just wanted to thank Potul publicly for his help on my project. He rewrote the programming for me to work with my application and it works perfectly. He did it purely out of kindness and I really appreciate it.

Thanks again man! You rock!
J

potul

I'm happy to see it works. When you finish the project, don't forget to post a demo video so that we can see the result!

Regards

Boogdish

I really want to try this out, could someone please post a diagram or explanation of the circuit surrounding the chip?

Taylor

I think you might have to buy the article to see the schem.

Gurner

was there any ever conclusion here wrt tracking/handling pitch bends?