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

Merging StrudelDirt ? #302

Open
yaxu opened this issue Sep 5, 2024 · 10 comments
Open

Merging StrudelDirt ? #302

yaxu opened this issue Sep 5, 2024 · 10 comments

Comments

@yaxu
Copy link
Collaborator

yaxu commented Sep 5, 2024

Strudel has a kind of superdirt clone superdough as it's default output. Strudel can also target superdirt via the osc support, which works well but there is some mismatch with the way superdough works, so @daslyfe has recently forked superdirt into StrudelDirt with some changes.

So I thought I'd make this issue to discuss the possibility of merging them again, with superdirt getting some enhancements in the process. This might involve tweaks on the strudel/tidal side if needed to get things closer.

@telephon
Copy link
Contributor

telephon commented Sep 5, 2024

Ah yes, it would be really so much better to keep them together! There are also people who slowly work on a browser version of supercollider, so that may help strudel as well.

Now there are a lot of changes which are hard to separate.

We'll need to have a chat about why certain things were needed, it seems that some could be done with less impact.

But please, let's not get superdirt forked away, because that will make development really complicated. @daslyfe , if you can bear with us, please request changes, I am open to them.

@daslyfe
Copy link

daslyfe commented Sep 6, 2024

Ah yes, it would be really so much better to keep them together! There are also people who slowly work on a browser version of supercollider, so that may help strudel as well.

Now there are a lot of changes which are hard to separate.

We'll need to have a chat about why certain things were needed, it seems that some could be done with less impact.

But please, let's not get superdirt forked away, because that will make development really complicated. @daslyfe , if you can bear with us, please request changes, I am open to them.

Hi yes, that would be great if a fork is not needed to support these features I am working on that are useful for strudel.

I am sure there are much better ways to implement some of these things, I am new to supercollider and hacking things together at the moment so very open to suggestions! Here are some of the proposed changes:

Suggested dirt changes:

Volume envelope adsr instead of asr. Note event
length (clip/legato) determines the sustain length. Once the note event length is completed the release stage of the envelope begins

Filter adsr envelopes - Created envelopes for each filter type. Envelope params default to volume adsr params when not specified.

New oscillators:
Sawtooth, triangle, sine, square, improved supersaw, pwm with continuous modulation

Meta parameters: z1-4 for various oscillator modules. Similar to mutable braids, or electron boxes, oscillators can have up to 4 parameters that shape the sound and vary depending on the model.

Strudel changes to support dirt:
octave needs to be implemented

Tidal/supersirt/strudel note consistency proposal:

The default octave should be 4, and ‘c’ or 0 coming from tidal/ strudel should refer to middle C aka C4. C4 should also play samples at their original frequency. I believe this would require some changes in each program to be consistent.

If these changes/ features fit within your vision of superdirt I can break them up into separate PRs.

@telephon
Copy link
Contributor

telephon commented Sep 6, 2024

Thank you for these! Very apprechiated. I'll comment them here, let's see:

Suggested dirt changes:

Volume envelope adsr instead of asr. Note event
length (clip/legato) determines the sustain length. Once the note event length is completed the release stage of the envelope begins

We just need to take care that sustain in supercollider (and superdirt)) really means the total event duration (unlike in many synths). So the "s" in adsr is not "sustain", but we need to supply something else, like "sus".

Filter adsr envelopes - Created envelopes for each filter type. Envelope params default to volume adsr params when not specified.

I would really like to have a combinatory method to do this, rather than building them into each filter. It would be much better if we could run arbitrary envelope synths on any argument, as we can already by mapping.

This takes a little bit of work though, so it would be good if we can live without it for a little while.
Btw. Modules can be also loaded from file, so in the meantime it could be just an extra file that is loaded.

New oscillators:
Sawtooth, triangle, sine, square, improved supersaw, pwm with continuous modulation

good!

Meta parameters: z1-4 for various oscillator modules. Similar to mutable braids, or electron boxes, oscillators can have up to 4 parameters that shape the sound and vary depending on the model.

good! Btw if there are any defaults needed, they should best be added to makeDefaultParentEvent.

Strudel changes to support dirt:
octave needs to be implemented

Tidal/supersirt/strudel note consistency proposal:

The default octave should be 4, and ‘c’ or 0 coming from tidal/ strudel should refer to middle C aka C4. C4 should also play samples at their original frequency. I believe this would require some changes in each program to be consistent.

in supercollider, the default (middle) octave is 5, this should be kept, I think.

If these changes/ features fit within your vision of superdirt I can break them up into separate PRs.

That would be great, then we can make them fit in best.

@daslyfe
Copy link

daslyfe commented Sep 6, 2024

Regarding the filter envelopes, I think a more flexible module based system sounds really cool. For now though can we do the envelopes for the filters as implemented (or similar) in the fork and then factor it out later? It is a feature that has been implemented In strudel for a while already.

@telephon
Copy link
Contributor

telephon commented Sep 7, 2024

Yes, maybe that is ok. But there are a lot of special things in the modules. So we'll have to integrate the functionality of StrudelUtils. Also I have so far taken care that superdirt is not dependent on sc3plugins, but uses them when provided. This may be a little fiddly...

Maybe, we could also add the variant modules to SuperDirt in a separate file where it is not loaded automatically, e.g. under scripts. It can call removeModuleand then addModule to be able to use the same names. We can load it from the startup if needed.

But let's see.

@telephon
Copy link
Contributor

telephon commented Sep 9, 2024

@daslyfe Ah and as I see it, one more thing I notice: modules are used as event-wise effects on synths and samples. There should be no reason to use modules for synths. This causes a lot of overhead in the end, because they are in an order, and have to traversed by every event one by one. The synthEvents you are creating are fine, all calculations can be made within them and then they should be reachable simply by their name, as usual.

Sorry that there is no documentation …

@telephon
Copy link
Contributor

@daslyfe I see that there are more additions accumulating in the fork – would it perhaps not be better to find solutions in SuperDirt? Or do you think you need some more experimenting until you know what you really need?

E.g. multiplying all the amp values in the SynthDef through the StrudelUtils may be achieved without much dependency and modifications by adding a function to the default even that calculates the amp value from the current environment.

@daslyfe
Copy link

daslyfe commented Sep 13, 2024

Currently at the moment I am in a messy “hacking” phase of working on this, I am almost done though and a lot of the work will be broken into small prs. Regarding amp values: my goal ultimately is to get all sustained synths to be at about 1/2 relative samples and percussive synths. This has worked well for strudel mixes not needing much gain adjustment to sound “nice”.

@daslyfe
Copy link

daslyfe commented Sep 13, 2024

@daslyfe Ah and as I see it, one more thing I notice: modules are used as event-wise effects on synths and samples. There should be no reason to use modules for synths. This causes a lot of overhead in the end, because they are in an order, and have to traversed by every event one by one. The synthEvents you are creating are fine, all calculations can be made within them and then they should be reachable simply by their name, as usual.

Sorry that there is no documentation …

Regarding modules: I created them for supersaw and superpulse because the array fill parameter needs an integer and not a ugen in order to work. Maybe there is a better way to do this?

@telephon
Copy link
Contributor

Regarding modules: I created them for supersaw and superpulse because the array fill parameter needs an integer and not a ugen in order to work. Maybe there is a better way to do this?

Sorry, I don't understand yet – do you want to make synthdefs on an event basis?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants