I am feeling dumb (how to build a PD plugin for MOD devices?)

Sorry for the rant :slightly_frowning_face:

I have made this trivial PD patch with Plugdata:
image

It is supposed to receive a midi CC and change its value. It is working on my laptop.

Now, I would like to build it for my dwarf.

First try, go to the cloud builder, but it turns out that it does not handle midi connections, also after adding the [r __hv_ctlin @hv_param] object

Then decided to build locally. After some mumbo-jumbo to get the mod-plugin-builder docker up and running I generated the code with PlugData:
image

when I try to build it I get /home/giorgio/Documents/plugdata/toggle_midi/dpf/utils/generate-ttl.sh: line 38: /home/giorgio/Documents/plugdata/toggle_midi/dpf/utils/lv2_ttl_generator: cannot execute binary file: Exec format error

Ok, fine, I may find a way to build natively first and then use lv2_ttl_generator to build the ttl. And then write the mod-ui, and then transfer it to the dwarf…

BUT, before I go into this rabbit hole (e.g. mod-sdk not willing to work on fedora 40), what is YOUR workflow to go from PD patches to MOD devices?

1 Like

Correct, the cloud builder is still missing many options, like setting the midi i/o.

Btw what do you think that [r __hv_ctlin @hv_param] does?
It would create a plugin parameter called __hv_ctlin with a range of 0 to 1, which is not what you want at all :slight_smile:

The midi i/o configuration is done via a json file and not from the patch itself.

My own test builds have been done manually from the commandline, but that’s not very usable for most.

Yes, it is weird, but it is on the hvcc docs so i gave it a try

MIDI I/O

In PureData there are objects to handle interfacing with a machines MIDI device.

heavy doesn’t provide cross-platform implementation for MIDI I/O as the requirements tend to change depending on the platform or framework being used.

Instead, it provides wrappers around these objects that route the data to specific hard-coded receivers/parameters in the patch context. For example a [notein] object will be replaced by a [r __hv_notein] receiver with input data split into its constituent parts and routed to the appropriate outlet.

[notein] wrapper implementation:

notein

ref. hvcc/docs/09.midi.md at master · enzienaudio/hvcc · GitHub

enzienaudio is no longer supported. go here for active docs: hvcc | The heavy hvcc compiler for Pure Data patches. Updated to python3 and additional generators

There were many bugs in the midi handling, the implementations look very different now :slight_smile:

It was also on the readme… Just googled “hvcc pure data midi” and landed on that old page. Anyway, I already wrote that I am feeling dumb!

Going back to my question, how am i supposed to build a working plugin? (see also Mod-sdk Package 'phantomjs' has no installation candidate )

It can’t be that hard :smiley:

1 Like