Decaying sounds synthesis with PWM
Hello everyone
Anyone knows if is possible to emulate decaying sounds like gong, bells, music boxes (carillon) etc using only the PWM output ?
I know such sound are basically tones with exponentially decaying envelope and wondering if their spectrums can be somewhat emulated with appropriate modulation of frequency and/or duty cycle of a PWM output (say the PIC PWM module) without using an external Programmable Gain Amplifier for the envelope.
I can barely remember someone did it with an attiny15 or so ...
Re: Decaying sounds synthesis with PWM
I have not tried it with straight PWM, but take a look at the SOUND command. It should help you a bit with the freqs.
Re: Decaying sounds synthesis with PWM
Quote:
Originally Posted by
amaze1
Hello everyone
Anyone knows if is possible to emulate decaying sounds like gong, bells, music boxes (carillon) etc using only the PWM output ?...
I have read wav files from an SD card and output using only PWM with excellent results.
From a pic only you may get a second or so.
Norm
Re: Decaying sounds synthesis with PWM
Quote:
Originally Posted by
amaze1
Hello everyone
I know such sound are basically tones with exponentially decaying envelope and wondering if their spectrums can be somewhat emulated with appropriate modulation of frequency and/or duty cycle of a PWM output (say the PIC PWM module) without using an external Programmable Gain Amplifier for the envelope.
Constructing bell-esque sounds using synths normally involves several sine waves and complicated algorithms (eg think Yamaha DX7) ...I'd hazard a guess & say that reading/playing a sample would be the best way to achieve what you want (ie no recourse to external envelope shaping hw)
Re: Decaying sounds synthesis with PWM
I guess you can do this. I can hazard a way to do it. Use the Timer/CCP module to generate the frequency/ies you need. Another output is used as envelope control which snubs the output. So, you have frequency and amplitude modulation in effect. Never tried it, so, don't hold me to this. Just an idea that can work
Re: Decaying sounds synthesis with PWM
Re: Decaying sounds synthesis with PWM
Quote:
Originally Posted by
amaze1
Hello everyone
Anyone knows if is possible to emulate decaying sounds like gong, bells, music boxes (carillon) etc using only the PWM output ?
I know such sound are basically tones with exponentially decaying envelope and wondering if their spectrums can be somewhat emulated with appropriate modulation of frequency and/or duty cycle of a PWM output (say the PIC PWM module) without using an external Programmable Gain Amplifier for the envelope.
I can barely remember someone did it with an attiny15 or so ...
I use the SOUND command for my DINGs and DONGs :). It works ok for me.
Re: Decaying sounds synthesis with PWM
Hello rsocor!
I am a new member living in France and working with PIC microcontroller. I search the hex , basic, c file for making a sound bell gong carillon with pic 16F family. Could you send me theses files and the electronic schematics?
Thank you very much
Best regard
Emmanuel from FRANCE
Re: Decaying sounds synthesis with PWM
Quote:
Originally Posted by
manuespagne
Hello rsocor!
I am a new member living in France and working with PIC microcontroller. I search the hex , basic, c file for making a sound bell gong carillon with pic 16F family. Could you send me theses files and the electronic schematics?
Thank you very much
Best regard
Emmanuel from FRANCE
Try this,
http://www.picbasic.co.uk/forum/show...ighlight=music
I tested it and it worked!
Re: Decaying sounds synthesis with PWM
Thank you very much roscor for your answer
In fact, i want to simulate the sound of the old IC from SIEMENS SAB 0600, by using a PWM Output and a RC Filter. Can you join me a hex file for a pic and a file in basic or in C.
The melody of the old cartoon candy i don't have the compiler, can you send me the hex file for the PIC 12F675
Do you know, the IC SAB 0600, have you simulate it?
Thank you much for your answer
Have Good day
Emmanuel from FRANCE
Re: Decaying sounds synthesis with PWM
I don’t know if I ever posted it here, but I did polyphonic with the PBP freqout command.
The other chip on the board is a MAX232.
https://www.youtube.com/watch?v=eesq_N3pe10