AlphaTab.Rendering.Utils.PercussionMapper.MapNoteForDisplay C# (CSharp) Method

MapNoteForDisplay() public static method

Maps the given note to a normal note value to place the note at the correct line on score notation
public static MapNoteForDisplay ( Note note ) : int
note AlphaTab.Model.Note
return int
        public static int MapNoteForDisplay(Note note)
        {
            var value = note.RealValue;
            if (value == 61 || value == 66)
            {
                return 50;
            }
            else if (value == 60 || value == 65)
            {
                return 52;
            }
            else if ((value >= 35 && value <= 36) || value == 44)
            {
                return 53;
            }
            else if (value == 41 || value == 64)
            {
                return 55;
            }
            else if (value == 43 || value == 62)
            {
                return 57;
            }
            else if (value == 45 || value == 63)
            {
                return 59;
            }
            else if (value == 47 || value == 54)
            {
                return 62;
            }
            else if (value == 48 || value == 56)
            {
                return 64;
            }
            else if (value == 50)
            {
                return 65;
            }
            else if (value == 42 || value == 46 || (value >= 49 && value <= 53) || value == 57 || value == 59)
            {
                return 67;
            }
            return 60;
        }

Usage Example

Example #1
0
 private int GetValue(Note n)
 {
     if (_track.IsPercussion)
     {
         return(PercussionMapper.MapNoteForDisplay(n));
     }
     else
     {
         return(n.RealValue);
     }
 }
All Usage Examples Of AlphaTab.Rendering.Utils.PercussionMapper::MapNoteForDisplay