gatesphere 45 Posted September 24, 2010 Share Posted September 24, 2010 Hey all, I made up a quick little noise maker to get used to some ADC10 code. Code and information is available on my blog: http://blog.suspended-chord.info/?c=16 Let me know what you think! EDIT: New blog post with fixed code: http://blog.suspended-chord.info/?c=17 bluehash 1 Quote Link to post Share on other sites
bluehash 1,581 Posted September 24, 2010 Share Posted September 24, 2010 Hmm.. I'll have to try this to hear what it sounds like. Anyways, it works, it sounds a bit funky, and it's nowhere near as high fidelity as its Arduino cousin. Why is that? Because of the bit resolution on the ADC? Whats the resolution of the ADC on the Arduino.? Quote Link to post Share on other sites
gatesphere 45 Posted September 24, 2010 Author Share Posted September 24, 2010 The ADC resolution on the Arduino is also 10-bit. I have a feeling that the fidelity issues have to deal with speed, particularly sample speed and MCLK speed. I might play around with it a bit and see if I can tweak the fidelity by increasing the DCO, reducing the divider, and choosing MCLK as the source for the ADC. That'll be later in the day, though. Oh, and I might also do a small demo recording, and take some pictures. Just for an idea. Quote Link to post Share on other sites
GeekDoc 226 Posted September 24, 2010 Share Posted September 24, 2010 Oh, and I might also do a small demo recording, and take some pictures. Just for an idea. I sense a Four-Three-oh! blog post in the making! Quote Link to post Share on other sites
gatesphere 45 Posted September 24, 2010 Author Share Posted September 24, 2010 Hahaha, that's up to bluehash. But I'm still debugging my code at the moment. Quote Link to post Share on other sites
GeekDoc 226 Posted September 24, 2010 Share Posted September 24, 2010 Hahaha, that's up to bluehash. But I'm still debugging my code at the moment. C'mon... photos, sound, code, and an MSP430! How could he NOT blog it!? -Doc Quote Link to post Share on other sites
bluehash 1,581 Posted September 24, 2010 Share Posted September 24, 2010 Post is in draft mode.. waiting for his pics. Quote Link to post Share on other sites
gatesphere 45 Posted September 24, 2010 Author Share Posted September 24, 2010 You might have to wait a bit longer... upon some further debugging, I have found out that my code just plain DOES. NOT. WORK. Something about the way I'm polling the ADC, or the map() function. I'm not sure which. I'll post here with updates. Quote Link to post Share on other sites
gatesphere 45 Posted September 24, 2010 Author Share Posted September 24, 2010 Correction (and double-post): It works now. Perfectly. And just as hi-fi as the Arduino version! Lesson: never ignore compiler warnings. I'm going to do another blog post, outlining the mistakes I made in the first one. With pictures. I'll post here when it's done Quote Link to post Share on other sites
gatesphere 45 Posted September 24, 2010 Author Share Posted September 24, 2010 Ok. New blog post, with pics, corrected code, and sample sounds, available now. http://blog.suspended-chord.info/?c=17 Have fun, people Quote Link to post Share on other sites
bluehash 1,581 Posted September 24, 2010 Share Posted September 24, 2010 Hahah! I just listened to the the sound clip. Some of it is annoying....but impressive that you can make those sounds! Will update blog later. Thanks for sharing.. As you say.. keep tweaking Quote Link to post Share on other sites
gatesphere 45 Posted September 25, 2010 Author Share Posted September 25, 2010 Thanks! It's just basic squarewave manipulation. Anyone can do it, it just takes a bit of math Quote Link to post Share on other sites
GeekDoc 226 Posted September 25, 2010 Share Posted September 25, 2010 Is the square wave the reason there's a kind of "popping" sound at the mid to high frequencies? Could this be smoothed to a (near) sine wave with the capacitor/diode combination I keep seeing on the web? Quote Link to post Share on other sites
gatesphere 45 Posted September 25, 2010 Author Share Posted September 25, 2010 The popping is mostly an artifact of the sample and processing speed. The delays aren't exactly precise, so the square waves aren't exactly square. Unmatched waves often lead to popping like this. I kind of like it though. Quote Link to post Share on other sites
GeekDoc 226 Posted September 25, 2010 Share Posted September 25, 2010 I kind of like it though. Me too! It kind of gives it a "beat". Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.