Creating Custom Algorithms

I’m a veteran DSP programmer and have recently created an ecosystem from scratch for Cortex M7, running on the Daisy Pod for the moment. I’ve finished created and algorithm that I’d like to deploy, and PolyEnd Endless seems like a good tool for the job. Two questions. Is either the hardware or the API published? I currently use the Eclipse based STM32CubeIDE for development and Segger’s RTT for setting parameters, verification, etc. I works great. I’d just like to hook into some packaged HW like the PolyEnd. Second question is the website says “preorder now”. What does that mean, that units are not yet available?

If this is not the right forum, can I get some information on where to make this inquiry?

Hey @andy-6391, first of all welcome to backstage! :party:

There‘s a SDK available on Github:

You can also find a bit of a „intro“ to it here:

And the product should be available right away.

As you are a dev. I think the best thing to know for you would be that the SDK is just an abstraction layer on top of the firmware/hardware of the device.

It exposes the most important parts (main loop, buffer and user input control) but doesn‘t offer full/indepth control over the hardware, unless you go all the way in and write your own firmware from scratch of course :laughing:

@Sandroid Exciting that there is an SDK. This looks like a good platform to port my work on DaisyPod to. I get all the physical stuff I’d have to build myself. Excellent! I do have some questions. I’ve read through the SDK. It looks like it does all I need, but …

How do I set the audio buffer size to trade latency against efficiency?
How do I know the memory map of the processor to choose memory allocation for the proper access speed for the various data? Do I not need to worry about this because the cache works so well? The example says to use static allocation - correct - but this question follows.
Is there an SWD port so I can load and debug via my debug probe rather than blindly loading a binary via the flasher and not know why something doesn’t work? Or is my only choice to make sure that is works on Daisy each time and then assume it will work on PolyEnd. That’s probably workable but not ideal.
Suppose I want to implement a software timer for my own purposes? Can I hook into the background process? That seems a missing aspect of the SDK - a background callback. Use the LED polling for this? If so, I need to know the period of the LED callback.

If these questions are too detailed, who do I ask?

kWorkingBufferSize is what you want to change. In the example from the Repo it‘s just set to the maximal avaiable size / length

I’m not sure honestly. There isn‘t anything exposed. But maybe there is a port on the pcb board directly.

I can try and source answers for you for all the others questions directly from the developers. It might take a couple days but i‘ll update you once i know more.

I‘ve personally just been compiling down to binary and testing from there. But i also haven‘t tried to build anything overly complex yet (Gated Reverb and some Audio degradation stuff).

That’s doesn’t sound right. The comments mention that the working buffer is in slow memory. Why would the primary codec/DMA buffers be in slow memory? Maybe you didn’t understand the question

If you can get more info, that would be wonderful. And one more question. I notice that there are gestures for footswitch press and footswitch hold, but not footswitch release. Why? This seems like an obvious want if you want an effect that is only active when the footswitch is depressed. Again not a show stopper, but a pretty obvious want.

@Sandroid

Hey @andy-6391, here’s some more info for you. :hugs:

You are right i misread what you were asking for. So let’s do this again :wink:

You don’t. The buffer size is a constant 128 samples per channel.

Your patch/compiled code is placed in external ram so there’s no need to worry about it - but it goes through the cache and you can keep that in mind when optimizing the code.

As i assumed: the debug port is only on the board (and we think it is not soldered in the production version) - not led out.

There was a time when it was considered to expose a timer, they then decided to keep it simple for now and not expose it. The LED refreshes with a fixed cycle when the value from the patch changes. (it’s 20ms).

Hope that helps! :victory_hand:

That’s disappointing, and takes some of the shine off. At 48kHz, two buffers of 128 will create 5 mSec of latency, not counting the latency of the codec HW Itself. By itself that’s not an issue, but add in the latency of a stage wireless system or DAW or wireless in ear, plus the latency of distance from a speaker on stage, it adds up. That’s why I usually set the buffer size of Logic Pro to 64. Sometimes you can even get away with a buffer size of 32. And there is really no reason not to support a buffer size of even 32 on a bare metal embedded system, for god’s sake. Disappointing. Can I make feature requests, and are they honored?

Based on my experience, that’s an oversimplification. I don’t know which parts are used, but I have experience with the STM32 series of processors. On them, there are many types of memory, both external and internal. Program memory is usually internal flash, for an application like this that is usually sufficient. The cortex prefetch mechanism + cache usually insure that flash delays aren’t an issue. For data memory, there is usually internal SRAM, which is the fastest, and often slightly slower internal RAM. It’s often arranged in banks to tune speed. External RAM is the slowest. So for large delay buffers (echo, looping) and other huge consumers of RAM, external memory makes sense. But for other uses, like the delay buffers in IIR filters themselves, internal memory is the way to go. So this answer is confusing.

Again, disappointing, but the ecosystem I’ve put together for testing embedded code natively using python as a test harness, plus a porting pipeline to STM32 (Daisy), mean I can reduce the risk of issues before trying anything on the embedded system. So this one is merely an annoyance. The PolyEnd is valuable because of the physical packaging of codec and knobs and switches and the LED. Too bad the API and debug access aren’t a little more accommodating, though I do appreciate the need to protect IP.

I just hope that no one thinks the valuable IP is the SW “OS”. That may have been true in the past, but in the days of Claude Code it just isn’t anymore. The valuable IP is the HW packaging. That’s why I want one.

I do really appreciate the time you took to look into this, even though some of the answers are either disappointing or incomplete. At least I’m now well informed about the polyend system. The biggest disappointment is the lack of a buffer size adjustment. Also there is no easy way to introduce background processing in a different thread, which would be great for algorithms which have a slower frequency domain processing component. That’s not my focus presently, but it is something that could be accomplished without too much trouble.

I know because I just created an environment similar to the PolyEnd environment on the Daisy, from scratch, and not using any “HAL”, in just a few days using Claude Code. It helps that I have decades of embedded experience, but the value of the PolyEnd Endless to an independent developer is the physical packaging. So if anyone there wants to reach out or collaborate with someone like me who knows the territory, I’m all ears. Meantime I’ll consider whether the buffer size issue is a big problem for me. Here’s my stack up. 5mSec (polyend buffers) + 2mSec (codec hw) + 5mSec (stage wireless) + 7 mSec (distance from bass amp) = 19mSec. Based on my experience, that’s about where one begins to feel a bit disconnected from the sound. If I were using my Daisy system, I’d do a buffer size of 32 unless I started to run out of MIPs