Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

[c5c04b]: plugins / addsynth / module.h Maximize Restore History

Download this file

module.h    125 lines (97 with data), 2.5 kB

  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
#include "libgui/Dialog.h"
#include "libgui/Slider.h"
#include "libkwave/DialogOperation.h"
class Signal;
class TimeLine;
class Curve;
class KIntegerLine;
class ScaleWidget;
class CornerPatchWidget;
class QLabel;
class QComboBox;
//*****************************************************************************
class AddSynthWidget : public QWidget {
Q_OBJECT
public:
AddSynthWidget (QWidget *parent = 0);
~AddSynthWidget ();
void setSines (int, int *, int*, int *);
public slots:
void setFunction (int);
signals:
protected:
void paintEvent(QPaintEvent *);
private:
int func;
int *power;
int *phase;
int *mult;
int count;
};
//***********************************************************************
class AddSynthDialog : public Dialog {
Q_OBJECT
public:
AddSynthDialog (int, int, bool);
~AddSynthDialog ();
const char *getCommand ();
Signal *getSignal();
public slots:
void setChannels (const char *);
void getFrequency();
void showPower (const char *);
void showPower (int);
void showPhase (const char *);
void showPhase (int);
void showMult (const char *);
void showMult (int);
void popMenu ();
void oddMult ();
void evenMult ();
void primeMult ();
void zeroPhase ();
void sinusPhase ();
void negatePhase ();
void enumerateMult ();
void randomizePower ();
void randomizePhase ();
void fibonacciMult ();
void invertPower ();
void sinusPower ();
void maxPower ();
void dbPower ();
protected:
void mousePressEvent( QMouseEvent *e);
void updateView ();
bool getNSlider (int, bool);
void resizeEvent (QResizeEvent *);
int getCount(); //get number of partials
private:
Dialog *sweep;
Curve *times;
AddSynthWidget *view;
ScaleWidget *x, *y;
CornerPatchWidget *corner;
KIntegerLine **mult;
KIntegerLine **powerlabel;
KIntegerLine **phaselabel;
Slider **power;
Slider **phase;
KIntegerLine *channel;
QLabel *channellabel;
QPushButton *freqbutton;
QPushButton *calculate;
Signal *test; //for hearing not yet done...
QComboBox *functype;
QPopupMenu* menu;
QLabel *phaselab;
QLabel *powerlab;
QLabel *multlab;
QPushButton *ok, *cancel;
int *apower, *aphase, *amult;
int num; //number of sines
int rate; //sampling rate
char *command;
bool tflag; //flag if typing in integerline
}
;