]>
code.delx.au - virtualtones/blob - stringinstrument.h
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
18 #include "instrument.h"
22 class StringInstrument
: public Instrument
26 StringInstrument(QWidget
*parent
);
33 QString
generateHelp();
34 void paintEvent(QPaintEvent
*);
35 void keyPressEvent(QKeyEvent
*);
36 void keyReleaseEvent(QKeyEvent
*);
39 virtual void setNotes(int array
[4])=0; // Set the base string notes
45 // down[1][3] == true, means that when the D string is bowed, G will be played
46 // First dimension is the string, second is the modifier
48 // Fudge keys. They're at the beginning of each string and do not play a note by themself
49 // downFudge[0] is '~', [1] is tab, etc.. They allow access to sharps
52 // bow[1][4] == true means that the D string will be bowed at the highest volume
53 // First dimension is the string to be bowed, second is the volume
56 // Base notes for each string
59 // The volumes and notes to play for each string
67 class ViolinInstrument
: public StringInstrument
70 ViolinInstrument(QWidget
*parent
);
71 ~ViolinInstrument() {};
73 void setNotes(int array
[4]);
77 class ViolaInstrument
: public StringInstrument
80 ViolaInstrument(QWidget
*parent
);
81 ~ViolaInstrument() {};
83 void setNotes(int array
[4]);
87 class CelloInstrument
: public StringInstrument
90 CelloInstrument(QWidget
*parent
);
91 ~CelloInstrument() {};
93 void setNotes(int array
[4]);
97 class ContrabassInstrument
: public StringInstrument
100 ContrabassInstrument(QWidget
*parent
);
101 ~ContrabassInstrument() {};
103 void setNotes(int array
[4]);