Polyatic Image to sound
All tools

Image to Sound: a Picture You Can See in a Spectrogram

Choose a picture and get a sound that draws it, the way hidden faces appear in song spectrograms.

You get: a WAV file (44.1 kHz, 16-bit mono) and the picture drawn back in this page’s spectrogram

Your sound as a spectrogram

Empty until you make a sound above. You can also open any recording here, or listen through the microphone while another device plays your WAV.

Time Freq
View settings
Frequency axis

Highest sound
–

Shown for a file: the highest frequency that still carries sound.

The view as a 1600 × 900 px picture, axes included.

Privacy: your picture, your text and the sound made from them never leave this tab. The picture is read, turned grey and synthesised into sound by this page’s own script; the WAV is built in memory and handed to your browser’s download. The page fetches nothing for this from anywhere except, only if you tap Use our picture, our example picture from this site. Besides an anonymous page count it sends fixed event names only: image-sound-page-open (the first sound made in a visit), image-sound-page-save (the first WAV downloaded), the shared app’s spec-encode and spec-encode-download, and spec-file or spec-live if you open a recording or the microphone in the view. None carries a picture, a sound, a file name, a text or a setting.

How to turn an image into sound

  1. Choose a picture. A PNG, JPEG or WebP from your phone or computer. Simple shapes and bold letters on a black background read best; a busy photo turns into a hiss that only roughly looks like the photo.
  2. Set the sound. Length is how many seconds the picture takes from its left edge to its right, 2 to 30. Lowest and Highest are the pitches of the bottom and top rows, anywhere from 20 to 20,000 Hz. Tick Invert for a dark drawing on white paper, so the ink makes the sound instead of the paper.
  3. Tap Make sound. Moments later the result is drawn in the spectrogram under the controls, the right way up. Play lets you hear it while a cursor moves across the picture.
  4. Download WAV keeps it. Every second of sound is 88,200 bytes (44,100 samples of 2 bytes), so the 6-second default is 517 KB and the 30-second maximum 2.5 MB.

How it works

Think of the picture as sheet music read from left to right. Each pixel row is one note held for the whole length, a pure sine wave, and the row’s brightness at each moment sets how loud that note is right then. Rows are tuned evenly from Highest at the top to Lowest at the bottom, so a spectrogram, which plots pitch upward and time to the right, rebuilds the picture.

Our example in numbers. The picture above is 384 pixels wide and 256 tall, so it becomes 256 sine waves. Spread from 500 to 12,000 Hz they are (12,000 − 500) / 255 = 45.1 Hz apart, and each of the 384 columns lasts 6 / 384 = 15.6 ms. The spectrogram that drew it uses a 2,048-point FFT, whose rows at 44,100 samples a second are 21.5 Hz apart, so each sine lands on about every second row: that is the faint horizontal grain inside the squares.

Why the six squares look almost alike. Their brightness runs from one sixth to full, so their sines are one sixth to fully loud. A spectrogram shows loudness in decibels, and one sixth of the amplitude is only 20 × log10(1/6) = −15.6 dB. On a colour scale 60 dB deep, the dimmest square sits about a quarter of the way down from the brightest, which is why grey shades come out flattened while black and white stay crisp.

The picture is turned grey first (with the Rec. 709 weights for red, green and blue) and shrunk if it is larger than 1,024 × 512 pixels. The waves start at phases from a seeded random generator, so they never all peak at once, and the total is set to peak at −14 dBFS. The same picture, settings and seed always give the same WAV, byte for byte; More options shows the seed, a text box and a log axis, which gives each octave the same height instead of each hertz.

The example is ours: a script in this site’s code (tools/image-to-sound-example.cjs) draws the picture from a 5 × 7 dot font and plain shapes, makes the sound with this page’s own encoder at the defaults shown above with seed 1, reads the WAV back and draws it with this page’s spectrogram code (FFT 2,048, Hann window). Run it twice and it writes the same bytes.

