]>
code.delx.au - virtualtones/blob - instrument.h
1 // instrument.h - An instrument widget
2 // Written by James Bunton <james@delx.net.au>
3 // Licensed under the GPL, see COPYING.txt for more details
13 #include <qmessagebox.h>
17 #define setPaletteBackgroundPixmap setBackgroundPixmap
21 class Instrument
: public QWidget
25 Instrument(QWidget
*parent
);
28 bool setNoteStart(int note
);
32 void setStartOctave(int octave
); // Middle C is in octave 5
36 virtual QString
generateHelp()=0;
37 void focusOutEvent(QFocusEvent
*);
38 bool event(QEvent
*e
);
39 QString
midi2string(int num
);
40 bool checkSharp(int num
);
44 // The base midi notes
47 // Make the function pure virtual
48 virtual void emitSounds()=0;
51 void playNote(int, int, int); // Note number, volume, length
52 void stopNote(int); // Note number