void Seq::setPos(int utick) { stopNotes(); playTime = cs->utick2utime(utick) * MScore::sampleRate; playPos = events.lowerBound(utick); }
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); }
void HexSequencer::subBeatEvent(int &subBeat){ // cout <<"subBeatnum is "<<subBeat<<endl; if (subBeat==noteLength&¬eLength!=32){ stopNotes(); } }
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; }
HexSequencer::~HexSequencer(){ //destructor stopNotes(); }