I have been addressing this issue for a few months and noticed that something is really wrong with the output.
First, what did work are the FM oscillators which are generating normally, as long as I don't put very high values on the FM modulator's amplitude.
However, when the notes switches after playing, it clicked. Yeah, it sounded irritating. I have checked other references (especially that fancy Japanese musical clocks in Youtube and actual clock shops) and they don't click like mad! A search in Google revealed that I have to dampen the sound between note-switches to prevent very sharp change of values in the output. That - I'm inserting these after I port Bruce Land's envelope generator algorithm inside: Bruce Land's FM Sound Synthesis
Another thing connecting the DAC to the little cheap mini compo set, the volume is decent. But to connect this to the LM386, or any of those PAM8403 and to the 4ohm speaker results in a tinny and unfulfilling volume! What just happened? I begin to suspect that there is a DC offset that prevents this from having a decent sound.
Using the Analog Discovery 2 and getting the first 512 samples from the system, it is noticed that there is really a DC offset somewhere at the lowest frequency area: (FFT is calculated using Octave)
Check the first value: 11.60945 + j0.0000. There could be a need to just get rid of it once and for all!
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.