Open widarr opened 10 years ago
It's because the code was specifically written for ATmega168/328 based Arduinos. The incompatibility with MEGA2560 is due to different clock registers etc.
I was able to modify the code to run on the MEGA2560 perfectly, but I lost it. I'll make a fork and rewrite+upload my code for the Mega board as soon as I find some time.
Ok, thank you. Would it be possible to change to output pin of the ATMEGA328 version to be PB1 (Digital Pin 9)? I have a finished circuit board where I want to use a wavetable synthesizer but I can't change the pin lokation anymore without many bodge wires.
I think it's doable, but not that simple. Currently I forked the repo (https://github.com/mrgame64/ArduinoSynth) so please direct your issue(s) there.
@widarr My fork is now compatible with MEGA boards: dacb7f0f7222fe07c87fed1bc5a28b68b89b75ff
Nice Work :D It works now on my MEGA Board :) I want to learn more about how the code works, can you make a comment in the setup() function how to use the input 2d array? The rows are the voices right? But how do you change the frequencies of the different waveforms? And what do the Envelopes do?
Honestly I'm unable to explain how that program actually works, but I can only point you to a freshly released "user friendly" version of this synthesizer with examples, documentation, etc. (MEGA is supported!)
https://github.com/dzlonline/the_synth
As for the envelopes, they fade out a sound as it ends. More about them here: http://en.wikipedia.org/wiki/ADSR_envelope#ADSR_envelope
I tested ALL pins of my MEGA2560 and there is no output at all. How can I test this?