(hide navigation)
  • Swedish content
Fund my projects
Patreon
Steady
Don't miss
Page thumbnail
The evolution of C64 games 1982–2023
Forum
Register
Log in
Latest comments
Syndication
RSS feed
Feedback
Music downloads
Video clips
Chip music
Piano music
Hardware projects

The swan

(This video at youtube)

In an attempt to squeeze as much emotion as possible into a tiny chip, I managed to fit Camille Saint-Saëns' The Swan into 480 (out of 1024) bytes of ROM on an ATtiny15. The microcontroller runs at 1.6 MHz and provides 32 bytes of RAM (actually registers).

It would have been possible to shrink the code even further by resorting to a quantized tempo and a fixed volume, but that would also have eliminated every trace of life from the music.

0000000: 7fc0 52a2 c2f2 2353 dfc0 83b3 f324 b4f4  ..R...#S.....$..
0000010: 4595 e546 a607 7758 034a 1b0b 0314 0324  E..F..wX.J.....$
0000020: 1a0b 0312 0320 1c0c 1f07 0310 1807 03bc  ..... ..........
0000030: fc07 0388 d403 f4ec 1b17 0f07 032c 3403  .............,4.
0000040: c4dc 03e4 0408 0322 0a00 d979 7756 76bb  ......."...ywVv.
0000050: 2775 68fe 603b 2b60 3f57 b3a1 ef76 ef31  'uh.`;+`?W...v.1
0000060: 2edc 5c7f 3c0e 87f0 07a7 b396 54ee ada9  ..\.<.......T...
0000070: 3568 a66b 0aff 04f0 2af6 743b 115c 5dc4  5h.k....*.t;.\].
0000080: 7e31 4ed6 0f53 006c e7d6 e726 f42d c82e  ~1N..S.l...&.-..
0000090: 014a bd4d 9c3d 6f72 6e5b f6ff 208b 052a  .J.M.=orn[.. ..*
00000a0: f679 a9c4 92c7 e2ff 03f8 27dd c278 279e  .y........'..x'.
00000b0: 6ff1 2481 fbbb 09e1 fed8 7a78 3d3c dbba  o.$.......zx=<..
00000c0: b3b5 2775 68fc 04ac 2a7b f9d0 f7ae e257  ..'uh...*{.....W
00000d0: 17f8 ff00 0077 9b77 bf8f 778d 5b5f 4f1e  .....w.w..w.[_O.
00000e0: ef1b f5b5 5347 e1f9 29b5 4e10 f7ea 66df  ....SG..).N...f.
00000f0: ec29 bd39 03d8 f4fb cd38 7bdb cf48 0003  .).9.....8{..H..
0000100: 7724 40e1 5fef 89e4 91e0 c0e0 f0e0 0fe1  w$@._...........
0000110: 07bb 04e0 09bf 03e0 00bf 03bf 5150 91f1  ............QP..
0000120: e42f c895 002d 102d 007f 1f70 272f 27fd  ./...-.-...p'/'.
0000130: 2095 2054 362f 2595 3695 e9f7 27fd 3fef   . T6/%.6...'.?.
0000140: 020f 131f 2c2f 2295 2f70 f894 a02e b12e  ....,/"./p......
0000150: c22e 7894 7051 b150 18f4 b0e1 60ff 6695  ..x.pQ.P....`.f.
0000160: c70d 77fc 03c0 20f4 cfef 02c0 08f0 cc27  ..w... ........'
0000170: 08b7 01ff fdcf 02e0 08bf d0cf 0694 08f0  ................
0000180: 0194 702c e8e1 c895 0694 50f0 0694 c8f0  ..p,......P.....
0000190: 0694 a0f7 400d 4f71 68e0 b4e7 54e2 c0cf  ....@.Oqh...T...
00001a0: 102d 990f 51f4 0e2f e82f ee23 19f0 c895  .-..Q.././.#....
00001b0: 902d 8395 e02f 0894 991f 08f4 e10f e395  .-.../..........
00001c0: e2cf 502d 550f accf dfb6 8a0c 9b1c ac2d  ..P-U..........-
00001d0: 97fc a195 a05f a8bb dfbe 1895 4c46 5421  ....._......LFT!

A hexdump of the entire ROM, containing packed data, code to unpack and parse the data and code to generate the audio signal.

Download:

The unmarked resistors should form a 5-bit R-2R ladder. I used 220 Ω and 442 Ω metal film resistors, but other values should work too.

Posted Monday 26-Apr-2010 16:12

Discuss this page

Disclaimer: I am not responsible for what people (other than myself) write in the forums. Please report any abuse, such as insults, slander, spam and illegal material, and I will take appropriate actions. Don't feed the trolls.

Jag tar inget ansvar för det som skrivs i forumet, förutom mina egna inlägg. Vänligen rapportera alla inlägg som bryter mot reglerna, så ska jag se vad jag kan göra. Som regelbrott räknas till exempel förolämpningar, förtal, spam och olagligt material. Mata inte trålarna.

Anonymous
Wed 28-Apr-2010 12:32
Brilliant!

I'm curious, what do you think would be the absolute minimal platform that would perform (with voice) "Daisy Bell" originally sung by IBM 7094 in 1961?
http://www.youtube.com/watch?v=41U78QP8nBk

zws1922
lft
Linus Åkesson
Mon 3-May-2010 06:08
I'm curious, what do you think would be the absolute minimal platform that would perform (with voice) "Daisy Bell" originally sung by IBM 7094 in 1961?

Really interesting idea! I'm putting that on my list for now. =)
Anonymous
Fri 23-Jul-2010 13:57
Are you familiar with Clara Rockmore's Theramin rendition of this song?
lft
Linus Åkesson
Fri 23-Jul-2010 18:04
Are you familiar with Clara Rockmore's Theramin rendition of this song?

Yes, I am. She plays it beautifully!
Anonymous
Wed 28-Jul-2010 21:40
If by 'emotion' you mean using aliasing to make my ears bleed, then yes.. it worked.
lft
Linus Åkesson
Thu 29-Jul-2010 07:25
If by 'emotion' you mean using aliasing to make my ears bleed, then yes.. it worked.

That's a perfectly valid emotion, although not necessarily the intended one. =) To each his own.
Cathedrow
Peter Knight
Fri 6-Aug-2010 16:05
Did someone say "Daisy Bell" on a minimalist platform?

How about an ATmega168?

http://code.google.com/p/tinkerit/wiki/Cantarino

(This was coded in a rush - most of the unvoiced phonemes are weak or missing)
lft
Linus Åkesson
Tue 24-Aug-2010 17:50

Cathedrow wrote:

Did someone say "Daisy Bell" on a minimalist platform?

How about an ATmega168?

http://code.google.com/p/tinkerit/wiki/Cantarino

(This was coded in a rush - most of the unvoiced phonemes are weak or missing)

Cool!
Anonymous
Fri 16-Dec-2011 14:58
Hee there,

I love listening to your Swan version, could you perhaps play some more with this? I grew up in these basic sounds
With kind regards,

Dokterzon
Anonymous
Sat 14-Oct-2023 00:06
If you could find a way to warm up the timbre so it is less sawtoothy, that would please cellists like myself more, but I like the expressive use of timing, the vibrato applied to longer tones and overall interpretation of the piece. Combined with the technical feat of doing it in such as small space, it is very impressive!