Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Phase Distortion oscillator #3273

Open
Altarberg opened this issue Nov 28, 2020 · 14 comments
Open

Phase Distortion oscillator #3273

Altarberg opened this issue Nov 28, 2020 · 14 comments
Labels
DSP Issues and feature requests related to sound generation in the synth Feature Request New feature request Oscillator Features or additions to the oscillator section
Milestone

Comments

@Altarberg
Copy link

I was wondering if it would be possible to add a Phase Distortion Osc, like the Casio CZ line. I think that PD combined with the filters and modulation capabilities of Surge would be great.

@baconpaul baconpaul added this to the 1.9.0 milestone Nov 28, 2020
@baconpaul
Copy link
Collaborator

I agree

@mkruselj mkruselj added DSP Issues and feature requests related to sound generation in the synth Feature Request New feature request Oscillator Features or additions to the oscillator section labels Nov 28, 2020
@mkruselj mkruselj changed the title Phase Distortion Osc type Phase Distortion oscillator Dec 10, 2020
@magnetophon
Copy link
Contributor

That would be great!
Maybe some inspiration can be found here: https://github.com/magnetophon/DigiDrie

@baconpaul
Copy link
Collaborator

oh yeah very interesting @magnetophon - which code has the model of the oscillator? my faust navigation is a little so-so but i would gladly use your model as a starting point!

@magnetophon
Copy link
Contributor

Great, I was hoping you'd say that!

If you want, I can cook up a little oscillator-only dsp.

@baconpaul
Copy link
Collaborator

That would be profoundly useful yeah

You are AGPL3 and we are GPL3. I would consult your code and rewrite as GPL3 in C++. Presume that's not a problem for you but if the A matters, lemme know. I don't think we can AGPL3 and still support all our use cases for surge.

@magnetophon
Copy link
Contributor

I'd be more than happy to make the oscillator GPL3.

@Altarberg
Copy link
Author

I'm glad this has some interest!
I'm just a musician and know nothing about programing, but i do have a CZ-5000 in superb shape. Just let me know if it could be useful!

@baconpaul
Copy link
Collaborator

I'd be more than happy to make the oscillator GPL3.

Fantastic!

And @Altarberg yeah we are about to release 1.8 (which is "all about MSEG, Filters, and Airwindows") but our 1.9 plan has a bunch of oscillator work imagined. We will definitely need testers and feedback as we go.

@magnetophon
Copy link
Contributor

I'd be more than happy to make the oscillator GPL3.

On closer inspection, looks like I already did :)

This issue reminded me to do a long overdue PR to add anti-aliasing.

Those are only the bare oscillators though;

In DigiDrie, I also added some features to make them more versatile:

  • a filter between the master oscillator and the CZ oscillator.
  • crossfade step-free between octaves

I made a repo that has these features, taken from DigiDrie, under GPL3.
https://github.com/magnetophon/faustOscillators
Let me know if you have any questions.

In the example, you can choose between a few filter types.
In Surge, I imagine all filters to be available in the dropdown.

The parameters should all fit in the current Surge GUI, when you remove the OSC switch and replace it by a fader.

There's two oscillator-specific features of DigiDrie that I omitted because there isn't enough room in the GUI for them (yet):

  • phase modulation from all other oscillators and itself, each with an amount fader.
  • left-right offset for all parameters:
    Each parameter has 2 faders: main and offset.
    There are 2 oscillators; left and right.
    Left uses main+offset as it's value, and right uses main-offset.

It would be great to have those features in Surge as well, I'll open separate issues for them.

Finally: by default, faust runs all code all the time.
It also has an undocumented feature to turn code off, but it doesn't work in all architectures.
I use it to switch oscillator types, but commented it out to make sure the repo works everywhere.
You can enable it by toggling the commenting of these lines.

@baconpaul
Copy link
Collaborator

Thank you very much. We are wrapping up 18 now but I will look at this when we start 19 (if not earlier).

On your extra features: The first I would do through the surge FM module, which we want to expand greatly in S19 (basically we want to go to 6 oscillators and a matrix). Then code PD to respond to external FM.

On the second - that's really hard but we are thinking some about expanded stereo panning, just not necessarily distinct stereo modulation.

@mkruselj
Copy link
Collaborator

mkruselj commented Dec 19, 2020

We don't necessarily need to implement all the parameters from the Faust implementation one to one, but just having a PD oscillator with its base parameter set would already be quite alright and great to have in Surge.

@baconpaul
Copy link
Collaborator

baconpaul commented Dec 19, 2020

yeah the faust code is super duper useful though. And @magnetophon has been thoughtful about the params. It is a very helpful document for when we turn to this.

@magnetophon
Copy link
Contributor

magnetophon commented Dec 20, 2020

6 oscillators and a matrix

So FM with 6 of any Surge osc? Perfect! :)

When you get around to it, I'd love to hear your thoughts on the sound of these things.
Here's a little teaser: digiDrie.mp3.
That's just the oscillators with some tasty modulation, no effects whatsoever.
If you listen with headphones you'll hear the stereo-offset feature in full swing.
The filter is also fairly evident in this clip.

@baconpaul
Copy link
Collaborator

So FM with 6 of any Surge osc? Perfect! :)

That is the plan. Quite a lot of work to get there. But i think it could be very powerful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DSP Issues and feature requests related to sound generation in the synth Feature Request New feature request Oscillator Features or additions to the oscillator section
Projects
None yet
Development

No branches or pull requests

4 participants