MuseScore  3.4
Music composition and notation
aeolus.h
Go to the documentation of this file.
1 //=============================================================================
2 // MusE Score
3 // Linux Music Score Editor
4 //
5 // Copyright (C) 2002-2010 Werner Schweer and others
6 //
7 // This program is free software; you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License version 2.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 //=============================================================================
19 
20 #ifndef __AEOLUS_H__
21 #define __AEOLUS_H__
22 
23 #include "stdint.h"
25 #include "synthesizer/midipatch.h"
26 
27 #include "asection.h"
28 #include "division.h"
29 #include "global.h"
30 
31 
32 namespace Ms {
33  struct MidiPatch;
34  class Event;
35  struct ParDescr;
36  }
37 
38 using namespace Ms;
39 
40 class Model;
41 // class M_audio_info;
42 class M_new_divis;
43 class M_ifc_init;
44 
45 //---------------------------------------------------------
46 // Synth
47 //---------------------------------------------------------
48 
49 class Aeolus : public Synthesizer {
50  static const std::vector<ParDescr> pd;
51 
53  QList<MidiPatch*> patchList;
54  uint16_t _midimap [16];
55  int _sc_cmode; // stop control command mode
56  int _sc_group; // stop control group number
57 
58  enum { VOLUME, REVSIZE, REVTIME, STPOSIT };
59 
60  volatile bool _running;
61  int _hold;
62  int _nplay;
63  int _nasect;
64  int _ndivis;
65  Asection* _asectp [NASECT];
66 
67  Division* _divisp [NDIVIS];
68  unsigned char _keymap [NNOTES];
69  float _audiopar[4];
70  float _revsize;
71  float _revtime;
72 
73  int nout;
74  float routb[PERIOD];
75  float loutb[PERIOD];
76 
77  float _fsamp;
78  int _fsize;
79  SyntiParameter *_asectpar [NASECT];
80 
82  uint32_t _ifelms [NGROUP];
83  char _tempstr[64];
84 
85  void proc_synth(int);
86  void cond_key_off (int m, int b);
87  void cond_key_on (int m, int b);
88 
89  void audio_init(int sampleRate);
90  void audio_start();
91 
92  void key_off (int n, int b);
93  void key_on (int n, int b);
94  void newDivis(M_new_divis* X);
95  void proc_queue(uint32_t);
96 
97  virtual void setValue(int idx, double value);
98  virtual double value(int idx) const;
99  const ParDescr* parameter(int idx) const;
100 
101  public:
102  Aeolus();
103  virtual ~Aeolus();
104  virtual void init(float sampleRate);
105 
106  virtual const char* name() const { return "Aeolus"; }
107 
108  virtual void setMasterTuning(double);
109  virtual double masterTuning() const;
110 
111  virtual bool loadSoundFonts(const QStringList&) { return true; }
112  virtual QStringList soundFonts() const { return QStringList(); }
113 
114  virtual void process(unsigned, float*, float*, float*);
115  virtual void play(const PlayEvent&);
116 
117  virtual const QList<MidiPatch*>& getPatchInfo() const;
118 
119  // get/set synthesizer state
120  virtual SynthesizerGroup state() const;
121  virtual void setState(const SynthesizerGroup&);
122 
123  virtual void allSoundsOff(int channel) { allNotesOff(channel); }
124  virtual void allNotesOff(int /*channel*/);
125 
126  virtual SynthesizerGui* gui();
127 
128  friend class Model;
129  };
130 
131 enum {
133  };
134 
135 #endif
136 
137 
int _sc_cmode
Definition: aeolus.h:55
Definition: midipatch.h:29
Definition: aeolus.h:132
Definition: aeolus.h:132
int _sc_group
Definition: aeolus.h:56
Definition: global.h:62
int _nplay
Definition: aeolus.h:62
Definition: model.h:139
virtual const char * name() const
Definition: aeolus.h:106
M_ifc_init * _ifc_init
Definition: aeolus.h:81
Definition: synthesizer.h:41
int _ndivis
Definition: aeolus.h:64
Definition: asection.h:60
virtual QStringList soundFonts() const
Definition: aeolus.h:112
int nout
Definition: aeolus.h:73
int _fsize
Definition: aeolus.h:78
float _fsamp
Definition: aeolus.h:77
virtual void allSoundsOff(int channel)
Definition: aeolus.h:123
Definition: messages.h:146
float _revtime
Definition: aeolus.h:71
QList< MidiPatch * > patchList
Definition: aeolus.h:53
Definition: effect.h:28
volatile bool _running
Definition: aeolus.h:60
Definition: synthesizergui.h:24
Definition: messages.h:109
Definition: global.h:59
Definition: aeolus.cpp:26
Definition: event.h:264
float _revsize
Definition: aeolus.h:70
int _nasect
Definition: aeolus.h:63
Definition: sparm.h:42
Definition: division.h:30
Definition: synthesizerstate.h:40
Definition: aeolus.h:132
Definition: global.h:60
Definition: aeolus.h:49
Definition: aeolus.h:58
static const std::vector< ParDescr > pd
Definition: aeolus.h:50
Model * model
Definition: aeolus.h:52
Definition: aeolus.h:132
Definition: global.h:63
Definition: event.h:219
#define PERIOD
Definition: asection.h:27
virtual bool loadSoundFonts(const QStringList &)
Definition: aeolus.h:111
int _hold
Definition: aeolus.h:61