]>
code.delx.au - virtualtones/blob - stringinstrument.h
e88d29f332276799e769c3683a53cebf287cb501
1 // stringinstrument.h - A stringed instrument simulator
2 // Written by James Bunton <james@delx.cjb.net>
3 // Licensed under the GPL, see COPYING.txt for more details
6 #ifndef STRINGINSTRUMENT_H
7 #define STRINGINSTRUMENT_H
13 #include "instrument.h"
17 class StringInstrument
: public Instrument
21 StringInstrument(QWidget
*parent
);
25 QString
generateHelp();
26 void paintEvent(QPaintEvent
*);
27 void keyPressEvent(QKeyEvent
*);
28 void keyReleaseEvent(QKeyEvent
*);
31 void zeroArray(bool array
[4][4]);
32 void zeroArray(bool array
[4]);
33 void zeroArray(int array
[4]);
34 virtual void setNotes(int array
[4])=0; // Set the base string notes
35 void copyArray(int source
[4], int dest
[4]);
40 // down[1][3] == true, means that when the D string is bowed, G will be played
41 // First dimension is the string, second is the modifier
43 // Fudge keys. They're at the beginning of each string and do not play a note by themself
44 // downFudge[0] is '~', [1] is tab, etc.. They allow access to sharps
47 // bow[1][4] == true means that the D string will be bowed at the highest volume
48 // First dimension is the string to be bowed, second is the volume
51 // Base notes for each string
54 // The volumes and notes to play for each string
62 class ViolinInstrument
: public StringInstrument
65 ViolinInstrument(QWidget
*parent
);
66 ~ViolinInstrument() {};
68 void setNotes(int array
[4]);
72 class ViolaInstrument
: public StringInstrument
75 ViolaInstrument(QWidget
*parent
);
76 ~ViolaInstrument() {};
78 void setNotes(int array
[4]);
82 class CelloInstrument
: public StringInstrument
85 CelloInstrument(QWidget
*parent
);
86 ~CelloInstrument() {};
88 void setNotes(int array
[4]);
92 class ContrabassInstrument
: public StringInstrument
95 ContrabassInstrument(QWidget
*parent
);
96 ~ContrabassInstrument() {};
98 void setNotes(int array
[4]);