| ??? 02/03/03 09:54 Read: times |
#38125 - RE: Digital Clock, London's Big-Ben Sound Responding to: ???'s previous message |
Technically speaking, it wouldn't be a big ben problem to do what you want, but for a starter project it may just be a little too much.
First and for all, you obviously need to have a good sample of the sound you want to make. Next thing would be to analyze the sample and look for repetitions in formants (basic wave shape, not amplitudes). Break the sample down into the number of formants you find and downsample them to a bitrate your design would be able to handle (depends upon your processor, clock and other software tasks running). Finally, you define an envelope that defines the amplitude characteristics in the time-domain (attack, decay, release,etc) for each remaining sample. Most of this can be done on a normal PC, but you will need at least some software to edit and resample your original sound and preferably a means to store the resulting samples in a (binary) format your micro can handle. You will probably find that such software will be difficult to find, which means that you either have to do it manually (just write down the values you read from a visual representation of the wave at fixed time intervals; wave editors generally have a cursor that you can move around). Using these samples and the envelope definitions, either drive a D/A or use a PWM with a good quality low pass filter. Take your time in making the correct samples. Especially when samples are used in loops, it is essential that you have smooth edges at the start and the end of the sample to prevent irritating clicking sounds occurring. The envelope curve can be as little as a simple look-up table that defines an amplification factor in time. Use your loop counter to work you way through the table. Oh, one more: don't expect too much from the sound quality! One of the characteristics of sound produced by metal instruments (like a bell) is that it contains a lot of harmonics that are lost when the samplerate is reduced. The resulting sound therefore is quite different from the original. Although in the end your audience just *may* recognize Big Ben, the result of your many hours of hard work and sweating may be very disappointing! |



