comparison README.OSC @ 404:4dc48a12fe79

* Add README.OSC from old repo
author Chris Cannam
date Tue, 15 Feb 2011 13:04:01 +0000
parents
children 80eae4eb6cc8
comparison
equal deleted inserted replaced
403:ba928954e640 404:4dc48a12fe79
1
2 OSC control of Sonic Visualiser
3 ===============================
4
5 Sonic Visualiser can be controlled remotely using the Open Sound
6 Control protocol. This facility requires Steve Harris's liblo (Lite
7 OSC) library to have been available when Sonic Visualiser was built.
8
9 Sonic Visualiser opens a single OSC port on startup. The URL of this
10 port is printed to standard output on startup, or can be read from the
11 About box on the Help menu.
12
13 OSC commands accepted by Sonic Visualiser take the form:
14
15 <scheme>://<host>:<port>/<method> [<arg> ...]
16
17 For example, "osc.udp://localhost:12654/play 2.0" will play the
18 current session from time 2.0 seconds.
19
20 Methods that manipulate panes or layers act on the currently selected
21 pane or layer. Use the setcurrent method to choose the right target
22 for subsequent such methods.
23
24 There is a small program sv/osc/sv-osc-send.c that sends an OSC method
25 and arguments to a given URL, and a small shell script sv/osc/sv-command
26 that provides a basic command shell for Sonic Visualiser.
27
28
29 OSC methods available
30 =====================
31
32 Main window methods
33 -------------------
34
35 /open <filename>
36
37 Open a new file (of type determined by Sonic Visualiser).
38 If it is an audio file, use it to replace the existing main
39 audio file (if any).
40
41 /openadditional <filename>
42
43 Open a new file. If it is an audio file, open it in a new
44 pane in addition to the existing audio file (if any).
45
46 /recent <n>
47 /last
48
49 Open the <n>'th most recent file from the Recent Files menu,
50 counting from 1 for the most recent file opened. "last" is a
51 synonym for "recent 1".
52
53 /save <filename>
54
55 Save the current session in <filename> as an SV session file.
56 This action will try to fail rather than overwrite an existing
57 file, but you probably shouldn't rely on that.
58
59 /export <filename>
60
61 Export the (first) selected area of the main audio file
62 (or all of it, if there is no selection) in <filename>, as a
63 WAV file. This action will try to fail rather than overwrite
64 an existing file, but you probably shouldn't rely on that.
65
66 /jump <t>
67 /jump end
68 /jump selection
69
70 Jump the playback position to time <t> (in seconds); or to
71 the end of the file; or to the start of the current selection.
72
73 /play
74 /play <t>
75 /play selection
76
77 Start playback. If a time <t> is given, start from that time
78 in seconds. If the word "selection" is given instead, play
79 the current selection.
80
81 /stop
82
83 Stop playback.
84
85 /loop on
86 /loop off
87
88 Switch playback loop mode on or off.
89
90 /select <t0> <t1>
91 /select all
92 /select none
93
94 Select the region from times <t0> to <t1> in seconds; or select
95 the whole file; or clear the selection. If there is a layer
96 selected that can be used as a snap guide for the selection, then
97 the selection will be snapped to it (in the same manner as when
98 making selections interactively).
99
100 /addselect <t0> <t1>
101
102 Make an additional selection (leaving any existing selection
103 in place) from times <t0> to <t1> in seconds.
104
105 /undo
106 /redo
107
108 Undo the last editing operation; redo the last undone operation.
109 Note that most of the classic editing operations (copy and paste
110 etc) are not controllable via OSC, but undo may still be useful
111 because Sonic Visualiser considers actions such as adding a pane
112 to be undoable editing operations as well.
113
114 /add <layertype>
115 /add <layertype> <channel>
116
117 Add a new pane containing a layer of the given type, based on
118 the main audio file. If no <channel> is specified, use all
119 available channels. Useful <layertype>s are:
120
121 waveform
122 spectrogram
123 spectrum
124 timeruler
125
126 The following <layertype>s are less useful, because they create
127 empty layers which there is currently no OSC support for editing:
128
129 timeinstants
130 timevalues
131 notes
132 text
133 colour3dplot
134
135 /set <control> <value>
136 /set pane <control> <value>
137 /set layer <control> <value>
138
139 Set a main window control; a property of the current pane; or a
140 property of the current layer.
141
142 Accepted main window <control>s are:
143
144 gain
145 whose values are linear multipliers (i.e. 1.0 == unity gain).
146
147 speedup
148 takes a value of a percentage increase in playback
149 speed, so 0 is the default playback speed, 100 sets double
150 the default speed, and -100 sets half the default speed
151 (yes, I know, it's nonsense, sorry).
152
153 overlays
154 controls the verbosity level of the text overlays on
155 each pane, from 0 (everything off) to 2 (everything on).
156
157 zoomwheels
158 controls whether the zoom wheels are displayed (1) or not (0).
159
160 propertyboxes
161 controls whether the property boxes are displayed (1) or not (0).
162
163 For pane and layer properties, the control name is the displayed
164 name of the given property (though you may use "-" or "_" in place
165 of any spaces in the name if it's easier for you). The value may
166 be the displayed value or underlying integer for the property.
167
168 Some examples:
169
170 /set pane Global-Scroll off
171 /set pane Follow_Playback Scroll
172 /set layer Colour Blue
173 /set layer Scale-Units dB
174 /set layer Frequency-Scale Log
175
176 Note that while you can use "-" or "_" in place of spaces in the
177 property name, you cannot currently do so in the value text. If
178 this is a problem for you, you might be able to set the value
179 as an integer instead (all layer properties can be set this way).
180
181 /setcurrent <pane>
182 /setcurrent <pane> <layer>
183
184 Make the given <pane> (a number counting from 1 for the topmost
185 pane) and optionally the given <layer> on that pane (a number
186 counting from 1 for the "frontmost" layer) the current pane and
187 layer for subsequent pane and layer operations.
188
189 /delete pane
190 /delete layer
191
192 Delete the current pane or layer.
193
194 /zoom <level>
195 /zoom in
196 /zoom out
197 /zoom default
198
199 Zoom to a given zoom <level>, given in audio sample frames per
200 pixel; or zoom in or out one step from the current level; or
201 return to the default zoom level. This method acts on the
202 current pane (it only affects all panes if set to Global Zoom,
203 which is the default).
204
205 /zoomvertical <min> <max>
206 /zoomvertical in
207 /zoomvertical out
208 /zoomvertical default
209
210 Change the vertical zoom and origin so as to show the value
211 range from <min> to <max> in the vertical scale; or zoom in or
212 out vertically; or return to the default vertical zoom level.
213 The effect of this method is heavily dependent on the current
214 layer.
215
216 /transform <name>
217
218 Transform the current main audio file using the named transform.
219 Transforms are named according to the scheme
220
221 type:source:plugin:output
222
223 For example, the percussion onset detector from the Vamp example
224 plugin set can be invoked via
225
226 /transform vamp:vamp-example-plugins:percussiononsets:onsets
227
228 If the output is omitted, the first is used. Note that you
229 need to use the plugin and output name, not description: in
230 this case "percussiononsets" rather than "Simple Percussion
231 Onset Detector".
232
233 There is not yet any way to run a transform via OSC on any but
234 the main audio file, nor with any but its default parameters,
235 processing block/step size, or channel selection.
236
237 /resize <w> <h>
238 /resize pane <h>
239
240 Resize the main window to width <w> and height <h> (if the
241 window system permits); resize the current pane to height <h>
242 if possible (!!! not yet working).
243
244 /quit
245
246 Exit the program abruptly without saving.
247
248 Handy things still missing from the OSC interface include:
249
250 * the ability to run transforms with non-default parameters or
251 starting from different source models
252 * the ability to add layers to a pane (without transform)
253 * the ability to add panes (and layers) showing any but the
254 main model
255 * the ability to set play parameters on a layer/model and show/hide it
256 * the ability to set the vertical zoom range (vital for spectrogram)
257 * the ability to import and export layers
258 * a working pane resize
259 * quick shortcuts to Melodic Range Spectrogram, Peak Frequency Spectrogram
260 * the ability to rename a layer
261
262