/// Updates the helper notes showing/not showing, whether mShowEditorHints.isOn. public void ToggleHelperNotes(Dropdown colorDropdownIN = null) { if (mMusicGenerator.mState >= eGeneratorState.editing) { if (mShowEditorHints.isOn) { if (mLoadedClip.mInstrumentSet.mInstruments.Count == 0) { return; } int currentInstIndex = (int)mInstrumentPanel.mInstrument.InstrumentIndex; if (colorDropdownIN != null) { mLoadedClip.mInstrumentSet.mInstruments[currentInstIndex].mData.mStaffPlayerColor = (eStaffPlayerColors)colorDropdownIN.value; } mStaffPlayer.ClearNotes(true, true); Instrument instrument = mLoadedClip.mInstrumentSet.mInstruments[currentInstIndex]; mStaffPlayer.ShowHighlightedNotes(instrument); if (mShowAllInstruments.isOn) { InstrumentSet set = mLoadedClip.mInstrumentSet; for (int i = 0; i < set.mInstruments.Count; i++) { int[][] notes = set.mInstruments[i].mClipNotes[mCurrentMeasure.value]; mStaffPlayer.ShowSetEditorNotes(notes, i); } } else { mStaffPlayer.ShowSetEditorNotes(instrument.mClipNotes[mCurrentMeasure.value], instrument.InstrumentIndex); } } else { mStaffPlayer.ClearNotes(false, true); } } }
/// Toggles all the instruments not currently being edited public void UIToggleAllInstruments(bool clear = false) { StaffPlayerUI staffPlayer = mStaffPlayer; InstrumentPanelUI instrumentPanel = mInstrumentPanel; if (clear) { staffPlayer.ClearNotes(true, false); } if (mInstrumentPanel.mInstrument != null) { InstrumentSet set = mLoadedClip.mInstrumentSet; if (set == null || set.mInstruments.Count == 0) { return; } int currentInstrument = (int)set.mInstruments[(int)instrumentPanel.mInstrument.InstrumentIndex].InstrumentIndex; if (set.mInstruments.Count > currentInstrument) { int[][] clipNotes = set.mInstruments[currentInstrument].mClipNotes[mCurrentMeasure.value]; if (mShowAllInstruments.isOn) { for (int i = 0; i < set.mInstruments.Count; i++) { int[][] notes = set.mInstruments[i].mClipNotes[mCurrentMeasure.value]; staffPlayer.ShowSetEditorNotes(notes, i); } } else { staffPlayer.ShowSetEditorNotes(clipNotes, currentInstrument); } } } }