Crates.io | scaleless_music |
lib.rs | scaleless_music |
version | 0.0.8 |
source | src |
created_at | 2016-08-11 22:34:18.112674 |
updated_at | 2016-11-24 02:11:43.681653 |
description | A library for building music with precise harmonies, without the limitations of any musical scale. |
homepage | |
repository | https://github.com/tiborgats/scaleless_music |
max_upload_size | |
id | 5956 |
size | 194,127 |
A library for building music with precise harmonies, without the limitations of any musical scale.
:construction: It is in a very early stage, but will change a lot as soon as I have some free time. I would be happy to work on this full-time, but I don't know how can I get money for supporting my life at the same time. If you have any idea, please share it with me.
I was always annoyed by the slightly false notes that came out from electronic musical instruments. When I wanted to compose some overtone flute music I also realized, that music composing software (MIDI editors) are limited to the western chromatic music scale. They miss not only some harmonies of the overtone flute, but also many of those, which are present in other types of music (e.g. Arabic). And so this project was born...
The aim of this software is to create music according to the following perfectionist principles:
The first rule means that the music shall not contain false sounds.
Pure intervals are important in music because they naturally tend to be perceived by humans as "consonant": pleasing or satisfying. Intervals not satisfying this criterion, conversely, tend to be perceived as unpleasant or as creating dissatisfaction or tension. (Wikipedia)
The second rule provides the freedom to use harmonies which are missing from the chromatic scale.
The realization of these conditions is mathematically impossible when using musical scales. In this new "scaleless" concept, the frequencies of the notes are not chosen from a fixed set (or scale), they are calculated dynamically, based on the relation of the previous notes to achieve pure intervals.
Counterexample: the popular equal temperament (used by MIDI) contains only one type of pure harmonic interval: the octave, all the other frequency intervals are slightly disharmonic in it (multiplies of ¹²√2). It is also limited to a small set of intervals. For a deeper understanding of the problem of equal temperament and musical scales in general, you can read about the just intonation approach.
scaleless_music uses additive synthesis, with an additional rule:
Note: this kind of synthesis is very resource demanding. So, for real-time sound generation smaller sample rate (eg. 48kHz) and lower number of overtones are desirable (to prevent buffer underrun). This can change after the speed optimization of the algorithm.
Later on I would like to complement it with sample-based synthesis. But it must be used carefully, because of the following possible problems:
Henceforward, I plan to create a tool for analyzing recorded samples, finding closest mathematical representation, and building harmonic sound structures with similar output. This way we can eliminate noise and have the option to use precise 3D spacial effects.
scaleless_music can be built with different sound output backends:
cargo build
cargo build --features "be-portaudio"
. If for some reason the building of rust-portaudio fails, you can check it's README for further instructions.cargo build --features "be-sdl2"
cargo build --features "be-rsoundio"
- not available yet