Exemple #1
0
        //internal clsNoteMapCF() {  //default
        //  if (P.F.MaxTicks <= 0) Debugger.Break();
        //  if (P.F.TicksPerQI <= 0) Debugger.Break();
        //  int len = P.F.MaxTicks / P.F.TicksPerQI;
        //  NewMap = new ushort[len];

        //}

        internal clsNoteMapCF(clsCF cf, clsOnOff onoff)
        {
            CF = cf;
#if MemoryInfo
            long before = GC.GetTotalMemory(true);
            Debug.WriteLine("clsNoteMapCF len = " + len);
            Debug.WriteLine("memory before = " + before + " bytes");
#endif
            _Map = new ushort[P.F.MaxBBT.MaxNoteMapQI];
            //Map = new clsMap(len, 12);
#if MemoryInfo
            long after = GC.GetTotalMemory(true);
            Debug.WriteLine("memory after = " + after + " bytes");
            Debug.WriteLine("diff = " + (after - before) + " bytes");
#endif
            _ChordAtt = new sChordAtt[P.F.MaxBBT.MaxNoteMapQI];
            for (int qi = 0; qi < P.F.MaxBBT.MaxNoteMapQI; qi++)
            {
                _ChordAtt[qi] = new sChordAtt(0); //root -1 etc.
            }
            if (onoff != null)
            {
                InitMap(onoff);
            }
            //CF.UndoRedoCF = new clsCF.clsUndoRedo(this);
            //CF.UndoRedoCF.Active = true;
        }
Exemple #2
0
 public override void NullifyChordinateStatus(int qi)
 {
     //if (qi >= P.F.MaxBBT.QI || qi >= _ChordAtt.Length) return;
     if (qi >= P.F.MaxBBT.QI)
     {
         return;
     }
     _ChordAtt[qi] = new sChordAtt(0);
 }
Exemple #3
0
 internal bool ChordEquals(sChordAtt att)
 {
     //* should check notemap before using this
     if (Root < 0 && att.Qualifier == 0)
     {
         return(true);                        //both undefined
     }
     if (att.Root < 0 && Qualifier == 0)
     {
         return(true);                        //both undefined
     }
     if (Root != att.Root)
     {
         return(false);
     }
     if (Root >= 0 && Qualifier != att.Qualifier)
     {
         return(false);
     }
     return(true);
 }
Exemple #4
0
 internal void SetChordAndAtts(int q, bool[] chord, sChordAtt att)
 {
     SetChordAndAtts(q, BoolArrayToUShort(chord), att);
 }
Exemple #5
0
 internal void SetChordAtt(int q, sChordAtt val)
 {
     _ChordAtt[q] = val;
 }