Page 1 of 1

Inheritance from VM classes and other questions

Posted: Mon Sep 24, 2018 1:38 pm
by lalo
Hi all,
since i'm starting experimenting with Module Designer i decided to start with a simple phase distortion oscillator (Casio CZ style).
So i have some questions.

1. Where can i see the implementation details for VM classes?

2. Is it possible to make some sub classes inheriting from VM ones?
I would like to have access to the phase accumulator to do the phase distortion work.

3. Is there any band-limiting technique inside AnalogOscillator class (poly-blep and the likes)?
I have to check if it is usable for a phase distortion oscillator.

4. Can i define and implement my classes or inherited classes directly in the [User Variables & Functions] section?

thanks!

Re: Inheritance from VM classes and other questions

Posted: Mon Sep 24, 2018 11:55 pm
by Cherry Dan
Hi Lalo,
1. Where can i see the implementation details for VM classes?
2. Is it possible to make some sub classes inheriting from VM ones?
I would like to have access to the phase accumulator to do the phase distortion work.
If you're talking about our DSP classes, the implementation details aren't really public and you can't really derive from our classes. Of course you can write your own DSP all day long. Our DSP is just there as a useful tool, but we encourage developers to create their own filters, oscillators, etc. After all, if you're just using our DSP, then your modules will probably end up sounding a lot like our modules.
4. Can i define and implement my classes or inherited classes directly in the [User Variables & Functions] section?
You can, sure. Java allows for classes to exist inside of other classes. However, you're probably better off just adding additional Java files to your project, with your own classes in them. I suggest looking at the "Limiter.vmod" demo project, which includes SignalLimiter.java as an additional Java file in the project. This is probably the best approach for building your own DSP library and using it in your modules.

Thanks!
Dan

Re: Inheritance from VM classes and other questions

Posted: Tue Sep 25, 2018 8:24 am
by lalo
Thanks for the hints Dan!
a.