-
Notifications
You must be signed in to change notification settings - Fork 1
lock_ prefix for all opcodes #13
Comments
lock
prefix for all opcodes
Hi Alex ! I'm not sure I'll have time to read all your discussion on the chat, so maybe we can argue here. I have to say that this will add a lot of complexity to the code in a first approximation, if you want to make it on all opcodes. For the actual use, in your first example you could have
which would achieve the same result right? Your last example is valid but it's more of an intermediate thing while developing a lib, a process that is bound to be a bit messy and hands on. I wonder how necessary would the added complexity is warranted. |
@paulfd Thanks for the thoughts. Possibly From my understanding of the conversation this would only be the The example I gave of |
I can see this as simplifying things like implementing the transposition trick. So, nice for the instrument developer, though it would only simplify things that are currently possible, not make currently impossible things possible, as far as I can tell. So I can see uses for it, but I'm not gonna lie and say it's something I'd want to have the job of coding. |
Suggested as an alternative, use the
|
Reason why
lock_
needs to exist:sfztools/sfizz#362 Has made it clear that SFZ rgc:audio & Cakewalk has some opcodes that are locked, as opposed to being able to be overridden.
For example:
As
key
sets three opcodes:pitch_keycenter
,lokey
&hikey
to the same value, then the above SFZ script would set the playback to:Even though
key
opcode (which normally sets all three opcodes to the same value) is placed afterpitch_keycenter
.Discussion of
lock_
opcode prefix:With a
lock_
prefix for opcodes, a lib maker would be able to replicate this behaviour- in a consistent and verbose manner.lock_pitch_keycenter
would allow the keycenter setting to be immutable, and only changeable by either anotherlock_pitch_keycenter
orlock_key=
.A simplified example:
lock_
is able to override a previouslock_
)lock_
prefix, while solving the above mentioned issue inpitch_keycenter=sample
, would also clearly communicate with the library maker that an opcode is locked. And would also allow library makers more freedom, and expressiveness when working with opcodes.It would allow a library maker to quickly swap out samples present in a group, without having to change every sample in regions.
For example - if a library maker was wanting to quickly test how the instrument behaved like if using a
*sine
wave for testing purposes, then it would be as simple as writing:The text was updated successfully, but these errors were encountered: