Subsample configuration: osc
The 9 settings under osc, each with the type, default and limits its schema declares.
Open Sound Control (OSC): Subsample tells other software about its samples, and can take audio files from it. It sends /sample/captured when a new recording has been analysed, with its file path, its duration in seconds, pitch_hz, pitch_class, its tempo in BPM and its number of onsets; and /sample/loaded when a sample joins the library from a capture, the watched directory or a /sample/import message, with its name, duration, pitch_hz and pitch_class. The path and the name are strings, pitch_class and the number of onsets are whole numbers, and the rest are decimals. pitch_hz is 0 when no pitch is heard, and pitch_class, 0 to 11 counting from C, is the pitch class holding most of the sound's energy, or -1 for a sound too short or too quiet to measure. With receive_enabled, a /sample/import message naming an audio file has Subsample analyse the file where it is, writing its analysis files beside it as it does in a library folder, and add it to the library until the next restart; to keep it, put it in library.directory as well. Requires the optional python-osc package. With notes_enabled, /note/on and /note/off messages play notes through the MIDI map, as MIDI notes do: /note/on carries the MIDI channel, 1 to 16, the note, 0 to 127, and the velocity as a decimal from 0 to 1, and /note/off the MIDI channel and the note. A message in a bundle plays at the bundle's time, as a MIDI note arriving then would; one on its own, or one whose time has passed, plays as it arrives. A sound with a quieter lead-in before its hit, such as a hi-hat pedal, starts early so that the hit lands on the bundle's time, unless its assignment says align: start. A bundle from another machine needs that machine's clock to agree with this one's.
enabled in osc
- Type
boolean- Default
false
Turns OSC on. When false, Subsample creates neither the sender nor any receiver, whatever the other osc settings say.
send_host in osc
- Type
string- Default
"127.0.0.1"
Host that outgoing /sample/captured and /sample/loaded messages go to.
send_port in osc
- Type
integer- Default
9000
UDP port that outgoing OSC messages go to.
receive_enabled in osc
- Type
boolean- Default
false
Starts an OSC receiver that imports the audio file named in each /sample/import message into the library. Has no effect unless enabled is true.
receive_port in osc
- Type
integer- Default
9002
UDP port the OSC receiver listens on.
receive_host in osc
- Type
string- Default
"127.0.0.1"- Example
"0.0.0.0"
Network interface the OSC receiver binds to. The receiver reads whatever audio file a message names, and writes its analysis files beside it, without authentication, so the default accepts messages from this machine only. Set 0.0.0.0 to accept them from other hosts on a network you control.
notes_enabled in osc
- Type
boolean- Default
false
Starts an OSC receiver for notes, apart from the one for imports. Has no effect unless enabled is true, and plays nothing unless the player is on.
notes_port in osc
- Type
integer- Default
9003
UDP port the note receiver listens on.
notes_host in osc
- Type
string- Default
"127.0.0.1"- Example
"0.0.0.0"
Network interface the note receiver binds to. The default accepts notes from this machine only. 0.0.0.0 accepts them from other hosts as well. That is safer than for receive_host, as a note can only play a sound, but any host that can reach the port can play, so open it only on a network you trust.