Esempio n. 1
0
 /// changes our selected instrument
 public void ChangeInstrument(Instrument instrumentIN)
 {
     if (mMusicGenerator.mState >= eGeneratorState.editorInitializing)
     {
         StaffPlayerUI staffPlayer = mStaffPlayer;
         staffPlayer.SetMeasure(instrumentIN);
         if (mShowEditorHints.isOn)
         {
             List <Instrument> instruments = mCurrentInstSet.mInstruments;
             int instrumentIndex           = (int)mInstrumentPanel.mInstrument.InstrumentIndex;
             staffPlayer.ShowHighlightedNotes(instruments[instrumentIndex]);
         }
         UIToggleAllInstruments();
     }
 }
Esempio n. 2
0
        /// sets the staff player measure, shows highlighted notes:
        public void SetMeasure()
        {
            if (mMusicGenerator.mState >= eGeneratorState.editorInitializing)
            {
                StaffPlayerUI staffPlayer = mStaffPlayer;
                Instrument    instrument  = mInstrumentPanel.mInstrument;
                staffPlayer.SetMeasure(instrument);

                if (mLoadedClip.mInstrumentSet != null && mShowEditorHints.isOn && mLoadedClip.mInstrumentSet.mInstruments.Count > 0)
                {
                    List <Instrument> instruments = mLoadedClip.mInstrumentSet.mInstruments;
                    staffPlayer.ShowHighlightedNotes(instruments[(int)instrument.InstrumentIndex]);
                }
                UIToggleAllInstruments();
            }
        }