What it cannot do

  • No colour. Only brightness becomes sound; a red and a green of the same lightness sound the same. Transparent parts count as black, so they stay silent.
  • At most 512 rows and 1,024 columns. A larger picture is shrunk to fit and loses fine detail. A small one is not enlarged: a 32-row icon makes 32 sines, which a spectrogram shows as separate stripes with gaps between them.
  • One output format. The WAV is always 44,100 Hz, 16-bit and mono; there is no MP3, no stereo and no other sample rate. Highest stops at 20,000 Hz, and Lowest and Highest are kept at least 100 Hz apart.
  • It does not mix the picture into your music. It makes the picture’s sound on its own; putting it under a song takes an audio editor (see the questions below).
  • It hides nothing. Anyone who opens the sound in a spectrogram sees the picture, and there is no way to turn the sound back into an image file except by looking. It is not encryption or a watermark.
  • Lossy copies lose it. MP3, AAC, voice messages and phone calls drop or smear the high frequencies, so keep the WAV, or a FLAC, if the picture has to survive.
  • Shading is compressed. Loudness follows brightness in a straight line, so in decibels the grey tones crowd together near white, as the squares in our example show. There is no gamma or contrast control to spread them.
  • It does not adjust for hearing. Every row gets the same strength for the same brightness, so the top of a picture can sound far louder than the bottom; see the question below.

Questions

How do I hide a picture in a song?

Make the picture’s sound here first, in a band where the song is quiet, then mix the two in an audio editor. Most music has little energy above about 15 kHz, so for a song you will share as WAV or FLAC, set Lowest to 15,000 and Highest to 19,000 Hz; many adults barely hear that band at all. For a song that will end up as an MP3 or on a streaming service, stay under about 15 kHz, because lossy encoders often cut what lies above, and accept that the picture’s hiss now overlaps the music. Download the WAV, open the song in Audacity, add the WAV with File > Import > Audio, slide it to where it should appear and pull its gain down 10 to 20 dB until you no longer notice it, then export the mix as WAV or FLAC. Aphex Twin’s 1999 Windowlicker single is the famous example: a face hides at the end of its second track.

Which app shows the picture?

Any spectrogram, this page included: the view under the controls draws your sound the moment it is made, and Open audio or video there opens any WAV, for instance one a friend sent you. Elsewhere, Audacity shows it after you pick Spectrogram from the track’s name menu, Sonic Visualiser with Layer > Add Spectrogram, and on Android an app such as Spectroid shows it live through the microphone while another device plays the sound. Whatever you use, choose a linear frequency scale, make the shown range reach from below your Lowest to above your Highest frequency, and use an FFT size near 2,048 at 44.1 kHz; a viewer whose top stops at 8 kHz cuts off everything above it.

Why is it so loud at the top?

The top of the picture is the top of the pitch range, and that is where ears are most sensitive and pure tones most piercing. The page gives every row the same strength for the same brightness, whatever its pitch, but hearing does not: around 3 to 4 kHz a tone needs several decibels less than at 500 Hz to sound as loud (the equal-loudness contours of ISO 226). A bright sky, a white margin or a caption across the top therefore becomes dozens of loud high sines together. If your picture is dark on light, tick Invert so the dark parts make the sound and the white background stays silent, crop away a bright sky, and keep Play volume low; the page already starts it at a fifth of full volume and caps the WAV’s peak at −14 dBFS.

Why does my photo sound like noise and not like a tune?

Because a photo lights up almost every row at once, and hundreds of sines of slightly different pitch, each at a random starting phase, add up to a hiss. A tune needs few bright rows: a thin bright line on black is one sliding tone, rising where the line rises. The wave in our example is such a line, 8 rows thick around the middle of the picture, so it sounds like a whistle sliding between about 4,800 and 7,500 Hz, up and down twice in about 5 seconds. Draw lines, not areas, if you want to hear the shape as well as see it.

Made with AI tools. · Privacy · Contact