0

How can I do something like play -n synth 0.2 saw F#3 in C with libsox? Is it possible at all? I couldn't find anything like that in the docs.

  • That's actually _four_ questions, as that play command (1) parses the command line to get the relevant effects and attributes, (2) opens the null device, (3) uses libsox to apply effects, (4) writes to an audio device. Please explain which part you are struggling with. Sharing any relevant code you already wrote is also helpful. – Ruud Helderman Jul 27 '22 at 11:19
  • 1
    My program currently uses system calls to do all that with such play commands, so I don't have any other relevant code. Your comment already gives me an idea of what I may have to do, I guess there's no shortcut in the api then. A code example of how to do that would be very appreciated, but thank you already for the command tear down! – ceilingslug Jul 28 '22 at 12:29
  • I agree it would be nice to have a complete example. [Here](https://stackoverflow.com/questions/53567179/how-to-change-tempo-of-sound-file-using-libsox-in-c) I found a link to some [sample code](https://sourceforge.net/p/sox/code/ci/master/tree/src/example0.c), but it covers only step 3. For the other steps, you may need to dive into the [source code](https://sourceforge.net/p/sox/code/ci/master/tree/src/) of SoX as a tool. – Ruud Helderman Jul 28 '22 at 15:00

0 Answers0