test publish

Dependencies:   mbed GroveEarbudSensor

Committer:
age2pierre
Date:
Fri Mar 25 11:17:39 2016 +0000
Revision:
5:ee265ab0752d
Fix to compile for c++99, added Scale Interface and two scales

Who changed what in which revision?

UserRevisionLine numberNew contents of line
age2pierre 5:ee265ab0752d 1 #include "MajorScale.h"
age2pierre 5:ee265ab0752d 2
age2pierre 5:ee265ab0752d 3 Notes MajorScale::getSupertonic()
age2pierre 5:ee265ab0752d 4 {
age2pierre 5:ee265ab0752d 5 return (Notes) ((int)tonality + 2);
age2pierre 5:ee265ab0752d 6 }
age2pierre 5:ee265ab0752d 7
age2pierre 5:ee265ab0752d 8 Notes MajorScale::getMediant()
age2pierre 5:ee265ab0752d 9 {
age2pierre 5:ee265ab0752d 10 return (Notes) ((int)tonality + 4) ;
age2pierre 5:ee265ab0752d 11 }
age2pierre 5:ee265ab0752d 12
age2pierre 5:ee265ab0752d 13 Notes MajorScale::getSubdominant()
age2pierre 5:ee265ab0752d 14 {
age2pierre 5:ee265ab0752d 15 return (Notes) ((int)tonality + 5);
age2pierre 5:ee265ab0752d 16 }
age2pierre 5:ee265ab0752d 17
age2pierre 5:ee265ab0752d 18 Notes MajorScale::getDominant()
age2pierre 5:ee265ab0752d 19 {
age2pierre 5:ee265ab0752d 20 return (Notes) ((int)tonality + 7);
age2pierre 5:ee265ab0752d 21 }
age2pierre 5:ee265ab0752d 22
age2pierre 5:ee265ab0752d 23 Notes MajorScale::getSuperdominant()
age2pierre 5:ee265ab0752d 24 {
age2pierre 5:ee265ab0752d 25 return (Notes) ((int)tonality + 9) ;
age2pierre 5:ee265ab0752d 26 }
age2pierre 5:ee265ab0752d 27
age2pierre 5:ee265ab0752d 28 Notes MajorScale::getSubtonic()
age2pierre 5:ee265ab0752d 29 {
age2pierre 5:ee265ab0752d 30 return (Notes) ((int)tonality + 11) ;
age2pierre 5:ee265ab0752d 31 }