-
-
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
Set the pitch key center from sample #362
Conversation
Does |
No, this opcode has complete priority when present. |
@alcomposer |
Wait... What does ARIA / Sforzando do? |
In ARIA, this opcode will lose priority even it placed after |
Probably would make sense for In order to maintain SFZ conventions. |
Yes if that follow the sfz standard behavior. But the benefit to use |
"In order to maintain SFZ conventions." Yes of course. But a special case like this, we can documented and explain it at the page |
Sounds like So if But if |
OTOH, Aria also did this similar behavior for
Both will sound the same in ARIA. pitch_keycenter will always 62 even it is before key=50, which mean |
So Personally I feel that the SFZ language should convey meaning, which allows a user to understand how to use Opcodes in a universal manner. If a user did want to achieve the first example: why not write:
Or alternatively have a new opcode: |
"So if key is after any of them it will override the previous assignment?"
"But if key is before any or all of them it will also set/override all three?"
|
|
"Probably would make sense for pitch_keycenter=sample to only loose priority if key= is after, not before?" Yes this is the standard sfz behavior, But if this is the condition, then no we no need to use |
Sounds like this example of ARIA logic breaks a fundamental concept in SFZ. Sorry, not sorry. |
From a usability pov it makes total sense though. Setting |
Okay! |
@paulfd Possibly a way to allow such behaviour would be to make it a SFZ convention? A
In the above example:
So- this would work (pertaining to the
With the above:
Simply becuase
With the above:
Alternatively: Because |
And then, this simply will works :
|
@kinwie But your example of offsetting samples for RR wont? And while I also think |
@alcomposer |
@kinwie sorry- I was talking about your RR example on Discord |
To allow a sfizz user freedom to lock the
|
it was documented yesterday at https://sfzformat.com/opcodes/pitch_keycenter, don't tell me we need to degrade the CW original behavior because ARIA? |
@redtide, it's much more serious than behaviour. If So a lib maker would have no way to override this setting. Which is a basic concept of SFZ opcodes. (All Opcodes can be overridden) |
I'm a bit lost now. What does ARIA do exactly with this? Which software's behavior do we emulate here? |
At this moment, probably neither, the behavior is very complicated in presence of edge cases. |
I have to repeat this: |
src/sfizz/Region.cpp
Outdated
@@ -215,6 +215,7 @@ bool sfz::Region::parseOpcode(const Opcode& rawOpcode) | |||
setRangeStartFromOpcode(opcode, keyRange, Default::keyRange); | |||
setRangeEndFromOpcode(opcode, keyRange, Default::keyRange); | |||
setValueFromOpcode(opcode, pitchKeycenter, Default::keyRange); | |||
pitchKeycenterFromSample = false; |
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.
So if I follow what would be the most useful would be to have
if (!pitchKeycenterFromSample)
setValueFromOpcode(opcode, pitchKeycenter, Default::keyRange);
This would mean that to override pitch_keycenter=sample
you need to explicitely have a pitch_keycenter=...
opcode. Having key=...
would just set the low and high key.
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.
Bump on this one. I think the above solution is the sensible way to go for now.
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.
Like this? c5a1d04
Yes, I think this is the best solution for this moment |
9b75a5c
to
fdfcee7
Compare
Add
pitch_keycenter=sample
. Works with wav and flac files.#357 @kinwie