brummer10 / guitarix

guitarix virtual versatile amplification for Jack/Linux
236 stars 24 forks source link

RPC call to change preset #88

Closed sktwitch closed 4 months ago

sktwitch commented 2 years ago

I've been using the guitarix.py example on a Raspberry Pi 4b to try to pull some data (sock.call("presets",['bankName']) which works fine. I'm then trying to make a call to set the preset to the next preset in the list, but am having difficulty determining how to do it. My plan is to have pushbuttons for next preset and previous preset using GPIO and make the call in python using RPC.

I've tried sock.call(:setpreset",['presetname']) but get the result below: No JSON object could be decoded {"jsonrpc": "2.0","id": "1","result": }

Does anyone know what the syntax would be to change the preset?

sktwitch commented 2 years ago

I think I figured it out. I had to use sock.notify(setpreset",['bankName','presetName']) and that set the preset correctly. Now to get the GPIO buttons setup / programmed to change the presets.