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.

151 lines
3.6KB

  1. #ifndef TSEXTERNALCONTROLMESSAGE_HPP
  2. #define TSEXTERNALCONTROLMESSAGE_HPP
  3. //-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
  4. // External (from Rack) Control message.
  5. // Currently this will be for OSC but may be from MIDI or anything else in the future.
  6. //-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
  7. struct TSExternalControlMessage {
  8. // External source of a control message (i.e. OSC).
  9. // Currently only OSC
  10. enum MessageSource {
  11. // OSC: Open Sound Control
  12. OSC = 1
  13. };
  14. // Message Type / Action to do. Currently enumerated for our sequencers.
  15. enum MessageType {
  16. // Set Play State
  17. // /play/state
  18. // Parameters: int value
  19. SetPlayRunningState,
  20. // Toggle Play/Pause
  21. // /play/state/tog
  22. // Parameters: -NONE-
  23. TogglePlayRunningState,
  24. // Reset
  25. // /play/reset
  26. // Parameters: -NONE-
  27. SetPlayReset,
  28. // Change Playing Pattern
  29. // /play/pat
  30. // Parameters: int pattern
  31. SetPlayPattern,
  32. // Store Play Pattern
  33. // /play/pat/sav
  34. // Parameters: int pattern
  35. StorePlayPattern,
  36. // Set BPM
  37. // /play/bpm
  38. // Parameters: int bpm
  39. SetPlayBPM,
  40. // Add to BPM
  41. // /play/bpm/add
  42. // Parameters: int addBPM
  43. AddPlayBPM,
  44. // Store BPM
  45. // /play/bpm/sav
  46. // Parameters: int bpm
  47. StorePlayBPM,
  48. // Set Tempo (0-1)
  49. // /play/tempo
  50. // Parameters: float tempo
  51. SetPlayTempo,
  52. // Add to Tempo (0-1)
  53. // /play/tempo/add
  54. // Parameters: float addTempo
  55. AddPlayTempo,
  56. // Set BPM Note
  57. // /play/bpmnote
  58. // Parameters: int divisorId
  59. SetPlayBPMNote,
  60. // Add to the BPM Note Index (selection)
  61. // /play/bpmnote/add
  62. // Parameters: int addIx
  63. AddPlayBPMNote,
  64. // Change Step Length
  65. // /play/len
  66. // Parameters: int step
  67. SetPlayLength,
  68. // Store Step Length
  69. // /play/len/sav
  70. // Parameters: int pattern
  71. StorePlayLength,
  72. // Set Ouput Mode (TRIG, RTRIG, GATE) or (VOLT, NOTE, PATT)
  73. // /play/omode
  74. // Parameters: int modeId
  75. SetPlayOutputMode,
  76. // Change Edit Pattern
  77. // /edit/pat
  78. // Parameters: int pattern
  79. SetEditPattern,
  80. // Change Edit Channel
  81. // /edit/ch
  82. // Parameters: int channel
  83. SetEditChannel,
  84. // Set the Step Value
  85. // /edit/step
  86. // Parameters: int step, float value, (opt) int pattern, (opt) int channel
  87. SetEditStep,
  88. // Set the Step Value (/<step>)
  89. // /edit/step
  90. // Parameters: float value
  91. SetEditStepValue,
  92. // Toggle Edit Step
  93. // /edit/step/tog
  94. // Parameters: int step, (opt) float value, (opt) int pattern, (opt) int channel
  95. ToggleEditStepValue,
  96. // Jump to Step Number (playing)
  97. // /play/step
  98. // Parameters: int step
  99. SetPlayCurrentStep,
  100. // Set Mode (Edit, Performance)
  101. // /play/mode
  102. // Parameters: int mode
  103. SetPlayMode,
  104. // Toggle Mode (Edit, Performance)
  105. // /play/mode/tog
  106. // Parameters: -NONE-
  107. TogglePlayMode,
  108. // Copy Channel
  109. // /edit/ch/cpy
  110. // Parameters: (opt) int channel, (opt) int pattern
  111. CopyEditChannel,
  112. // Copy Pattern
  113. // /edit/pat/cpy
  114. // Parameters: (opt) int pattern
  115. CopyEditPattern,
  116. // Paste
  117. // /edit/clipboard/pst
  118. // Parameters: -NONE-
  119. PasteEditClipboard,
  120. // Randomize Channel Steps
  121. // /edit/step/rnd
  122. // Parameters: -NONE-
  123. RandomizeEditStepValue,
  124. // Initialize the module
  125. // /edit/module/init
  126. // Parameters: -NONE-
  127. InitializeEditModule,
  128. // Total # message types
  129. NUM_MESSAGE_TYPES
  130. };
  131. // The message type / action.
  132. MessageType messageType;
  133. // The message source (i.e. OSC).
  134. MessageSource messageSource;
  135. // Pattern number 0-63
  136. int pattern;
  137. // Channel 0-15
  138. int channel;
  139. // Step number 0-(MaxSteps-1)
  140. int step;
  141. // The mode (or BPM)
  142. int mode;
  143. // The value / mode.
  144. float val;
  145. };
  146. #endif // !TSEXTERNALCONTROLMESSAGE_HPP