A Collatz conjecture full music generator in 800 lines of C
A Collatz conjecture full music generator in 800 lines of C
Hi HN, while the hype around neural networks and neural network tools is still going strong. I decided to release my project as open source it generates IDM/Ambient music based on the Collatz hypothesis using numbers. It’s a procedural synthesizer written in pure C. It takes any number, calculates a sequence for it, and uses that sequence as code to generate the source music. And yes, it’s important to note that we don’t use MIDI all sound is generated on the fly. For example, 11 synthesized voices (Additive, FM, Noise), ADSR envelopes, filters, and effects. We use the libsndfile audio library. Rather, this isn’t just random sounds the program tracks the local entropy of the sequence. If the numbers lack sharp jumps, the music loops into motifs if a sharp jump occurs, the structure breaks down, glitch effects are activated, and the tempo accelerates. This is done intentionally to try to create a composition rather than a set of notes. I wanted to explore and apply more mathematics, which is why I chose this particular approach. The code isn’t large for your convenience, I’ve implemented a variety of build methods (makefile, Docker, CMake, .bat). I’d love to hear your feedback on the synthesis architecture and ideas for other mathematical sequences that might sound interesting.
Share cardActual performance
Launch Intel predictions
Analyze your own launch →Incorrect prediction on native model
Similar products
Mobile music generator
Mindscapes – Stochastic background music generator
Aimusicgen.me AI-powered music generator for quick
Spinning Cube in 45 lines, 45 Chars Each
Flappy Bird in 128 Lines of CoffeeScript
AI Music Generator
MuseGen - AI Music Generator
AI Music Generator
AI Music Generator
AI Music Generator