Adding Pure Data synths ....(and Csound?)

Ahhh! BTW, i would like to include more PD patches, so don’t hesitte to contribute any “zynthianized” PD patch you have :wink:

Here’s a zynthianized PD patch I’ve been playing with. Feel free to include it if you want to.
It is not for everyone as it is somewhat a toy. However, some may find ways to fit it in to a
musical composition.
I’ll include some sound samples to avoid the monocle :wink:. #1 and #2 were made using
the pd patch only, #3 was made with the pd patch in the background and a synth layer
playing on a separate midi channel.

Harpo.zip (5.3 KB)



7 Likes

ooo, you’ve reminded me about this: EP-MK1 possible new plugin time to get hacking I think. The Harpo sounds really interesting and rhythmical!

Jut finished my travels … If you could enable Csound that would be great. I’d like to put some good patches together and also see if I can interface to it through PD. Maybe someone’s done that by now?

As another question, I’m wondering how far we are from SuperCollider? I wrote one of the first tutorials for SC3 so I have a bunch of stuff I could probably Zynthianise much more quickly than slowly.

All of that said, I know everything has to be step-by-step :slight_smile: … Thanks very much

Hi @printer1!

I’m having serious problems with the csound integration. It’s not very stable and i don’t like the csound way very much …
I’m seriously thinking about abandoning the csound zynthian engine and moving to SC, that seems more alive.

Anyway, i would upload a development branch, so you can enable the engine in your zynthian and try it a little bit, OK? :wink:

Regards,

Hi @jofemodo,

I thought I replied to your last message last night but I don’t see it on the board. In any case …

After more thought … if Csound isn’t stable within Zynthian maybe it’s not worth taking it past where it is now? Which best as I can tell is it’s not listed an an “engine” but it is working from an ssh login from another machine.

That being the case, maybe PD as a front-end for it is all that’s needed, assuming the PD objects that control Csound will run in Zynthian (so PD can call it)…

And SC is then the better bet as an engine? I will see in the next few days if I can get the PD-Cound objects to communicate.

If you make Csound available in whatever form will bang on that too :blush:

Thanks in advance,

Mark

Hi, I am trying to learn how to zynthianize PD patches. I started with martin brinkmann’s wonderful “cells1” patch, which is 8 FM drums being controlled by a neural net.

I believe I followed all the instructions ronsum kindly provided above in this thread.

But the patch doesn’t work. Not only does it not play, the controllers I wrote into the zynconfig.yml file don’t appear. Whenever I load this patch, I see the controllers from whatever Previous pd patch I had loaded.

cells1forzynthian.zip (4.5 KB)

If someone could let me know what I’m doing wrong I’d really appreciate that. And I promise i’ll zynthianize some more PD patches. Thank you.

2 Likes

Could you set the scene with one or two pictures of what you did? Personally, I’ve done virtually nothing with PD and it’s always interesting to see the routes that are becoming well warn paths round here…?

1 Like

Hi @exiannyc,
I am currently not able to access my zynthian, so I cannot check your patch. But I’ve checked your files and I think the problem with the controllers not working is the structure of your yaml file.
The structure of a yaml file is defined by intends and whitespaces. To add your “threshX” controller sections to the “midi_controllers” section you have to put a whitespace befere the “threshX” sections.
Please try it again with this file: zynconfig.yml (491 Bytes)
If there is still a problem I hopefully can try your patch on the weekend.

1 Like

@wyleu Here are the instructions I’m following. I’ve taken the various layers of guidance above in this thread and zynthesized them all into the following. If we come up with corrections I’ll edit this.

  1. Write the patch (include ctlin objects to speak to encoders) and put it in its own directory. The patch should be named with a unique name. In this example we’ll call it wow.pd
  2. Create a file and name it zynconfig.yml to map ctlins to encoders and put it in the same directory.
    Here’s an example of a zynconf.yml file:

main_file: “wow.pd”
midi_controllers:
volume:
midi_cc: 7
value: 64
program:
midi_cc: 2
value: ‘1’
labels: [‘1’, ‘2’, ‘3’, ‘4’, ‘5’, ‘6’, ‘7’, ‘8’, ‘9’, ‘10’, ‘11’, ‘12’, ‘13’, ‘14’, ‘15’, ‘16’]
vibrato_depth:
midi_cc: 1
value: 64

  1. Use quotes, colons, underscores, spaces and commas just as shown in the example or it won’t load. Don’t forget to include the first line showing the wow.pd name as shown in the example.
  2. Select your wow.pd, any supporting files and subfolders and the zynconfig.yml file and use them to create a zip file named wow.zip
  3. Boot your zynthian. If you haven’t updated your zynthian software since the Nov 17th update, update it now or the following may not work.
  4. Open the zynthian Webconf page on your PC.
  5. Under Library select Presets & Soundfonts
  6. Click on ZynAddSubFX - Synthesizer to expose the drop down selection menu
  7. Scroll down and select PureData - Visual Programming
  8. Select the bank you want your patch to go to. You can type in a New bank name and hit the plus button if you don’t want to use an existing bank.
  9. Click on the upload bar and then click on the click and choose button
  10. Navigate to the wow.zip file, select it, then click on upload

