Pure Data

A few days late, but it’s out! :fireworks:

Here is the new release of pd2dsy

In summary:

  • the tool now uses python3 instead of python2
  • custom JSON can be used to work with hardware using the Daisy Seed or Daisy Patch SM
  • build options allow for access to larger code-sizes (beyond the previous 128kB limit), and the 64MB of external SDRAM.
  • the utility will now compile and attempt to flash the daisy after converting the pd patch
  • all of the official breakout boards are now fully supported (missing functionality from the daisy patch and the entire daisy field have been added)
    • exception being access to OLED displays on boards like the Patch and Field are still in development

Information for installing, and using the tool can be found at the top of the README.

This is just the beginning of our improvements to this workflow, and we look forward to seeing what wonderful creations people make!

7 Likes

Excited to get started with this and the Patch SM! But anyone get this new pd2sy working? I get stuck at the USAGE section - I get the error that
bash: ./pd_env/Scripts/activate.sh: No such file or directory
I wonder if theres a problem with the windows installation? I notice that in the Scripts folder theres no activate.sh file, but not sure if thats right or not.

@fadedinstruments Did you go through the install instructions very carefully? You can do them again if you have any doubts. Were there any errors during install?

If that doesn’t fix it, what do you get when you run ls ./pd_env/

@fadedinstruments

I was able to recreate your issue on my end – I suppose certain windows systems will have slightly different results.

To resolve the issue on your end you can run the following instead:

source pd_env/Scripts/activate

We’ll update the README to reflect this as well.

Hope that helps!

1 Like

Thanks for the quick response! So, when I put that in it just responds with a (pd_env) but no corvus~… after it. However, when I go through with the python pd2dsy.py --board .pd and translate a PD file it does seem to work :slight_smile: I dont have my prototyping board yet so its hard to fully check the patch_sm (plus I’m still struggling to figure it all out), but when I touch an audio cable to the audio output pins it seems to work! Thanks!

@fadedinstruments Glad it’s working! The corvus: you see in the screenshots is the username being displayed in the shell, just to let you know who you’re logged in as, and what line you’re on. In git bash it looks slightly different but it’s the same idea.

image

Anyways, that’s not part of the output so you should be ready to go!

Ah, of course! Thanks for the clarification.
So, it works for me now, but I do have to retype in source pd_env/Scripts/activate everytime I reopen git bash. If I dont, I get this error everytime I run the pd2dsy python script:

Traceback (most recent call last):
File “C:\Users\Doron\Documents\JEROME\Projects\Faded\Daisy\pd2dsy\pd2dsy.py”, line 11, in
import hvcc
ModuleNotFoundError: No module named ‘hvcc’

Its not a big problem, but I imagine its not supposed to do that?

That is to be expected.

You can leave that terminal open if you plan on running the converter multiple times, but you do have to activate the virtual environment the first time you open a new terminal in order for all of the python stuff to work as expected.

1 Like

I’ve justed using pd2dsy and I’ve encountered an issue. Whenever I use *~ it mutes audio regardless of what value it’s being sent. Even *~ 1 mutes audio from an osc~ 440, if I connect osc~ 440 direct to a dac~ it works fine.

Even the patch_init_test example doesn’t work. I’m guessing an installation issue is to blame here. Using python 3 with the new hvcc build.

@UtilityDevices Hi, and welcome to the forum!

Did you have the repo cloned prior to the update? If so, its possible the libDaisy submodule is out of date.

If you ran the install.sh script after updating, that should resolve the issue, but there’s a chance it did not.

If you navigate to libdaisy and run, git status you should see the following:

$ git status
HEAD detached at 3e200cbf
nothing to commit, working tree clean

If you see anything different, you can try re-running the install.sh which should checkout the proper commit, and rebuild the library.

Let me know if that helps!

Thanks, this seemed to work. Did a clean install of basically eveything and I’m up and running.

2 Likes

Heyo! So I’ve got everything up and running and am loving the daisy and pd2dsy! I’m curious - I seem to get to a point in my current patch that when I add more things it starts to sound noisy - a bit like the sample rate is reduced. I dont think my patch is that complex, but I wonder if I’m hitting a processor max or something? Does daisy automatically reduce the sample rate when it gets overloaded? Is there some way within pd2dsy to know if youre hitting the max capacity of the daisy?
I’m also curious, I notice that things don’t always sound exactly the same in PD versus coming out of the daisy. Is this a general problem of conversion from pd2dsy? Is this something that is a bit more reliable with Max Gen~?
Thanks!

It could be that you are reaching the CPU threshold, if it sounds like some light crackling/distortion. The converted output from pd2dsy isn’t as well optimized as what you can do with Arduino, C/C++, or even the output of gen~.

However, depending on the complexity of your patch, there could be an issue with the converter, or the engine itself. Is it any particular object that starts to give you issues, or just the quantity of objects?

The pd2dsy utility is using hvcc which is a tool that reads, and generates code from a Pure Data patch. So there definitely could be slight differences from the conversion, although I don’t expect there to be too many.

The integration with Max/MSP gen~ is a bit different, in that gen~ itself natively exports optimized c++ code that is meant for embedding into other things. The oopsy integration couples that exported code with some glue for running on the Daisy platform. So performance is probably a bit better.

Would you be able to share your patch, or part of your patch?

A couple internal modules works slightly differently in HVCC, or with some limitations ([select] for instance doesn’t take the right inlet and doesn’t work on symbol objects).

Also note that on deskop Pd (and HVCC) runs at 64bit floating point while in Daisy it will use 32 bit. This will give different rounding errors and precision so slightly different results overall.

