/usr/include/drumstick/qove.h is in libdrumstick-dev 0.5.0-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 | /*
Overture OVE File component
Copyright (C) 2006-2010, Rui Fan <vanferry@gmail.com>
This library is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef DRUMSTICK_OVE_H
#define DRUMSTICK_OVE_H
#include "macros.h"
#include <QObject>
namespace OVE {
class Track;
class Voice;
class Measure;
class MeasureData;
class NoteContainer;
}
/**
* @file qove.h
* Overture OVE Files Input
* @defgroup OVE Overture File Parser (Input)
* @{
*/
namespace drumstick {
class MeasureToTick;
/**
* Overture OVE Files (input only)
*
* This class is used to parse Overture Files
* @since 0.5.0
*/
class DRUMSTICK_EXPORT QOve : public QObject {
Q_OBJECT
public:
QOve(QObject * parent = 0);
virtual ~QOve();
void setTextCodecName(const QString& codec);
void readFromFile(const QString& fileName);
Q_SIGNALS:
/**
* Emitted for a OVE file read error
*
* @param errorStr Error string
*/
void signalOVEError(const QString& errorStr);
/**
* Emitted after reading a WRK header
*
* @param quarter of OVE file
* @param trackCount of OVE file
*/
void signalOVEHeader(int quarter, int trackCount);
/**
* Emitted after reading the last chunk of a OVE file
*/
void signalOVEEnd();
/**
* Emitted after reading a Note message
*
* @param track track number
* @param tick musical time
* @param channel MIDI Channel
* @param pitch MIDI Note
* @param vol Velocity
*/
void signalOVENoteOn(int track, long tick, int channel, int pitch, int vol);
void signalOVENoteOff(int track, long tick, int channel, int pitch, int vol);
/**
* Emitted after reading a Control Change message
*
* @param track track number
* @param tick musical time
* @param channel MIDI Channel
* @param ctl MIDI Controller
* @param value Control value
*/
void signalOVECtlChange(int track, long tick, int channel, int ctl, int value);
/**
* Emitted after reading a Polyphonic Aftertouch message (Key Aftertouch)
*
* @param track track number
* @param tick musical time
* @param channel MIDI Channel
* @param pitch MIDI Note
* @param press Pressure amount
*/
void signalOVEKeyPress(int track, long tick, int channel, int pitch, int press);
/**
* Emitted after reading a Bender message
*
* @param track track number
* @param tick musical time
* @param channel MIDI Channel
* @param value Bender value
*/
void signalOVEPitchBend(int track, long tick, int channel, int value);
/**
* Emitted after reading a Program change message
*
* @param track track number
* @param tick musical time
* @param channel MIDI Channel
* @param patch Program number
*/
void signalOVEProgram(int track, long tick, int channel, int patch);
/**
* Emitted after reading a Channel Aftertouch message
*
* @param track track number
* @param tick musical time
* @param channel MIDI Channel
* @param press Pressure amount
*/
void signalOVEChanPress(int track, long tick, int channel, int press);
/**
* Emitted after reading a System Exclusive event
*
* @param track track number
* @param tick musical time
* @param bank Sysex Bank number
*/
void signalOVESysexEvent(int track, long tick, int bank);
/**
* Emitted after reading a System Exclusive Bank
*
* @param bank Sysex Bank number
* @param name Sysex Bank name
* @param autosend Send automatically after loading the song
* @param port MIDI output port
* @param data Sysex bytes
*/
void signalOVESysex(int bank, const QString& name, bool autosend, int port, const QByteArray& data);
/**
* Emitted after reading a text message
*
* @param track track number
* @param tick musical time
* @param data Text data
*/
void signalOVEText(int track, long tick, const QString& data);
/**
* Emitted after reading a Time signature
*
* @param bar Measure number
* @param tick musical time
* @param num Numerator
* @param den Denominator (exponent in a power of two)
*/
void signalOVETimeSig(int bar, long tick, int num, int den);
/**
* Emitted after reading a Key Signature
*
* @param bar Measure number
* @param tick musical time
* @param alt Number of alterations (negative=flats, positive=sharps)
*/
void signalOVEKeySig(int bar, long tick, int alt);
/**
* 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.
*
* @param tick musical time
* @param tempo beats per minute multiplied by 100
*/
void signalOVETempo(long tick, int tempo);
/**
* Emitted after reading a new track prefix
*
* @param name track name
* @param track track number
* @param channel forced MIDI channel
* @param pitch Note transposition
* @param velocity Velocity increment
* @param port MIDI port number
* @param selected track is selected
* @param muted track is muted
* @param loop track loop enabled
*/
void signalOVENewTrack(const QString& name, int track, int channel,
int pitch, int velocity, int port, bool selected, bool muted, bool loop);
/**
* Emitted after reading a track patch chunk
*
* @param track track number
* @param channel MIDI Channel
* @param patch
*/
void signalOVETrackPatch(int track, int channel, int patch);
/**
* Emitted after reading a track bank chunk
*
* @param track track number
* @param channel MIDI Channel
* @param bank
*/
void signalOVETrackBank(int track, int channel, int bank);
/**
* Emitted after reading a track volume chunk.
*
* @param track track number
* @param channel MIDI Channel
* @param vol initial volume
*/
void signalOVETrackVol(int track, int channel, int vol);
/**
* Emitted after reading a chord diagram chunk.
*
* @param track track number
* @param tick event time in ticks
* @param name chord name
* @param data chord data definition (not decoded)
*/
void signalOVEChord(int track, long tick, const QString& name, const QByteArray& data);
/**
* Emitted after reading an expression indication (notation) chunk.
*
* @param track track number
* @param time event time in ticks
* @param code expression event code
* @param text expression text
*/
void signalOVEExpression(int track, long time, int code, const QString& text);
private:
void convertSong();
void convertSignatures();
void convertTrackHeader(OVE::Track* track, int trackNo);
void convertMeasure(
OVE::Track* track,
int trackNo,
const QList<OVE::Voice*>& voices,
OVE::Measure* measure,
OVE::MeasureData* measureData,
int transpose,
int offsetTick);
void convertNotes(int trackNo, int measureTick, OVE::NoteContainer* container, int channel, int pitchShift);
private:
class QOvePrivate;
QOvePrivate* d;
};
} // namespace drumstick
/** @} */
#endif // DRUMSTICK_OVE_H
|