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

Add attack_shape, decay_shape, release_shape #1009

Open
paulfd opened this issue Nov 9, 2021 · 10 comments
Open

Add attack_shape, decay_shape, release_shape #1009

paulfd opened this issue Nov 9, 2021 · 10 comments
Assignees
Labels
improvement Improve on existing functionality
Milestone

Comments

@paulfd
Copy link
Member

paulfd commented Nov 9, 2021

See @PythonBlue's fork.

@paulfd paulfd added the improvement Improve on existing functionality label Nov 9, 2021
@paulfd paulfd added this to the 1.2.0 milestone Nov 9, 2021
@paulfd paulfd self-assigned this Nov 9, 2021
@SoliDeoGloria2
Copy link

Hello! I'd like to know a little more about this feature (and sorry if this has been commented anywhere else). I've been thinking for months about an envelope generator for Sfizz (at least for the volume), and I guess this is related to it, although no envelope knobs appear in the plugin on these last releases. While I'm not a programmer, I have some simple ideas about this feature which I could provide, but I begin by asking here not to open a redundant issue.

The idea is simple : every time you load a .sfz instrument in Sfizz the usual bunch of ADSR envelope knobs would appear together with the CC7, 10 & 11 knobs already present. The best polyphonic example of this in the plugin realm that I've personally used is the one found in TX16WX, honestly. Something like that in Sfizz would be, in my most humble opinion, the missing link in Linux's sampling environment. No other free sfz sampler has synth-like capabilties out of the box (I mean, in the form of visible knobs every time you load an instrument).

Whatever I can contribute in terms of feedback, just ask me. Thanks for all; this plugins is going in the right direction, I think!

@paulfd
Copy link
Member Author

paulfd commented Jan 25, 2022

No there's no default envelope, nor envelope controls in sfz and sfizz in general. This particular feature is planned to be an update to the existing envelope capabilities of sfizz, and so it's a bit orthogonal to what you describe.

You are not the first one to ask this though, I remember another discussion on the same topic. There are 2 ways we could proceed to add something like this:

  • sfizz can handle up to 512 CC controls right now. Most of them are unreachable by MIDI and could very well be dedicated to this envelope controls (say cc200 is attack, cc201 is decay, ...).
  • as you probably know, the strength and tragedy of the sfz format is that it is simply a text file describing samples/oscillators and their modifiers associated with each key. You could thus very well add your own envelope controls to an existing instrument simply by editing it as follows:
<global> // Find this header, or create it if it doesn't exist
...
ampeg_attack_oncc200=1 ampeg_release_oncc201=10 // Add whatever envelope control you need
// Rest of the file

(Edited with the correct opcodes)
This would have the same effect as the first solution, while keeping true to the default behavior. We could then also add an option for users to load a "patch" file that would apply global controls on all subsequent loaded sfz files.

I'm not entirely sold on either solution to be honest. I feel editing files is not that complex and you only need to do it once for the sfz instruments you like. If I had to choose, something like the second one seems more empowering for users.

@SoliDeoGloria2
Copy link

Thanks so much for the feedback!

I tried the following with the copy of a sfz patch from the Virtual Playing Orchestra :

image

I set the attack to controller 73 and the release to 72. As they don 't seem to respond immediately to their corresponding CCs, I assign them in Reaper via MIDI modulation. Nothing happens, neither. Most probably, the mistake I am making is obvious to you. I don't see any Attack and Release controls anywhere, though...

@paulfd
Copy link
Member Author

paulfd commented Jan 27, 2022

Sorry I'm stupid, the opcodes are ampeg_attack_onccXX and ampeg_release_onccXX (or their alias, ampeg_attackccXX, ..). Sorry for the mixup. Does this work?

@paulfd
Copy link
Member Author

paulfd commented Jan 27, 2022

By the way you can find all about it in there: https://sfzformat.com/modulations/envelope_generators

@SoliDeoGloria2
Copy link

SoliDeoGloria2 commented Jan 27, 2022

Fabulous!!!

Now I can implement envelopes with ampeg_attackccXX and the like (!!!) That was a missing link!. Really, now orchestral instruments will be vastly more usable with Sfizz.

If I see the need, I'll investigate other possible controls. Nevertheless, the ADSR amp envelope was the main tool that I was needing to give the basic shape of the instruments, particularly the orchestral ones

I'm immensely grateful for this, really.

Edit : by the way, is the "shape" opcode for the attack curve already implemented?

@SoliDeoGloria2
Copy link

I'm not entirely sold on either solution to be honest. I feel editing files is not that complex and you only need to do it once for the sfz instruments you like. If I had to choose, something like the second one seems more empowering for users.

I have to say that I personally don't have any problem at all with editing copies of the original sfz files. For the average user, it would be probably useful to have the controls available at plain sight, but of course you, as a developer, know much better than I the possibilities and limitations of each option. Now that I know it's possible to add the envelope generators, I'm personally done.

If you need testers for this functionality, just tell me...

@kinwie
Copy link

kinwie commented Feb 16, 2022

If these stuff going to be done, I also request for off_shape
It's basically release_shape for the off_by and off_time
I used -3 shape for artificial cymbal tail to get nearer to real sound.
And also lot of other use for it of course

@kinwie
Copy link

kinwie commented Feb 16, 2022

I link this issue to my repo :
https://github.com/redtide/test/issues/2

@6-AND-9
Copy link

6-AND-9 commented Oct 3, 2022

I'm not entirely sold on either solution to be honest. I feel editing files is not that complex and you only need to do it once for the sfz instruments you like. If I had to choose, something like the second one seems more empowering for users.

I have to say that I personally don't have any problem at all with editing copies of the original sfz files. For the average user, it would be probably useful to have the controls available at plain sight, but of course you, as a developer, know much better than I the possibilities and limitations of each option. Now that I know it's possible to add the envelope generators, I'm personally done.

If you need testers for this functionality, just tell me...

Hello, an average user here. Yes, having a per-note ADSR envelope inside of Sfizz would be much preferable to having to edit each and every sfz bank out there. I can probably figure out how to do it, but doing this for hundreds of banks? No way.

For example, I downloaded the Sonatina Symphonic Orchestra in sfz, several tens of banks. I find an ADSR envelope is sorely missing for some of these orchestral banks.

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

No branches or pull requests

4 participants