Arduino Forum

Using Arduino => Audio => Topic started by: dsese1234 on Aug 13, 2012, 06:30 pm

Title: ADSR working in Guitar Help :)
Post by: dsese1234 on Aug 13, 2012, 06:30 pm
Hello Guys,


i have try this code https://github.com/rmosquito/PolyEGg which is generate ADSR working on arduino and successfully working. but i am wonder how would be work in audio signal such guitar? i believe the code will work only with the build in audio in arduino. ??

i want to work it like this http://www.youtube.com/watch?v=XjgnchGwPtY
to increase the guitar sustain. :)

what should i do to work it?
any answer would be appreciated thank you so much in advance.:)


Regards
Darwin

Title: Re: ADSR working in Guitar Help :)
Post by: johnwasser on Aug 13, 2012, 10:32 pm
The way to add sustain is to amplify the signal inversely to the magnitude of the signal.  That is probably easier to do in with analog signals, although it can be done with digital signals IF you have a fast enough processor.  To get reasonable sound quality you will need a faster processor (and A/D)  than a 16 MHz ATmega.
Title: Re: ADSR working in Guitar Help :)
Post by: Grumpy_Mike on Aug 13, 2012, 10:41 pm
But the code says:-
Quote
this software is currently pre-alpha and non-functional.

That means it does not work. And seeing it was 5 months ago it looks like it never did.
Title: Re: ADSR working in Guitar Help :)
Post by: dsese1234 on Aug 14, 2012, 05:21 am
Hi guys thanks for response. =)

if the code is not working ? what would be to do to start ADSR? (ATTACT, DECAY, SUSTAIN, RELEASE). can we share as the method to work with  arduino?  what should be the idea? audio buffer or ringbuffer?,timer?,etc? something like the output in pwm 11 in arduino and analog 0 for audio signal?

any idea? =)



Title: Re: ADSR working in Guitar Help :)
Post by: Grumpy_Mike on Aug 14, 2012, 06:58 am
I don't think you can do what this with the arduino. Basically it has not got enough memory to store the signals and there is not enough processing power to process the samples fast enough. Also with only 10 bits input and 8 bits output on PWM the sound quality will be very poor.

This is the best I have sen for real time processing:-
http://interface.khm.de/index.php/labor/experimente/arduino-realtime-audio-processing/ (http://interface.khm.de/index.php/labor/experimente/arduino-realtime-audio-processing/)
Title: Re: ADSR working in Guitar Help :)
Post by: dsese1234 on Aug 14, 2012, 09:22 am
Hi Grumpy_Mike,

Great Research. i have already try this. and really works!=) but i have a question. what would be the recommendation to upgrade or extend the arduino memory? to output long delay...   others told me that i need to use sd card.?

I am very thankful all the response :)
Title: Re: ADSR working in Guitar Help :)
Post by: Grumpy_Mike on Aug 14, 2012, 11:13 am
The problem with an SD card is that it is too slow for random access at audio speeds. This is especially true if you need to read and write to it. Also there is a write limit so it will fail quite soon. You are better using SRAM there are some boards about or you could build your own.
Extra memory shield for the Mega:-
http://www.ruggedcircuits.com/html/megaram.html (http://www.ruggedcircuits.com/html/megaram.html)