--- liblscp/trunk/lscp/client.h 2005/08/16 09:48:42 735 +++ liblscp/trunk/lscp/client.h 2006/11/27 18:33:02 946 @@ -2,7 +2,7 @@ // /**************************************************************************** liblscp - LinuxSampler Control Protocol API - Copyright (C) 2004-2005, rncbc aka Rui Nuno Capela. All rights reserved. + Copyright (C) 2004-2006, rncbc aka Rui Nuno Capela. All rights reserved. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -14,9 +14,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ @@ -96,6 +96,41 @@ } lscp_usage_t; +/** MIDI instrument parameter struct. */ +typedef struct _lscp_midi_instrument_t +{ + int bank_msb; + int bank_lsb; + int program; + +} lscp_midi_instrument_t; + + +/** MIDI instrument load mode. */ +typedef enum _lscp_load_mode_t +{ + LSCP_LOAD_DEFAULT = 0, + LSCP_LOAD_ON_DEMAND, + LSCP_LOAD_ON_DEMAND_HOLD, + LSCP_LOAD_PERSISTENT + +} lscp_load_mode_t; + + +/** MIDI instrument info cache struct. */ +typedef struct _lscp_midi_instrument_info_t +{ + char * name; + char * engine_name; + char * instrument_file; + int instrument_nr; + char * instrument_name; + lscp_load_mode_t load_mode; + float volume; + +} lscp_midi_instrument_info_t; + + //------------------------------------------------------------------------- // Client socket main structure. @@ -186,6 +221,22 @@ lscp_server_info_t * lscp_get_server_info (lscp_client_t *pClient); +int lscp_get_total_voice_count (lscp_client_t *pClient); +int lscp_get_total_voice_count_max (lscp_client_t *pClient); + +//------------------------------------------------------------------------- +// MIDI instrument mapping control functions. + +lscp_status_t lscp_map_midi_instrument (lscp_client_t *pClient, lscp_midi_instrument_t *pMidiInstr, const char *pszEngineName, const char *pszFileName, int iInstrIndex, float fVolume, lscp_load_mode_t load_mode, const char *pszName); +lscp_status_t lscp_unmap_midi_instrument (lscp_client_t *pClient, lscp_midi_instrument_t *pMidiInstr); + +int lscp_get_midi_instruments (lscp_client_t *pClient); + +lscp_midi_instrument_info_t *lscp_get_midi_instrument_info(lscp_client_t *pClient, lscp_midi_instrument_t *pMidiInstr); + +lscp_status_t lscp_clear_midi_instruments (lscp_client_t *pClient); + + #if defined(__cplusplus) } #endif