Anonymous asked in Science & MathematicsPhysics · 1 decade ago

Raw numbers to sound wave?

I have a set of 10,000 integers, and I'd like to see what they "sound like" as a soundwave. The inspiration was how they look in a graph - they're not random, and have values between 1 and 1000 with most being above 100 and below 400.

The graph itself looks like something straight out of Windows' old sound player.

Is there a method to convert this kind of raw data into sound? I don't care if it sounds like static, as long as it reflects the data.

1 Answer

  • Anonymous
    1 decade ago
    Favorite Answer

    You could convert it to a MIDI file. Let's say you would like to be able to play this "music" on a piano. Pianos have 88 keys/notes. If you divide the 1000 values available in your data into 88 intervals, you can assign each number to a MIDI note that can be played on a piano.

    1000 / 88 = 11.363636...

    MIDI notes corresponding to the piano range from 21 through 108.


    21: 0 to 11.363636...

    22: 12 to 22

    23: 23 to 33


    108: 9,990 to 10,000

    If this sounds like noise, you can smooth it with a moving average. Number the observations from 1 to 10,000. Average observations 1 through 5 and put the average in position 3. Average observations 2 through 6 and put the average in position 4. Continue through all 10,000 observations. Then you can convert the averaged values to MIDI notes and play them. To dampen the noise even more, average in a wider window, e.g. average 10 observations instead of 5.

    You might be interested to know that when DNA sequences are converted to musical notes, the resulting melody does not sound random.

Still have questions? Get your answers by asking now.