]> Shamusworld >> Repos - ardour-manual/blob - include/osc58-querying-ardour.html
update supported format page
[ardour-manual] / include / osc58-querying-ardour.html
1
2 <p>
3   In order to make a custom controller that knows what strips Ardour
4   has, the controller needs to be able to query Ardour for that
5   information. These set of commands are for smarter control surfaces
6   That have the logic to figure out what to do with the information.
7   These are not of value for mapped controllers like touchOSC and
8   friends. The controller will need to send these queries to Ardour
9   as often as it needs this information. It may well make sense to use
10   regular feedback for things that need to be updated often such as
11   position or metering.
12   Here are the commands used to query Ardour: (added in Ardour 5.5)
13 </p>
14
15 <table class="dl">
16   <tr><th><kbd class="osc">/strip/list</kbd></th>
17   <td>Ask for a list of strips</td></tr>
18   <tr><th><kbd class="osc">/strip/sends <em>ssid</em></kbd></th>
19   <td>Asks for a list of sends on the strip <em>ssid</em></td></tr>
20   <tr><th><kbd class="osc">/strip/receives <em>ssid</em></kbd></th>
21   <td>Asks for a list of tracks that have sends to the strip <em>ssid</em> points to</td></tr>
22   <tr><th><kbd class="osc">/strip/plugin/list <em>ssid</em></kbd></th>
23   <td>Asks for a list of plug-ins for strip <em>ssid.</em></td></tr>
24   <tr><th><kbd class="osc">/strip/plugin/descriptor <em>ssid</em> <em>piid</em></kbd></th>
25   <td>Asks for a list of descriptors for plug-in <em>piid</em> on strip <em>ssid</em></td></tr>
26   <tr><th><kbd class="osc">/set_surface</kbd></th>
27   <td>Ask for the current surface setting. Reply is in the same form as setting the surface would be.</td></tr>
28   <tr><th><kbd class="osc">/surface/list</kbd></th>
29   <td>Print a list of known surfaces and Link Sets to the log window.</td></tr>
30 </table>
31
32 <h3>A list of strips</h3>
33
34 <p>
35   <code>/strip/list</code> asks Ardour for a list of strips that the
36   current session has. Ardour replies with a message for each
37   strip with the following information:
38   <ul>
39     <li>Strip type - One of:</li>
40     <ul>
41                 <li>AT - Audio Track</li>
42                 <li>MT - MIDI Track</li>
43                 <li>B - Audio Bus</li>
44                 <li>MB - MIDI bus</li>
45                 <li>FB - Foldback bus</li>
46                 <li>V - VCA</li>
47     </ul>
48     <li>Strip name</li>
49     <li>Number of inputs</li>
50     <li>Number of outputs</li>
51     <li>Muted</li>
52     <li>Soloed</li>
53     <li>Ssid (strip number)</li>
54     <li>Record enabled</li>
55   </ul>
56   After all the strip messages have been sent, one final message is
57   sent with:
58   <ul>
59     <li>The text <code>end_route_list</code></li>
60     <li>The session frame rate</li>
61     <li>The last frame number of the session</li>
62     <li>Monitor section present</li>
63   </ul>
64 </p>
65 <p class="note">
66         The <code>/set_surface</code> should be set before this is called. That way
67         The right set of strips will be sent in return (though the default is good
68         for most uses) and feedback will start correctly.
69 </p>
70 <p>
71   If the surface is using <code>/strip/list</code>, the surface needs to know
72   if the strips have changed. This would be true if a strip gets moved, created or
73   deleted. When this happens Ardour sends <code>/strip/list</code> to the surfaces
74   that have previously requested a <code>/strip/list</code>. This lets the
75   surface know that its list of strips is no longer valid.
76 </p>
77 <p class="note">A bus will not have a record enable and so a bus message
78   will have one less parameter than a track. It is the controllers
79   responsibility to deal with this.
80 </p>
81
82 <h3>A list of sends</h3>
83 <p>
84   <code>/strip/sends <em>ssid</em></code> asks Ardour for a list of
85   sends for strip number ssid. The reply is sent back to the
86   controller as one message with the following information:
87   <ul>
88     <li>Ssid that information is for</li>
89     <li>Each send's information:</li>
90     <ul>
91       <li>The send's target bus ssid</li>
92       <li>The send's target bus name</li>
93       <li>The send id for this strip</li>
94       <li>The send gain as a fader position</li>
95       <li>The Send's enable state</li>
96     </ul>
97   </ul>
98 </p>
99 <p>
100   The controller can tell how many sends there are from the number of
101   parameters as each send has 5 parameters and there is one extra for
102   ssid.
103 </p>
104
105 <h3>A list if tracks that send audio to a bus</h3>
106 <p>
107   <code>/strip/receives <em>ssid</em></code> will return a list of
108   tracks that have sends to the bus at the ssid. The reply will
109   contain the following information for each track connected to this
110   bus:
111   <ul>
112     <li>The ssid of the track sending</li>
113     <li>The name of the sending track</li>
114     <li>The id of the send at that track</li>
115     <li>It's gain in fader position</li>
116     <li>The send's enable state</li>
117   </ul>
118 </p>
119
120 <h3>A list of plug-ins for strip</h3>
121 <p>
122   <code>/strip/plugin/list <em>ssid</em></code> will return a list of
123   plug-ins that strip ssid has. The reply will contain the following
124   information:
125   <ul>
126     <li>Ssid that information is for</li>
127     <li>Each plugin's information:</li>
128     <ul>
129       <li>The plug-in's id</li>
130       <li>The plug-in's name</li>
131     </ul>
132   </ul>
133 </p>
134
135 <h3>A list of a plug-in's parameters</h3>
136 <p>
137   <code>/strip/plugin/descriptor <em>ssid</em> <em>piid</em></code> will
138   return the plug-in parameters for ppid plug-in on the ssid strip. The
139   reply will be sent as a number of messages, one for each parameter.
140   Each message will contain the following information:
141   <ul>
142     <li>Ssid of the strip the plug-in is in</li>
143     <li>The plug-in id for the plug-in</li>
144     <li>The plug-in parameter id for the plug-in</li>
145     <li>The plug-in parameter's name</li>
146     <li>Information about that parameter:</li>
147     <ul>
148       <li>A bitset of flags (see below)</li>
149       <li>Data type</li>
150       <li>Minimum value</li>
151       <li>Maximum value</li>
152       <li>The number of scale points</li>
153       <li>zero or more scale points of one value and one string each</li>
154       <li>The current parameter value</li>
155     </ul>
156   </ul>
157 </p>
158 <p>
159         After all the parameters have been sent this way, one final message"
160         <code>/strip/plugin/descriptor_end</code> is sent with these parameters:
161         <ul>
162           <li>Ssid of the strip the plugin is in</li>
163           <li>The plug-in id for the plug-in</li>
164         </ul>
165 </p>
166 <p>
167   The flag bitset above has been defined as (from lsb):
168   <ul>
169     <li>0&mdash;enumeration</li>
170     <li>1&mdash;integer step</li>
171     <li>2&mdash;logarithmic</li>
172     <li>5&mdash;sample rate dependent</li>
173     <li>6&mdash;toggled</li>
174     <li>7&mdash;controllable</li>
175     <li>8&mdash;hidden</li>
176   </ul>
177   Bits 3 and 4 are not used, they were max unbound and min unbound in
178   previous versions and always zero.
179 </p>
180 <p>
181         While this seems complex, it is really not that bad. Minimum,
182         maximum and value will in most cases give you all you need. For simpler
183         access to plug-ins, the /select/plugin/ set of commands will handle most
184         needs.
185 </p>
186 <h3>Obtaining a list of surfaces Ardour knows about</h3>
187 <p>
188         Ardour can work with more than one OSC control surface at a time.
189         Sometimes it is useful to know the information stored about all
190         surfaces. Sending <code>/surface/list</code> from any surface or selecting:
191         <kbd class="menu">Print surface information to Log window</kbd> from
192         the <kbd class="menu">Debug</kbd> dropdown in the OSC setup dialog,
193         will list all the information Ardour uses to calculate the feedback
194         it sends. The Log window can be opened from the menu with
195         <kbd class="option">Window &gt; Log</kbd>.
196         This would be useful information to include with any OSC
197         related Bug report. The output is printed in this format:
198 </p>
199 <p>
200 <img alt="Surface Output"
201      src="/images/osc-surface-log.png">
202 </p>
203