public void TrackBtn_OnClicked(Nez.UI.Button btn) { // // Track number button (on bottom of slider) // if (TrackChanl[btn.Tag] < 0) { ChnlMsg.SetText("Channel: "); } else { ChnlMsg.SetText("Channel: " + TrackChanl[btn.Tag].ToString("00")); } // // Give channel number/instrument name // TrackMsg.SetText("Track: " + btn.Tag.ToString("00")); InstrumentMsg.SetText("Description: " + TrackInstrument[btn.Tag]); }
private void SetTrackButtonOn() { int x = 0; //index of the control Vector2 StartPos = new Vector2(20, 250 + (80 * x)); ChnlMsg.SetText("All Tracks"); //InstrumentMsg.SetText("All Instruments"); int trknum = 0; string trkname = ""; GeneralMidiInstrument gmi; foreach (Track trk in sequence1.tracks) { float PosX = 14f; float PosY = 0; trkname = trk.Name; if (trk.Name == "" || trk.Name is null) { trkname = "Track " + trknum.ToString(); } if (trk.ProgramChange != 0) { gmi = (GeneralMidiInstrument)trk.ProgramChange; TrackInstrument[trknum] = gmi.ToString(); TrackChanl[trknum] = trk.MidiChannel; } else { TrackInstrument[trknum] = "n/a"; } switch (trknum) { case 0: TracksInMidi[trknum] = true; x = 0; break; case 1: TracksInMidi[trknum] = true; x = 1; break; case 2: TracksInMidi[trknum] = true; x = 2; break; case 3: TracksInMidi[trknum] = true; x = 3; break; case 4: TracksInMidi[trknum] = true; x = 4; break; case 5: TracksInMidi[trknum] = true; x = 5; break; case 6: TracksInMidi[trknum] = true; x = 6; break; case 7: TracksInMidi[trknum] = true; x = 7; break; case 8: TracksInMidi[trknum] = true; x = 0; PosX = 794; break; case 9: TracksInMidi[trknum] = true; x = 1; PosX = 794; break; case 10: TracksInMidi[trknum] = true; x = 2; PosX = 794; break; case 11: TracksInMidi[trknum] = true; x = 3; PosX = 794; break; case 12: TracksInMidi[trknum] = true; x = 4; PosX = 794; break; case 13: TracksInMidi[trknum] = true; x = 5; PosX = 794; break; case 14: TracksInMidi[trknum] = true; x = 6; PosX = 794; break; case 15: TracksInMidi[trknum] = true; x = 7; PosX = 794; break; } PosY = (200 + (80 * x)); trknum += 1; } }
private void PBtn_OnClicked(Nez.UI.Button btn) { AllChannels = -1; ChnlMsg.SetText("All Channels"); }