Image Source: NASA

Fractal music app

The fractal music application was motivated by the self-similarity inherent to music: rhythm and pitch are fundamentally the same thing, only at different scales. This app allows you to create fractals in music by copying the contents of one interval in another (probably smaller) interval. If the second interval is inside the first, a fractal is created.

Two types of objects can be created in this app: notes and fractals. By default, a note is a pure frequency which plays at a fixed volume for the specified duration. They have five attributes: layer, start, duration, frequency, and volume. All numerical values should be in integer or decimal form. Fractions are not accepted. Layers will become relevant when we discuss fractals. By default there is only one layer; they can be added via the "Add Layer" button. The start is the number of seconds after the beginning of the file at which the note will start. The duration is the number of seconds the note will last. The file ends after the last note (or fractal). The frequency is the note's frequency in hertz. The volume is note's volume, and should range between 0 and 100. Volume is automatically normalized by the program. A value of 100 indicates that a note should be the maximum permitted value, which may differ between projects. Many overlapping notes/fractals can result in the maximum volume of a note being low. If the "Round Notes" setting is selected, notes will not have constant volume, but will instead have a sinusoidal shape where the maximum volume is being specified.

Fractals have significantly more attributes. The contents of a fractal object lie with a β-interval, which has layer, start, and duration attributes. The contents of the β-interval are identical to the contents of the α-interval, but they are scaled to fix within the β-interval's duration. If the duration of the β-interval is half that of the α-interval, any note in the α-interval will appear in the β-interval; its duration will be halved, but its frequency will not change. The α-interval has start and duration attributes as usual, but the α-layers attributes differs in that multiple layers can be entered. To specify which layers should be accepted, either write "all" to accept all layers or enter them as a list, separated by commas (i.e. "1,2,3"). The layers exist so that fractals can copy only specific notes/fractals in the α-interval. Fractals have two attributes involving volume. The relative volume is comparable to the volume attribute of a note. A relative volume of 100 indicates that a note being copied into the β-interval preserves its volume. If the relative volume is 50, copied notes will have their volume halved. The recurring volume is only relevant if α- and β-intervals overlap. When this happens, the contents of the β-interval will be copied into itself (as it is part of the α-interval). This process continues, creating progressively smaller copies of the α-interval. To change how many times this process recurs, alter the "Iteration Depth" setting; the default is 20. Each iteration, the volume of each note is reduced according to the relative volume. (If it's 100, there is no reduction.) Hypothetically, if the relative volume is less than 100, the final theoretical volume will be finite. The program does not account for this theoretical limiting volume: if a note lies in the overlap between the α- and β-intervals, it may be copied onto itself or other notes repeatedly, causing the volume to exceed the maximum. This will have undesirable consequences on the final product. Lastly, if the reversed attribute is selected, the contents in the β-interval will be reversed each iteration.

Notes and fractals can be removed at any time under their layer's heading. When a note or fractal is removed, the fields in the associated section ("Note" or "Fractal") are updated to match the deleted entry. This allows you to quickly remove a note/fractal, alter it, and re-enter it. When you want to listen to your music, click the "Render" button. It may take a moment to render your work if you are using a large iteration depth. This will allow you to listen to the audio, or download it using the "Download this audio button".

This project is far from being a polished application. There are likely bugs, and I have envisioned a number of additional features and options which may be implemented in the future. Enjoy!