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
Replace the linear ADSR with an exponential ADSR #1
Conversation
The exponential ADSR is based on a single-pole low pass filter.
Hi, thanks for the patch! :-D My preference would be to have the ADSR type be switchable, so that existing presets will not be affected, but based on what you said make exponential the default for newly created presets. Would you mind implementing support for this in the ADSR class via a setType(...) or similar method? P.S. do you think there are there any other ADSR types that it might be interesting to support in the future? |
Hosts support saving current plugin state as user presets. And some hosts like REAPER will set program index to 0 when loading them. At this time, if plugin still load factory program #0, users won't get their own presets. One of the best solutions is: reserve factory program #0 as "initial program". No matter when host or user set to this value, plugin state will always stays untouched. Then, correspondingly, move factory programs forward by one item. Always keep in mind that programs displayed in host's menu is independent, as it's enumerated by effGetProgramNameIndexed when loading plugin instance. So, we can just let factory programs display from item amsynth#1, then when user choose factory programs, reduce choice index by 1 in effSetProgram, and this is the actual preset index kept by Amsynth preset manager.
Hosts support saving current plugin state as user presets. And some hosts like REAPER will set program index to 0 when loading them. At this time, if plugin still load factory program #0, users won't get their own presets. Such a "redirection" is unexpected. One of the best solutions is: reserve factory program #0 as "initial program". No matter when host or user set to this value, plugin state will always stays untouched. Then, correspondingly, move factory programs forward by one item. Always keep in mind that programs displayed in host's menu is independent, as it's enumerated by effGetProgramNameIndexed when loading plugin instance. So, we can just let factory programs display from item amsynth#1, then when user choose factory programs, reduce choice index by 1 in effSetProgram, and this is the actual preset index kept by Amsynth preset manager.
Hosts support saving current plugin state as user presets. And some hosts like REAPER will set program index to 0 when loading them. At this time, if plugin still load factory program #0, users won't get their own presets. Such a "redirection" is unexpected. One of the best solutions is: reserve factory program #0 as "initial program". No matter when host or user set to this value, plugin state will always stays untouched. Then, correspondingly, move factory programs forward by one item. Always keep in mind that programs displayed in host's menu is independent, as it's enumerated by effGetProgramNameIndexed when loading plugin instance. So, we can just let factory programs display from item \amsynth#1, then when user choose factory programs, reduce choice index by 1 in effSetProgram, and this is the actual preset index kept by Amsynth preset manager.
Hosts support saving current plugin state as user presets. And some hosts like REAPER will set program index to 0 when loading them. At this time, if plugin still load factory program #0, users won't get their own presets. Such a "redirection" is unexpected. One of the best solutions is: reserve factory program #0 as "initial program". No matter when host or user set to this value, plugin state will always stays untouched. Then, correspondingly, move factory programs forward by one item. Always keep in mind that programs displayed in host's menu is independent, as it's enumerated by effGetProgramNameIndexed when loading plugin instance. So, we can just let factory programs display from item amsynth#1, then when user choose factory programs, reduce choice index by 1 in effSetProgram, and this is the actual preset index kept by Amsynth preset manager.
Hosts support saving current plugin state as user presets. And some hosts like REAPER will set program index to 0 when loading them. At this time, if plugin still load factory program #0, users won't get their own presets. Such a "redirection" is unexpected. One of the best solutions is: reserve factory program #0 as "initial program". No matter when host or user set to this value, plugin state will always stays untouched. Then, correspondingly, move factory programs forward by one item. Always keep in mind that programs displayed in host's menu is independent, as it's enumerated by effGetProgramNameIndexed when loading plugin instance. So, we can just let factory programs display from item amsynth#1, then when user choose factory programs, reduce choice index by 1 in effSetProgram, and this is the actual preset index kept by Amsynth preset manager.
Hosts support saving current plugin state as user presets. And some hosts like REAPER will set program index to 0 when loading them. At this time, if plugin still load factory program #0, users won't get their own presets. Such a "redirection" is unexpected. One of the best solutions is: reserve factory program #0 as "initial program". No matter when host or user set to this value, plugin state will always stays untouched. Then, correspondingly, move factory programs forward by one item. Always keep in mind that programs displayed in host's menu is independent, as it's enumerated by effGetProgramNameIndexed when loading plugin instance. So, we can just let factory programs display from item amsynth#1, then when user choose factory programs, reduce choice index by 1 in effSetProgram, and this is the actual preset index kept by Amsynth preset manager.
Hosts support saving current plugin state as user presets. And some hosts like REAPER will set program index to 0 when loading them. At this time, if plugin still load factory program #0, users won't get their own presets. Such a "redirection" is unexpected. One of the best solutions is: reserve factory program #0 as "initial program". No matter when host or user set to this value, plugin state will always stays untouched. Then, correspondingly, move factory programs forward by one item. Always keep in mind that programs displayed in host's menu is independent, as it's enumerated by effGetProgramNameIndexed when loading plugin instance. So, we can just let factory programs display from item amsynth#1, then when user choose factory programs, reduce choice index by 1 in effSetProgram, and this is the actual preset index kept by Amsynth preset manager.
The exponential ADSR is based on a single-pole low pass filter.
Note, this patch changes the sound of every preset because of the difference in ADSR type.
Exponential ADSR change smoothly, especially for the AMP ENV, whereas the linear ADSR causes AMP ENV to change abruptly (notable on presets with short release that are meant for keys; e.g. Pianola from BrianBanks1).
This behaviour is said to be similar to classic analog synths.
Unfortunately since both AMP ENV and FILTER ENV uses the same ADSR class, the FILTER ENV is also changed.
For me personally, exponential ADSR is always preferable for AMP ENV, while for FILTER ENV linear ADSR is different, but not less preferable.
Would it be better to have both? if so then there should be a way of choosing between them.
I could think of two ways of switching,
Thoughts?