drumstick 2.9.0
C++ MIDI libraries using Qt objects, idioms, and style.

Cakewalk WRK file format (input only) More...

#include <qwrk.h>

Inheritance diagram for QWrk:

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. More...
 
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...
 
Q_DECL_DEPRECATED 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...
 
Q_DECL_DEPRECATED 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...
 
Q_DECL_DEPRECATED 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...
 
Q_DECL_DEPRECATED 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...
 
Q_DECL_DEPRECATED void signalWRKTrackName (int track, const QString &name)
 Emitted after reading a track name chunk. More...
 
Q_DECL_DEPRECATED void signalWRKStringTable (const QStringList &strs)
 Emitted after reading a string event types chunk. More...
 
Q_DECL_DEPRECATED 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...
 
Q_DECL_DEPRECATED 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...
 
void signalWRKText2 (int track, long time, int type, const QByteArray &data)
 Emitted after reading a text message This signal is emitted when getTextCodec() is nullptr. More...
 
void signalWRKTrack2 (const QByteArray &name1, const QByteArray &name2, int trackno, int channel, int pitch, int velocity, int port, bool selected, bool muted, bool loop)
 Emitted after reading a track prefix chunk This signal is emitted when getTextCodec() is nullptr. More...
 
void signalWRKComments2 (const QByteArray &data)
 Emitted after reading a comments chunk This signal is emitted when getTextCodec() is nullptr. More...
 
void signalWRKNewTrack2 (const QByteArray &name, int trackno, int channel, int pitch, int velocity, int port, bool selected, bool muted, bool loop)
 Emitted after reading a new track prefix This signal is emitted when getTextCodec() is nullptr. More...
 
void signalWRKTrackName2 (int track, const QByteArray &name)
 Emitted after reading a track name chunk. More...
 
void signalWRKStringTable2 (const QList< QByteArray > &strs)
 Emitted after reading a string event types chunk. More...
 
void signalWRKSegment2 (int track, long time, const QByteArray &name)
 Emitted after reading a segment prefix chunk. More...
 
void signalWRKExpression2 (int track, long time, int code, const QByteArray &text)
 Emitted after reading an expression indication (notation) chunk. More...
 
Q_DECL_DEPRECATED void signalWRKMarker (long time, int type, const QString &data)
 Emitted after reading a text marker This is deprecated because the class QTextCodec was removed from QtCore since Qt6 Use signalWRKMarker2() instead. More...
 
void signalWRKMarker2 (long time, int type, const QByteArray &data)
 Emitted after reading a text marker This signal is emitted when getTextCodec() is nullptr. More...
 

Public Member Functions

 QWrk (QObject *parent=nullptr)
 Constructor. More...
 
virtual ~QWrk ()
 Destructor.
 
void readFromStream (QDataStream *stream)
 Reads a stream. More...
 
void readFromFile (const QString &fileName)
 Reads a stream from a disk file. More...
 
Q_DECL_DEPRECATED QTextCodec * getTextCodec ()
 Gets the text codec used for text meta-events I/O. More...
 
Q_DECL_DEPRECATED 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#, ... 11=B) 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...
 

Static Public Attributes

static const QByteArray HEADER = QByteArrayLiteral("CAKEWALK")
 Cakewalk WRK file format header string id. More...
 

Detailed Description

Cakewalk WRK file format (input only)

This class is used to parse Cakewalk WRK Files. Signals with QString parameters are deprecated because the class QTextCodec was removed from QtCore since Qt6.

Since
0.3.0
Examples
dumpwrk.cpp, and guiplayer.cpp.

Definition at line 95 of file qwrk.h.

Constructor & Destructor Documentation

◆ QWrk()

QWrk ( QObject parent = nullptr)
explicit

Constructor.

Parameters
parentObject owner

Definition at line 131 of file qwrk.cpp.

Member Function Documentation

◆ getAutoRestart()

bool getAutoRestart ( ) const

Auto-restart?

Returns
Auto-restart

Definition at line 372 of file qwrk.cpp.

◆ getAutoRewind()

bool getAutoRewind ( ) const

