Guitarman9119 / Nucleo_Guitar_Effects_Pedal

Guitar Effects based on Nucleo STM32F303 Playing an instrument like the electric guitar requires a lot of time to practice and improve yourself. Certain styles of playing requires specific effects. To achieve this guitarists use effect units which are commonly known as effects pedals. An effects pedal is an electronic device that uses the output signal from the guitar pick-up as input and changes the signal by applying signal processing techniques to create an altered output signal. These pedals come in various price ranges, but it does not offer the guitarist the possibility to create his own effects by reprogramming the effects pedal or using a custom effect. With the advancement in digital signal processors and the improvement in the field of music and electronics, it has become possible to create a multi-effects pedal capable of processing audio in real time. The primary aim of this project is to design and construct a multi-effects pedal that can be reprogrammed for the electric guitar. The multi-effects pedal and guitar should be able to be reprogrammed using a computer or function without any other external accessories when just practising. This functionality is important for the guitarist. The main objective was achieved by designing and constructing an multi-effects pedal that allows the user to reprogram the effects pedal. Evaluation and testing were done to ensure that the simulated effects in Simulink were correctly implemented on the digital signal processor. Various tests were done to ensure that the effects pedal was functioning as expected and that the pedal is easy to use.
GNU General Public License v2.0
35 stars 6 forks source link

schematic and build instructions #1

Open alejoseb opened 5 years ago

alejoseb commented 5 years ago

Hi, Nice project and thanks for sharing. Can you provide schematics?

Guitarman9119 commented 5 years ago

Hello Alejandro,

Which schematics are you looking for? I have most of them uploaded on indestructibles:

https://www.instructables.com/id/Nucleo-Guitar-Effects-Pedal/

Regards Vernon

On Mon, Apr 1, 2019 at 11:03 PM Alejandro Mera notifications@github.com wrote:

Hi, Nice project and thanks for sharing. Can you provide schematics?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Guitarman9119/Nucleo_Guitar_Effects_Pedal/issues/1, or mute the thread https://github.com/notifications/unsubscribe-auth/ANo3dYTjwdwILBDSEu9YKwttwA_wsjX6ks5vch_SgaJpZM4cV86y .

alejoseb commented 5 years ago

Hey thanks for your answer, I found your repository directly on GitHub, so I was not aware of your instructable post. You may add that link to the readme file. That might help everybody to find the whole information of your project.

alejoseb commented 4 years ago

Hi, I was checking your code and seems it is not a working version. It includes a DMA configuration for ADC but you are actually not using it. In addition there is no code for the output and DAC section. Can you upload a working version of your code. Thanks in advance

Guitarman9119 commented 4 years ago

I don't have the original pedal with me, plan to rebuild it again soon but according to the DAC section:

while(1) { button_control(); adc_sample = HAL_ADC_GetValue(&hadc1) / 4096.0f ; adc_sample += 0.0126953f; if(adc_sample< 0.501 && adc_sample > 0.499) adc_sample = 0.5; // List of Effects if(effect_state == 0) modified_sample = clean(adc_sample); else if (effect_state == 1) modified_sample = tremolo(adc_sample); else if (effect_state == 2) modified_sample = tremolo2(adc_sample); else if (effect_state == 3) modified_sample = ez_distort(adc_sample); else if (effect_state == 4) modified_sample = ez_distort2(adc_sample); else if (effect_state == 5) modified_sample = flanger(adc_sample); else if (effect_state == 6) modified_sample = delay(adc_sample); modified_sample -= 0.0126953f; analog_out = modified_sample; } } analog_out is the DAC pin PA_4, if you do not use DMA, and just use analog in, it does not make any change in terms of audio quality (frequency range of guitar) so if you should un-comment //AnalogIn analog_in(PA_0); and change adc_sample = analog_in / 4096.0f ; in the while(1),

this will also work.

I have a folder with code at home, not sure is it the same version will check and send it to you. If there is anything else let me know and I will try to assist.

Regards Vernon

On Thu, Oct 10, 2019 at 12:45 AM Alejandro Mera notifications@github.com wrote:

Hi, I was checking your code and seems it is not a working version. It includes a DMA configuration for ADC but you are actually using it. In addition there is no code for the output and DAC section. Can you upload a working version of your code. Thanks in advance

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Guitarman9119/Nucleo_Guitar_Effects_Pedal/issues/1?email_source=notifications&email_token=ADNDO5LRPXTYSHYQ7ATLXTTQNYDC5A5CNFSM4HCXZ2ZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAYRCUI#issuecomment-540086609, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADNDO5L3APL5SN3O5MH7CTDQNYDC5ANCNFSM4HCXZ2ZA .

alejoseb commented 4 years ago

Thanks, for your answer I double checked and yes the analog output is correct. However, the DMA implementation is not clear, I believe something is wrong there, because there is no configuration of a buffer where you should store the samples coming from ADC. In addition I checked the source code of HAL_ADC_GetValue(&hadc1). That function access directly DR register of ADC, so technically is not using DMA. I am curious about that, because I am reviewing multiple examples with DMA and this particular example is not as expected. There are some missing parts in the configuration (for example source, destination and length of DMA transfer). I will try some modifications with a complete configuration and see if the code works as expected.

Guitarman9119 commented 4 years ago

The DMA part was a nightmare for me, my programming skills and knowledge that time was not up to par. I wanted to make some delay effect and ended up just doing basic effects due to time constraints and finals in other subjects.

On Thu, Oct 10, 2019 at 9:06 AM Alejandro Mera notifications@github.com wrote:

Thanks, for your answer I double checked and yes the analog output is correct. However, the DMA implementation is not clear, I believe something is wrong there, because there is no configuration of a buffer where you should store the samples coming from ADC. In addition I checked the source code of HAL_ADC_GetValue(&hadc1). That function access directly DR register of ADC, so technically is not using DMA. I am curious about that, because I am reviewing multiple examples with DMA and this particular example is not as expected. There are some missing parts in the configuration (for example source, destination and length of DMA transfer). I will try some modifications with a complete configuration and see if the code works as expected.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Guitarman9119/Nucleo_Guitar_Effects_Pedal/issues/1?email_source=notifications&email_token=ADNDO5NVCCE7JIT5OUK7UBTQNZ52HA5CNFSM4HCXZ2ZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAZ7JUA#issuecomment-540275920, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADNDO5PCVF4NAP3ZCZSEXTLQNZ52HANCNFSM4HCXZ2ZA .