Hey there
I’m using this tutorial Pure Data patch with parameters in the Pisound App and adapting it to try and get some parameter control in a different patch.
I’m pretty sure the JSON is ok:
{
"name" : "datasynth",
"display" : "DataSynth",
"parameters" : [
["float","global_rate","GlobalRate",250,9000,3000]
],
"pages" : [
["main","Main",["global_rate"]]
]
}
The patch shows in the Collections listing on the Pisound app. But I get ‘Error starting patch (-10)’ in a popup in the app.
I added ktrl to the Pd patch:
So maybe the JSON isn’t OK!
If anyone has any suggestions I’d be really grateful. The example patches all run fine and I can use the parameters sliders for them. I’ve also got a couple of similar patches to the one above running (although without the parameter control obvs)
Cheers
Dan
Hey, -10 means there could be a mistake in blokas.yml, or a bug in the pisound-ctl daemon - could you share with us the output of sudo journalctl -u pisound-ctl
after you have made a new attempt to launch the patch?
Here’s the output:
pi@raspberrypi:~ $ sudo journalctl -u pisound-ctl
-- Logs begin at Thu 2016-11-03 17:16:42 GMT, end at Wed 2019-01-02 16:54:31 GMT. --
Jan 02 16:52:47 raspberrypi systemd[1]: Started Bluetooth service for Pisound companion app..
Jan 02 16:53:36 raspberrypi pisound-ctl[299]: mec_app initialise
Jan 02 16:53:36 raspberrypi pisound-ctl[299]: loaded preferences
Jan 02 16:53:36 raspberrypi pisound-ctl[299]: {
Jan 02 16:53:36 raspberrypi pisound-ctl[299]: "mec": {
Jan 02 16:53:36 raspberrypi pisound-ctl[299]: "Kontrol": {
Jan 02 16:53:36 raspberrypi pisound-ctl[299]: "listen port": 6000
Jan 02 16:53:36 raspberrypi pisound-ctl[299]: }
Jan 02 16:53:36 raspberrypi pisound-ctl[299]: },
Jan 02 16:53:36 raspberrypi pisound-ctl[299]: "mec-app": {
Jan 02 16:53:36 raspberrypi pisound-ctl[299]: }
Jan 02 16:53:36 raspberrypi pisound-ctl[299]: }
Jan 02 16:53:36 raspberrypi pisound-ctl[299]: mec api initialise
Jan 02 16:53:36 raspberrypi pisound-ctl[299]: mecapi_proc start
Jan 02 16:53:36 raspberrypi pisound-ctl[299]: MecApi::MecApi
Jan 02 16:53:36 raspberrypi pisound-ctl[299]: MecApi_Impl::init
Jan 02 16:53:36 raspberrypi pisound-ctl[299]: KontrolDevice initialise
Jan 02 16:53:36 raspberrypi pisound-ctl[299]: KontrolDevice::init
Jan 02 16:53:36 raspberrypi pisound-ctl[299]: mec_app running
Jan 02 16:53:36 raspberrypi pisound-ctl[299]: kontrol device : listening on 6000
Jan 02 16:53:36 raspberrypi pisound-ctl[299]: KontrolDevice::init - complete
Jan 02 16:53:39 raspberrypi pisound-ctl[299]: KontrolDevice::new client 127.0.0.1 : 60748 KA = 5
I had a look at the YML file for a couple of the other patches and I hadn’t realised that I needed to add the controls to it.
The original YML file is:
name: Data Synth
author: Dan P
entry: datasynth.pd
image: basic.jpeg
description: |
Cut up broken synth samples.
tags:
- samples
Which (as we know!) appears in the collection of Pure Data patches, but I get an error when I try to load.
So I changed the YML to:
name: Data Synth
author: Dan P
midi_controls:
- control: global_rate
value 0
description: Global Tempo
entry: datasynth.pd
image: basic.jpeg
description: |
Cut up broken synth samples.
tags:
- samples
But now the patch doesn’t appear in the collection of Pure Data patches in the app!
My guess is that I’ve got the syntax wrong for the YML, but I can’t see where!
Thanks again for your help and Happy New Year
D
OK - so now it works!
Changed the YML back to:
name: Data Synth
author: Dan P
entry: datasynth.pd
image: basic.jpeg
description: |
Cut up broken synth samples.
tags:
- samples
And now the patch loads and I get a slider
So I guess its fixed, I’m not sure how though - will let you know if anything else comes up.
Cheers
Dan
1 Like
The midi_controls node can be used to document MIDI CC values used in a patch (there’s a special menu where this information displayed in the app), but it’s not required to be specified for the new controls.
You may use online services like http://www.yamllint.com/ and https://jsonlint.com/ to syntax-check the files. However, if the files are syntactically correct, but are missing required info, the patch may still be missing from the list, in that case, check the output of sudo journalctl -u pisound-ctl
after attempting to launch a patch. The log may be quite long, so hit the ‘end’ key to get to the end.
One more important thing to know about journalctl is that it seems to have quite a long delay after a message gets printed into it, so it may take some time (or more log lines) for the lines you’re interested in to appear… So in case you can’t see in the output any attempts to start a patch, even if you’ve made this action in the client, repeat it a couple of times until output is available.
Getting logging to be more instant is possible by reducing std output buffer size of the server process, but at a cost of performance, so for now we’ve decided to keep OS default buffer size.