Also: can mp3s be totally represented as a text file?

  • cabbage@piefed.social
    link
    fedilink
    arrow-up
    47
    ·
    edit-2
    4 months ago

    Everything is just vibrations; vibrations are just waves. Vinyl records make a physical copy of the sound wave. As the needle drags across it at the correct speed it starts vibrating, reproducing the sound that went into the groove in the first place.

    Sound files are more tricky: Basically you need to measure the wave as it goes up and down, store it into a file, and then have a computer convert it back into vibrations with the help of a loudspeaker. The more times you measure the sound wave per second, the better quality your recording will be.

    As we know that sounds are waves, it’s not so hard to imagine a text file containing sound. Below is a very simple wave form represented with numbers:

    - _ - ⁻ - _ - ⁻ - _ - ⁻ - _ - ⁻ - _ - ⁻ - _ - ⁻ - _ - ⁻ - _ - ⁻ - _ _ - - ⁻ ⁻ - - _ _

    1 0 1 2 1 0 1 2 1 0 1 2 1 0 1 2 1 0 1 2 1 0 1 2 1 0 1 2 1 0 1 2 1 0 0 1 1 2 2 1 1 0 0

    In theory, a computer could convert this into sound. It would sound awful.

    • Monkey With A Shell@lemmy.socdojo.com
      link
      fedilink
      arrow-up
      15
      ·
      4 months ago

      While it sounds simple enough to say ‘waves captured in media reproduce sounds’ it’s still pretty mind bending to note that we can capture all the distinct parts of a symphony in that one wiggly little groove of a record.

      • MrPoopbutt@lemmy.world
        link
        fedilink
        arrow-up
        21
        ·
        4 months ago

        That is because of linearity/superposition - look up both of those concepts for more info. Basically, you can add as many sounds together as you’d like and it is the same as a single, different sound - so if you can recreate the one sound, you can recreate all of them.

        The speaker doesn’t know “this part of the wave is from the drum and that part is from the guitar”, etc

        • cabbage@piefed.social
          link
          fedilink
          arrow-up
          8
          ·
          edit-2
          4 months ago

          Which is still mind blowing in its own right. What’s incredible in the end is not so much the process of sound recording as the nature of reality itself.

          For this part of the equation I find it useful to think of two tin cans with a string between them, which is a perfectly capable microphone/loudspeaker set-up.

        • bartolomeo@suppo.fi
          link
          fedilink
          arrow-up
          1
          ·
          4 months ago

          “this part of the wave is from the drum and that part is from the guitar”

          So is that information deduced by the listener’s mind, as opposed to their ear? Kind of like depth perception in the field of vision?

          • Ugurcan@lemmy.world
            link
            fedilink
            arrow-up
            1
            ·
            edit-2
            4 months ago

            In short, yes.

            Ear as an organ is not a simple microphone though. It’s partially evolved in a way to help humans recognize ‘the music’ and ‘the speech’. The brain does the heavy lifting.

      • PM_Your_Nudes_Please@lemmy.world
        link
        fedilink
        arrow-up
        3
        ·
        4 months ago

        It may help to remember that you only have two ears to hear that entire orchestra. So with only two speakers, you can reproduce said orchestra. By the time it makes it to your ear, the sound vibrations aren’t a bunch of separate waves; They have combined into a compound wave, with all of the constructive and destructive interference that goes along with that. What you hear is the sum of all the sound waves around you, not each individual source of the waves.

      • brianorca@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        4 months ago

        The Fourier transform is a way to convert from a raw waveform into all of its distinct parts, and back again. Computers do this for some types of sound data compression, such as MP3. Your ears do this (in the cochlea) when converting the physical movement of sound waves into electrical signals for your brain.