Esempio n. 1
0
        private string GetNoteDispay(int sb, int tl, int t)
        {
            // string note_data = this.mm.song.song_blocks[sb].track_lines[tl].GetTrack(t).note.ToString();
            SongNote s         = this.mm.song.song_blocks[sb].track_lines[tl].track[t];
            string   note_data = s.note.ToString();
            string   sound     = s.sound.ToString();

            //string volume=  this.mm.song.song_blocks[sb].track_lines[tl].GetTrack(t).volume.ToString();

            if (note_data.Trim() == "")
            {
                return(".");
            }
            else
            {
                return(note_data.PadRight(3) + " " + "1.0 " + sound);
            }
        }
Esempio n. 2
0
        public double Update()
        {
            double val = 0;
            //This check to see if we need to progress the song along
            long time = this.GetMillisecond() - this.last_time;

            if (time > this.tempo_time_elapse)
            {
                this.song.Next_Step();
                //Let reset the tempo timer
                this.last_time = this.GetMillisecond();
            }

            for (int i = 0; i < channel.Length; i++)
            {
                SongNote sn = this.song.Get_Current_TrackLine().track[i];
                if (this.song.Get_Current_Song_Block().current_track_line != this.channel[i].last_index)
                {
                    this.channel[i].last_index = this.song.Get_Current_Song_Block().current_track_line;
                    // sn.feq = 300/(this.channel[i].ldata.Length*0.1);
                    if (sn.feq == -1)
                    {
                        sn.feq = this.channel[i].last_feq;
                    }
                    else
                    {
                        this.channel[i].StopNote();
                        if (sn.note != "")
                        {
                            this.channel[i].last_feq = sn.feq;
                            this.channel[i].PlayNote(sn.feq, sn.volume, sn.sound);
                        }
                    }
                }
                val += this.channel[i].Update();
            }


            return((float)val);
        }