topical media & game development 
  
 
 
 
 
  
    
    
  
actionscript-omr-lib-Note.ax
actionscript-omr-lib-Note.ax
[swf]
 
flex
  package 
  {
          public class @ax-actionscript-omr-lib-Note
          {
                  private var gpitch:actionscript_omr_lib_Pitch;
                  private var glength:int;
                  //var position:int;
                  public function @ax-actionscript-omr-lib-Note(pitch:int,length:int)
                  {
                          //pitch coming in here is y fucntion from 0 to 11
                          //Should be from 0 to 23 when half steps are implemented
                          //for now, map to two octaves using 
                          // 0 > 1, 1> 3, 2 >5, 3 > 7 etc.
                          var base24pitch:int = 2*pitch+1;
                          //Assume treble clef,  with a B4 on the middle line
                          //Half steps are currently out, so line space at 5 is C5, line space at 4 is A4
                                                  
                          gpitch = new actionscript_omr_lib_Pitch(4,base24pitch);
                          glength = length;
                  }
  
                  public function getPitch():actionscript_omr_lib_Pitch{
                          return gpitch;
                  }
                  public function getLength():int{
                          return glength;
                  }
          }
  }
  
  
(C) Æliens 
27/08/2009
You may not copy or print any of this material without explicit permission of the author or the publisher. 
In case of other copyright issues, contact the author.