Beispiel #1
0
    // Token: 0x06002A5F RID: 10847 RVA: 0x001378B4 File Offset: 0x00135AB4
    public static Song smethod_1(string string_0, bool bool_1)
    {
        Song song = new Song();

        GClass30.bool_0 = bool_1;
        MidiFile midiFile;
        Song     result;

        try
        {
            midiFile = MidiFile.Read(Path.Combine(string_0, "notes.mid"), null);
            goto IL_27;
        }
        catch (SystemException)
        {
            result = null;
        }
        return(result);

IL_27:
        IEnumerable <TrackChunk> trackChunks = midiFile.GetTrackChunks();

        song.float_4 = (float)((TicksPerQuarterNoteTimeDivision)midiFile.TimeDivision).TicksPerQuarterNote;
        song.float_3 = song.float_4 * GlobalVariables.instance.songSpeed.Single_0;
        GClass30.smethod_5(trackChunks.First <TrackChunk>().Events, song);
        foreach (TrackChunk trackChunk in trackChunks.Skip(1))
        {
            string text = GClass30.smethod_0(trackChunk.Events);
            uint   num  = < PrivateImplementationDetails >.ComputeStringHash(text);
            if (num <= 2134366526u)
            {
                if (num <= 583162216u)
                {
                    if (num != 316203908u)
                    {
                        if (num != 583162216u)
                        {
                            continue;
                        }
                        if (text == "part keys")
                        {
                            GClass30.smethod_7(trackChunk.Events, song, Song.Instrument.Keys);
                            continue;
                        }
                        continue;
                    }
                    else
                    {
                        if (text == "events")
                        {
                            GClass30.smethod_6(trackChunk.Events, song);
                            continue;
                        }
                        continue;
                    }
                }
                else if (num != 969470554u)
                {
                    if (num != 1314878412u)
                    {
                        if (num != 2134366526u)
                        {
                            continue;
                        }
                        if (!(text == "t1 gems"))
                        {
                            continue;
                        }
                    }
                    else
                    {
                        if (text == "part rhythm")
                        {
                            GClass30.smethod_7(trackChunk.Events, song, Song.Instrument.Rhythm);
                            continue;
                        }
                        continue;
                    }
                }
                else
                {
                    if (text == "part vocals")
                    {
                        GClass30.smethod_3(trackChunk.Events, song);
                        continue;
                    }
                    continue;
                }
            }
            else if (num <= 2421315013u)
            {
                if (num != 2329120099u)
                {
                    if (num != 2387209770u)
                    {
                        if (num != 2421315013u)
                        {
                            continue;
                        }
                        if (text == "beat")
                        {
                            GClass30.smethod_2(trackChunk.Events, song);
                            continue;
                        }
                        continue;
                    }
                    else
                    {
                        if (text == "part bass ghl")
                        {
                            GClass30.smethod_7(trackChunk.Events, song, Song.Instrument.GHLBass);
                            continue;
                        }
                        continue;
                    }
                }
                else
                {
                    if (text == "part guitar coop")
                    {
                        GClass30.smethod_7(trackChunk.Events, song, Song.Instrument.GuitarCoop);
                        continue;
                    }
                    continue;
                }
            }
            else if (num != 2594645819u)
            {
                if (num != 3225037695u)
                {
                    if (num != 3641264310u)
                    {
                        continue;
                    }
                    if (!(text == "part guitar"))
                    {
                        continue;
                    }
                }
                else
                {
                    if (text == "part bass")
                    {
                        GClass30.smethod_7(trackChunk.Events, song, Song.Instrument.Bass);
                        continue;
                    }
                    continue;
                }
            }
            else
            {
                if (text == "part guitar ghl")
                {
                    GClass30.smethod_7(trackChunk.Events, song, Song.Instrument.GHLGuitar);
                    continue;
                }
                continue;
            }
            GClass30.smethod_7(trackChunk.Events, song, Song.Instrument.Guitar);
        }
        song.method_1();
        return(song);
    }