Quasi Random Music: Executable or Text Version

Despite the seemingly odd anomalies in musical scales (the intervals between the notes of the standard Major and Minor scales are not all the same, for example), ALL the Major and Minor scales and their standard chords lend themselves to a scaleable mathematical structure. That's not evident on a piano keyboard, but it's sort-of "obvious" to every guitar player, since each chord shape can be shifted up and down the fretboard, and it sounds "the same", but higher or lower in pitch.
My program revolves around randomly chosen arpeggios of the 7 extended Triads in each Major or Minor key.

To finish, there's also a Coda of one of my own pieces (it sounds infinitely better on a real guitar, of course), which uses one of my favourite weird chords - the "add #11". The piece uses the A6, E6, Dsus2 and D(#11) chords, and is in the key of A Major.


Celestial Chords:
Executable or Text Version

This program was a bit of an accidental discovery, in reality. It uses the built-in MIDI instruments in your PC to play a number of different chords ALL based around the SAME root-note. Then it switches to another root note. It uses all 45 "nameable" chords (all Minor, Major, Dominant, Diminished, Augmented and Altered types), but excluding so-called polytonal "slash" chords, with an additional bass note, and excluding inversions of all the above. That's still 12 x 45 = 540 chords altogether.

I was just surprised it sounded good, since this outcome was a trial-run on the way to doing something else.

The user can choose one from 120 of the built-in MIDI instruments.

3 BODY PROBLEM: Executable or Text Version

The picture below is a screen print of the paths taken by 3 Planets moving solely under the influence of each others gravity.
Suggested values are given in the program as you enter parameters. There are quite a lot of them! The program may be stopped at any time by pressing the Space-Bar. Press -s- to continue thereafter.

 

N BODY PROBLEM: Executable or Text Version

I'm surprised I managed to get this program to work beyond just a few iterations, but it's very well-behaved. It simulates any number of Asteroids near a more massive Planet, all moving under the combined influence of each others' gravity. It gets too slow beyond about 500 Asteroids, and I had to compromise a bit of accuracy for execution speed.

Luckily, our own Solar System of planets appears to be in a very long period of stable trajectories, but it is nonetheless as inherently UNstable as the mish-mash of paths generated by the 3 Body program.

I found that the double-iteration Improved Euler method was perfectly accurate enough, rather than the more sophisticated Runge-Cutta method, so long as I reduced the time-steps in accordance with that use by Dr David Acheson in his book. That is, reducing the time steps whenever there is a "close encounter" of any 2 planets.

The program numerically solves a system of 6 pairs of inter-dependent 2nd order Differential Equations "on the fly". The continuing check on the accuracy of calculations is the Energy Error; in theory the energy should remain constant.

Return to Top Page                                                                                                                           Next Page