MuseScore  3.4
Music composition and notation
Public Slots | Signals | Public Member Functions | Private Slots | Private Member Functions | Private Attributes | List of all members
Ms::Seq Class Reference

#include <seq.h>

Inheritance diagram for Ms::Seq:
Inheritance graph
[legend]
Collaboration diagram for Ms::Seq:
Collaboration graph
[legend]

Public Slots

void setRelTempo (double)
 
void seek (int utick)
 
void seekRT (int utick)
 
void stopNotes (int channel=-1, bool realTime=false)
 
void start ()
 
void stop ()
 
void setPos (POS, unsigned)
 
void setMetronomeGain (float val)
 

Signals

void started ()
 
void stopped ()
 
int toGui (int, int arg=0)
 
void heartBeat (int, int, int)
 
void tempoChanged ()
 
void timeSigChanged ()
 

Public Member Functions

 Seq ()
 
 ~Seq ()
 
bool canStart ()
 
void rewindStart ()
 
void loopStart ()
 
void seekEnd ()
 
void nextMeasure ()
 
void nextChord ()
 
void prevMeasure ()
 
void prevChord ()
 
void collectEvents (int utick)
 
void ensureBufferAsync (int utick)
 
void guiStop ()
 
void stopWait ()
 
void setLoopIn ()
 
void setLoopOut ()
 
void setLoopSelection ()
 
bool init (bool hotPlug=false)
 
void exit ()
 
bool isRunning () const
 
bool isPlaying () const
 
bool isStopped () const
 
void processMessages ()
 
void process (unsigned framesPerPeriod, float *buffer)
 
int getEndUTick () const
 
bool isRealtime () const
 
void sendMessage (SeqMsg &) const
 
void setController (int, int, int)
 
virtual void sendEvent (const NPlayEvent &)
 
void setScoreView (ScoreView *)
 
MasterScorescore () const
 
ScoreViewviewer () const
 
void initInstruments (bool realTime=false)
 
Driverdriver ()
 
void setDriver (Driver *d)
 
MasterSynthesizersynti () const
 
void setMasterSynthesizer (MasterSynthesizer *ms)
 
int getCurTick ()
 
double curTempo () const
 
void putEvent (const NPlayEvent &, unsigned framePos=0)
 
void startNoteTimer (int duration)
 
virtual void startNote (int channel, int, int, double nt) override
 
virtual void startNote (int channel, int, int, int, double nt) override
 
virtual void playMetronomeBeat (BeatType type) override
 
void eventToGui (NPlayEvent)
 
void stopNoteTimer ()
 
void recomputeMaxMidiOutPort ()
 
float metronomeGain () const
 
void setInitialMillisecondTimestampWithLatency ()
 
unsigned getCurrentMillisecondTimestampWithLatency (unsigned framePos) const
 
- Public Member Functions inherited from Ms::Sequencer
 Sequencer ()
 
virtual ~Sequencer ()
 

Private Slots

void seqMessage (int msg, int arg=0)
 
void heartBeatTimeout ()
 
void midiInputReady ()
 
void setPlaylistChanged ()
 
void handleTimeSigTempoChanged ()
 

Private Member Functions

void renderChunk (const MidiRenderer::Chunk &, EventMap *)
 
void updateEventsEnd ()
 
void setPos (int)
 
void playEvent (const NPlayEvent &, unsigned framePos)
 
void guiToSeq (const SeqMsg &msg)
 
void metronome (unsigned n, float *l, bool force)
 
void seekCommon (int utick)
 
void unmarkNotes ()
 
void updateSynthesizerState (int tick1, int tick2)
 
void addCountInClicks ()
 
int getPlayStartUtick ()
 
QQueue< NPlayEvent > * liveEventQueue ()
 

Private Attributes

QMutex mutex
 
MasterScorecs
 
ScoreViewcv
 
bool running
 
Transport state
 
bool inCountIn
 
bool useJackTransportSavedFlag
 
int maxMidiOutPort
 
Fraction prevTimeSig
 
double prevTempo
 
bool oggInit
 
