コード例 #1
0
        public void LoadSong(string file_name)
        {
            int    counter = 0;
            string line;

            System.IO.StreamReader file = new System.IO.StreamReader(file_name);
            while ((line = file.ReadLine()) != null)
            {
                if (line.ToUpper() == "BLOCK_START")
                {
                    SongBlock song_block = new SongBlock();
                    song_block.ReadSongBlock(file);
                    this.song_blocks.Add(song_block);
                }
                else if (line.ToUpper() == "BLOCK_SAMPES")
                {
                    Read_Sample_Block(file);
                }
                else if (line.ToUpper().StartsWith("TEMPO"))
                {
                    this.tempo = int.Parse(line.Split(' ')[1]);
                }
                else if (line.ToUpper().StartsWith("CHANNELS"))
                {
                    this.channels = int.Parse(line.Split(' ')[1]);
                }
                counter++;
            }

            file.Close();
        }
コード例 #2
0
 public SongNoteGroup Get_Current_TrackLine()
 {
     if (current_song_block == null)
     {
         current_song_block = song_blocks[0];
     }
     return(this.current_song_block.Get_Current_TrackLine());
 }
コード例 #3
0
 public void Next_Step()
 {
     current_song_block = song_blocks[0];
     current_song_block.Next_Track_Line();
 }