emlyn / sonic-pi-tool

🎻 Controlling Sonic Pi from the command line, in Python.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

More commands

emlyn opened this issue · comments

The server supports some more commands that could be useful:

  • /reload reload ruby lib files(?)
  • /mixer-* control overall mixer (mono/stereo, hpf, lpf, amp)
  • midi-* start/stop/reset midi system
  • others? see here

Is there any way to pick up and run cached scripts as created in the gui. They seem to be stored as spi files in the .sonic directory. I suspect this might be difficult?

You should be able to just point to the script files directly, like sonic-pi-tool eval-file ~/.sonic-pi/store/default/workspace_two.spi.
But I agree it would be nice to have an easier way to do this, something like sonic-pi-tool eval-buffer 2?
Is that what you are thinking? I don't think it should be too hard to add that.

I tried that, and it does work, mostly. I think it may run once?

play :C4
live_loop :mpr121 do
  use_real_time
  a = sync "/osc*/mpr121"
  synth :dull_bell, note: a
end

I added a play :C4 at the font of this and it does play one note, but doesn't receive the live input.

There was a problem with it starting the OSC server, which should now be fixed. Feel free to re-open this if you still have problems.