bool playlistChanged
 
SeqMsgFifo toSeq
 
SeqMsgFifo fromSeq
 
Driver_driver
 
MasterSynthesizer_synti
 
double meterValue [2]
 
double meterPeakValue [2]
 
int peakTimer [2]
 
EventMap events
 
EventMap::const_iterator eventsEnd
 
EventMap renderEvents
 
RangeMap renderEventsStatus
 
MidiRenderer midi
 
QFuture< void > midiRenderFuture
 
bool allowBackgroundRendering = false
 
EventMap countInEvents
 
QQueue< NPlayEvent_liveEventQueue
 
int playFrame
 
int countInPlayFrame
 
int endUTick
 
EventMap::const_iterator playPos
 
EventMap::const_iterator countInPlayPos
 
EventMap::const_iterator guiPos
 
QList< const Note * > markedNotes
 
uint tackRemain
 
uint tickRemain
 
qreal tackVolume
 
qreal tickVolume
 
qreal metronomeVolume
 
unsigned initialMillisecondTimestampWithLatency
 
QTimer * heartBeatTimer
 
QTimer * noteTimer
 

Constructor & Destructor Documentation

◆ Seq()

Ms::Seq::Seq ( )

◆ ~Seq()

Ms::Seq::~Seq ( )

Member Function Documentation

◆ addCountInClicks()

void Ms::Seq::addCountInClicks ( )
private

◆ canStart()

bool Ms::Seq::canStart ( )

◆ collectEvents()

void Ms::Seq::collectEvents ( int  utick)

◆ curTempo()

double Ms::Seq::curTempo ( ) const

◆ driver()

Driver* Ms::Seq::driver ( )
inline

◆ ensureBufferAsync()

void Ms::Seq::ensureBufferAsync ( int  utick)

◆ eventToGui()

void Ms::Seq::eventToGui ( NPlayEvent  e)

◆ exit()

void Ms::Seq::exit ( )

◆ getCurrentMillisecondTimestampWithLatency()

unsigned Ms::Seq::getCurrentMillisecondTimestampWithLatency ( unsigned  framePos) const

◆ getCurTick()

int Ms::Seq::getCurTick ( )

◆ getEndUTick()

int Ms::Seq::getEndUTick ( ) const
inline

◆ getPlayStartUtick()

int Ms::Seq::getPlayStartUtick ( )
private

◆ guiStop()

void Ms::Seq::guiStop ( )

◆ guiToSeq()

void Ms::Seq::guiToSeq ( const SeqMsg msg)
private

◆ handleTimeSigTempoChanged

void Ms::Seq::handleTimeSigTempoChanged ( )
privateslot

◆ heartBeat

void Ms::Seq::heartBeat ( int  ,
int  ,
int   
)
signal

◆ heartBeatTimeout

void Ms::Seq::heartBeatTimeout ( )
privateslot

◆ init()

bool Ms::Seq::init ( bool  hotPlug = false)

◆ initInstruments()

void Ms::Seq::initInstruments ( bool  realTime = false)

◆ isPlaying()

bool Ms::Seq::isPlaying ( ) const
inline

◆ isRealtime()

bool Ms::Seq::isRealtime ( ) const
inline

◆ isRunning()

bool Ms::Seq::isRunning ( ) const
inline

◆ isStopped()

bool Ms::Seq::isStopped ( ) const
inline

◆ liveEventQueue()

QQueue<NPlayEvent>* Ms::Seq::liveEventQueue ( )
inlineprivate

◆ loopStart()

void Ms::Seq::loopStart ( )

◆ metronome()

void Ms::Seq::metronome ( unsigned  n,
float *  l,
bool  force 
)
private

◆ metronomeGain()

float Ms::Seq::metronomeGain ( ) const
inline

◆ midiInputReady

void Ms::Seq::midiInputReady ( )
privateslot

◆ nextChord()

void Ms::Seq::nextChord ( )

◆ nextMeasure()

void Ms::Seq::nextMeasure ( )

◆ playEvent()

void Ms::Seq::playEvent ( const NPlayEvent event,
unsigned  framePos 
)
private

