--- qsampler/trunk/src/qsamplerChannel.h 2004/11/19 10:18:59 303 +++ qsampler/trunk/src/qsamplerChannel.h 2005/02/17 17:27:59 388 @@ -1,7 +1,7 @@ // qsamplerChannel.h // /**************************************************************************** - Copyright (C) 2003-2004, rncbc aka Rui Nuno Capela. All rights reserved. + Copyright (C) 2003-2005, rncbc aka Rui Nuno Capela. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License @@ -69,9 +69,12 @@ // Instrument file and index. QString& instrumentFile(); int instrumentNr(); + QString& instrumentName(); int instrumentStatus(); bool loadInstrument(const QString& sInstrumentFile, int iInstrumentNr); - + // Special instrument file/name/number settler. + bool setInstrument(const QString& sInstrumentFile, int iInstrumentNr); + // MIDI input driver (DEPRECATED). QString& midiDriver(); bool setMidiDriver(const QString& sMidiDriver); @@ -100,6 +103,9 @@ float volume(); bool setVolume(float fVolume); + // Istrument name remapper. + void updateInstrumentName(); + // Channel info structure map executive. bool updateChannelInfo(); @@ -119,9 +125,18 @@ // Context menu event handler. void contextMenuEvent(QContextMenuEvent *pEvent); + // Common (invalid) name-helpers. + static QString noEngineName(); + static QString noInstrumentName(); + + // Check whether a given file is an instrument file. + static bool isInstrumentFile (const QString& sInstrumentFile); + // Retrieve the available instrument name(s) of an instrument file (.gig). - static QString getInstrumentName (const QString& sInstrumentFile, int iInstrumentNr); - static QStringList getInstrumentList (const QString& sInstrumentFile); + static QString getInstrumentName (const QString& sInstrumentFile, + int iInstrumentNr, bool bInstrumentNames); + static QStringList getInstrumentList (const QString& sInstrumentFile, + bool bInstrumentNames); private: @@ -133,6 +148,7 @@ // Sampler channel info map. QString m_sEngineName; + QString m_sInstrumentName; QString m_sInstrumentFile; int m_iInstrumentNr; int m_iInstrumentStatus;