There are patching strategies and optimizations possible in HVCC, but you really have to know what you are doing. Have a look at GitHub - Wasted-Audio/heavylib: Library of Heavy compatible abstractions for an idea of abstractions that are suitable for optimized conversion to the HVCC binary format.

We hope to extend the selection of HVCC compatible abstractions and example patches in the coming months.

Hi People,
I currently trying to upload a simple PD Sketch to a Daisy Seed.
I followed the tutorial on their wiki and created a custom .json file.
My error Message is called: make: *** [build/HvMessage.o] Error 1

I am grateful for any help or advice! :slight_smile:

[UPDATE: I reinstalled the X-Code command line tools even though I wasn’t getting error messages. It install.command now seems to be running normally. Looks like that update is non-optional.

install.command ran for a while. The install.sh script now gives me the set of errors listed below. ]

OK, I’m getting pretty frustrated. This installation process is quite opaque and there seem to be several different installation processes, each with their own errors in the instructions and piles of resulting error codes. I’m not sure if I’m supposed to do all of the installations, or pick one based on gut instinct, or what.

I’ve been periodically returning to Pd/Daisy since I got my Seed through the Kickstarter to see if it’s in a usable form, but all I’m getting is a review of error messages, file names that don’t seem to match those in the download, and an even wider variety of error messages. I’m obviously not the only backer who was excited about Pd integration, and I’m assured by others that that it does, in fact, work when it works, but for me, the reasons for failure are uncommonly opaque.

Currently, running some part of the installer somehow repeatedly crashes Python and fails to find files (error below). The former is obviously a problem but I’m sure there’s a fix. I reinstalled Python already, but it keeps happening. I of course don’t have a favorite command line installer, nor will most Pd users, so I’m probably installing something wrong.

Failing to find files makes some sense to me because the path in the instructions starts with “./”, but doesn’t say what your pwd is, so I have no idea where those files are supposed to be.

In the instructions, for some reason I’m in Visual Basic now (I really don’t understand why) and it’s telling me to hit Cmd-P, but that’s a file search. I’ve figured out that Cmd-Shift-P brings up the commands. I pasted in task build_and_program_dfu but nothing seems to be happening. The feedback is:
make: dfu-util: No such file or directory make: *** [program-dfu] Error 1 The terminal process "/bin/bash '-c', 'make clean; make; make program-dfu'" terminated with exit code: 2.

I’d really love to be able to use this, but this tool is supposed to be the very opposite of having an artist download and configure an entire house of cards of development tools based on existing knowledge.

Can someone point me to a definitive page that correctly shows me how to make Pd2dsy work?

[Updated error messages, because it looks like perhaps I did something out of order before. This is from install.sh in the pd2dsy directory.]

Installing python packages...
Collecting wheel
  Using cached wheel-0.37.1-py2.py3-none-any.whl (35 kB)
Installing collected packages: wheel
Successfully installed wheel-0.37.1
WARNING: You are using pip version 22.0.4; however, version 22.1.2 is available.
You should consider upgrading via the '/Users/joshua/pd_env/bin/python3 -m pip install --upgrade pip' command.
ERROR: Could not open requirements file: [Errno 2] No such file or directory: 'requirements.txt'
WARNING: You are using pip version 22.0.4; however, version 22.1.2 is available.
You should consider upgrading via the '/Users/joshua/pd_env/bin/python3 -m pip install --upgrade pip' command.
Building libDaisy...
fatal: not a git repository (or any of the parent directories): .git
/Users/joshua/pd2dsy/install.sh: line 23: cd: libdaisy: No such file or directory
make: *** No rule to make target `clean'.  Stop.
make: *** No targets specified and no makefile found.  Stop.
Setup complete!

Is this project abandoned? It seems like the parts work, but rely on rather more developer knowledge than intended. I see people occasionally getting things functional, but there’s no definitive “Start here to run pd2dsy” instructions for users who don’t already have developer habits and tools onhand.

Hi @JoshuaACNewman

Sorry to hear that you’ve had a difficult time getting this up and running.
The project is certainly not abandoned.

The most up-to-date instructions for installation and usage can be found in the README of the GitHub repo.

We are constantly working on improving the simplicity of installing the toolchain itself, as this differs from operating system to operating system, but there should be only a single location with instructions on this.
If you were seeing a number of different locations with varying instructions can you share those so we might either clean them up to be correct, or remove them?

In short, once you have the DaisyToolchain installed on your operating system (which it sounds like you do now) you should be able to:

  1. clone the pd2dsy repository
  2. run ./install.sh

Based on your pasted notes above, it does seem like you got to step 2, but had downloaded the repo instead of cloning it with git.
Due to the use of “submodules”, etc. within the repo, git is required to get a functional version of the software.
If you use git to clone the project instead, the install.sh script should work as expected, and you’ll be up and running.

We understand your frustration in getting this up and running, and are actively working on improving the process.
We are currently working on an update to the tool that will be a self-contained, installable package with a simple GUI that shouldn’t require any fiddling around with the terminal to get up and running.

1 Like


trying to get this simple sampler looper working – worked on the desktop but it does not do anything when I hit the button with the lineinput

does the line in automatically connect to the ADC on the POD? thanks for any help

I have been following the Github README but I am having some problems getting hvcc to work. When I use,

python pd2dsy.py --board <BOARD> <FILE>.pd

I get,

Traceback (most recent call last):
  File "pd2dsy.py", line 11, in <module>
    import hvcc
ModuleNotFoundError: No module named 'hvcc'

I tried to manually install hvcc and even got a copy of python 2.7 to do so, I assume this is not necessary but I am at a loss where to go from here. Any advice would be much appreciated :slight_smile: