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.

73 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. #include <cstdint>
  21. #define CARLA_BRIDGE_START_NAMESPACE namespace CarlaBridge {
  22. #define CARLA_BRIDGE_END_NAMESPACE }
  23. CARLA_BRIDGE_START_NAMESPACE
  24. /*!
  25. * @defgroup CarlaBridgeAPI Carla Bridge API
  26. *
  27. * The Carla Bridge API
  28. * @{
  29. */
  30. #define MAX_BRIDGE_MESSAGES 256 //!< Maximum number of messages per client
  31. enum MessageType {
  32. MESSAGE_NULL = 0,
  33. MESSAGE_PARAMETER, // index, 0, value
  34. MESSAGE_PROGRAM, // index, 0, 0
  35. MESSAGE_MIDI_PROGRAM, // index, 0, 0 | bank, program, 0
  36. MESSAGE_NOTE_ON, // note, velocity, 0
  37. MESSAGE_NOTE_OFF, // note, 0, 0
  38. MESSAGE_SHOW_GUI, // show, 0, 0
  39. MESSAGE_RESIZE_GUI, // width, height, 0
  40. MESSAGE_SAVE_NOW,
  41. MESSAGE_QUIT
  42. };
  43. struct Message {
  44. MessageType type;
  45. int32_t value1;
  46. int32_t value2;
  47. double value3;
  48. Message()
  49. : type(MESSAGE_NULL),
  50. value1(0),
  51. value2(0),
  52. value3(0.0) {}
  53. };
  54. /**@}*/
  55. class CarlaClient;
  56. class CarlaToolkit;
  57. CARLA_BRIDGE_END_NAMESPACE
  58. #endif // CARLA_BRIDGE_H