public RBMidiInspector(RBMid file) { InitializeComponent(); gemDisplay.Image = new Bitmap(gemDisplay.Width, gemDisplay.Height); var Midi = new MidiCS.MidiFile(MidiCS.MidiFormat.MultiTrack, file.MidiTracks.ToList(), 480); previewState = new GemTrackPreviewState { Midi = file, diff = difficultySelector.SelectedIndex, scroll = 0, length = (float)(Midi.Duration * 1000.0), zoom = 1, enabled = false, }; difficultySelector.Items.Clear(); for (var track = 0; track < file.GemTracks.Length; track++) { for (var i = 0; i < file.GemTracks[track].Gems.Length; i++) { difficultySelector.Items.Add($"Track {track} difficulty {i}"); } } }
public RBMidiInspector(RBMid file) { InitializeComponent(); gemDisplay.Image = new Bitmap(gemDisplay.Width, gemDisplay.Height); var Midi = new MidiCS.MidiFile(MidiCS.MidiFormat.MultiTrack, file.MidiTracks.ToList(), 480); previewState = new GemTrackPreviewState { rbmid = file, tempos = Midi.TempoTimeSigMap, diff = difficultySelector.SelectedIndex, scroll = 0, length = (float)(Midi.Duration * 1000.0), zoom = 1, enabled = false, }; difficultySelector.Items.Clear(); for (var track = 0; track < file.GemTracks.Length; track++) { for (var i = 0; i < file.GemTracks[track].Gems.Length; i++) { if (file.GemTracks[track].Gems[i].Length == 0) { continue; } difficultySelector.Items.Add($"Gem track {track} difficulty {i}"); SelectorActions.Add(MakeGemtrackAction(track, i)); } } for (var track = 0; track < file.VocalTracks.Length; track++) { difficultySelector.Items.Add($"Vocal track {track}"); SelectorActions.Add(MakeVocalTrackAction(track)); } button3_Click(this, null); }