◆ playMetronomeBeat()

void Ms::Seq::playMetronomeBeat ( BeatType  type)
overridevirtual

Implements Ms::Sequencer.

◆ prevChord()

void Ms::Seq::prevChord ( )

◆ prevMeasure()

void Ms::Seq::prevMeasure ( )

◆ process()

void Ms::Seq::process ( unsigned  framesPerPeriod,
float *  buffer 
)

◆ processMessages()

void Ms::Seq::processMessages ( )

◆ putEvent()

void Ms::Seq::putEvent ( const NPlayEvent event,
unsigned  framePos = 0 
)

◆ recomputeMaxMidiOutPort()

void Ms::Seq::recomputeMaxMidiOutPort ( )

◆ renderChunk()

void Ms::Seq::renderChunk ( const MidiRenderer::Chunk ch,
EventMap eventMap 
)
private

◆ rewindStart()

void Ms::Seq::rewindStart ( )

◆ score()

MasterScore* Ms::Seq::score ( ) const
inline

◆ seek

void Ms::Seq::seek ( int  utick)
slot

◆ seekCommon()

void Ms::Seq::seekCommon ( int  utick)
private

◆ seekEnd()

void Ms::Seq::seekEnd ( )

◆ seekRT

void Ms::Seq::seekRT ( int  utick)
slot

◆ sendEvent()

void Ms::Seq::sendEvent ( const NPlayEvent ev)
virtual

Implements Ms::Sequencer.

◆ sendMessage()

void Ms::Seq::sendMessage ( SeqMsg ) const

◆ seqMessage

void Ms::Seq::seqMessage ( int  msg,
int  arg = 0 
)
privateslot

◆ setController()

void Ms::Seq::setController ( int  channel,
int  ctrl,
int  data 
)

◆ setDriver()

void Ms::Seq::setDriver ( Driver d)
inline

◆ setInitialMillisecondTimestampWithLatency()

void Ms::Seq::setInitialMillisecondTimestampWithLatency ( )

◆ setLoopIn()

void Ms::Seq::setLoopIn ( )

◆ setLoopOut()

void Ms::Seq::setLoopOut ( )

◆ setLoopSelection()

void Ms::Seq::setLoopSelection ( )

◆ setMasterSynthesizer()

void Ms::Seq::setMasterSynthesizer ( MasterSynthesizer ms)
inline

◆ setMetronomeGain

void Ms::Seq::setMetronomeGain ( float  val)
inlineslot

◆ setPlaylistChanged

void Ms::Seq::setPlaylistChanged ( )
inlineprivateslot

◆ setPos() [1/2]

void Ms::Seq::setPos ( int  utick)
private

◆ setPos [2/2]

void Ms::Seq::setPos ( POS  ,
unsigned  t 
)
slot

◆ setRelTempo

void Ms::Seq::setRelTempo ( double  relTempo)
slot

◆ setScoreView()

void Ms::Seq::setScoreView ( ScoreView v)

◆ start

void Ms::Seq::start ( )
slot

◆ started

void Ms::Seq::started ( )
signal

◆ startNote() [1/2]

void Ms::Seq::startNote ( int  channel,
int  pitch,
int  velo,
double  nt 
)
overridevirtual

Implements Ms::Sequencer.

◆ startNote() [2/2]

void Ms::Seq::startNote ( int  channel,
int  pitch,
int  velo,
int  duration,
double  nt 
)
overridevirtual

Implements Ms::Sequencer.

◆ startNoteTimer()

void Ms::Seq::startNoteTimer ( int  duration)

◆ stop

void Ms::Seq::stop ( )
slot

◆ stopNotes

void Ms::Seq::stopNotes ( int  channel = -1,
bool  realTime = false 
)
slot

◆ stopNoteTimer()

void Ms::Seq::stopNoteTimer ( )

◆ stopped

void Ms::Seq::stopped ( )
signal

◆ stopWait()

void Ms::Seq::stopWait ( )

◆ synti()

MasterSynthesizer* Ms::Seq::synti ( ) const
inline

