# Matching digital sound data with a sine equation

This topic is 4609 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Is it possible to match digital sound data with some type of sine equation? Like, over the time of one second, could a graph match my digital sound data? Thank you, Dev578

##### Share on other sites
you are probably looking for the discrete fourier transform.

##### Share on other sites
Or some cross-correlation function.

##### Share on other sites
Hmm, well I need it to stretch the sound wave horizontally to make it a set length. Would the discrete fourier transform make this possible?

Dev578

##### Share on other sites
Quote:
 Original post by dev578Hmm, well I need it to stretch the sound wave horizontally to make it a set length. Would the discrete fourier transform make this possible?

The Fourier transform gives you the frequency decomposition of the signal. That is, the amplitude and phase of the sine waves you would need to add up to reproduce the signal.

##### Share on other sites
You can use a DFT to perform time stretching, but the results will generally be of middling quality due to the tradeoffs inherent in DFTs. A simpler, faster, and better algorithm involves fading between overlapped sections of the clip. More info here.

BTW: At the high end, this is an impressively complicated area. I'd suggest checking out the open source program "Audacity"; I seem to recall that it can do this well.

##### Share on other sites
Are you wondering about display of sound data on a screen, or are you wondering about sound processing?

To display it, you can do whatever you want. It's just bits.

To process it, you have to be very careful, because signals don't follow the same rules as, say, triangle meshes. If you want to stretch or compress the duration of a sound, you end up wanting to do "time stretching," of which there are a number of approaches. Check out musicdsp.com for some references.

If you want to analyze it (e g, "what's the basic fundamental tone in this section") then you either want auto-correlation, or you want a fast fourier transform. More words to google for :-)

1. 1
2. 2
3. 3
4. 4
5. 5
Rutin
15

• 14
• 9
• 9
• 9
• 10
• ### Forum Statistics

• Total Topics
632912
• Total Posts
3009199
• ### Who's Online (See full list)

There are no registered users currently online

×