How to generate sound effects without using musical ICs like UM66

Is there any way by which i can generate sound effects generated by musical ics like UM66 and many other similiar ICs. I want to generate police siren, Jingle bell and happy birthday sounds. Can these sounds be generated by PWM? I read that these ICs have ROM in which sound notes are preloaded. But Do these notes mean generate a particular frequency signal. If anybody can explain the mechanism by which these sounds can be generated, it'll be helpful. i intend to use a microcontroller with onchip ROM so I can store these notes only if I know how to use them and what they actually generate.

Reply to
Rohit
Loading thread data ...

Not sure about every particular tune, but in the past, circuits existed from transistors that generated various sirens, etc. The devil in in the detil as to which siren you want to make.

Reply to
terryc

With a bit of elementary thinking you can get there from here. In fact, with a bit of elementary web searching I think you could find others who have gotten there already -- have you done web searches on "music from a microprocessor pin"?

Think about what sound you want to generate, what fidelity you need, and what the resulting electrical signal at the speaker must be. Then think about what processor loading you want to accept.

For single-voice, single-volume, ultra-tinny sounds your job is easy: just use a 50% duty cycle square wave and vary it's frequency. Turn it off entirely for silence (and a click). You can play a tune or make a siren easily this way. If you don't vary the frequency over much more than an octave you can knock the harmonics down pretty well with an appropriate low-pass filter to improve the sound quality.

At the other end of the extreme, with a lot of processing you could output sound that would, in theory, be high fidelity (44.1kHz sample rate, well over 10 bits at the highest frequency, much better than that at the low frequency) at the cost of requiring a fairly healthy DSP chip with a fancy PWM driver (something like a TMS320F28xx). At this point your system cost would probably be more than just using a hi-fi CODEC, but it could be done without if you really wanted.

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com

Do you need to implement control loops in software?
"Applied Control Theory for Embedded Systems" gives you just what it says.
See details at http://www.wescottdesign.com/actfes/actfes.html
Reply to
Tim Wescott

Learn to play an insrument, and record that :-0 Marc

Reply to
LVMarc

On Jul 9, 7:43=A0am, Tim Wescott wrote: [....]

Even a part like the F120 from Silabs can do fairly impressive sound on its DAC outputs. The DAC can be programed to update on a timer overflow so that the processing time doesn't change the phase. You can make the sound effects a lot "fatter" by modulating the reload number for the counter to FM the output slightly.

.
Reply to
MooseFET

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.