-
Notifications
You must be signed in to change notification settings - Fork 757
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
Fix EnvGate issues #3797
Fix EnvGate issues #3797
Conversation
Instead of relying on an indirect clue, we follow the documentation for `i_level`, interpreting it as initial level. This fixes supercollider#3768, supercollider#3795. # testing: all uses of EnvGate that used the i_level parameter to scale the resulting envelope. In class library, there is no such use. this is a change to the implemented, not however to the documented API.
try { | ||
{ EnvGate(fadeTime:1) }.asSynthDef | ||
} { |e| error = e }; | ||
error.postln; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extraneous postln
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, fixed.
try { | ||
{ EnvGate(fadeTime:1) }.asSynthDef | ||
} { |e| error = e }; | ||
this.assert(error.isException.not, "number should be a valid EnvGate fadeTime") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need an assertThrows
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I'll implement one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you are awesome
# Please enter a commit message to explain why this merge is necessary, # especially if it merges an updated upstream into a topic branch. # # Lines starting with '#' will be ignored, and an empty message aborts # the commit.
Actually, I'd prefer to merge this into 3.10 in the current form and improve the test later, once the |
assertException was merged already though, wasn't it? so you could just rebase this and add the test |
ah, I'm dizzy. thanks. |
@brianlheim ok, done! |
Can you please rebase it on current develop? There are merge conflicts (I think this is Githib's issue actually) |
@@ -987,6 +987,7 @@ void sc_plugin_interface::buffer_alloc_read_channels(uint32_t index, const char | |||
uint32_t frames, uint32_t channel_count, | |||
const uint32_t * channel_data) | |||
{ | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haha where did this come from? Weird..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe from fixing the merge conflicts in github.
@@ -987,6 +987,7 @@ void sc_plugin_interface::buffer_alloc_read_channels(uint32_t index, const char | |||
uint32_t frames, uint32_t channel_count, | |||
const uint32_t * channel_data) | |||
{ | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haha where did this come from? Weird..
@@ -0,0 +1,11 @@ | |||
|
|||
TestEnvGate : UnitTest { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file should be named TestEnvGate; if a more specific name is desired you could use TestEnvGate_GraphBuilding
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done, thanks!
anything still missing here? |
ready to go, fixes two bugs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
@telephon
class library: EnvGate uses direct start level
Instead of relying on an indirect clue, we follow the documentation for
i_level
, interpreting it as initial level. This fixes #3768, #3795.testing: all uses of EnvGate that used the i_level parameter to scale
the resulting envelope. In class library, there is no such use.
this is a change to the implemented, not however to the documented API.