Auto-rewind?

Returns
Auto-rewind

Definition at line 309 of file qwrk.cpp.

◆ getAutoSave()

int getAutoSave ( ) const

Auto save (0=disabled, 1..256=minutes)

Returns
Auto save

Definition at line 237 of file qwrk.cpp.

◆ getAutoStop()

bool getAutoStop ( ) const

Auto-stop?

Returns
Auto-stop

Definition at line 291 of file qwrk.cpp.

◆ getClock()

int getClock ( ) const

Clock Source (0=Int, 1=MIDI, 2=FSK, 3=SMPTE)

Returns
Clock Source

Definition at line 228 of file qwrk.cpp.

◆ getCountIn()

int getCountIn ( ) const

Measures of count-in (0=no count-in)

Returns
Measures of count-in

Definition at line 354 of file qwrk.cpp.

◆ getCurTempoOfs()

int getCurTempoOfs ( ) const

Which of the 3 tempo offsets is used: 0..2.

Returns
tempo offset index

Definition at line 381 of file qwrk.cpp.

◆ getEndAllTime()

int getEndAllTime ( ) const

Time of latest event (incl.

all tracks)

Returns
Time of latest event

Definition at line 474 of file qwrk.cpp.

◆ getFilePos()

long getFilePos ( )

Current position in the data stream.

Returns
current position

Definition at line 652 of file qwrk.cpp.

◆ getFrom()

int getFrom ( ) const

From marker time.

Returns
From marker time

Definition at line 201 of file qwrk.cpp.

◆ getKeySig()

int getKeySig ( ) const

Key signature (0=C, 1=C#, ... 11=B)

Returns
Key signature

Definition at line 219 of file qwrk.cpp.

◆ getLastChunkRawData()

QByteArray getLastChunkRawData ( ) const

Gets the last chunk raw data (undecoded)

Returns
last chunk raw data

Definition at line 170 of file qwrk.cpp.

◆ getMetroAccent()

bool getMetroAccent ( ) const

Metronome accents primary beats?

Returns
Metronome accents primary beats

Definition at line 345 of file qwrk.cpp.

◆ getMetroPlay()

bool getMetroPlay ( ) const

Metronome on during playback?

Returns
Metronome on during playback

Definition at line 327 of file qwrk.cpp.

◆ getMetroRecord()

bool getMetroRecord ( ) const

Metronome on during recording?

Returns
Metronome on during recording

Definition at line 336 of file qwrk.cpp.

◆ getNow()

int getNow ( ) const

Now marker time.

Returns
Now marker time

Definition at line 192 of file qwrk.cpp.

◆ getPatchSearch()

bool getPatchSearch ( ) const

Patch/controller search-back?

Returns
Patch/controller search-back

Definition at line 282 of file qwrk.cpp.

◆ getPlayDelay()

int getPlayDelay ( ) const

Play Delay.

Returns
Play Delay

Definition at line 246 of file qwrk.cpp.

◆ getPunchEnabled()

bool getPunchEnabled ( ) const

Auto-Punch enabled?

Returns
Auto-Punch enabled

Definition at line 447 of file qwrk.cpp.

◆ getPunchInTime()

int getPunchInTime ( ) const

Punch-in time.

Returns
punch-in time

Definition at line 456 of file qwrk.cpp.

◆ getPunchOutTime()

int getPunchOutTime ( ) const

Punch-out time.

Returns
Punch-out time

Definition at line 465 of file qwrk.cpp.

◆ getRewindTime()

int getRewindTime ( ) const

Auto-rewind time.

Returns
Auto-rewind time

Definition at line 318 of file qwrk.cpp.

◆ getSendCont()

bool getSendCont ( ) const

Send MIDI Continue?

Returns
Send MIDI Continue

Definition at line 273 of file qwrk.cpp.

◆ getSendSPP()

bool getSendSPP ( ) const

Send Song Position Pointer?

Returns
Send Song Position Pointer

Definition at line 264 of file qwrk.cpp.

◆ getStopTime()

unsigned int getStopTime ( ) const

Auto-stop time.

Returns
Auto-stop time

Definition at line 300 of file qwrk.cpp.

◆ getTempoOfs1()

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

Returns
tempo offset 1

Definition at line 400 of file qwrk.cpp.

◆ getTempoOfs2()

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

Returns
tempo offset 2

Definition at line 419 of file qwrk.cpp.

◆ getTempoOfs3()

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

Returns
tempo offset 3

Definition at line 438 of file qwrk.cpp.

◆ getTextCodec()

QTextCodec * getTextCodec ( )

Gets the text codec used for text meta-events I/O.

Returns
QTextCodec pointer
Deprecated:
because the class QTextCodec was removed from QtCore since Qt6.

Definition at line 148 of file qwrk.cpp.

◆ getThru()

int getThru ( ) const

Thru marker time.

Returns
Thru marker time

Definition at line 210 of file qwrk.cpp.

◆ getThruOn()

bool getThruOn ( ) const

MIDI Thru enabled? (only used if no THRU rec)

Returns
MIDI Thru enabled

Definition at line 363 of file qwrk.cpp.

◆ getZeroCtrls()

bool getZeroCtrls ( ) const

Zero continuous controllers?

Returns
Zero continuous controllers

Definition at line 255 of file qwrk.cpp.

◆ readFromFile()

void readFromFile ( const QString &  fileName)

Reads a stream from a disk file.

Parameters
fileNameName of an existing file.

Definition at line 701 of file qwrk.cpp.

References QWrk::readFromStream().

◆ readFromStream()

void readFromStream ( QDataStream *  stream)

Reads a stream.

Parameters
streamPointer to an existing and opened stream

Definition at line 691 of file qwrk.cpp.

Referenced by QWrk::readFromFile().

◆ setTextCodec()

void setTextCodec ( QTextCodec *  codec)

Sets the text codec for text meta-events.

The engine doesn't take ownership of the codec instance.

Parameters
codecQTextCodec pointer
Deprecated:
because the class QTextCodec was removed from QtCore since Qt6.

Definition at line 160 of file qwrk.cpp.

◆ signalWRKChanPress

void signalWRKChanPress ( int  track,
long  time,
int  chan,
int  press 
)
signal

Emitted after reading a Channel Aftertouch message.

Parameters
tracktrack number
timemusical time
chanMIDI Channel
pressPressure amount

◆ signalWRKChord

void signalWRKChord ( int  track,
long  time,
const QString &  name,
const QByteArray &  data 
)
signal

Emitted after reading a chord diagram chunk.

Parameters
tracktrack number
timeevent time in ticks
namechord name
datachord data definition (not decoded)

◆ signalWRKComments

Q_DECL_DEPRECATED void signalWRKComments ( const QString &  data)
signal

Emitted after reading a comments chunk.

Parameters
datafile text comments
Deprecated:
because the class QTextCodec was removed from QtCore since Qt6. use signalWRKComments2() instead

◆ signalWRKComments2

void signalWRKComments2 ( const QByteArray &  data)
signal

Emitted after reading a comments chunk This signal is emitted when getTextCodec() is nullptr.

Parameters
datafile text comments

◆ signalWRKCtlChange

void signalWRKCtlChange ( int  track,
long  time,
int  chan,
int  ctl,
int  value 
)
signal

Emitted after reading a Control Change message.

Parameters
tracktrack number
timemusical time
chanMIDI Channel
ctlMIDI Controller
valueControl value

◆ signalWRKError

void signalWRKError ( const QString &  errorStr)
signal

Emitted for a WRK file read error.

Parameters
errorStrError string

◆ signalWRKExpression

Q_DECL_DEPRECATED void signalWRKExpression ( int  track,
long  time,
int  code,
const QString &  text 
)
signal

Emitted after reading an expression indication (notation) chunk.

Parameters
tracktrack number
timeevent time in ticks
codeexpression event code
textexpression text
Deprecated:
because the class QTextCodec was removed from QtCore since Qt6. use signalWRKExpression2() instead

◆ signalWRKExpression2

void signalWRKExpression2 ( int  track,
long  time,
int  code,
const QByteArray &  text 
)
signal

Emitted after reading an expression indication (notation) chunk.

This signal is emitted when getTextCodec() is nullptr

Parameters
tracktrack number
timeevent time in ticks
codeexpression event code
textexpression text

◆ signalWRKGlobalVars

void signalWRKGlobalVars ( )
signal

Emitted after reading the global variables chunk.

This record contains miscellaneous Cakewalk global variables that can be retrieved using individual getters.

See also
getNow(), getFrom(), getThru()

◆ signalWRKHairpin

void signalWRKHairpin ( int  track,
long  time,
int  code,
int  dur 
)
signal

Emitted after reading a hairpin symbol (notation) chunk.

Parameters
tracktrack number
timeevent time in ticks
codehairpin code
durduration

◆ signalWRKHeader

void signalWRKHeader ( int  verh,
int  verl 
)
signal

Emitted after reading a WRK header.

Parameters
verhWRK file format version major
verlWRK file format version minor

◆ signalWRKKeyPress

void signalWRKKeyPress ( int  track,
long  time,
int  chan,
int  pitch,
int  press 
)
signal

Emitted after reading a Polyphonic Aftertouch message.

Parameters
tracktrack number
timemusical time
chanMIDI Channel
pitchMIDI Note
pressPressure amount

◆ signalWRKKeySig

void signalWRKKeySig ( int  bar,
int  alt 
)
signal

Emitted after reading a WRK Key Signature.

Parameters
barMeasure number
altNumber of alterations (negative=flats, positive=sharps)

◆ signalWRKMarker

Q_DECL_DEPRECATED void signalWRKMarker ( long  time,
int  type,
const QString &  data 
)
signal

Emitted after reading a text marker This is deprecated because the class QTextCodec was removed from QtCore since Qt6 Use signalWRKMarker2() instead.

Parameters
timeevent time in ticks or smpte
typetipe of time: 0=ticks or 1=smpte
datamarker text
Deprecated:
because the class QTextCodec was removed from QtCore since Qt6. use signalWRKMarker2() instead

◆ signalWRKMarker2

void signalWRKMarker2 ( long  time,
int  type,
const QByteArray &  data 
)
signal

Emitted after reading a text marker This signal is emitted when getTextCodec() is nullptr.

Parameters
timeevent time in ticks or smpte
typetipe of time: 0=ticks or 1=smpte
datamarker text

◆ signalWRKNewTrack

Q_DECL_DEPRECATED void signalWRKNewTrack ( const QString &  name,
int  trackno,
int  channel,
int  pitch,
int  velocity,
int  port,
bool  selected,
bool  muted,
bool  loop 
)
signal

Emitted after reading a new track prefix.

Parameters
nametrack name
tracknotrack number
channelforced MIDI channel
pitchNote transposition
velocityVelocity increment
portMIDI port number
selectedtrack is selected
mutedtrack is muted
looptrack loop enabled
Deprecated:
because the class QTextCodec was removed from QtCore since Qt6. use signalWRKNewTrack2() instead

◆ signalWRKNewTrack2

void signalWRKNewTrack2 ( const QByteArray &  name,
int  trackno,
int  channel,
int  pitch,
int  velocity,
int  port,
bool  selected,
bool  muted,
bool  loop 
)
signal

Emitted after reading a new track prefix This signal is emitted when getTextCodec() is nullptr.

Parameters
nametrack name
tracknotrack number
channelforced MIDI channel
pitchNote transposition
velocityVelocity increment
portMIDI port number
selectedtrack is selected
mutedtrack is muted
looptrack loop enabled

◆ signalWRKNote

void signalWRKNote ( int  track,
long  time,
int  chan,
int  pitch,
int  vol,
int  dur 
)
signal

Emitted after reading a Note message.

Parameters
tracktrack number
timemusical time
chanMIDI Channel
pitchMIDI Note
volVelocity
durDuration

◆ signalWRKPitchBend

void signalWRKPitchBend ( int  track,
long  time,
int  chan,
int  value 
)
signal

Emitted after reading a Bender message.

Parameters
tracktrack number
timemusical time
chanMIDI Channel
valueBender value

◆ signalWRKProgram

void signalWRKProgram ( int  track,
long  time,
int  chan,
int  patch 
)
signal

Emitted after reading a Program change message.

Parameters
tracktrack number
timemusical time
chanMIDI Channel
patchProgram number

◆ signalWRKSegment

Q_DECL_DEPRECATED void signalWRKSegment ( int  track,
long  time,
const QString &  name 
)
signal

Emitted after reading a segment prefix chunk.

Parameters
tracktrack number
timesegment time offset
namesegment name
Deprecated:
because the class QTextCodec was removed from QtCore since Qt6. use signalWRKSegment2() instead

◆ signalWRKSegment2

void signalWRKSegment2 ( int  track,
long  time,
const QByteArray &  name 
)
signal

Emitted after reading a segment prefix chunk.

This signal is emitted when getTextCodec() is nullptr

Parameters
tracktrack number
timesegment time offset
namesegment name

◆ signalWRKSoftVer

void signalWRKSoftVer ( const QString &  version)
signal

Emitted after reading a software version chunk.

Parameters
versionsoftware version string

◆ signalWRKStreamEnd

void signalWRKStreamEnd ( long  time)
signal

Emitted after reading the last event of a event stream.

Parameters
timemusical time

◆ signalWRKStringTable

Q_DECL_DEPRECATED void signalWRKStringTable ( const QStringList &  strs)
signal

Emitted after reading a string event types chunk.

Parameters
strslist of declared string event types
Deprecated:
because the class QTextCodec was removed from QtCore since Qt6. use signalWRKStringTable2() instead

◆ signalWRKStringTable2

void signalWRKStringTable2 ( const QList< QByteArray > &  strs)
signal

Emitted after reading a string event types chunk.

This signal is emitted when getTextCodec() is nullptr

Parameters
strslist of declared string event types

◆ signalWRKSysex

void signalWRKSysex ( int  bank,
const QString &  name,
bool  autosend,
int  port,
const QByteArray &  data 
)
signal

Emitted after reading a System Exclusive Bank.

Parameters
bankSysex Bank number
nameSysex Bank name
autosendSend automatically after loading the song
portMIDI output port
dataSysex bytes

◆ signalWRKSysexEvent

void signalWRKSysexEvent ( int  track,
long  time,
int  bank 
)
signal

Emitted after reading a System Exclusive event.

Parameters
tracktrack number
timemusical time
bankSysex Bank number

◆ signalWRKTempo

void signalWRKTempo ( long  time,
int  tempo 
)
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.

Parameters
timemusical time
tempobeats per minute multiplied by 100

◆ signalWRKText

Q_DECL_DEPRECATED void signalWRKText ( int  track,
long  time,
int  type,
const QString &  data 
)
signal

Emitted after reading a text message.

Parameters
tracktrack number
timemusical time
typeText type
dataText data
Deprecated:
because the class QTextCodec was removed from QtCore since Qt6. use signalWRKText2() instead

◆ signalWRKText2

void signalWRKText2 ( int  track,
long  time,
int  type,
const QByteArray &  data 
)
signal

Emitted after reading a text message This signal is emitted when getTextCodec() is nullptr.

Parameters
tracktrack number
timemusical time
typeText type
dataText data

◆ signalWRKThru

void signalWRKThru ( int  mode,
int  port,
int  channel,
int  keyPlus,
int  velPlus,
int  localPort 
)
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.

Parameters
mode(auto, off, on)
portMIDI port
channelMIDI channel
keyPlusNote transpose
velPlusVelocity transpose
localPortMIDI local port

◆ signalWRKTimeBase

void signalWRKTimeBase ( int  timebase)
signal

Emitted after reading the timebase chunk.

Parameters
timebaseticks per quarter note

◆ signalWRKTimeFormat

void signalWRKTimeFormat ( int  frames,
int  offset 
)
signal

Emitted after reading a SMPTE time format chunk.

Parameters
framesframes/sec (24, 25, 29=30-drop, 30)
offsetframes of offset

◆ signalWRKTimeSig

void signalWRKTimeSig ( int  bar,
int  num,
int  den 
)
signal

Emitted after reading a WRK Time signature.

Parameters
barMeasure number
numNumerator
denDenominator (exponent in a power of two)

◆ signalWRKTrack

Q_DECL_DEPRECATED void signalWRKTrack ( const QString &  name1,
const QString &  name2,
int  trackno,
int  channel,
int  pitch,
int  velocity,
int  port,
bool  selected,
bool  muted,
bool  loop 
)
signal

Emitted after reading a track prefix chunk.

Parameters
name1track 1st name
name2track 2nd name
tracknotrack number
channeltrack forced channel (-1=no forced)
pitchtrack pitch transpose in semitones (-127..127)
velocitytrack velocity increment (-127..127)
porttrack forced port
selectedtrue if track is selected
mutedtrue if track is muted
looptrue if loop is enabled
Deprecated:
because the class QTextCodec was removed from QtCore since Qt6. use signalWRKTrack2() instead

◆ signalWRKTrack2

void signalWRKTrack2 ( const QByteArray &  name1,
const QByteArray &  name2,
int  trackno,
int  channel,
int  pitch,
int  velocity,
int  port,
bool  selected,
bool  muted,
bool  loop 
)
signal

Emitted after reading a track prefix chunk This signal is emitted when getTextCodec() is nullptr.

Parameters
name1track 1st name
name2track 2nd name
tracknotrack number
channeltrack forced channel (-1=no forced)
pitchtrack pitch transpose in semitones (-127..127)
velocitytrack velocity increment (-127..127)
porttrack forced port
selectedtrue if track is selected
mutedtrue if track is muted
looptrue if loop is enabled

◆ signalWRKTrackBank

void signalWRKTrackBank ( int  track,
int  bank 
)
signal

Emitted after reading a track bank chunk.

Parameters
tracktrack number
bank

◆ signalWRKTrackName

Q_DECL_DEPRECATED void signalWRKTrackName ( int  track,
const QString &  name 
)
signal

Emitted after reading a track name chunk.

Parameters
tracktrack number
nametrack name
Deprecated:
because the class QTextCodec was removed from QtCore since Qt6. use signalWRKTrackName2() instead

◆ signalWRKTrackName2

void signalWRKTrackName2 ( int  track,
const QByteArray &  name 
)
signal

Emitted after reading a track name chunk.

This signal is emitted when getTextCodec() is nullptr

Parameters
tracktrack number
nametrack name

◆ signalWRKTrackOffset

void signalWRKTrackOffset ( int  track,
int  offset 
)
signal

Emitted after reading a track offset chunk.

Parameters
tracktrack number
offsettime offset

◆ signalWRKTrackPatch

void signalWRKTrackPatch ( int  track,
int  patch 
)
signal

Emitted after reading a track patch chunk.

Parameters
tracktrack number
patch

◆ signalWRKTrackReps

void signalWRKTrackReps ( int  track,
int  reps 
)
signal

Emitted after reading a track offset chunk.

Parameters
tracktrack number
repsnumber of repetitions

◆ signalWRKTrackVol

void signalWRKTrackVol ( int  track,
int  vol 
)
signal

Emitted after reading a track volume chunk.

Parameters
tracktrack number
volinitial volume

◆ signalWRKUnknownChunk

void signalWRKUnknownChunk ( int  type,
const QByteArray &  data 
)
signal

Emitted after reading an unknown chunk.

Parameters
typechunk type
datachunk data (not decoded)

◆ signalWRKVariableRecord

void signalWRKVariableRecord ( const QString &  name,
const QByteArray &  data 
)
signal

Emitted after reading a variable chunk.

This record may contain data in text or binary format.

Parameters
namerecord identifier
datarecord variable data

Member Data Documentation

◆ HEADER

const QByteArray HEADER = QByteArrayLiteral("CAKEWALK")
static

Cakewalk WRK file format header string id.

Cakewalk WRK File header id

Definition at line 145 of file qwrk.h.


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