From the original SynthMaker forum (2004–2014), with its members’ names and dates.
wayfaerer ·
I'm working on an additive synth with 16 oscillators, but the controls for each oscillator will be hidden from the user. Instead, I have one formula which outputs frequency in Hz for all 16 oscillators. One of the formula's variables (i) corresponds to the oscillator # (1-16).
The only way I can think of to implement this is to copy/paste the (rather large) formula to each of the 16 oscillators and just manually change the i value for each oscillator to represent its number. But it's a big formula, and there MUST be a better way of doing this.
Also, I've been told when working out other parts of the formula earlier that I should probably avoid using the code component. According to Oddson: "The code component is generally not appropriate for event data as it keeps running at sample rate burning up CPU. " So I guess the code component is not appropriate for this situation.
If you have an idea of the best way to get the frequency to each of the 16 oscillators, please let me know. Thanks. 🙂
infuzion ·
I would use green-float maths as far as I could go, then use larger hop() in code for stream maths that didn't need to be updated so much.
gdev1981 ·
dunno if this is helpful or not (i dont know if your talking about spread or not)
but if you are i would get a knob and then 4 4-packs (16)
have 8 coming straight from the knob, 8 inverted and then put the knob in multiple times for the ones you want to spread farther
then 4 pack in to 4 stream mults
hmm i think your probably doing something way over my head but i tried anyway and thats the main thing
😀 good luck!
rl ·
I don't know your formula, but I could imagine it could be split split into smaller pieces that can be commonly used by other oscillators.
It depends on what you want to achive, but there is nothing wrong with the code module.
In case you don't want to do frequency modulation (means: no fast frequency changes) using a hop(32) or so would save a lot CPU.
wayfaerer ·
Thanks for your replies. I should explain myself better. I'd like to show the formula (as a picture) so it will make more sense to people... can anyone tell me a good place for hosting images so that I can show them here? For now, I've uploaded a zip file here:
http://download.yousendit.com/D574B8DD36B67024
For the file "formula.jpg": alpha, beta, and lambda are each values specified by the user via a slider. J and K are 2 variables that are stored in an array and are accessed based on MIDI note number. Oddson helped me map those properly. The variable "i" refers to the oscillator number (1-16), and Ji and Ki are two stored values which will be used to alter the intonation of each of the 16 partials. The Ji and Ki values are different for each partial.
The file "formula in synthmaker.jpg" shows an implementation of the last third of the formula - basically it is only missing part of the formula with the i's, Ki's, and Ji's.
My question is this, do I need to copy/paste this formula 16 times (once for each oscillator), or can I simply use it once to generate 16 frequency outputs which then go to the oscillators?
Thanks again.
infuzion ·
wayfaerer wrote: can anyone tell me a good place for hosting images so that I can show them here?
wayfaerer wrote: My question is this, do I need to copy/paste this formula 16 times (once for each oscillator), or can I simply use it once to generate 16 frequency outputs which then go to the oscillators?
Since the math is in Stream data, you'll need 1 copy per OSC.
If the math was all in green float, then you can get away with using Float Sample & Holds & Multiplexer.
How exactly does this thing supposed to work please?
wayfaerer ·
Dang, having all of that copied to each oscillator will probably take up too much CPU, but I'll try it out and let you know.
How does it work? Well, I don't completely understand it myself because someone else is in charge of the math, and I'm in charge of implementing the math to the synth.
There are 2 main parts of that formula: the first part, which determines the tuning of the partials (based on a few continua - the syntonic, hanson, and magic continua), and the second part, which determines the tuning of the fundamental frequency. The overall idea is to make it an additive synth, but hide all of the "additive" parts from the user, and instead have them use filters like a subtractive synth.
Thanks for your help and I'll let you know how my CPU handles having 16 different formulae and oscillators. 😕
infuzion ·
wayfaerer wrote: Dang, having all of that copied to each oscillator will probably take up too much CPU...
How does it work?...There are 2 main parts of that formula: the first part, which determines the tuning of the partials (based on a few continua - the syntonic, hanson, and magic continua)
Dang, it is Greek to me! No wait, looks like Latin... well I guess my limited Italian is no use here 😉
Speed Tips:
[old link] (1st section new just for you)
[old link]
Does it need to be poly? You can try Mono & Use the Pack4.
I see some spots where you can do some more optimization easily, PM me the files if you want the special help 😉
Wrote something here? To have a post removed or your name hidden, write to [email protected].