drumstick
1.1.3
|
Cakewalk WRK file format (input only) More...
#include <qwrk.h>
Signals | |
void | signalWRKError (const QString &errorStr) |
Emitted for a WRK file read error. More... | |
void | signalWRKUnknownChunk (int type, const QByteArray &data) |
Emitted after reading an unknown chunk. More... | |
void | signalWRKHeader (int verh, int verl) |
Emitted after reading a WRK header. More... | |
void | signalWRKEnd () |
Emitted after reading the last chunk of a WRK file. | |
void | signalWRKStreamEnd (long time) |
Emitted after reading the last event of a event stream. | |
void | signalWRKNote (int track, long time, int chan, int pitch, int vol, int dur) |
Emitted after reading a Note message. More... | |
void | signalWRKKeyPress (int track, long time, int chan, int pitch, int press) |
Emitted after reading a Polyphonic Aftertouch message. More... | |
void | signalWRKCtlChange (int track, long time, int chan, int ctl, int value) |
Emitted after reading a Control Change message. More... | |
void | signalWRKPitchBend (int track, long time, int chan, int value) |
Emitted after reading a Bender message. More... | |
void | signalWRKProgram (int track, long time, int chan, int patch) |
Emitted after reading a Program change message. More... | |
void | signalWRKChanPress (int track, long time, int chan, int press) |
Emitted after reading a Channel Aftertouch message. More... | |
void | signalWRKSysexEvent (int track, long time, int bank) |
Emitted after reading a System Exclusive event. More... | |
void | signalWRKSysex (int bank, const QString &name, bool autosend, int port, const QByteArray &data) |
Emitted after reading a System Exclusive Bank. More... | |
void | signalWRKText (int track, long time, int type, const QString &data) |
Emitted after reading a text message. More... | |
void | signalWRKTimeSig (int bar, int num, int den) |
Emitted after reading a WRK Time signature. More... | |
void | signalWRKKeySig (int bar, int alt) |
Emitted after reading a WRK Key Signature. More... | |
void | signalWRKTempo (long time, int tempo) |
Emitted after reading a Tempo Change message. More... | |
void | signalWRKTrack (const QString &name1, const QString &name2, int trackno, int channel, int pitch, int velocity, int port, bool selected, bool muted, bool loop) |
Emitted after reading a track prefix chunk. More... | |
void | signalWRKTimeBase (int timebase) |
Emitted after reading the timebase chunk. More... | |
void | signalWRKGlobalVars () |
Emitted after reading the global variables chunk. More... | |
void | signalWRKThru (int mode, int port, int channel, int keyPlus, int velPlus, int localPort) |
Emitted after reading an Extended Thru parameters chunk. More... | |
void | signalWRKTrackOffset (int track, int offset) |
Emitted after reading a track offset chunk. More... | |
void | signalWRKTrackReps (int track, int reps) |
Emitted after reading a track offset chunk. More... | |
void | signalWRKTrackPatch (int track, int patch) |
Emitted after reading a track patch chunk. More... | |
void | signalWRKTrackBank (int track, int bank) |
Emitted after reading a track bank chunk. More... | |
void | signalWRKTimeFormat (int frames, int offset) |
Emitted after reading a SMPTE time format chunk. More... | |
void | signalWRKComments (const QString &data) |
Emitted after reading a comments chunk. More... | |
void | signalWRKVariableRecord (const QString &name, const QByteArray &data) |
Emitted after reading a variable chunk. More... | |
void | signalWRKTrackVol (int track, int vol) |
Emitted after reading a track volume chunk. More... | |
void | signalWRKNewTrack (const QString &name, int trackno, int channel, int pitch, int velocity, int port, bool selected, bool muted, bool loop) |
Emitted after reading a new track prefix. More... | |
void | signalWRKSoftVer (const QString &version) |
Emitted after reading a software version chunk. More... | |
void | signalWRKTrackName (int track, const QString &name) |
Emitted after reading a track name chunk. More... | |
void | signalWRKStringTable (const QStringList &strs) |
Emitted after reading a string event types chunk. More... | |
void | signalWRKSegment (int track, long time, const QString &name) |
Emitted after reading a segment prefix chunk. More... | |
void | signalWRKChord (int track, long time, const QString &name, const QByteArray &data) |
Emitted after reading a chord diagram chunk. More... | |
void | signalWRKExpression (int track, long time, int code, const QString &text) |
Emitted after reading an expression indication (notation) chunk. More... | |
void | signalWRKHairpin (int track, long time, int code, int dur) |
Emitted after reading a hairpin symbol (notation) chunk. More... | |
Public Member Functions | |
QWrk (QObject *parent=0) | |
Constructor. | |
virtual | ~QWrk () |
Destructor. | |
void | readFromStream (QDataStream *stream) |
Reads a stream. More... | |
void | readFromFile (const QString &fileName) |
Reads a stream from a disk file. More... | |
QTextCodec * | getTextCodec () |
Gets the text codec used for text meta-events I/O. More... | |
void | setTextCodec (QTextCodec *codec) |
Sets the text codec for text meta-events. More... | |
long | getFilePos () |
Current position in the data stream. More... | |
int | getNow () const |
Now marker time. More... | |
int | getFrom () const |
From marker time. More... | |
int | getThru () const |
Thru marker time. More... | |
int | getKeySig () const |
Key signature (0=C, 1=C#, ... More... | |
int | getClock () const |
Clock Source (0=Int, 1=MIDI, 2=FSK, 3=SMPTE) More... | |
int | getAutoSave () const |
Auto save (0=disabled, 1..256=minutes) More... | |
int | getPlayDelay () const |
Play Delay. More... | |
bool | getZeroCtrls () const |
Zero continuous controllers? More... | |
bool | getSendSPP () const |
Send Song Position Pointer? More... | |
bool | getSendCont () const |
Send MIDI Continue? More... | |
bool | getPatchSearch () const |
Patch/controller search-back? More... | |
bool | getAutoStop () const |
Auto-stop? More... | |
unsigned int | getStopTime () const |
Auto-stop time. More... | |
bool | getAutoRewind () const |
Auto-rewind? More... | |
int | getRewindTime () const |
Auto-rewind time. More... | |
bool | getMetroPlay () const |
Metronome on during playback? More... | |
bool | getMetroRecord () const |
Metronome on during recording? More... | |
bool | getMetroAccent () const |
Metronome accents primary beats? More... | |
int | getCountIn () const |
Measures of count-in (0=no count-in) More... | |
bool | getThruOn () const |
MIDI Thru enabled? (only used if no THRU rec) More... | |
bool | getAutoRestart () const |
Auto-restart? More... | |
int | getCurTempoOfs () const |
Which of the 3 tempo offsets is used: 0..2. More... | |
int | getTempoOfs1 () const |
Fixed-point ratio value of tempo offset 1. More... | |
int | getTempoOfs2 () const |
Fixed-point ratio value of tempo offset 2. More... | |
int | getTempoOfs3 () const |
Fixed-point ratio value of tempo offset 3. More... | |
bool | getPunchEnabled () const |
Auto-Punch enabled? More... | |
int | getPunchInTime () const |
Punch-in time. More... | |
int | getPunchOutTime () const |
Punch-out time. More... | |
int | getEndAllTime () const |
Time of latest event (incl. More... | |
QByteArray | getLastChunkRawData () const |
Gets the last chunk raw data (undecoded) More... | |
Cakewalk WRK file format (input only)
This class is used to parse Cakewalk WRK Files
bool getAutoRestart | ( | ) | const |
bool getAutoRewind | ( | ) | const |
int getAutoSave | ( | ) | const |
int getClock | ( | ) | const |
int getCountIn | ( | ) | const |
int getCurTempoOfs | ( | ) | const |
int getEndAllTime | ( | ) | const |
long getFilePos | ( | ) |
int getFrom | ( | ) | const |
int getKeySig | ( | ) | const |
QByteArray getLastChunkRawData | ( | ) | const |
bool getMetroAccent | ( | ) | const |
bool getMetroPlay | ( | ) | const |
bool getMetroRecord | ( | ) | const |
int getNow | ( | ) | const |
bool getPatchSearch | ( | ) | const |
bool getPunchEnabled | ( | ) | const |
int getPunchInTime | ( | ) | const |
int getPunchOutTime | ( | ) | const |
int getRewindTime | ( | ) | const |
bool getSendCont | ( | ) | const |
bool getSendSPP | ( | ) | const |
unsigned int getStopTime | ( | ) | const |
int getTempoOfs1 | ( | ) | const |
Fixed-point ratio value of tempo offset 1.
NOTE: The offset ratios are expressed as a numerator in the expression n/64. To get a ratio from this number, divide the number by 64. To get this number from a ratio, multiply the ratio by 64. Examples: 32 ==> 32/64 = 0.5 63 ==> 63/64 = 0.9 64 ==> 64/64 = 1.0 128 ==> 128/64 = 2.0
int getTempoOfs2 | ( | ) | const |
Fixed-point ratio value of tempo offset 2.
NOTE: The offset ratios are expressed as a numerator in the expression n/64. To get a ratio from this number, divide the number by 64. To get this number from a ratio, multiply the ratio by 64. Examples: 32 ==> 32/64 = 0.5 63 ==> 63/64 = 0.9 64 ==> 64/64 = 1.0 128 ==> 128/64 = 2.0
int getTempoOfs3 | ( | ) | const |
Fixed-point ratio value of tempo offset 3.
NOTE: The offset ratios are expressed as a numerator in the expression n/64. To get a ratio from this number, divide the number by 64. To get this number from a ratio, multiply the ratio by 64. Examples: 32 ==> 32/64 = 0.5 63 ==> 63/64 = 0.9 64 ==> 64/64 = 1.0 128 ==> 128/64 = 2.0
QTextCodec * getTextCodec | ( | ) |
int getThru | ( | ) | const |
bool getThruOn | ( | ) | const |
bool getZeroCtrls | ( | ) | const |
void readFromFile | ( | const QString & | fileName | ) |
Reads a stream from a disk file.
fileName | Name of an existing file. |
Definition at line 642 of file qwrk.cpp.
References QWrk::readFromStream().
void readFromStream | ( | QDataStream * | stream | ) |
Reads a stream.
stream | Pointer to an existing and opened stream |
Definition at line 632 of file qwrk.cpp.
Referenced by QWrk::readFromFile().
void setTextCodec | ( | QTextCodec * | codec | ) |
|
signal |
Emitted after reading a Channel Aftertouch message.
track | track number |
time | musical time |
chan | MIDI Channel |
press | Pressure amount |
Definition at line 662 of file moc_qwrk.cpp.
|
signal |
Emitted after reading a chord diagram chunk.
track | track number |
time | event time in ticks |
name | chord name |
data | chord data definition (not decoded) |
Definition at line 829 of file moc_qwrk.cpp.
|
signal |
Emitted after reading a comments chunk.
data | file text comments |
Definition at line 773 of file moc_qwrk.cpp.
|
signal |
Emitted after reading a Control Change message.
track | track number |
time | musical time |
chan | MIDI Channel |
ctl | MIDI Controller |
value | Control value |
Definition at line 641 of file moc_qwrk.cpp.
|
signal |
Emitted for a WRK file read error.
errorStr | Error string |
Definition at line 593 of file moc_qwrk.cpp.
|
signal |
Emitted after reading an expression indication (notation) chunk.
track | track number |
time | event time in ticks |
code | expression event code |
text | expression text |
Definition at line 836 of file moc_qwrk.cpp.
|
signal |
Emitted after reading the global variables chunk.
This record contains miscellaneous Cakewalk global variables that can be retrieved using individual getters.
Definition at line 725 of file moc_qwrk.cpp.
|
signal |
Emitted after reading a hairpin symbol (notation) chunk.
track | track number |
time | event time in ticks |
code | hairpin code |
dur | duration |
Definition at line 843 of file moc_qwrk.cpp.
|
signal |
Emitted after reading a WRK header.
verh | WRK file format version major |
verl | WRK file format version minor |
Definition at line 607 of file moc_qwrk.cpp.
|
signal |
Emitted after reading a Polyphonic Aftertouch message.
track | track number |
time | musical time |
chan | MIDI Channel |
pitch | MIDI Note |
press | Pressure amount |
Definition at line 634 of file moc_qwrk.cpp.
|
signal |
Emitted after reading a WRK Key Signature.
bar | Measure number |
alt | Number of alterations (negative=flats, positive=sharps) |
Definition at line 697 of file moc_qwrk.cpp.
|
signal |
Emitted after reading a new track prefix.
name | track name |
trackno | track number |
channel | forced MIDI channel |
pitch | Note transposition |
velocity | Velocity increment |
port | MIDI port number |
selected | track is selected |
muted | track is muted |
loop | track loop enabled |
Definition at line 794 of file moc_qwrk.cpp.
|
signal |
Emitted after reading a Note message.
track | track number |
time | musical time |
chan | MIDI Channel |
pitch | MIDI Note |
vol | Velocity |
dur | Duration |
Definition at line 627 of file moc_qwrk.cpp.
|
signal |
Emitted after reading a Bender message.
track | track number |
time | musical time |
chan | MIDI Channel |
value | Bender value |
Definition at line 648 of file moc_qwrk.cpp.
|
signal |
Emitted after reading a Program change message.
track | track number |
time | musical time |
chan | MIDI Channel |
patch | Program number |
Definition at line 655 of file moc_qwrk.cpp.
|
signal |
Emitted after reading a segment prefix chunk.
track | track number |
time | segment time offset |
name | segment name |
Definition at line 822 of file moc_qwrk.cpp.
|
signal |
Emitted after reading a software version chunk.
version | software version string |
Definition at line 801 of file moc_qwrk.cpp.
|
signal |
Emitted after reading a string event types chunk.
strs | list of declared string event types |
Definition at line 815 of file moc_qwrk.cpp.
|
signal |
Emitted after reading a System Exclusive Bank.
bank | Sysex Bank number |
name | Sysex Bank name |
autosend | Send automatically after loading the song |
port | MIDI output port |
data | Sysex bytes |
Definition at line 676 of file moc_qwrk.cpp.
|
signal |
Emitted after reading a System Exclusive event.
track | track number |
time | musical time |
bank | Sysex Bank number |
Definition at line 669 of file moc_qwrk.cpp.
|
signal |
Emitted after reading a Tempo Change message.
Tempo units are given in beats * 100 per minute, so to obtain BPM it is necessary to divide by 100 the tempo.
time | musical time |
tempo | beats per minute multiplied by 100 |
Definition at line 704 of file moc_qwrk.cpp.
|
signal |
Emitted after reading a text message.
track | track number |
time | musical time |
type | Text type |
data | Text data |
Definition at line 683 of file moc_qwrk.cpp.
|
signal |
Emitted after reading an Extended Thru parameters chunk.
It was introduced in Cakewalk version 4.0. These parameters are intended to override the global vars Thruon value, so this record should come after the VARS_CHUNK record. It is optional.
mode | (auto, off, on) |
port | MIDI port |
channel | MIDI channel |
keyPlus | Note transpose |
velPlus | Velocity transpose |
localPort | MIDI local port |
Definition at line 731 of file moc_qwrk.cpp.
|
signal |
Emitted after reading the timebase chunk.
timebase | ticks per quarter note |
Definition at line 718 of file moc_qwrk.cpp.
|
signal |
Emitted after reading a SMPTE time format chunk.
frames | frames/sec (24, 25, 29=30-drop, 30) |
offset | frames of offset |
Definition at line 766 of file moc_qwrk.cpp.
|
signal |
Emitted after reading a WRK Time signature.
bar | Measure number |
num | Numerator |
den | Denominator (exponent in a power of two) |
Definition at line 690 of file moc_qwrk.cpp.
|
signal |
Emitted after reading a track prefix chunk.
name1 | track 1st name |
name2 | track 2nd name |
trackno | track number |
channel | track forced channel (-1=no forced) |
pitch | track pitch transpose in semitones (-127..127) |
velocity | track velocity increment (-127..127) |
port | track forced port |
selected | true if track is selected |
muted | true if track is muted |
loop | true if loop is enabled |
Definition at line 711 of file moc_qwrk.cpp.
|
signal |
Emitted after reading a track bank chunk.
track | track number |
bank |
Definition at line 759 of file moc_qwrk.cpp.
|
signal |
Emitted after reading a track name chunk.
track | track number |
name | track name |
Definition at line 808 of file moc_qwrk.cpp.
|
signal |
Emitted after reading a track offset chunk.
track | track number |
offset | time offset |
Definition at line 738 of file moc_qwrk.cpp.
|
signal |
Emitted after reading a track patch chunk.
track | track number |
patch |
Definition at line 752 of file moc_qwrk.cpp.
|
signal |
Emitted after reading a track offset chunk.
track | track number |
reps | number of repetitions |
Definition at line 745 of file moc_qwrk.cpp.
|
signal |
Emitted after reading a track volume chunk.
track | track number |
vol | initial volume |
Definition at line 787 of file moc_qwrk.cpp.
|
signal |
Emitted after reading an unknown chunk.
type | chunk type |
data | chunk data (not decoded) |
Definition at line 600 of file moc_qwrk.cpp.
|
signal |
Emitted after reading a variable chunk.
This record may contain data in text or binary format.
name | record identifier |
data | record variable data |
Definition at line 780 of file moc_qwrk.cpp.