A game of pair (aka memory) where a device with a camera acts as audio playback device for physical cards.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Nils 6042a5075d more README 2 months ago
css Initial README and code dump 2 months ago
datasets Initial README and code dump 2 months ago
game Initial README and code dump 2 months ago
images Initial README and code dump 2 months ago
js Initial README and code dump 2 months ago
makecards Initial README and code dump 2 months ago
LICENSE Initial commit 2 months ago
README.md more README 2 months ago
game.html.template Initial README and code dump 2 months ago
generate.py Transfer files todo to readme 2 months ago
index.html Initial README and code dump 2 months ago
index.html.template Initial README and code dump 2 months ago
make-cards.bash Initial README and code dump 2 months ago
music2metadataini.py Transfer files todo to readme 2 months ago
numbers-as-qr-codes.pdf Initial README and code dump 2 months ago



A matching game, commonly referred to as a memory game, in which a camera-equipped device functions as an audio player for physical cards.

How to play

  1. Start by printing and cutting the provided .pdf file containing the cards. Place them on a table, with two cards forming a pair.
  2. Go to the game's website and select a topic, for example, "Orchestral Beginnings." Choose the number of pairs you want to play with.
  3. There's no need to arrange the cards in any specific order; random placement is fine.
  4. Hold a card in front of your device's camera, and it will play the corresponding sound for that card.
  5. That's it! There are no predefined rules in this software. Play the game just as you would with physical picture cards.

Common Variant: In the common variant, each player selects two cards and listens to their sounds. All other players present can also hear the sounds. When you find two cards that match, you earn one point, and those cards are removed from the game. The game typically ends when no cards are left.

The definition of a "matched pair" depends on the chosen topic. For instance, in "Orchestral Beginnings," you must find two cards with the same sound. In other topic modes, the two matching cards might produce different sounds, such as a beginning and an end.

After scanning a card, you can read its name and additional information on your device if desired. Alternatively, you can play by ear to increase the challenge. To even the odds, you can allow one player to view the information, while the other player does not.

You can also use this feature to verify whether two cards truly form a pair if you're uncertain.

How to Host the Game Yourself

  • Modify all .template files in the root directory and adjust your HTML base directory tag (located at the top).
  • Run the generate.py script.
  • Copy all generated files to a standard web server.

Please keep in mind that when running a local test web server, modern browsers often restrict access to your camera device. Nowadays, browsers typically grant camera access only to websites with secure HTTPS connections. However, there are methods to set exceptions in your browser to permit access for addresses like,, and "localhost."

Adding More Datasets

A dataset consists of audio files, a special file called metadata.ini, and optional image files. Each pair can either be composed of one file, which is automatically used twice, or two distinct audio files. Any other files in the directory will be disregarded.

To create your own dataset, duplicate datasets/orchestralbeginnings/metadata.ini. It follows a straightforward and self-explanatory file format.

Typically, 18 pairs per player are considered the standard for the picture variant, and even 32 pairs per player in competitive play. However, this might be excessive for our audio version.

Remember to rerun the generate.py script every time you add new datasets.

Roadmap and TODO

  • Implement training mode.
  • Different languages (during development it's hardcoded German)
  • When playing with reduced pair count randomize which pairs are chosen.
  • Option (for the user) to play a short confirmation sound ("blip") if a new card was scanned. With very soft music, like often in classical, it is not clear if the scanning was already successful.
  • Improve performance. Caching etc.
  • Web-GUI Editor: Load and Save metadata.ini, provide easy ways to "upload" your own music, provide basic cutting and fade in/out tools.
  • Fancy Mode: Support for physical NFC/RFID chips ( needs a library to readout these chips)
  • Accesible mode: Support for hand written cards with just numbers on them ( needs simple AI handwriting detection for numbers)
  • Barcodes? But QR Codes are better already.
  • Content or topic ideas. Both fun and "boring but educational"
    • Two parts of the same piece
      • A and B theme of a classical Sonata or Symphony
      • Verse / Chorus
    • Two interpretations or recordings of the same piece
      • Or "original and cover" in pop music terms
    • Two pieces from a group. For example two different fugues, opera arias, church arias, two Chopin nocturnes etc.
    • Historical and geographical context: Medieval, Renaissance, Baroque etc. and also from Germany, France, Italy etc. (so you can multiply time and location to get a playable number of pairs)
    • Instruments
      • Just the same audio file twice of a solo instrument
      • Prominently featured in an actual piece of music, or two different ones, or one of the cards in isolation.
      • Featured in different styles, like clarinet in Mozart and Swing
      • Instrument families
    • Musical intervals
      • both successive and simultaneous
      • Musical complementary intervals
      • Also one of the cards may be transposed

Futher Ideas

  • Link or template to print out high quality playing cards somewhere online, without sponsoring or special deals, just convenience
  • Wooden playing cards with QR cards laser or CNC carved

License and Sources

All included audio files have a free and open license, most of them CC-Zero, CC-By or CC-By-SA. If you host your own version and protect it with a password you can of course use any music you like.

Some sources: