Browse Subversion Repository
Annotation of /trunk/echoes/EchoesStyleGenerator.h
Parent Directory
| Revision Log
Revision 101 -
( hide annotations)
( download)
( as text)
Fri Feb 1 01:09:56 2013 UTC
(11 years, 2 months ago)
by haruneko24
File MIME type: text/x-chdr
File size: 1712 byte(s)
| 1 |
haruneko24 |
67 |
#ifndef ECHOESSTYLEGENERATOR_H |
| 2 |
|
|
#define ECHOESSTYLEGENERATOR_H |
| 3 |
|
|
|
| 4 |
haruneko24 |
68 |
#include <QList> |
| 5 |
haruneko24 |
99 |
#include <QVector> |
| 6 |
haruneko24 |
67 |
|
| 7 |
|
|
#include "AbstractStyleGenerator.h" |
| 8 |
|
|
#include "EchoesPhrase.h" |
| 9 |
|
|
|
| 10 |
|
|
namespace stand |
| 11 |
|
|
{ |
| 12 |
|
|
namespace model |
| 13 |
|
|
{ |
| 14 |
haruneko24 |
99 |
class ControlItem; |
| 15 |
haruneko24 |
67 |
} |
| 16 |
haruneko24 |
99 |
namespace utility |
| 17 |
|
|
{ |
| 18 |
|
|
namespace envelope |
| 19 |
|
|
{ |
| 20 |
|
|
class Envelope; |
| 21 |
|
|
} |
| 22 |
|
|
} |
| 23 |
haruneko24 |
67 |
namespace echoes |
| 24 |
|
|
{ |
| 25 |
|
|
|
| 26 |
|
|
class EchoesStyleModel; |
| 27 |
haruneko24 |
99 |
class EchoesSegment; |
| 28 |
haruneko24 |
67 |
|
| 29 |
|
|
class EchoesStyleGenerator : public AbstractStyleGenerator |
| 30 |
|
|
{ |
| 31 |
|
|
public: |
| 32 |
|
|
explicit EchoesStyleGenerator(EchoesStyleModel *style = 0); |
| 33 |
|
|
virtual ~EchoesStyleGenerator(); |
| 34 |
|
|
|
| 35 |
haruneko24 |
70 |
virtual stand::view::helper::ControlCommand *styleCommand(stand::model::SequenceModel *sequence, int trackId, int tickBegin, int tickEnd, int tickResolution, double msFramePeriod); |
| 36 |
haruneko24 |
67 |
|
| 37 |
|
|
EchoesStyleModel *style(); |
| 38 |
|
|
void setStyle(EchoesStyleModel *style); |
| 39 |
|
|
|
| 40 |
haruneko24 |
99 |
private: // private methods. |
| 41 |
haruneko24 |
101 |
struct _Data |
| 42 |
haruneko24 |
99 |
{ |
| 43 |
haruneko24 |
101 |
QPair<EchoesNote, EchoesNote> target; |
| 44 |
|
|
QPair<EchoesNote, EchoesNote> source; |
| 45 |
|
|
int frontNote; |
| 46 |
|
|
int diffNote; |
| 47 |
|
|
const stand::utility::envelope::Envelope *pitch; |
| 48 |
|
|
const stand::utility::envelope::Envelope *volume; |
| 49 |
haruneko24 |
99 |
}; |
| 50 |
haruneko24 |
101 |
stand::view::helper::ControlCommand *_calculatePhrase(const EchoesPhrase &phrase, const EchoesSegment &source, stand::model::SequenceModel *sequence, int trackId, int tickResolution, double framePeriod, stand::view::helper::ControlCommand *parent); |
| 51 |
|
|
void _morph(stand::view::helper::ControlCommand *pitch, stand::view::helper::ControlCommand *volume, QList<_Data> &data, int tickResolution, double framePeriod, stand::model::SequenceModel * sequence); |
| 52 |
haruneko24 |
99 |
private: // private members. |
| 53 |
haruneko24 |
67 |
EchoesStyleModel *_style; |
| 54 |
haruneko24 |
101 |
|
| 55 |
haruneko24 |
67 |
}; |
| 56 |
|
|
|
| 57 |
|
|
} |
| 58 |
|
|
} |
| 59 |
|
|
|
| 60 |
|
|
#endif // ECHOESSTYLEGENERATOR_H |
| |