Develop and Download Open Source Software

Browse Subversion Repository

Contents of /trunk/echoes/EchoesStyleGenerator.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 101 - (show annotations) (download) (as text)
Fri Feb 1 01:09:56 2013 UTC (11 years, 1 month ago) by haruneko24
File MIME type: text/x-chdr
File size: 1712 byte(s)


1 #ifndef ECHOESSTYLEGENERATOR_H
2 #define ECHOESSTYLEGENERATOR_H
3
4 #include <QList>
5 #include <QVector>
6
7 #include "AbstractStyleGenerator.h"
8 #include "EchoesPhrase.h"
9
10 namespace stand
11 {
12 namespace model
13 {
14 class ControlItem;
15 }
16 namespace utility
17 {
18 namespace envelope
19 {
20 class Envelope;
21 }
22 }
23 namespace echoes
24 {
25
26 class EchoesStyleModel;
27 class EchoesSegment;
28
29 class EchoesStyleGenerator : public AbstractStyleGenerator
30 {
31 public:
32 explicit EchoesStyleGenerator(EchoesStyleModel *style = 0);
33 virtual ~EchoesStyleGenerator();
34
35 virtual stand::view::helper::ControlCommand *styleCommand(stand::model::SequenceModel *sequence, int trackId, int tickBegin, int tickEnd, int tickResolution, double msFramePeriod);
36
37 EchoesStyleModel *style();
38 void setStyle(EchoesStyleModel *style);
39
40 private: // private methods.
41 struct _Data
42 {
43 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 };
50 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 private: // private members.
53 EchoesStyleModel *_style;
54
55 };
56
57 }
58 }
59
60 #endif // ECHOESSTYLEGENERATOR_H

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26