◆ tempoChanged

void Ms::Seq::tempoChanged ( )
signal

◆ timeSigChanged

void Ms::Seq::timeSigChanged ( )
signal

◆ toGui

int Ms::Seq::toGui ( int  ,
int  arg = 0 
)
signal

◆ unmarkNotes()

void Ms::Seq::unmarkNotes ( )
private

◆ updateEventsEnd()

void Ms::Seq::updateEventsEnd ( )
private

◆ updateSynthesizerState()

void Ms::Seq::updateSynthesizerState ( int  tick1,
int  tick2 
)
private

◆ viewer()

ScoreView* Ms::Seq::viewer ( ) const
inline

Member Data Documentation

◆ _driver

Driver* Ms::Seq::_driver
private

◆ _liveEventQueue

QQueue<NPlayEvent> Ms::Seq::_liveEventQueue
private

◆ _synti

MasterSynthesizer* Ms::Seq::_synti
private

◆ allowBackgroundRendering

bool Ms::Seq::allowBackgroundRendering = false
private

◆ countInEvents

EventMap Ms::Seq::countInEvents
private

◆ countInPlayFrame

int Ms::Seq::countInPlayFrame
private

◆ countInPlayPos

EventMap::const_iterator Ms::Seq::countInPlayPos
private

◆ cs

MasterScore* Ms::Seq::cs
private

◆ cv

ScoreView* Ms::Seq::cv
private

◆ endUTick

int Ms::Seq::endUTick
private

◆ events

EventMap Ms::Seq::events
private

◆ eventsEnd

EventMap::const_iterator Ms::Seq::eventsEnd
private

◆ fromSeq

SeqMsgFifo Ms::Seq::fromSeq
private

◆ guiPos

EventMap::const_iterator Ms::Seq::guiPos
private

◆ heartBeatTimer

QTimer* Ms::Seq::heartBeatTimer
private

◆ inCountIn

bool Ms::Seq::inCountIn
private

◆ initialMillisecondTimestampWithLatency

unsigned Ms::Seq::initialMillisecondTimestampWithLatency
private

◆ markedNotes

QList<const Note*> Ms::Seq::markedNotes
private

◆ maxMidiOutPort

int Ms::Seq::maxMidiOutPort
private

◆ meterPeakValue

double Ms::Seq::meterPeakValue[2]
private

◆ meterValue

double Ms::Seq::meterValue[2]
private

◆ metronomeVolume

qreal Ms::Seq::metronomeVolume
private

◆ midi

MidiRenderer Ms::Seq::midi
private

◆ midiRenderFuture

QFuture<void> Ms::Seq::midiRenderFuture
private

◆ mutex

QMutex Ms::Seq::mutex
mutableprivate

◆ noteTimer

QTimer* Ms::Seq::noteTimer
private

◆ oggInit

bool Ms::Seq::oggInit
private

◆ peakTimer

int Ms::Seq::peakTimer[2]
private

◆ playFrame

int Ms::Seq::playFrame
private

◆ playlistChanged

bool Ms::Seq::playlistChanged
private

◆ playPos

EventMap::const_iterator Ms::Seq::playPos
private

◆ prevTempo

double Ms::Seq::prevTempo
private

◆ prevTimeSig

Fraction Ms::Seq::prevTimeSig
private

◆ renderEvents

EventMap Ms::Seq::renderEvents
private

◆ renderEventsStatus

RangeMap Ms::Seq::renderEventsStatus
private

◆ running

bool Ms::Seq::running
private

◆ state

Transport Ms::Seq::state
private

◆ tackRemain

uint Ms::Seq::tackRemain
private

◆ tackVolume

qreal Ms::Seq::tackVolume
private

◆ tickRemain

uint Ms::Seq::tickRemain
private

◆ tickVolume

qreal Ms::Seq::tickVolume
private

◆ toSeq

SeqMsgFifo Ms::Seq::toSeq
private

◆ useJackTransportSavedFlag

bool Ms::Seq::useJackTransportSavedFlag
private

The documentation for this class was generated from the following files: