Synthesize simple sound waveforms (1)

Source: Internet
Author: User

Synthesize simple sound waveforms (1) favorites
When I first started studying audio files half a year ago, I made a small program to synthesize simple waveforms in order to have a perceptual knowledge of the audio files. Today, let's review this program to make a summary of audio analysis. This article will briefly introduce the wave file and synthesize three simple waveforms. In this way, we try to give a preliminary understanding of audio.

Before that, have you ever wondered why old black and white TVs make so ugly sounds when they cannot receive signals? Why do we use the harsh voice as the ringtone for old-fashioned phones? Next we will give you a closer understanding of this.

The first thing we need to synthesize is the sound of a sine signal. According to the principle of Fu Ye transformation, the vast majority of signals can be expressed in the form of Sine Signal superposition. First, let's listen to the basic elements that make up other colorful sounds. Click the play button below to play the audio file.

How does it feel? monotonous, harsh, not nice, right?

The second one is to synthesize a Rectangular Wave. The waveforms synthesized here are not monotonous duplicates of the same rectangle, so as to synthesize interesting sounds. If it is just a simple repetition, we can only get monotonous sounds. This waveform is synthesized by two rectangles. The period of one rectangle wave is twice that of the other, and is switched every 600 samples. Click the play button below to play the audio file.

Are you familiar with it? By the way, it is the ringtone. That is to say, the old phone ringtones are rectangular waves. Why do we use rectangular waves? I personally think it is easy to implement. The part of the phone that sends a ringtone is an electronic component, and it processes continuous signals, as long as it simply changes the holding time of this component level, we can easily synthesize the ringtones we hear.

The above two waveforms are both regular, so what will the random signal look like? The code to generate random signals is simple, that is, to randomly fill the amplitude in the audio data. Click the play button below to play the audio file.

Are you familiar with it? When the TV cannot receive a signal, it will make such a sound. Specifically, it does not receive a signal, but does not receive a signal from the radio station and receives a random signal. However, the current color TV is fine, and you will judge whether the received signal is a random signal. If you do not play the sound, you will not hear the harsh sound.

Click here to download the code for merging the wave file in this article. The code is written in C and compiled in Win XP + vs.net 2003. .

This article from the csdn blog, reproduced please indicate the source: http://blog.csdn.net/thinkport/archive/2008/04/05/2253363.aspx

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.