├── Readme.md
├── index.html
├── screentunes.css
└── screentunes.js
/Readme.md:
--------------------------------------------------------------------------------
1 | # Screen Tunes
2 |
3 | It turns out that some LCD monitors will emit a tone when patterns of repeating bars are displayed on the screen.
4 | This pattern varies based on the size of the bars. The goal of this project is to eventually be able to play some
5 | music through the screen using a web page.
6 |
7 | I found out about this effect from the Hacker News comments on a page that was about a completely different bar spacing effect
8 | but produced sound out of some monitors (including my external Samsung LCD).
9 | [Some commenters](https://news.ycombinator.com/item?id=8856930) produced theories including that this is caused by
10 | the expansion and contraction of capacitors/inductors in the display as the screen scans down and the black pixels take a different
11 | amount of power than the white pixels. This theory suggests that varying the width of the bars would change the pitch,
12 | which indeed does happen.
13 |
14 | This is mainly intended as an experiment out of curiosity and geekery; it has no practical use.
15 |
16 | ## Technique
17 |
18 | I simply created a full screen canvas where I draw an animated and variably spaced sequence of black and white bars.
19 | Displaying this pattern in a large browser window on some LCD monitors produces a tone.
20 |
21 | ## Plans
22 |
23 | #### Music
24 |
25 | Theoretically this could be used to play simple digital chiptune-like songs. By animating to different bar widths the notes
26 | could be changed at around 60HZ. It might even be possible to play multiple notes at once by either partitioning the screen
27 | vertically into different chunks with different bar widths on each, or perhaps just alternating bar widths at 60HZ might be too
28 | fast for the ear to discern the alternation.
29 |
30 | #### Calibration
31 |
32 | Using the web audio API I could direct users to put a microphone near their screen and do a bar width sweep and record the
33 | frequency and relative amplitude. This could used for both data collection on this phenomenon and to calibrate the playing of
34 | music to emit the correct pitch at the correct amplitude.
35 |
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
15 | On some LCD monitors this page will cause the screen to emit a
16 | tone that varies in pitch with the bar height. Maximize window for best results.
17 |
22 | Edit: I kinda managed to get this to play music but it doesn't work very well. If you're ambitious you can download and try out the "music" branch on Github.
23 |