Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The current version of python-sonic only support sonic-pi v3 as changes have been made to sonic-pi's treatment of non-cue OSC messages. This PR seeks to update python-sonic to support these new changes for v4+. This address #42 .
See this issue: sonic-pi-net/sonic-pi#3330 for further details.
In short, Sonic-Pi now randomises the GUI udp port and requires a Token to be sent with any non-cue OSC message like
/run-code
. Therefore this PR makes the following changes:synth_server.py
with a new token field.set_parameter
now also takes a token as the second argument.send_command
now inserts the token before a command instead of the oldGUI_ID
parameter.psonic.py
with a new functionset_server_parameter_from_log
which by default parses the file~/.sonic-pi/log/spider.log
, or allows the user to submit thespider.log
file. The function parses the spider.log for the token, the server port and osc cues port and sets those as the server parameter.psonic_example.py
for testing.This has been tested on windows and linux.
Let me know if you want any other updates.