Skip to main content

This package features an implementation of various musical dice games by Mozart, Kirnberger and Stadler. These dice games are also known as “Musikalisches Würfelspiel” (German for “musical dice game”).

The earliest printed edition of a dice game is Johann Philipp Kirnberger’s “Der allezeit fertige Menuetten- und Polonaisencomponist” (The ever-ready minuet and polonaise composer”), published in 1757. Afterwards, many composers, such as, for example, C.P.E. Bach, Hayden, and Mozart, published these so called “Musikalische Würfelspiele” (musical dice games) all over Europe. The music style varies roughly between Gregorian chants up to and including the salon pieces of the Romantic period. See [Reuter2013] for more details.

To play a dice game, one would need:

  • two dice

  • a tables sheet with the measure indices

  • a measures sheet with all the numbered bars

  • music paper to write down your composition

The measures and tables where composed by the composer of the dice game and were organized such, that random compilations made a musical composition. To play the game, you would have to throw the dice, and then look up the measure corresponding to your dice throw and your bar index in the dice table. Having found the right bar number, you then select that bar from the measures sheet provided.

This software package automizes the production of these musical pieces. All pieces (tables sheets and measures) have been inserted into this software package and suitable software has been created to allow production of the musical pieces.

For a use case of this library, and more information on these dice games, please visit http://opus-infinity.org, a website by the same author.

For complete functionality, this package requires the following packages to be installed on the user’s system:

  • lilypond, to convert the compositions into midi and pdf files

  • fluidsynth or timidity, for converting midi to wav

  • ffmpeg, to convert wav to other audio formats

  • imagemagick, to prepare the image outputs of the compositions

Python API

The major component of this library is the class “DiceGame”. All dicegames implement this class and its funcions. For use cases, please see the demo’s in the scripts folder.

Technical details

All musical dice games are stored internally using Lilypond bars. When composed into a musical piece, these bars are combined to form a complete piece. The external package Lilypond is then called to convert the composition into a midi file and a pdf file. Next, fluidsynth, or timidity is used to convert the midi to wav, either using a default soundfont, or a user provided soundfont. Afterwards, the composition pdf can be transformed to png for display in, for example, a browser.

[Reuter2013]

Reuter, Christoph. (2013), Der Würfel als Autor, Würfelmusik und Zufallstexte des 17. bis 19. Jahrhunderts. In: Herbert Bannert, Elisabeth Klecker (Hgg.), Autorschaft, Konzeptionen, Transformationen, Diskussionen. Wien, Praesens Verlag. p. 195-222.

Metadata

Release files for musical_games 0.9.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for musical_games 0.9.3
File Size Uploaded
musical_games-0.9.3.tar.gz 96.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for musical_games 0.9.3
File Interpreter ABI Platform
musical_games-0.9.3-py3-none-any.whl Python 3 none any Details

Total release size: 204.5 kB

Release files / musical_games-0.9.3.tar.gz

Download URL musical_games-0.9.3.tar.gz
Size 96.0 kB
Tags Source
SHA-256 checksum
How to use checksums
d4e0a37c2ab739d687047bc0c792a6fef69ec92e579653ce2674b863b7e16b63
BLAKE2b-256 checksum
How to use checksums
cd19a4ce5dc79401547025f02310fcc186a72695764e03eb5e2c317d26424dea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.32.3

Release files / musical_games-0.9.3-py3-none-any.whl

Download URL musical_games-0.9.3-py3-none-any.whl
Size 108.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
461005e873fdf68f8b99a472873fc46e6e66f3be6b63f3dd75951d07fb17cb8a
BLAKE2b-256 checksum
How to use checksums
7d207ad45e81afb3ac973551ad2403ee041fdb508b6e695539be7594c7449e30
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.32.3

Release history Release notifications | RSS feed

This release

0.9.3 This release

2 release files

0.9.2

2 release files

0.9.1

2 release files

0.9.0

2 release files

0.8.9

2 release files

0.8.7

2 release files

0.8.6

2 release files

0.8.5

2 release files

0.8.4

2 release files

0.8.3

2 release files

0.8.2

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.14

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page