Done!

As you see, the highlighted object “ctlin 65” is what i added, meaning “bring in the signal from the controller on MIDI channel 65 and put it here.” There is a ctlin inside each of the “pd cell” objects. The “threshold” parameter controls when each neuron in the net “fires.” Higher number, fires less often.

@weichselbaumj thank you very much for your edits and comments. I did upload your version to my zynthian. Unfortunately this did not make my patch work. Here’s the new (still not functioning) version. (It still has the same problem: when I open it, the controller layout from the previous PD controller layout is still in place on the screen of the Zynthian, although the top line of the Zynthian screen says it’s running this patch. No sound comes out.)

zyncells1mb.zip (5.1 KB)

Anyway, as you can see I’m using the Purr Data environment (because it’s nicer looking - all those lovely gracefully curving cables), not basic Pure Data. And maybe that is the problem! I’ll try doing it in Pure Data later this evening and see if that helps.

Thanks everybody.

Christian

1 Like

Thanks ! That great! once your clear we will transfer it into the wiki!

I would be honored and humbled were such an august day ever to arrive. :smile:

Hi, I think I found another issue. Inside the “pd cell” the “ctlin” objct should be directly connected to the number object. In my understanding the way it was originally, a message from “ctlin” just triggered the message object with the default value.
Screenshot from 2020-11-13 18-08-47

But there seems to be another problem which I was not able to identify. Most of the time when loading the patch, no “ctlin” messages are received. Then after some reloads the patch and all controls work as expected.
Can you reproduce this behavior on your zynthian?

Here is the modified, sometimes working patch: zyncells1mb.zip (5.2 KB)

Let me know if this also sometimes works four you :drum:

1 Like

Zynthian PureData doesn’t seem to like certain filenames. I don’t know why, but I have come across this several times before. Perhaps someone else can shed some light on this. In this case, I logged into my zynthian using Putty with X11 forwarding to allow me to display the PD gui when the patch was launched. The PD window showed the file zyncells1mb: can’t open

image

So using my windows pc, I changed the name of the pd file to Zyncells1.pd and the first line of the YAML file to main_file: “Zyncells1.pd” and used the two files to create a zip named Zyncells1.zip. I then uploaded the zip to the zynthian, rebooted and loaded the newly named pd patch. After a few seconds it started playing.

I would suggest @exiannyc add an object to control the volume using midi cc7. In most zynthian pd patches the volume control is the first control on the first page of controllers. I also notice thresh2 can give unpleasant results when adjusted to zero depending on settings of the other controllers. The patch could be revised to disallow thresh2 going to zero.

2 Likes

Many thanks @weichselbaumj and @ronsum for your efforts.

The revised and renamed patch still doesn’t work on my Zynthian, but I’ll keep tinkering, with this and other patches. (OuterSpaceSynth and Grids sound great, though!)

@ronsum, your feedback on the patch is very welcome. My current Pure Data knowledge is pretty limited, but it’s great to have a push to learn more.

If anybody wants to have a go with some other great patches that Martin Brinkmann has made available, look here http://martin-brinkmann.de/pd-patches.html

I’ll keep you posted if I have a breakthrough. If anyone else has wisdom about zynthianizing PD patches, please share! thanks.

Hi @exiannyc,

did you try the modified patch from my latest post: Adding Pure Data synths ....(and Csound?)

This patch works for me if I load it twice! (add pure data layer --> load the patch --> delete the layer --> add pure data layer --> load the patch)
Midi control messages are not received after first load after a fresh restart of zynthian. If I find some time I will have a closer look to this.

I tried switching PD patches (didn’t help) but I haven’t tried deleting and reloading Layers. I’ll try that soon and let you know. Thanks for your investigative efforts!

@weichselbaumj I tried your add layer / load pd patch / delete layer / add layer / load PD patch method and unfortunately it didn’t work for me. Still the previous UI layout comes up, and still no sound comes out. I’ll keep tinkering.

I do open up and examine the PD patches that work fine on the Zynthian (grids, 48patches, outer space) and I can’t see what the difference is between these, which work, and mine, which don’t. I’ll let you know if I make progress. However, @ronsum I believe I’m improving my CTLIN installation technique and MIDI CC numbering - thanks for guidance on those.

If you send me the revised zip file you are using I’d be happy to take a look at it.

very useful information on this everyone! thanks very much for the update. my nose is on the grindstone with non-related work to pay the bills but sometime i’m planning on getting a Pi/Zynthian setup and trying to run PD patches on it. so its good to know the progress of running PD patches.

one thing i might suggest is that if the test patch runs it could be that your YAML file is not validated correctly. there’s several sites where you can paste your data and it will tell you if the format is correct for YAML. could be worth a try.

additionally i would not recommend PurrData on Zynthian. at some point you are bound to hit an object that PurrData(L2Ork) supports but vanilla PD doesn’t. all of Martin’s patches were made with vanilla as far as i know, so as long as PurrData didn’t change any of them you should be fine. but don’t be surprised if PurrData can’t open some of them - it’s like 70% compatible with PD vanilla, though i will definitely admit it looks much nicer.