• Main Page
  • Files
  • File List
  • File Members

/Users/garethloy/Musimathics/Musimat1.2/MusimatTutorial/B0201c.cpp

Go to the documentation of this file.
00001 #include "MusimatTutorial.h"
00002 MusimatTutorialSection(B0201c) {
00003         Print("*** Natural Chromatic Scale ***");
00004         /*****************************************************************************
00005          
00006          Natural Chromatic Scale
00007          
00008          To create the natural chromatic scale, all we need now is to establish 
00009          the frequency reference for natural chromatic middle C and tabulate the ratios of the scale.
00010          *****************************************************************************/
00011         para1();  // Step into this function to continue the tutorial
00012 }
00013 
00014 Real    R = 440.0;
00015 Real    cNat4 = R * 3.0/5.0; //264.00 Hz
00016 
00017 RealList naturalChromatic(
00018         1.0/1.0, 16.0/15.0, 9.0/8.0, 6.0/5.0,
00019         5.0/4.0, 4.0/3.0, 64.0/45.0, 3.0/2.0,
00020         8.0/5.0, 5.0/3.0, 16.0/9.0, 15.0/8.0
00021 );
00022 
00023 Static Void para1() {
00024         
00025         /*****************************************************************************
00026          Then
00027          *****************************************************************************/
00028         
00029         Print("A4=",  pitchToHz(A4 , cNat4, naturalChromatic));
00030         
00031         /*****************************************************************************
00032          prints A4=440.0, and
00033          *****************************************************************************/
00034         
00035         Print("C4=",  pitchToHz(C4 , cNat4, naturalChromatic));
00036         
00037         /*****************************************************************************
00038          prints C4=264.00.
00039          *****************************************************************************/
00040 }
00041 
00043 /* $Revision: 1.3 $ $Date: 2006/09/05 08:03:08 $ $Author: dgl $ $Name:  $ $Id: B0201c.cpp,v 1.3 2006/09/05 08:03:08 dgl Exp $ */
00044 // The Musimat Tutorial � 2006 Gareth Loy
00045 // Derived from Chapter 9 and Appendix B of "Musimathics Vol. 1" � 2006 Gareth Loy 
00046 // and published exclusively by The MIT Press.
00047 // This program is released WITHOUT ANY WARRANTY; without even the implied 
00048 // warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
00049 // For information on usage and redistribution, and for a DISCLAIMER OF ALL
00050 // WARRANTIES, see the file, "LICENSE.txt," in this distribution.
00051 // "Musimathics" is available here:     http://mitpress.mit.edu/catalog/item/default.asp?ttype=2&tid=10916
00052 // Gareth Loy's Musimathics website:    http://www.musimathics.com/
00053 // The Musimat website:                 http://www.musimat.com/
00054 // This program is released under the terms of the GNU General Public License
00055 // available here:                      http://www.gnu.org/licenses/gpl.txt
00056 

Generated on Fri Nov 26 2010 16:18:25 for Musimat Tutorial by  doxygen 1.7.2