コード例 #1
0
ファイル: seq.cpp プロジェクト: Mistobaan/MuseScore
void Seq::setPos(int utick)
      {
      stopNotes();

      playTime = cs->utick2utime(utick) * MScore::sampleRate;
      playPos  = events.lowerBound(utick);
      }
コード例 #2
0
ファイル: seq.cpp プロジェクト: remcohh/MuseScore
Seq::Seq()
      {
      running         = false;
      playlistChanged = false;
      cs              = 0;
      cv              = 0;
      tackRest        = 0;
      tickRest        = 0;

      endTick  = 0;
      state    = TRANSPORT_STOP;
      oggInit  = false;
      _driver  = 0;
      playPos  = events.cbegin();

      playTime  = 0;
      metronomeVolume = 0.3;

      meterValue[0]     = 0.0;
      meterValue[1]     = 0.0;
      meterPeakValue[0] = 0.0;
      meterPeakValue[1] = 0.0;
      peakTimer[0]       = 0;
      peakTimer[1]       = 0;

      heartBeatTimer = new QTimer(this);
      connect(heartBeatTimer, SIGNAL(timeout()), this, SLOT(heartBeatTimeout()));

      noteTimer = new QTimer(this);
      noteTimer->setSingleShot(true);
      connect(noteTimer, SIGNAL(timeout()), this, SLOT(stopNotes()));
      noteTimer->stop();

      connect(this, SIGNAL(toGui(int)), this, SLOT(seqMessage(int)), Qt::QueuedConnection);
      }
コード例 #3
0
void HexSequencer::subBeatEvent(int &subBeat){
    
//    cout <<"subBeatnum is "<<subBeat<<endl;
    
    if (subBeat==noteLength&&noteLength!=32){
        stopNotes();
    }
    
}
コード例 #4
0
void HexSequencer::beatEvent(int &beatCount){
    
    currentBeatTime = 0;
    beatTimestamp = ofGetElapsedTimef();
    
    beatIndicatorScale = 1;
    
    if (noteLength==32){ //full measure, so stop on the beat
        stopNotes();
    }
    moveNotes();
//    cout << "beat event #"<<beatCount<<" occurred"<<endl;
}
コード例 #5
0
HexSequencer::~HexSequencer(){ //destructor
    stopNotes();
}