Collection of tools useful for audio production
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

71 lines
1.7KB

  1. /*
  2. * Carla bridge code
  3. * Copyright (C) 2011-2012 Filipe Coelho <falktx@gmail.com>
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation; either version 2 of the License, or
  8. * any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * For a full copy of the GNU General Public License see the COPYING file
  16. */
  17. #ifndef CARLA_BRIDGE_H
  18. #define CARLA_BRIDGE_H
  19. #include "carla_includes.h"
  20. #define CARLA_BRIDGE_START_NAMESPACE namespace CarlaBridge {
  21. #define CARLA_BRIDGE_END_NAMESPACE }
  22. CARLA_BRIDGE_START_NAMESPACE
  23. /*!
  24. * @defgroup CarlaBridgeAPI Carla Bridge API
  25. *
  26. * The Carla Bridge API
  27. * @{
  28. */
  29. #define MAX_BRIDGE_MESSAGES 256 //!< Maximum number of messages per client
  30. enum MessageType {
  31. MESSAGE_NULL = 0,
  32. MESSAGE_PARAMETER = 1, // index, 0, value
  33. MESSAGE_PROGRAM = 2, // index, 0, 0
  34. MESSAGE_MIDI_PROGRAM = 3, // bank, program, 0
  35. MESSAGE_NOTE_ON = 4, // note, velocity, 0
  36. MESSAGE_NOTE_OFF = 5, // note, 0, 0
  37. MESSAGE_SHOW_GUI = 6, // show, 0, 0
  38. MESSAGE_RESIZE_GUI = 7, // width, height, 0
  39. MESSAGE_SAVE_NOW = 8,
  40. MESSAGE_QUIT = 9
  41. };
  42. struct Message {
  43. MessageType type;
  44. int value1;
  45. int value2;
  46. double value3;
  47. Message()
  48. : type(MESSAGE_NULL),
  49. value1(0),
  50. value2(0),
  51. value3(0.0) {}
  52. };
  53. /**@}*/
  54. class CarlaBridgeClient;
  55. class CarlaBridgeToolkit;
  56. CARLA_BRIDGE_END_NAMESPACE
  57. #endif // CARLA_BRIDGE_H