Awuwunya / AMPS

Ample Music Playback System development project
Apache License 2.0
23 stars 1 forks source link

Fractional note frequency #8

Open Awuwunya opened 5 years ago

Awuwunya commented 5 years ago

This feature would make all frequency work as note.fraction as opposed to frequency. Lets say you want to modulate: Instead of adding x to the note frequency, you add x to the note.fraction value. This will later be converted into a frequency, where note is just the note to use, and fraction represents a fraction of the difference between the next note - current note difference in frequency. For example, fraction of $40 may mean current note + ((next note - current note) / $100 * $40). This would make modulation, portamento and other effects be effectively exponential as opposed to linear, and make them sound more "realistic". It would make the driver more accurate in production of notes at the cost of extra CPU time and more work to port songs correctly. It would also make code more complex (especially when dealing with how FM splits its octaves; dome frequency values actually overlap between octaves), but it would also bring many advantages and make it easier to create interesting effects in music.