annotate _writetools/keynroot2notetext.m @ 9:4ea6619cb3f5 tip

removed log files
author matthiasm
date Fri, 11 Apr 2014 15:55:11 +0100
parents b5b38998ef3b
children
rev   line source
matthiasm@8 1 function outnote = keynroot2notetext(key,root,type)
matthiasm@8 2
matthiasm@8 3 switch type
matthiasm@8 4 case 'normal'
matthiasm@8 5 if root ~= 13
matthiasm@8 6 scale{1} = {'A','Bb','B','C','C#','D','D#','E','F','F#','G','G#'};
matthiasm@8 7 scale{2} = {'Bb','B','C','Db','D','Eb','E','F','Gb','G','Ab','A'};
matthiasm@8 8 scale{3} = {'B','C','C#','D','D#','E','F','F#','G','G#','A','A#'};
matthiasm@8 9 scale{4} = {'C','C#','D','Eb','E','F','F#','G','Ab','A','Bb','B'};
matthiasm@8 10 scale{5} = {'Db','D','Eb','E','F','Gb','G','Ab','A','Bb','B','C'};
matthiasm@8 11 scale{6} = {'D','D#','E','F','F#','G','G#','A','Bb','B','C','C#'};
matthiasm@8 12 scale{7} = {'Eb','E','F','Gb','G','Ab','A','Bb','B','C','Db','D'};
matthiasm@8 13 scale{8} = {'E','F','F#','G','G#','A','Bb','B','C','C#','D','D#'};
matthiasm@8 14 scale{9} = {'F','Gb','G','Ab','A','Bb','B','C','Db','D','Eb','E'};
matthiasm@8 15 scale{10} = {'Gb','G','Ab','A','Bb','Cb','C','Db','D','Eb','E','F'};
matthiasm@8 16 scale{11} = {'G','G#','A','Bb','B','C','C#','D','D#','E','F','F#'};
matthiasm@8 17 scale{12} = {'Ab','A','Bb','B','C','Db','D','Eb','E','F','Gb','G'};
matthiasm@8 18 outnote = scale{key}{mod(root - key,12)+1};
matthiasm@8 19 else
matthiasm@8 20 outnote = '';
matthiasm@8 21 end
matthiasm@8 22 case 'lily'
matthiasm@8 23 if root ~= 13
matthiasm@8 24 scale{1} = {'a','bes','b','c','cis','d','dis','e','f','fis','g','gis'};
matthiasm@8 25 scale{2} = {'bes','b','c','des','d','es','e','f','ges','g','as','a'};
matthiasm@8 26 scale{3} = {'b','c','cis','d','dis','e','f','fis','g','gis','a','ais'};
matthiasm@8 27 scale{4} = {'c','cis','d','es','e','f','fis','g','as','a','bes','b'};
matthiasm@8 28 scale{5} = {'des','d','es','e','f','ges','g','as','a','bes','b','c'};
matthiasm@8 29 scale{6} = {'d','dis','e','f','fis','g','gis','a','bes','b','c','cis'};
matthiasm@8 30 scale{7} = {'es','e','f','ges','g','as','a','bes','b','c','des','d'};
matthiasm@8 31 scale{8} = {'e','f','fis','g','gis','a','bes','b','c','cis','d','dis'};
matthiasm@8 32 scale{9} = {'f','ges','g','as','a','bes','b','c','des','d','es','e'};
matthiasm@8 33 scale{10} = {'ges','g','as','a','bes','ces','c','des','d','es','e','f'};
matthiasm@8 34 scale{11} = {'g','gis','a','bes','b','c','cis','d','dis','e','f','fis'};
matthiasm@8 35 scale{12} = {'as','a','bes','b','c','des','d','es','e','f','ges','g'};
matthiasm@8 36 outnote = scale{key}{mod(root - key,12)+1};
matthiasm@8 37 else
matthiasm@8 38 outnote = 'r';
matthiasm@8 39 end
matthiasm@8 40 end