2025-04-24 –, Zeiss Plenary (Spectrum)
Computers have long been an integral part of creating music. Virtual instruments and digital audio workstations make creating music easy and accessible. But how do programming languages and especially Python fit into this? Python can serve as a tool for creating musical notation
and MIDI files.
Throughout the session, you’ll learn how to:
- Use Python to create melodies, harmonies, and rhythms.
- Generate music based on rules, randomness, and mathematical principles.
- Visualize and export your compositions as MIDI and sheet music.
By the end of the talk, you’ll have a clear understanding of how to turn simple algorithms into expressive musical works.
This talk provides a general introduction into creating music algorithmically using Python. Little prior knowledge about music is assumed. It is helpful to know how sheet music looks and what the MIDI format is beforehand.
We will start by looking briefly into the basic building blocks of music (harmony, melody and rhythm) and what our goal is (creating sheet music and a playable MIDI file).
Then we will discuss the history of algorithmic composition in music and from that we will develop ideas how we can create music from algorithms and randomness.
For creating sheet music we will look into the packages Abjad und music21.
In the end will we will create a playable MIDI file for our music using MIDIUtil.
Novice
Expected audience expertise: Python:Novice
Hendrik is a C++ developer and works on software for analysis of pipeline inspection data. This includes topics like machine learning,
numerical mathematics and distributed computing. Before this he completed his PhD in physics at the University of Osnabrück with a thesis about quantum mechanics and
numerical simulations where he got to know and and love programming and complex, mathematical tasks.
His favorite programming languages, in which he also has the most experience, are C++, Python and Rust. He describes himself as a "learning enthusiast"
who always gets absorbed in trying out new things. Therefore, he values being up to date with programming languages
and using the latest features of them in a meaningful way.