]>
code.delx.au - virtualtones/blob - stringinstrument.h
8e5b485441587a1dafc3401eedd3780b734e2a22
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
14 #include "instrument.h"
18 class StringInstrument
: public Instrument
22 StringInstrument(QWidget
*parent
);
29 QString
generateHelp();
30 void paintEvent(QPaintEvent
*);
31 void keyPressEvent(QKeyEvent
*);
32 void keyReleaseEvent(QKeyEvent
*);
35 void zeroArray(bool array
[4][4]);
36 void zeroArray(bool array
[4]);
37 void zeroArray(int array
[4]);
38 virtual void setNotes(int array
[4])=0; // Set the base string notes
39 void copyArray(int source
[4], int dest
[4]);
43 // down[1][3] == true, means that when the D string is bowed, G will be played
44 // First dimension is the string, second is the modifier
46 // Fudge keys. They're at the beginning of each string and do not play a note by themself
47 // downFudge[0] is '~', [1] is tab, etc.. They allow access to sharps
50 // bow[1][4] == true means that the D string will be bowed at the highest volume
51 // First dimension is the string to be bowed, second is the volume
54 // Base notes for each string
57 // The volumes and notes to play for each string
65 class ViolinInstrument
: public StringInstrument
68 ViolinInstrument(QWidget
*parent
);
69 ~ViolinInstrument() {};
71 void setNotes(int array
[4]);
75 class ViolaInstrument
: public StringInstrument
78 ViolaInstrument(QWidget
*parent
);
79 ~ViolaInstrument() {};
81 void setNotes(int array
[4]);
85 class CelloInstrument
: public StringInstrument
88 CelloInstrument(QWidget
*parent
);
89 ~CelloInstrument() {};
91 void setNotes(int array
[4]);
95 class ContrabassInstrument
: public StringInstrument
98 ContrabassInstrument(QWidget
*parent
);
99 ~ContrabassInstrument() {};
101 void setNotes(int array
[4]);