Excerpts from James Morris's message of 2010-07-05 11:39:53 +0200: > a program i'm making (yes that one) will benefit from knowing about > musical scales. i looked in the source code for non-sequencer (i'll > look at arpage next), and adapted an array there into the following > form: > > { "Major", { 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1 }}, > { "Natural Minor", { 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0 }}, > { "Harmonic Minor", { 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 0, 1 }}, > { "Melodic Minor", { 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1 }}, > { "Major Pentatonic", { 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0 }}, > { "Minor Pentatonic", { 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0 }}, > { "Chromatic", { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }} > > (1 means a note is part of that scale, 0 means it is not). Just one word of warning: In case you copy code from non-sequencer, make sure to test it. I played with it today, played with scales, and after I reverted to the initial "Major" it started to more or less randomly not play notes. Well, I think there was a pattern to it, but anyway, it seems to be buggy somewhere around that code. -- Regards, Philipp -- "Wir stehen selbst enttäuscht und sehn betroffen / Den Vorhang zu und alle Fragen offen." Bertolt Brecht, Der gute Mensch von Sezuan _______________________________________________ Linux-audio-user mailing list Linux-audio-user@xxxxxxxxxxxxxxxxxxxx http://lists.linuxaudio.org/listinfo/linux-audio-user