Fractal Music Generator
This tool generates music from binary bitwise fractals. More generally, it writes music notes from any mathematical function of the form . The value is time, and the music is the function value, , at each sample played as a MIDI note index starting at A, 440 Hz. You can use binary bitwise operations (and: &, or: |, xor: @) to create 1-dimensional slices of Pascal's triangle, and then apply a periodic function (like a modulo: %) to keep the value in an acceptable range. This results in self-similar musical fractal patterns!

You can add multiple equations to overlay music, such as for two hands on a piano or instruments in an orchestra. Add or subtract 12 from the answer to shift by an octave. To select from a musical scale, use the function white(index), which converts a white note's sequential index to its MIDI index. Additionally, you can apply the function fix(refnote, note) to correct dissonant sounds by returning a slightly better value for the MIDI note that is more harmonious compared to refnote. This is useful for creating supporting themes for the main music.
The synthesizer is compatible with the Yamaha DX7 voice file SYSEX format. You can add a bank of 32 custom instruments and select them.
To save your music, you can save all the equations by copying the URL at the bottom of the page, or you can generate a MIDI file or a WAV file. (Synthesized only up to a specified length, since fractal music goes on forever!)
Tempo: 0:00
Double click on the graph to set the starting time.
Save:
Length: seconds
⇓ Generate MIDI File
⇓ Generate WAV Audio File
This software is free to use for both personal and business purposes. All music equations you create with this tool, if you release them, must be licensed as CC0 (no copyright, in the public domain to the fullest extent permitted by law).
