Does anyone have advice for using heavy with a patch that has custom externals?

I wrote many of my own externals in C while developing g my project. Now I want to convert the whole thing to C, for Daisy. But I know heavy only works with vanilla objects, and the extra externals created for heavy.

Is there a common way of doing this? My thought was to convert the project to C in chunks, then stitch it back together while inserting the C code from my externals. But that seems daunting… is there maybe a way to make my externals compatible with heavy?

Unfortunately there is not.

The internal API that the Heavy library uses is completely different from PD and connecting that up to the pd parser is very non-trivial. Of course any effort to try this would be applauded, but it requires intricate knowledge of the entire transpiling process and internal interfaces to accomplish.

At the moment there is no way to do this without manually extending the entire code conversion pipeline.
There have been others with a similar intent to extend the objects using custom code, so it might make sense to try and team up to combine efforts.

I would suggest starting a discussion on github:Wasted-Audio/hvcc · Discussions · GitHub
Or joining the discord: Heavy

I will!

What do you mean “manually extending the entire code conversion pipeline”?

Are you saying my approach of converting parts of it, stitching them together and inserting more code probably wouldn’t work? Or do you think the generated code would be too cryptic for me to understand and modify? Since I’m new to heavy and Daisy

Or is something like that what you meant?

I mean that you have to modify the entirety of the transpiler toolchain, front to back, in order to add such code in any functional way.

This means you need to understand how the conversion process works, from the interpretation of PD patches, to the transpilation of a Heavy DSP graph, to the actual Heavy internal library code.

Imo this forum is not the best way to discuss how to approach this. You could have a look at my attempt to create rfft/rifft objects (unsuccessfully, but the boilerplate is there): WIP: first setup of rfft~ components by dromer · Pull Request #110 · Wasted-Audio/hvcc · GitHub