C++ CHOP: the easy way

Hi,
I made a little tutorial on how to create a custom C++ chop using another powerful graphical programming language: matlab simulink. Simulink can be used to simulate all kinds of stuff and is really incredibly powerful and great for controlled development and testing.
Using the technique I show in the video, one basically doesn’t have to code any C++ at all besides some copy and pasting. Hope this sparks some development in the community, I myself am going to develop some Audioanalysis stuff very soon with this. Hope you enjoy, and please let me know if you find any errors/mistakes in the video.
(also, sorry, audio/video got a bit out of sync, but I think the content is still clear)
[video]- YouTube

nice! didn’t know simulink, cool that it can export c++. Hope to find time in the future to play with it a bit - thanks for this!

Wow, pretty interesting that this worked! I’ve made a decent amount of C++ OPs for clients and there’s a lot of things that I’ve had to sort through in them, and still many things to figure out the optimal approach to with less than extensive documentation.

Something to try, I’m not sure if you’d be able to have multiple of your ops in a network because of the declared static instance of the oneStep object in your .cpp file. I think you want to create a new instance with each op that get’s instanced, which means you’d want to add your oneStep object to the header file area of the C++ OP itself (but not the C++ op base). Otherwise, as I understand, it’s the equivalent of one OP in memory grabbing the functions from another OP in memory, which could lead to instability. Official word from Derivative on this would be good, to confirm if that’s correct.

Yes exactly, static data will be shared between all C++ nodes that load that .dll. If you want per-node storage you should put it inside your class.

Thanks, Malcolm :slight_smile:

Ah thanks Elburz&Malcolm, I’ll play around with this.
I hope I soon have time to apply and test what you wrote. I’ll see if I can put some comments in the video or something.
I’ working on BPM detection with this at the moment, and it looks as if it will soon get to a state where it is useable, so I’l want to make sure what I’ doing is stable etc.

Anyway, I was sure there must be some mistake(s) in there, so I’ happy at least one got caught :slight_smile:

Also I’ curious about the performance of this technique. Any comments about why this is slower than the built in filter for example? (actually it should be faster because the bailt in one is a two pole…)
I have the hope that it’ because the built in one is framed/vectorized, which can also be done in simulink… I’l try this soon…