/[svn]/liblscp/trunk/src/client.c
ViewVC logotype

Diff of /liblscp/trunk/src/client.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1031 by capela, Mon Jan 15 11:08:28 2007 UTC revision 1665 by schoenebeck, Mon Feb 4 13:02:30 2008 UTC
# Line 2  Line 2 
2  //  //
3  /****************************************************************************  /****************************************************************************
4     liblscp - LinuxSampler Control Protocol API     liblscp - LinuxSampler Control Protocol API
5     Copyright (C) 2004-2007, rncbc aka Rui Nuno Capela. All rights reserved.     Copyright (C) 2004-2008, rncbc aka Rui Nuno Capela. All rights reserved.
6    
7     This library is free software; you can redistribute it and/or     This library is free software; you can redistribute it and/or
8     modify it under the terms of the GNU Lesser General Public     modify it under the terms of the GNU Lesser General Public
# Line 2051  lscp_fxsend_info_t *lscp_get_fxsend_info Line 2051  lscp_fxsend_info_t *lscp_get_fxsend_info
2051          return pFxSendInfo;          return pFxSendInfo;
2052  }  }
2053    
2054    /**
2055     *  Alter effect send's name:
2056     *  @code
2057     *  SET FX_SEND NAME <sampler-chan> <fx-send-id> <name>
2058     *  @endcode
2059     *
2060     *  @param pClient          Pointer to client instance structure.
2061     *  @param iSamplerChannel  Sampler channel number.
2062     *  @param iFxSend          Effect send number.
2063     *  @param pszFxName        Effect send's new name.
2064     *
2065     *  @returns LSCP_OK on success, LSCP_FAILED otherwise.
2066     */
2067    lscp_status_t lscp_set_fxsend_name ( lscp_client_t *pClient, int iSamplerChannel, int iFxSend, const char *pszFxName )
2068    {
2069            char szQuery[LSCP_BUFSIZ];
2070    
2071            if (!pClient || iSamplerChannel < 0 || iFxSend < 0 || !pszFxName)
2072                    return LSCP_FAILED;
2073    
2074            snprintf(szQuery, LSCP_BUFSIZ, "SET FX_SEND NAME %d %d %s\r\n", iSamplerChannel, iFxSend, pszFxName);
2075            return lscp_client_query(pClient, szQuery);
2076    }
2077    
2078  /**  /**
2079   *  Alter effect send's audio routing:   *  Alter effect send's audio routing:
# Line 2096  lscp_status_t lscp_set_fxsend_midi_contr Line 2119  lscp_status_t lscp_set_fxsend_midi_contr
2119          if (iSamplerChannel < 0 || iFxSend < 0 || iMidiController < 0 || iMidiController > 127)          if (iSamplerChannel < 0 || iFxSend < 0 || iMidiController < 0 || iMidiController > 127)
2120                  return LSCP_FAILED;                  return LSCP_FAILED;
2121    
2122          sprintf(szQuery, "SET FX_SEND MIDI_CONTROLLER %d %d %d %d\r\n", iSamplerChannel, iFxSend, iMidiController);          sprintf(szQuery, "SET FX_SEND MIDI_CONTROLLER %d %d %d\r\n", iSamplerChannel, iFxSend, iMidiController);
2123          return lscp_client_query(pClient, szQuery);          return lscp_client_query(pClient, szQuery);
2124  }  }
2125    
# Line 2119  lscp_status_t lscp_set_fxsend_level ( ls Line 2142  lscp_status_t lscp_set_fxsend_level ( ls
2142          if (iSamplerChannel < 0 || iFxSend < 0 || fLevel < 0.0f)          if (iSamplerChannel < 0 || iFxSend < 0 || fLevel < 0.0f)
2143                  return LSCP_FAILED;                  return LSCP_FAILED;
2144    
2145          sprintf(szQuery, "SET FX_SEND LEVEL %d %d %d %g\r\n", iSamplerChannel, iFxSend, fLevel);          sprintf(szQuery, "SET FX_SEND LEVEL %d %d %f\r\n", iSamplerChannel, iFxSend, fLevel);
2146          return lscp_client_query(pClient, szQuery);          return lscp_client_query(pClient, szQuery);
2147  }  }
2148    
# Line 2627  lscp_status_t lscp_clear_midi_instrument Line 2650  lscp_status_t lscp_clear_midi_instrument
2650    
2651          return lscp_client_query(pClient, szQuery);          return lscp_client_query(pClient, szQuery);
2652  }  }
2653    
2654    /**
2655     * Open an instrument editor application for the instrument
2656     * on the given sampler channel:
2657     * EDIT CHANNEL INSTRUMENT <sampler-channel>
2658     *
2659     * @param pClient         Pointer to client instance structure.
2660     * @param iSamplerChannel Sampler Channel.
2661     *
2662     * @returns LSCP_OK on success, LSCP_FAILED otherwise.
2663     */
2664    lscp_status_t lscp_edit_channel_instrument ( lscp_client_t *pClient, int iSamplerChannel )
2665    {
2666            char szQuery[LSCP_BUFSIZ];
2667    
2668            if (iSamplerChannel < 0)
2669                    return LSCP_FAILED;
2670    
2671            sprintf(szQuery, "EDIT CHANNEL INSTRUMENT %d\r\n", iSamplerChannel);
2672    
2673            return lscp_client_query(pClient, szQuery);
2674    }
2675    
2676    
2677  // end of client.c  // end of client.c

Legend:
Removed from v.1031  
changed lines
  Added in v.1665

  ViewVC Help
Powered by ViewVC