19 #ifndef DRUMSTICK_QWRK_H 20 #define DRUMSTICK_QWRK_H 24 #include <QScopedPointer> 89 void readFromStream(QDataStream *stream);
90 void readFromFile(
const QString& fileName);
91 QTextCodec* getTextCodec();
92 void setTextCodec(QTextCodec *codec);
98 int getKeySig()
const;
100 int getAutoSave()
const;
101 int getPlayDelay()
const;
102 bool getZeroCtrls()
const;
103 bool getSendSPP()
const;
104 bool getSendCont()
const;
105 bool getPatchSearch()
const;
106 bool getAutoStop()
const;
107 unsigned int getStopTime()
const;
108 bool getAutoRewind()
const;
109 int getRewindTime()
const;
110 bool getMetroPlay()
const;
111 bool getMetroRecord()
const;
112 bool getMetroAccent()
const;
113 int getCountIn()
const;
114 bool getThruOn()
const;
115 bool getAutoRestart()
const;
116 int getCurTempoOfs()
const;
117 int getTempoOfs1()
const;
118 int getTempoOfs2()
const;
119 int getTempoOfs3()
const;
120 bool getPunchEnabled()
const;
121 int getPunchInTime()
const;
122 int getPunchOutTime()
const;
123 int getEndAllTime()
const;
125 QByteArray getLastChunkRawData()
const;
126 double getRealTime(
long ticks)
const;
140 void signalWRKError(
const QString& errorStr);
148 void signalWRKUnknownChunk(
int type,
const QByteArray& data);
156 void signalWRKHeader(
int verh,
int verl);
167 void signalWRKStreamEnd(
long time);
179 void signalWRKNote(
int track,
long time,
int chan,
int pitch,
int vol,
int dur);
190 void signalWRKKeyPress(
int track,
long time,
int chan,
int pitch,
int press);
201 void signalWRKCtlChange(
int track,
long time,
int chan,
int ctl,
int value);
211 void signalWRKPitchBend(
int track,
long time,
int chan,
int value);
221 void signalWRKProgram(
int track,
long time,
int chan,
int patch);
231 void signalWRKChanPress(
int track,
long time,
int chan,
int press);
240 void signalWRKSysexEvent(
int track,
long time,
int bank);
251 void signalWRKSysex(
int bank,
const QString& name,
bool autosend,
int port,
const QByteArray& data);
261 void signalWRKText(
int track,
long time,
int type,
const QString& data);
270 void signalWRKTimeSig(
int bar,
int num,
int den);
278 void signalWRKKeySig(
int bar,
int alt);
289 void signalWRKTempo(
long time,
int tempo);
305 void signalWRKTrack(
const QString& name1,
306 const QString& name2,
307 int trackno,
int channel,
int pitch,
308 int velocity,
int port,
309 bool selected,
bool muted,
bool loop );
316 void signalWRKTimeBase(
int timebase);
326 void signalWRKGlobalVars();
342 void signalWRKThru(
int mode,
int port,
int channel,
int keyPlus,
int velPlus,
int localPort);
350 void signalWRKTrackOffset(
int track,
int offset);
358 void signalWRKTrackReps(
int track,
int reps);
366 void signalWRKTrackPatch(
int track,
int patch);
374 void signalWRKTrackBank(
int track,
int bank);
382 void signalWRKTimeFormat(
int frames,
int offset);
389 void signalWRKComments(
const QString& data);
398 void signalWRKVariableRecord(
const QString& name,
const QByteArray& data);
406 void signalWRKTrackVol(
int track,
int vol);
421 void signalWRKNewTrack(
const QString& name,
422 int trackno,
int channel,
int pitch,
423 int velocity,
int port,
424 bool selected,
bool muted,
bool loop );
431 void signalWRKSoftVer(
const QString& version);
439 void signalWRKTrackName(
int track,
const QString& name);
446 void signalWRKStringTable(
const QStringList& strs);
455 void signalWRKSegment(
int track,
long time,
const QString& name);
465 void signalWRKChord(
int track,
long time,
const QString& name,
const QByteArray& data);
475 void signalWRKExpression(
int track,
long time,
int code,
const QString& text);
485 void signalWRKHairpin(
int track,
long time,
int code,
int dur);
489 quint16 to16bit(quint8 c1, quint8 c2);
490 quint32 to32bit(quint8 c1, quint8 c2, quint8 c3, quint8 c4);
494 QString readString(
int len);
495 QString readVarString();
496 void readRawData(
int size);
497 void readGap(
int size);
499 void seek(qint64 pos);
502 void processTrackChunk();
503 void processVarsChunk();
504 void processTimebaseChunk();
505 void processNoteArray(
int track,
int events);
506 void processStreamChunk();
507 void processMeterChunk();
508 void processTempoChunk(
int factor = 1);
509 void processSysexChunk();
510 void processSysex2Chunk();
511 void processNewSysexChunk();
512 void processThruChunk();
513 void processTrackOffset();
514 void processTrackReps();
515 void processTrackPatch();
516 void processTrackBank();
517 void processTimeFormat();
518 void processComments();
519 void processVariableRecord(
int max);
520 void processNewTrack();
521 void processSoftVer();
522 void processTrackName();
523 void processStringTable();
524 void processLyricsStream();
525 void processTrackVol();
526 void processNewTrackOffset();
527 void processMeterKeyChunk();
528 void processSegmentChunk();
529 void processNewStream();
530 void processUnknown(
int id);
531 void processEndChunk();
541 QScopedPointer<QWrkPrivate> d;
548 #endif // DRUMSTICK_QWRK_H
static const QByteArray HEADER
Cakewalk WRK file format header string id.
The QObject class is the base class of all Qt objects.
Drumstick visibility macros.
Timebase. If present is the first chunk in the file.
Events stream with lyrics.
Software version which saved the file.
Cakewalk WRK file format (input only)
Table of text event types.
Extended thru parameters.
WrkChunkType
Record types within a WRK file.