Beispiel #1
0
 public override void undo()
 {
     //もともとあるデータを削除
     foreach (float tTime in new float[3] {
         mTime.mQuarterBeat + 0.1f, mTime.mQuarterBeat + 1.3f, mTime.mQuarterBeat + 2.6f
     })
     {
         MusicScoreData.deleteChangeBpm(tTime);
         MusicScoreData.deleteLyrics(tTime);
         MusicScoreData.deleteNote(tTime);
     }
     //生成し直し
     for (int i = 0; i < 4; i++)
     {
         if (mBpmData[i] != null)
         {
             mBpmData[i].set("time", mTime.mQuarterBeat + i);
             MusicScoreData.addChangeBpm(mBpmData[i]);
         }
         if (mLyricsData[i] != null)
         {
             mLyricsData[i].set("time", mTime.mQuarterBeat + i);
             MusicScoreData.addLyrics(mLyricsData[i]);
         }
         if (mNoteData[i] != null)
         {
             mNoteData[i].set("time", mTime.mQuarterBeat + i);
             MusicScoreData.addNote(mNoteData[i]);
         }
     }
 }
Beispiel #2
0
 public override void run()
 {
     //もともとあるデータを削除して記憶
     float[] tTripletTimes = new float[3] {
         mTime.mQuarterBeat + 0.1f, mTime.mQuarterBeat + 1.3f, mTime.mQuarterBeat + 2.6f
     };
     for (int i = 0; i < 3; i++)
     {
         mBpmData[i]    = MusicScoreData.deleteChangeBpm(tTripletTimes[i]);
         mLyricsData[i] = MusicScoreData.deleteLyrics(tTripletTimes[i]);
         mNoteData[i]   = MusicScoreData.deleteNote(tTripletTimes[i]);
     }
     //生成し直し
     float[] tNewTime = new float[3] {
         mTime.mQuarterBeat + 0, mTime.mQuarterBeat + 1, mTime.mCorrectQuarterBeat + 3
     };
     for (int i = 0; i < 3; i++)
     {
         if (mBpmData[i] != null)
         {
             mBpmData[i].set("time", tNewTime[i]);
             MusicScoreData.addChangeBpm(mBpmData[i]);
         }
         if (mLyricsData[i] != null)
         {
             mLyricsData[i].set("time", tNewTime[i]);
             MusicScoreData.addLyrics(mLyricsData[i]);
         }
         if (mNoteData[i] != null)
         {
             mNoteData[i].set("time", tNewTime[i]);
             MusicScoreData.addNote(mNoteData[i]);
         }
     }
 }
    public override void run()
    {
        mPreRhythm             = MusicScoreData.mRhythm;
        mPreMargin             = MusicScoreData.mMargin;
        mPreRust               = MusicScoreData.mRust;
        MusicScoreData.mRhythm = mRhythm;
        MusicScoreData.mMargin = mMargin;
        MusicScoreData.mRust   = mRust;
        mForm.reset();
        //音源再生位置より手前のbpm変更イベント削除
        float mPlayMusicQuarterBeat = MusicScoreData.mStartPlayMusicTime.mQuarterBeat;

        mBpms = new List <Arg>();
        //削除するbpm変更イベントを探す
        List <Arg> tBpms = MusicScoreData.getChangeBpmInBar(new KeyTime(0));

        foreach (Arg tData in tBpms)
        {
            if (tData.get <float>("time") < 1)
            {
                continue;                              //先頭のbpm変更イベントはそのままにする
            }
            if (mPlayMusicQuarterBeat <= tData.get <float>("time"))
            {
                continue;                                                   //音源再生位置以降
            }
            mBpms.Add(tData);
        }
        //見つけたbpm変更イベントを削除
        foreach (Arg tData in mBpms)
        {
            MusicScoreData.deleteChangeBpm(tData.get <float>("time"));
        }
    }
 public override void undo()
 {
     MusicScoreData.deleteChangeBpm(mTime.mQuarterBeat);
     if (mPreData != null)
     {
         MusicScoreData.addChangeBpm(mPreData);
     }
 }
 public override void run()
 {
     mPreData = MusicScoreData.deleteChangeBpm(mTime.mQuarterBeat);
     MusicScoreData.addChangeBpm(new Arg(new Dictionary <string, object>()
     {
         { "bpm", mBpm },
         { "time", mTime.mQuarterBeat }
     }));
 }
Beispiel #6
0
 public override void run()
 {
     //もともとあるデータを削除して記憶
     for (int i = 0; i < 4; i++)
     {
         mBpmData[i]    = MusicScoreData.deleteChangeBpm(mTime.mQuarterBeat + i);
         mLyricsData[i] = MusicScoreData.deleteLyrics(mTime.mQuarterBeat + i);
         mNoteData[i]   = MusicScoreData.deleteNote(mTime.mQuarterBeat + i);
     }
     //生成し直し
     float[] tNewTime = new float[4] {
         mTime.mQuarterBeat + 0.1f, mTime.mQuarterBeat + 1.3f, 0, mTime.mQuarterBeat + 2.6f
     };
     for (int i = 0; i < 4; i++)
     {
         if (i == 2)
         {
             continue;
         }
         if (mBpmData[i] != null)
         {
             mBpmData[i].set("time", tNewTime[i]);
             MusicScoreData.addChangeBpm(mBpmData[i]);
         }
         if (mLyricsData[i] != null)
         {
             mLyricsData[i].set("time", tNewTime[i]);
             MusicScoreData.addLyrics(mLyricsData[i]);
         }
         if (mNoteData[i] != null)
         {
             mNoteData[i].set("time", tNewTime[i]);
             MusicScoreData.addNote(mNoteData[i]);
         }
     }
 }
 public override void run()
 {
     mData = MusicScoreData.deleteChangeBpm(mTime.mQuarterBeat);
 }