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