Power supply is built, but not yet tested. Oh, how I wish I had a variac so I could turn up the mains voltage gradually! Will report back tomorrow once I, you know, sleep...
I think we've got a winner here! I plugged it in this morning (picture me standing as far back as possible, safety glasses on, ready to yank the cord...) and it didn't blow up! Not only that but the power rails seem to be nice and steady where they should be. I haven't had a chance to fully test it yet, but a quick check on my scope showed very little noise and no periodic waveforms or ripple. I guess I'll know for sure when I use it to power the guitar!
Please show a video! I demoed Karplus-Strong on a TBot in front of 100+ HBRC hobbyists at Google headquarters. Very nice sound compared to the sine and square wave tones other robots have played for the last 50 years.
Hanno
Please show a video! I demoed Karplus-Strong on a TBot in front of 100+ HBRC hobbyists at Google headquarters. Very nice sound compared to the sine and square wave tones other robots have played for the last 50 years.
Hanno
Will do, I just need to get my new power supply up and running. Well, it's running, but I need to stuff it into a case so that it's safe to use.
OK, I finally hooked up my new power supply in a somewhat permanent fashion. OK, it's safe - screwed onto a chunk of wood. Still have to find a case for it. Anyway, here are some waveforms for the three output voltages. As you can see, I've managed a nice clean 20mVp-p ripple on each line, which translates into zero noise and hum at the output! Argh, still kicking myself for not doing this ages ago, but at least I've learned not to trust switching power supplies when it comes to audio.
OK, I finally hooked up my new power supply in a somewhat permanent fashion. OK, it's safe - screwed onto a chunk of wood. Still have to find a case for it. Anyway, here are some waveforms for the three output voltages. As you can see, I've managed a nice clean 20mVp-p ripple on each line, which translates into zero noise and hum at the output! Argh, still kicking myself for not doing this ages ago, but at least I've learned not to trust switching power supplies when it comes to audio.
So tonight I'll be putting my guitar back together again so I can continue with the software work. Feels nice to be getting things accomplished!
Do you have new florescent lights in your shop? LCD back lights can also sit in the ~100KHz range. The 1GHz scope at work has a 105KHz brightness ripple in it's back light. I put that flicker to good use testing some amplified photo-diodes that needed at least 100kHz bandwidth. THAT "quick" project was a crash course in low noise Op-amp design! 147KHz is a high enough frequency to couple into a scope's ground wire, have you looked at what the scope measures with the ground wire hooked to the tip? Your linear regulators may be performing better that the scope screen shots show.
Otherwise, I'll re-iterate that I think you could have gotten away with just using a linear regulator for the 3.3 volt rail. The 3.3 volt rail IS functioning as one reference voltage for the PWM DAC, so in retrospect its fairly obvious that it needs to be clean . (the other reference for the DAC is ground) Also, the couple tests done with the output filters powered and the string output stopped, show that the output op-amps can reject the level of ripple the PC supply had on the +5 and - 5 rails.
Yep, there's a fluorescent work light directly above, plugged into the same circuit. The room lights are fluorescent as well. I'll measure again with the lights off!
A linear regulator is what I used for all three voltages. 7805, 7905 and an LM317 for the 3.3V line. Oh, and some huge filter caps. Perhaps if I get a chance I'll hook up both supplies to see if it was the 3 or 5 volt line, but what you said makes sense - a ripple would affect the PWM DAC, and if the signal were within the voltage rails of the op amps then the signal would remain unaffected.
I suppose in the end I wanted to design a dedicated power supply anyway. Once I publish plans (?) I want others to be able to grab off the shelf parts, rather than hack a computer power supply.
I got started on my menu system today (as in, after midnight...) The guitar features a 4x20 character LCD screen, controlled by a rotary encoder with a built-in switch. The user presses the dial to bring up the calibration menu, then can scroll through a number of tuning presets. The most difficult part so far is getting the encoder input to work properly. The official Parallax code works best of all the objects on the OBEX, but it still counts two "ticks" for each detent on the encoder. That would be fine if I could get away with simply dividing the count by two, but sometimes it only counts one tick, or three, so it's not so simple. Perhaps I'll have to work a modulo in there to determine if the Delta is an even number or not. However I end up doing it, I want a positive or negative integer that corresponds to how many detents the user felt when they turned the knob, and have that move a cursor on the screen. Hopefully it'll be up and running tonight and I can start loading in different guitar tunings.
Rotary Encoder and basic menu are working. I was having a lot of trouble with it at the start; sometimes it would work and sometimes not. Turns out I had a bad wire leading up to the rotary encoder, so that only one of the pins was reliably switching. That set me back another evening, but oh well. At least I found a clever way (for me, anyway...) to switch menu positions through all this troubleshooting.
I guess tomorrow night I'll start with the tuning menus.
Finished up the power supply tonight. It now has a shiny new case that is roughly 1.25 million times better than the old one. Check it:
In case it's a little hard to make out, I cut the vent holes in the shape of an ionizing radiation (nuke) symbol. The holes are covered in screen mesh (cut from an old screen window!), and backlit by a colour-changing LED. I cut the holes using a drill press and my trusty scroll saw. The whole thing is painted with Krylon spray paint.
Overkill? Perhaps. But you know what they say, if you're gonna do something......
Success! I managed to get my tuning-selection menu working. Right now the user is able to select from one of 15 different guitar tunings; three from a regular guitar (four of the six strings) and the rest are bass guitar tunings. The next step is to add a "custom tuning" screen where the user can select any open string frequency for each string, then save it to memory. I used a 64k EEPROM so there's lots of room to store custom tunings. Well, that's the plan, anyway. For the first release the guitar will simply remember which tuning it was set to the last time it was used.
When will you upload a video to show off this great project ?
When it's done! My plan is to release full build instructions on Instructables, and I don't want to post a video on YouTube until those instructions are up. Otherwise, I'll have thousands (a guy can dream!) of requests from people who want to know where I got it, how to make one, how much I'd be willing to sell it for, etc.etc. So don't worry - audio and video are planned and coming, but the timing is carefully planned as well.
After much tinkering, I finally finished the menu system for my laser guitar. The user is able to enter a Tuning menu, where they can choose from a number of different pre-set guitar tunings, or they can dial in a custom tuning. The tuning values are then used in the main program to change the pitch of the string. I'll also tack on some code that saves the current tunings into EEPROM memory.
The next step is to integrate all that code into my main program.
After that, the last thing I need to do is to build a fret position calibration program. The membrane potentiometers don't all measure alike even though the positions are the same, so a calibration routine is required to ensure that all the fret positions register properly.
I've got plans for features beyond this, but I want to get the guitar to this point first.
Calibration program is done! I've created a companion program whose purpose is to fill the EEPROM with tuning values and calibrate the membrane potentiometer strings. I'm using memory management to store the values in the top half of a 64K EEPROM. It took a while to get it running properly (especially storing arrays) but I figured it out eventually.
So, now I just need a few tweaks to my main program, and I should be good to go...
BTW, you might want to hack the code so each string's KS code has a buffer just large enough to work with the lowest pitch that string will play. And since you are using a different cog per string, with its own DAC output, you could even have all strings use a fairly small buffer, and just change the sampling rate for each object.
Once I added the additional feature I needed I ran out of space again. Reducing the buffer from 1680 seems to have a negative effect on the strings (the pitch changes) - even a setting of 1500 messes them up. I'll post the code in the other thread I started regarding reducing the size of my program, maybe some smart folks can help me out and boost the efficiency of my program a bit!
If you reduce the sample rate by 1/2, I would expect that you could also reduce the KS buffer size by 1/2 (and by "expect", I mean it works for me, not that that helps you any [8^). I noticed in your code from the other thread that in the function "MULTI_KS" (called from _main) you pass in the sample rate, but in "start_string" (called from statetune) you use the constant sr, which is set to 96000; is it possible that that is causing a mixup when you try the lower samplig rate?
I'll try again tonight, and make sure that both the main KS.spin and my multiKS are both using 48k throughout. start_string was added so that I could restart the strings after retuning them, and I was always careful to restart them with the existing sample rate. But maybe I messed up. And maybe I should remove that ability completely, and just have the sample rate fixed at 48k from now on...
It's been a while but I thought I'd update everyone on the progress I've made with my Karplus-Strong wielding laser guitar.
First off, I fixed the memory issues I was having, both in running out of room on the Propeller and in storing variables between power cycles. Lots of head-scratching, testing and discussion led me to using a new, compatible EEPROM chip.
Right now, the guitar plays like a real guitar. Pluck the strings, hold the frets, and you get a response like a real guitar. Palm mute is implemented as well as basic control over volume and sustain. And of course, the ability to quickly switch between different guitar tunings through a simple menu system. You can even dial in your own custom tuning.
So really, at this point it's very nearly done. There is just one thing left to add, and that is pitch bending. In the implementation I have now, the player may change the pitch in one-note increments. Unfortunately that causes somewhat of a "staircase" effect, much like running one's finger along the fretboard. Once I get the pitch bending solved, I will consider development on this version to be complete.
I can't wait to post build info, pictures and video to the 'net!
Comments
Glad you like it. And yeah, there will definitely be video and audio once this is all wrapped up!
Hanno
Will do, I just need to get my new power supply up and running. Well, it's running, but I need to stuff it into a case so that it's safe to use.
-5V line:
_5V_POWER.bmp
+3.3V line:
3_3V_POWER.bmp
+5V line:
5V_POWER.bmp
So tonight I'll be putting my guitar back together again so I can continue with the software work. Feels nice to be getting things accomplished!
Jonathan
Do you have new florescent lights in your shop? LCD back lights can also sit in the ~100KHz range. The 1GHz scope at work has a 105KHz brightness ripple in it's back light. I put that flicker to good use testing some amplified photo-diodes that needed at least 100kHz bandwidth. THAT "quick" project was a crash course in low noise Op-amp design! 147KHz is a high enough frequency to couple into a scope's ground wire, have you looked at what the scope measures with the ground wire hooked to the tip? Your linear regulators may be performing better that the scope screen shots show.
Otherwise, I'll re-iterate that I think you could have gotten away with just using a linear regulator for the 3.3 volt rail. The 3.3 volt rail IS functioning as one reference voltage for the PWM DAC, so in retrospect its fairly obvious that it needs to be clean . (the other reference for the DAC is ground) Also, the couple tests done with the output filters powered and the string output stopped, show that the output op-amps can reject the level of ripple the PC supply had on the +5 and - 5 rails.
Lawson
A linear regulator is what I used for all three voltages. 7805, 7905 and an LM317 for the 3.3V line. Oh, and some huge filter caps. Perhaps if I get a chance I'll hook up both supplies to see if it was the 3 or 5 volt line, but what you said makes sense - a ripple would affect the PWM DAC, and if the signal were within the voltage rails of the op amps then the signal would remain unaffected.
I suppose in the end I wanted to design a dedicated power supply anyway. Once I publish plans (?) I want others to be able to grab off the shelf parts, rather than hack a computer power supply.
Well
Much appreciated!
I guess tomorrow night I'll start with the tuning menus.
In case it's a little hard to make out, I cut the vent holes in the shape of an ionizing radiation (nuke) symbol. The holes are covered in screen mesh (cut from an old screen window!), and backlit by a colour-changing LED. I cut the holes using a drill press and my trusty scroll saw. The whole thing is painted with Krylon spray paint.
Overkill? Perhaps. But you know what they say, if you're gonna do something......
When it's done! My plan is to release full build instructions on Instructables, and I don't want to post a video on YouTube until those instructions are up. Otherwise, I'll have thousands (a guy can dream!) of requests from people who want to know where I got it, how to make one, how much I'd be willing to sell it for, etc.etc. So don't worry - audio and video are planned and coming, but the timing is carefully planned as well.
The next step is to integrate all that code into my main program.
After that, the last thing I need to do is to build a fret position calibration program. The membrane potentiometers don't all measure alike even though the positions are the same, so a calibration routine is required to ensure that all the fret positions register properly.
I've got plans for features beyond this, but I want to get the guitar to this point first.
So, now I just need a few tweaks to my main program, and I should be good to go...
have you ever thought about connecting your laser-guitar to the Coyote-1 OpenStomp-pedal?
http://www.openstomp.com/wiki/index.php?title=Main_Page
I guess this creates the most quadrature-propellerised sounds you have ever heard :-)
best regards
Stefan
Sure have! It would work great with the OpenStomp, or any other pedal. The output is a standard 1/4" jack.
Jonathan
Jonathan
First off, I fixed the memory issues I was having, both in running out of room on the Propeller and in storing variables between power cycles. Lots of head-scratching, testing and discussion led me to using a new, compatible EEPROM chip.
Right now, the guitar plays like a real guitar. Pluck the strings, hold the frets, and you get a response like a real guitar. Palm mute is implemented as well as basic control over volume and sustain. And of course, the ability to quickly switch between different guitar tunings through a simple menu system. You can even dial in your own custom tuning.
So really, at this point it's very nearly done. There is just one thing left to add, and that is pitch bending. In the implementation I have now, the player may change the pitch in one-note increments. Unfortunately that causes somewhat of a "staircase" effect, much like running one's finger along the fretboard. Once I get the pitch bending solved, I will consider development on this version to be complete.
I can't wait to post build info, pictures and video to the 'net!