Thanks Dave
Yeah I have a feeling it is not something easily done, especially not for a project like this, with multiple envelopes, oscillators, lfos, random and more and everything in separate structs.
I’ve made the envelopes that I use in this project as separate modules, I think I might try to make one of the to start with.
Do you think I can make a float_4 struct member?
Something like this:
struct Envelope{
float_4 Env( bool trigger, float_4 pitch, float_4 Fm){
// Envelope code here......
}
}
And then call it from main:
Envelope[c/4].Env( gatein[c], parampitch[c/4], FmInput[c/4]);
I can see there might be an issue with the gatein, since it’s not float_4, but bool, so it would still use just [c]. Maybe I could just make that gatein float_4 too?
Envelope[c/4].Env( gatein[c/4], parampitch[c/4], FmInput[c/4]);
Yeah I need to look into that. That’s something I have been postponing for a while, since I feel it’s a bit of c++ voodoo. I also think it makes the code a bit harder to read, but should learn it so I can implement it from the start, so I don’t have to deal with doing it to everything at once in a huge project like this, cause it seems a bit daunting to do it now on everything.
I just add the fm like this:
frequency = (dsp::FREQ_C4 * std::pow(2.f, ParamFrequency + VoltInput )) + FmInput;
Not sure what it is, I just played around until I had something working. It seems like it might be phase modulation?
And the feedback like this:
sine = sinf(2.f * M_PI * phase + feedback );
Sounds really cool. Will check your modules, just installed them
Once I get it optimised, I think I’ll add a 4th operator too. And nore goodies.
And also I’d like to add more osc options. Right now it’s just a sine, but would be nice to add some harmonics based versions of different oscillator shapes. Something like these shapes:
Etc…
… Which are the shapes of the Elektron Digitones oscillators. I have all of them emulated in Pure Data, so I “just” need to figure out how to implement them in VCV, with decent interpolation. But yeah, it’s a lot of work to “just” do that.