-
-
cpenny42
I've been interested in this for a while. I've extensively used Pd and extended it on my own, and also have used LabVIEW for a few years in an engineering setting.
I really want to make a Pd -> VHDL compiler, from there you could definitely print chips. However, I would also want to add support for a "patch" that runs external C (or C++) code, since sometimes you will definitely need the low-level abilities of C when writing firmware.
-
cpenny42
Can you be more specific? You can definitely take in the input list, get its size (using [list length]), then output a different list through a single outlet, but I think you might mean that the number of outlets changes depending on the input list. You can definitely do this through dynamic patching (I have a patch that will help you do this easily), but if you dynamically change the number of outlets, any connections you have would be disconnected. You can fix this with more dynamic patching, but it gets a little more complicated. If you post more info about what specifically you're trying to do we can definitely help.
-
cpenny42
Here's a few links to some basic externals that should work:
https://github.com/cpenny42/HelloWorld-PdExternal
https://github.com/cpenny42/PdExternal-SignalExample
https://github.com/cpenny42/PdExternal-SoundfontsExample
https://github.com/cpenny42/PdExternal-argvlet me know if they don't work for some reason. Here's a good pdf that goes over more of the details: http://pdstatic.iem.at/externals-HOWTO/pd-externals-HOWTO.pdf
-
cpenny42
@ricky Cool! Small world I guess. I'm working with him right now on using Pd for a Music Apps for the iPad course — it's really fun.
-
cpenny42
@ricky And there is a technique you can use for deleting objects in a patch, but it's kind of hacky. You can use [find <object_identifier> 1, cut( if the object has something in its name that is guaranteed to be unique. This usually isn't the case, but you can design your dynamic patch with this in mind.
Here's an example where I do this:
-
cpenny42
@ricky Here's a patch I made that will do this. Give it the name of your patch and it will give you the ID of each object, which you can use to connect/disconnect them:
-
cpenny42
@raynovich There are tons of ways to do this. I've made some patches going over 2 different ways:
This one opens a subpatch that holds a message box and waits for the enter key to be pressed before sending the box's contents to elsewhere in the patch. It automatically enters and exits Edit mode so the user doesn't have to worry about it. Right now it uses a message box, but that could easily be replaced with a symbol box if it's not important to be able to input multiple words:
input_text_simple.pdThe next one is a bit more complex and was a lot more fun to make. It uses dynamic patching to create canvases in a subpatch. It listens for valid keystrokes and interactively changes the canvases' labels until the user presses enter, when the input is captured and sent to the main part of the patch:
The tricky thing about the second one is that it uses a non-fixed-width font, so it can sometimes mess up my guesses for the word width (in pixels), since some letters are a lot longer than others.
Edit: the advanced one has a dynamic [makefilename] patch too, which is pretty useful.