45 class MasterSynthesizer;
47 enum class POS : char;
79 static const int SEQ_MSG_FIFO_SIZE = 1024*8;
87 void enqueue(
const SeqMsg&);
132 double meterValue[2];
133 double meterPeakValue[2];
142 bool allowBackgroundRendering =
false;
169 void updateEventsEnd();
172 void playEvent(
const NPlayEvent&,
unsigned framePos);
173 void guiToSeq(
const SeqMsg& msg);
174 void metronome(
unsigned n,
float* l,
bool force);
175 void seekCommon(
int utick);
177 void updateSynthesizerState(
int tick1,
int tick2);
178 void addCountInClicks();
180 int getPlayStartUtick();
185 void seqMessage(
int msg,
int arg = 0);
186 void heartBeatTimeout();
187 void midiInputReady();
189 void handleTimeSigTempoChanged();
192 void setRelTempo(
double);
193 void seek(
int utick);
194 void seekRT(
int utick);
195 void stopNotes(
int channel = -1,
bool realTime =
false);
198 void setPos(
POS,
unsigned);
204 int toGui(
int,
int arg = 0);
205 void heartBeat(
int,
int,
int);
207 void timeSigChanged();
221 void collectEvents(
int utick);
222 void ensureBufferAsync(
int utick);
227 void setLoopSelection();
229 bool init(
bool hotPlug =
false);
235 void processMessages();
236 void process(
unsigned framesPerPeriod,
float* buffer);
239 void sendMessage(
SeqMsg&)
const;
241 void setController(
int,
int,
int);
246 void initInstruments(
bool realTime =
false);
254 double curTempo()
const;
256 void putEvent(
const NPlayEvent&,
unsigned framePos = 0);
257 void startNoteTimer(
int duration);
258 virtual void startNote(
int channel,
int,
int,
double nt)
override;
259 virtual void startNote(
int channel,
int,
int,
int,
double nt)
override;
260 virtual void playMetronomeBeat(
BeatType type)
override;
263 void stopNoteTimer();
264 void recomputeMaxMidiOutPort();
267 void setInitialMillisecondTimestampWithLatency();
268 unsigned getCurrentMillisecondTimestampWithLatency(
unsigned framePos)
const;
RangeMap renderEventsStatus
Definition: seq.h:139
ScoreView * viewer() const
Definition: seq.h:245
int getEndUTick() const
Definition: seq.h:237
unsigned initialMillisecondTimestampWithLatency
Definition: seq.h:163
bool oggInit
Definition: seq.h:124
Seq * seq
Definition: seq.cpp:62
QTimer * heartBeatTimer
Definition: seq.h:165
int endUTick
Definition: seq.h:149
QQueue< NPlayEvent > * liveEventQueue()
Definition: seq.h:182
MasterScore * cs
Definition: seq.h:109
bool isPlaying() const
Definition: seq.h:232
SeqMsg(SeqMsgId _id, const NPlayEvent &e)
Definition: seq.h:72
QTimer * noteTimer
Definition: seq.h:166
uint tickRemain
Definition: seq.h:158
MasterScore * score() const
Definition: seq.h:244
Definition: scoreview.h:90
QFuture< void > midiRenderFuture
Definition: seq.h:141
bool inCountIn
Definition: seq.h:113
Definition: sequencer.h:26
qreal tickVolume
Definition: seq.h:160
void setMasterSynthesizer(MasterSynthesizer *ms)
Definition: seq.h:251
uint tackRemain
Definition: seq.h:157
bool isStopped() const
Definition: seq.h:233
Transport state
Definition: seq.h:112
Helper class to keep track of status of status of certain parts of score or MIDI representation.
Definition: rendermidi.h:45
EventMap::const_iterator playPos
Definition: seq.h:151
Transport
Definition: seq.h:92
EventMap renderEvents
Definition: seq.h:138
EventMap::const_iterator countInPlayPos
Definition: seq.h:152
qreal tackVolume
Definition: seq.h:159
ScoreView * cv
Definition: seq.h:110
int playFrame
Definition: seq.h:147
virtual ~SeqMsgFifo()
Definition: seq.h:86
bool useJackTransportSavedFlag
Definition: seq.h:119
Driver * driver()
Definition: seq.h:248
SeqMsg()
Definition: seq.h:69
void setMetronomeGain(float val)
Definition: seq.h:199
EventMap events
Definition: seq.h:136
qreal metronomeVolume
Definition: seq.h:161
Definition: aeolus.cpp:26
MIDI renderer for a score.
Definition: rendermidi.h:63
int countInPlayFrame
Definition: seq.h:148
bool isRunning() const
Definition: seq.h:231
double prevTempo
Definition: seq.h:122
SeqMsg(SeqMsgId _id, qreal val)
Definition: seq.h:71
BeatType
Definition: sig.h:29
MidiRenderer midi
Definition: seq.h:140
bool playlistChanged
Definition: seq.h:125
MasterSynthesizer * synti() const
Definition: seq.h:250
Fraction prevTimeSig
Definition: seq.h:121
Definition: rendermidi.h:69
QMutex mutex
Definition: seq.h:107
QList< const Note * > markedNotes
Definition: seq.h:155
SeqMsgFifo fromSeq
Definition: seq.h:128
NPlayEvent event
Definition: seq.h:67
int maxMidiOutPort
Definition: seq.h:120
SeqMsgFifo toSeq
Definition: seq.h:127
EventMap::const_iterator eventsEnd
Definition: seq.h:137
Definition: fraction.h:46
Definition: msynthesizer.h:33
bool isRealtime() const
Definition: seq.h:238
POS
Definition: score.h:100
EventMap::const_iterator guiPos
Definition: seq.h:153
SeqMsgId id
Definition: seq.h:62
QQueue< NPlayEvent > _liveEventQueue
Definition: seq.h:145
MasterSynthesizer * _synti
Definition: seq.h:130
qreal realVal
Definition: seq.h:65
SeqMsg(SeqMsgId _id, int val)
Definition: seq.h:70
Driver * _driver
Definition: seq.h:129
EventMap countInEvents
Definition: seq.h:144
SeqMsgId
Definition: seq.h:54
int intVal
Definition: seq.h:64
void setDriver(Driver *d)
Definition: seq.h:249
bool running
Definition: seq.h:111
float metronomeGain() const
Definition: seq.h:265
void setPlaylistChanged()
Definition: seq.h:188