1
// RCS-ID: $Id: Instrument.h,v 1.3 2006/02/23 19:23:54 cecilios Exp $
2
//--------------------------------------------------------------------------------------
3
// LenMus Phonascus: The teacher of music
4
// Copyright (c) 2002-2006 Cecilio Salmeron
6
// This program is free software; you can redistribute it and/or modify it under the
7
// terms of the GNU General Public License as published by the Free Software Foundation;
8
// either version 2 of the License, or (at your option) any later version.
10
// This program is distributed in the hope that it will be useful, but WITHOUT ANY
11
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12
// PARTICULAR PURPOSE. See the GNU General Public License for more details.
14
// You should have received a copy of the GNU General Public License along with this
15
// program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street,
16
// Fifth Floor, Boston, MA 02110-1301, USA.
18
// For any comment, suggestion or feature request, please contact the manager of
19
// the project at cecilios@users.sourceforge.net
21
//-------------------------------------------------------------------------------------
22
/*! @file Instrument.h
23
@brief Header file for class lmInstrument
30
#ifndef __INSTRUMENT_H__ //to avoid nested includes
31
#define __INSTRUMENT_H__
39
lmInstrument(lmScore* pScore, wxInt32 nNumStaves, wxInt32 nMIDIChannel, wxInt32 nMIDIInstr);
42
//returns lmVStaff number nStaff (1..n)
43
lmVStaff* GetVStaff(wxInt32 nStaff);
45
//Returns the number of VStaves that this lmInstrument has (1..n)
46
inline wxInt32 GetNumStaves() {return (wxInt32)m_cStaves.GetCount(); }
54
int GetMIDIChannel() { return m_nMidiChannel; }
55
int GetMIDIInstrument() { return m_nMidiInstr; }
57
// methods related to MusicXML import/export
58
void XML_SetId(const wxString sId) { m_xmlId = sId; }
59
const wxString XML_GetId() { return m_xmlId; }
62
lmScore *m_pScore; //score to whith this instrument belongs
63
VStavesList m_cStaves; //wxList of VStaves that this instrument has
64
wxString m_sNombre; //instrument name
65
wxString m_sShortName; //name abreviation to use
66
wxInt32 m_nMidiInstr; //num. of MIDI instrument no use for this lmInstrument
67
wxInt32 m_nMidiChannel; //MIDI channel to use
69
// variables related to MusicXML import/export
70
wxString m_xmlId; // part id
73
// declare a list of Instruments class
75
WX_DECLARE_LIST(lmInstrument, InstrumentsList);
79
#endif // __INSTRUMENT_H__