musikinformatik / SuperDirt

Tidal Audio Engine
GNU General Public License v2.0
520 stars 74 forks source link

Six-op FM synth #153

Closed loopier closed 4 years ago

loopier commented 4 years ago

@yaxu suggested in this forum thread to add the synth to the repo.

This is my first ever pull-request and contribution to another repo. Please forgive me if I'm not doing things properly. I'm open to suggestions and guidance on doing so.

bgold-cosmos commented 4 years ago

This is fun! The output always seems to be at peak level, it might be worth turning it down a bit; I think somewhere around -10dB would put it about even with a typical Tidal sample.

Since there are so many parameters, it might be nice to have some examples or "presets". This could be in SuperDirt or even on the Tidal end, e.g. fmpreset1 = mod11 1 # detune1 1 # detune2 1 # mod12 20 # ratio1 1.02 # ratio2 2

loopier commented 4 years ago

I will review the output level, thanks.

Where should I add the examples or "presets" in Tidal? If I do it in SuperDirt, should I do it as new SynthDefs, or is there a better way to do it?

bgold-cosmos commented 4 years ago

I don't know about the "best" way to do it, but one example might be to look what I did with the 'voice' parameter in superhammond. Basically a big multidimensional array of parameter values that you can dial "presets" from using SelectX with the voice parameter.

loopier commented 4 years ago

I reduced the output level by -15dB and added a few random presets that can be accessed with the voice parameter as you suggested.

I also added a feedback parameter. With manual feedback mods (mod11, mod22, ... mod66) it must be set to 1 in order to hear them.

I thought it would be more fun to have random presets than predefined ones, so the musician won't know how they are going to sound. The presets are generated with random values every time the SynthDef is evaluated. They will be different on every machine, or even on every session if the SynthDefs are evaluated on startup. Are they?

telephon commented 4 years ago

@loopier ready to merge or do you want to still change something?

loopier commented 4 years ago

@loopier ready to merge or do you want to still change something?

I'm ready! Just made a last revision and fixed the conflict. Thanks!

loopier commented 4 years ago

Thanks!

telephon commented 4 years ago

thank you!

telephon commented 4 years ago

I just noticed that the random numbers in the presets are fixed in each synthdef, so they will be the same for each note, but different on each restart of superdirt. Is this intended?

In principle, it would be possible to have presets in superdirt, not in the synthdef. But that's for another time, I think.

loopier commented 4 years ago

I just noticed that the random numbers in the presets are fixed in each synthdef, so they will be the same for each note, but different on each restart of superdirt. Is this intended?

Yes, it is. I thought it would be more fun to have random presets than predefined ones, so the musician won't know how they are going to sound.

In principle, it would be possible to have presets in superdirt, not in the synthdef. But that's for another time, I think. Sure!

telephon commented 4 years ago

OK, good!

telephon commented 4 years ago

btw. the detunes are integers between -7 and 7, is that intended? Array.fill(6, {rand2(7)}),

loopier commented 4 years ago

yep, also intended.

loopier commented 4 years ago

But I may change it to floats if you reckon it would be better

telephon commented 4 years ago

No, not necessarily. It is an aesthetic choice. With whole number detunes, you get a more predictable pattern of multiples of one second beatings, I suppose? I haven't tried.