Exemple #1
0
        protected virtual void InitModule(uint startPosition = 0)
        {
            track          = startPosition;
            counter        = 0;
            patternDelay   = 0;
            samplesPerTick = 0;
            mixerPosition  = 0;
            currentRow     = 0;
            pattern        = module[(int)track];
            BPM            = module.BPM;
            speed          = module.tempo;
            moduleEnd      = false;

            mixChannels.Clear();
            for (int ch = 0; ch < module.numberOfChannels; ch++)
            {
                ModuleMixerChannel mc = CreateMixerChannel();
                mc.instrumentIndex     = 0;
                mc.instrumentLastIndex = 0;
                mixChannels.Add(mc);
            }

            SetBPM();
            UpdateBPM();
        }
Exemple #2
0
 protected void NextRow()
 {
     currentRow++;
     if (currentRow >= pattern.patternRows.Count)
     {
         pattEnd    = true;
         currentRow = 0;
         track++;
         if (track >= module.songLength)
         {
             moduleEnd = true;
             //if (!mixLoop) played = true;
             //else
             //{
             //    track = 0;
             //    pattern = module.patterns[module.arrangement[track]];
             //}
         }
         else
         {
             pattern = module[(int)track];
         }
     }
 }