Skip to main content
17 votes

Lossy or Lossless?

Jelly, 7 5 bytes ƈƈeØA Lossy formats return 0, lossless formats return 1. Try it online! (permalinks in Gist) Background The formats we have to support have ...
Dennis's user avatar
  • 211k
13 votes
Accepted

Shortest Konami Code

05AB1E, 33 bytes (Fine on Empty Input) Dg0Qiq}•ï“뙵yê!•36BQi7ç“+30™‹“J, Try it online! 05AB1E, 30 26 bytes (Fails on Empty Input) -4 thanks to Adnan ...
Magic Octopus Urn's user avatar
12 votes

Play the Final Fantasy Prelude

ZX Spectrum 48K Basic, 246 203 bytes ...
Neil's user avatar
  • 177k
11 votes
Accepted

Play the Final Fantasy Prelude

MATL (1 language), 78 77 bytes 0'!4XC@nRAxt~&'F5:ZaKeK1X"tP[AaABOlHN]0Y(_&vhYs"1875:YPE*76/@12/W*Y,E]&h1e4Y# This uses equal temperament, ...
Luis Mendo's user avatar
  • 105k
10 votes

Play the sound of Pi

Python 2, 182 bytes ...
primo's user avatar
  • 33.5k
9 votes

Shortest Konami Code

JavaScript (ES6), 202 200 198 bytes Tested only on Chrome and Firefox. Uses UDLR rather than the arrow keys. Please make sure that CapsLock is off. ...
Arnauld's user avatar
  • 198k
9 votes

Play some of Pachelbel's Canon

Mathematica, 212 152 139 135 bytes ...
JungHwan Min's user avatar
  • 13.9k
9 votes
Accepted

Play the sound of Pi

Mathematica, 107 87 bytes Thanks to Martin Ender for saving 20 bytes! "t.au"~Export~Sound[SoundNote[⌊12Mod[#,10,1]/7⌋-1,.5]&/@#&@@RealDigits[Pi,10,1000]] ...
Greg Martin's user avatar
  • 16.2k
9 votes

Lossy or Lossless?

C, 82 80 32 bytes Inspired by @Dennis' answer, this can be reduced much further: main(){return getchar()&200^64;} Pipe the file data to stdin. Returns 0 for ...
Dave's user avatar
  • 8,499
8 votes

Shortest Konami Code

Python 3,  55  53 bytes -1 byte thanks to isaacg (use bitwise not to replace -10 with ~9). -1 byte thanks to ...
Jonathan Allan's user avatar
8 votes

Play some of Pachelbel's Canon

JavaScript (ES7), 249 242 241 bytes ...
user81655's user avatar
  • 11.2k
8 votes

Play the Final Fantasy Prelude

CP-1610 machine code, 125 DECLEs1=156.25 bytes 1. CP-1610 instructions are encoded with 10-bit values (0x000 to 0x3FF), known as DECLEs. Although the Intellivision is also able to work on 16-bit data, ...
Arnauld's user avatar
  • 198k
7 votes

Twinkle Twinkle Little Star

Desmos, 148 116 bytes The viewport has been manually changed to x=0 to 20, and y=0 to 12, because the audio trace feature in Desmos is affected by the viewport (the song will become distorted if the ...
Aiden Chow's user avatar
  • 14.2k
7 votes

Play the Final Fantasy Prelude

JavaScript, 320 bytes I don't golf with JavaScript much so I'm sure there's a lot of opportunities for golfing here. Should work on most browsers. ...
Jordan's user avatar
  • 11.3k
6 votes

Twinkle Twinkle Little Star

bash + say + gunzip, 136 bytes say, of course, being the OS X text-to-speech command. This is... dorky. Yeah, let's go with dorky. ...
Jordan's user avatar
  • 11.3k
6 votes

Play some of Pachelbel's Canon

BBC BASIC, 141 ASCII characters (65.217BPM) ...
Level River St's user avatar
6 votes

Play the sound of Pi

Scratch, 530 bytes Inspired by BookOwl's answer. Online Demonstration. Playback will begin immediately, press space to stop and reset. Click the cat to start again. Edit: golfed down slightly. I ...
primo's user avatar
  • 33.5k
6 votes

Lossy or Lossless?

GS2, 3 bytes ◄5ì Lossy formats return 0, lossless formats return 1. Try it online! (permalinks in Gist) Background The formats we have to support have the ...
Dennis's user avatar
  • 211k
6 votes

Make your keyboard into a keyboard

Python 3, 154 140 bytes ...
Кирилл Малышев's user avatar
6 votes

Play the Final Fantasy Prelude

PowerShell, 401 379 340 304 290 bytes ...
bigyihsuan's user avatar
  • 10.8k
5 votes

Shortest Konami Code

Jelly, 33 30 29 27 bytes ɠ⁻“UUDDLRLRBA”$¿ṛ7Ọ“¡}ʠƈ[ỵ» Turns out, the append () is not needed, strings are automatically ...
JayDepp's user avatar
  • 273
5 votes

Shortest Konami Code

Processing, 161 157 155 bytes ...
user41805's user avatar
  • 13.2k
5 votes

Play the Final Fantasy Prelude

Javascript, 270 bytes ...
ccprog's user avatar
  • 851
4 votes

Twinkle Twinkle Little Star

JavaScript, 194 177 176 Now that WebAudio is a thing, I thought it would be fun to write this. (Yes, I know ES6 and WebAudio came out after the challenge was posted.) Tested on Microsoft Edge. <...
General Grievance's user avatar
4 votes

Shortest Konami Code

><>, 132 69 64 62 bytes *><>, 84 bytes i:1+?\0[ :1+?!\i BA"a~/"UUDDLRLR {v!?l/!?= 7/"+30 lives" o<;!?l Try it here! This relys on the bell chime (ascii ...
redstarcoder's user avatar
  • 1,811
4 votes

Play some of Pachelbel's Canon

Befunge, 242 bytes The tune is written to stdout in the format of a MIDI file. You'll need to redirect that output to a .mid file in order to play the excerpt. ...
James Holderness's user avatar
3 votes

Shortest Konami Code

AutoHotkey, 63 bytes Input,K,L10 if(K="UUDDLRLRBA"){ MsgBox,"+30 lives" SoundBeep } After running this script, it will check if the next 10 ...
Cave Johnson's user avatar
3 votes

Shortest Konami Code

Petit Computer BASIC, 91 bytes @L WAIT 1S$=S$+CHR$(B)*!!B B=BTRIG()IF B<1024GOTO@L IF"xxxxxxxxxx"==S$THEN BEEP?"+30 lives Finally a solution that ...
12Me21's user avatar
  • 6,721
3 votes

Shortest Konami Code

Stacked, 41 bytes ['+30 lives'BEL+out]prompt'UUDDLRLRBA'=if Reads input from keyboard. ...
Conor O'Brien's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible