Пример #1
0
 public virtual void initNoteArray()
 {
     for (int i = 0; i < MAXNOTE * NBNOTECHORD; i++)
         noteArray[i] = new Note(1, "silence");
 }
Пример #2
0
        public virtual void fillArray(int centreX, int centreY, int longu, String res)
        {
            bool limiteNote = true;

            int i = (centreX - 180) / 60;
            if (i >= 0 && i < MAXNOTE)
            {
                for (int j = 0; j < NBNOTECHORD && limiteNote; j++)
                {
                    if (noteArray[i + j * MAXNOTE].name == "silence")
                    {
                        noteArray[i + j * MAXNOTE] = new Note(longu, res);

                        limiteNote = false;
                    }
                    //  if (limiteNote)
                    //   MessageBox.Show("Seulement 3 notes par accord maximum");
                }
            }

            if (timer.Enabled == false)
                playSound(res);
        }