예제 #1
0
 public void DoubleSpeed(BeatList beats)
 {
     for (int index = 0; index < this._bars.Count; index += 2)
     {
         Bar bar1 = this._bars[index];
         Bar bar2 = new Bar();
         this._bars.Insert(index + 1, bar2);
         float num = bar1._duration / 2f;
         bar1._duration  = num;
         bar2._duration  = num;
         bar2._startTime = bar1._startTime + num;
     }
 }
 private void OnBeatsTracked()
 {
     this._beatList = new BeatList();
     this._beatList.CreateFromLines(this._madmomProcess._resultEntries);
     this._barList = new BarList();
     this._barList.CreateFromBeats(this._beatList._beats);
     this._barList.RemoveDeviants(2f);
     this._barList.FillEmptyRegions(8f, this._userSong.trackData.duration);
     if ((double)this._barList._bars[0].Bpm > 190.0)
     {
         this._barList.HalfSpeed();
     }
     else if ((double)this._barList._bars[0].Bpm < 90.0)
     {
         this._barList.DoubleSpeed(this._beatList);
     }
     this._beatList.CreateFromBars(this._barList);
     this.AverageBpm = this._beatList.AverageBpm;
     // ISSUE: method pointer
     this._vampProcessEnergies.Apply("vamp:bbc-vamp-plugins:bbc-energy", this._userSong.wavPath, OnEnergiesTracked);
 }