DanTModules New Releases Thread

Been working on it…

Does this seem like an acceptable CPU amount for continuous quantization of the full 16 channels? (Obviously compared to MI Plaits it looks OK :wink:)

1 Like

Let me rephrase that…

It is NOT acceptable, turning off the note display reduces the CPU by a lot.

Question for the seasoned C++ devs: what’s the most efficient way to build a std::string? Clearly my concatenation shenanigans are needing to be replaced

1 Like

I’m not seasoned or anything - but this came up in my search:

4. Optimize String Use: A Case Study - Optimized C++ [Book]

1 Like

You are doing it in the ui thread aren’t you?

I.mean, you’re not recalculating the display 48,000 times a second.

Just checking.

1 Like

wowzers, thanks for the link, but, tl;dr

Though I did scan it and confirmed the std::string::reserve and using += in favour of + suggestions I found else where… this has reduced the CPU to approximately 3.2% so heading in the right direction.

I think though I will try switching to <sstream> that I have used elsewhere…

1 Like

:flushed: nope… 41,000 times a second

let me just fix that, thanks!

1 Like

I did something similar myself when I ported to v2

1 Like

Ah ha, thank you for benefitting me with your experience, appreciate it, the display now has no effect on the cpu and no <sstream> required

6 Likes

Very nice job, Dan, I am almost very content now :star_struck: Just a little nerdy request (wish) yet - IMHO it’s still safe to increase a bit (may be by 125%) the font size for this nice new note display ;). Anyway, I really appreciate your attention and responsiveness to the wishes/ideas of us, mere mortals!

1 Like

Is the Audible stuff polyphonic in VCV?

Some are

1 Like

Thanks! That’s fun…

I just submitted a new update this evening, hopefully it will be added to the library soon.

I tried to add the requested features

I have added memory banks to Nonaquant now, there are 16 for the module and 16 for the plugin, and there are two polyphonic inputs, when a channel receives a trigger, it will load the memory bank.

The module memory banks will be saved to the patch, the plugin memory banks are saved to the DanTModules.json file, and so are shared between all instances of the module.

I haven’t got this working by trigger yet, but there is a context menu option to clear all the notes

https://www.instagram.com/tv/CYzNx1NpoRx/

For the colour changing theme there are also two new modules

Chromagica provides CV control over the Amount of Red Green and Blue of the panel

Chromakey is a resizable blank that matches the Chromagica values, but also has preset colour options that will work well with chroma-key type effects in video editor apps (ie. greenscreen type of stuff).

5 Likes

Just out of curiosity: did you have to change a lot in the codes of your modules to work with Chromagica? (Read: is it theoretically possible to hack the code and target modules of other developers?)

Unfortunately yes, it involved changing the code of every single module (plus a few shared headers), drawing additional SVGs for each module and recompiling the entire plugin.

The way the other modules get the info from Chromagica is via some global variables that are externed by a shared header and defined by the module.

The new SVGs for the module have a transparent background, but otherwise the same elements as the regular panel SVGs (with the colour changed). When the module is drawn, in code I first draw a rectangle and fill it using the Chromagica globals to determine the colour. Then the panel SVG is drawn on top of that rectangle. (I would think that the majority of plugins don’t have transparent panel SVGs, the exception being plugins that programmatically draw their panels)

I suppose it would be technically possible for me to make available a header that other Devs could include in their plugins to make the globals available;

BUT

They would then need to implement their own panel draw methods to change the colour and also create alternative panel SVGs with the static elements.

It feels very hacky, and I don’t think there is any way to actually “hack” this onto another plugin (without some code changes in the target plugin) and many coders avoid global variables if at all possible.

Sadly I don’t think it very likely that this functionality could be applied to other plugins.

Although, it is possible there is some other nicer way for me to create an interface to Chromagica’s data that I am not aware of? If any one can enlighten me in that area I’ll consider implementing it.

1 Like

Dan, Sir, the new modules and the new themes are fantastic. Thank you.

1 Like

And thanks for updating Bright Idea :heart_eyes: :+1:t2:

3 Likes

You are very welcome

Just FYI, I will be working on updating the documentation when I find some free time, I hope to have it done by the weekend maybe

3 Likes

btw, doing std container mutating on the audio thread is a terrible thing to do, even if it weren’t inefficient. They will call malloc and free, which are blocking operations on any operating system. So they will cause pops and clicks. no one should ever do that :wink: Demo/docs/efficient-plugins.md at main · squinkylabs/Demo · GitHub

1 Like

Normally it is hard to get excited about a blank panel. But I love the concept of your new blank - combining a resizable blank with the ability to set the color. And then being able to lock the color for an individual blank so you can then change colors elsewhere is icing on the cake.

I have a feeling I will be using it fairly often. I frequently build emulations of various hardware using VCV, and labeling of controls becomes important. I use Stoermelder’s GLUE (I sure hope it makes it to the library soon for V2 - I hesitate to post patches with a version not on the library), and when I label a narrow module that does not have room for labels, I use an adjacent blank to get the space I need for the label. Being able to set the color will simplify my task tremendously. Up until now, I cover my blank with empty labels to set the background color, and then put the actual labels on top.

3 Likes