示例#1
0
        public static QBCParser LoadMidiSong(string fileName, bool forceRB3)
        {
            QBCParser qbc  = null;
            Song      song = null;

            try {
                song = MidReader.ReadMidi(fileName);
                String      chartFile   = ChartWriter.writeChart(song, "", false, forceRB3).ToString();
                ChartParser chartParser = new ChartParser(chartFile, false);
                qbc = chartParser.ConvertToQBC();
            }
            catch (Exception e)
            {
                MessageBox.Show("Error using the new MIDI importer.\nReverting to original GHTCP method. \n\n" + e.ToString(), "MIDI Error", MessageBoxButtons.OK, MessageBoxIcon.Information);
                qbc = new MIDIParser(fileName).LoadMidi().ConvertToQBC();
            }
            return(qbc);
        }