-
-
Notifications
You must be signed in to change notification settings - Fork 58
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 support for offset_cc
#170
Conversation
Rebased in order to make it readable (since the base branch changed after the PR) |
@@ -59,6 +59,12 @@ bool sfz::Region::parseOpcode(const Opcode& opcode) | |||
case hash("offset_random"): | |||
setValueFromOpcode(opcode, offsetRandom, Default::offsetRange); | |||
break; | |||
case hash("offset_cc&"): | |||
if (opcode.parameters.back() > config::numCCs) |
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.
I note there exist multiple occurrences of ccNumber > config::numCCs
in code.
There is also for (int cc = 0; cc < config::numCCs; cc++)
.
One of these has to be wrong. Perhaps instead the checks should use >=
.
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're right it should be >=
in all these checks.
Closes #159
It will be cleaner once the changes from #166 are merged