Closed theGreatWhiteShark closed 8 months ago
Agree with this reasoning ADSR: changing the length of the note should effectively move the Release point, and also filtering.
I guess I would recommend that before doing anything much else in renderNote*
, it would probably be wise to just entirely remove renderNoteNoResample
to avoid duplication of effort. It's slower than the NoResample
variant, but not that much slower. Optimisation without duplication can be a later activity (which I plan to do!)
I guess I would recommend that before doing anything much else in renderNote*, it would probably be wise to just entirely remove renderNoteNoResample to avoid duplication of effort.
Any volunteer? 😄 But you are right, of course. Just hoped I could implement the drumkit map stuff without large detours. But sample rendering is too important to postpone it till 1.3.0.
I would start by checking/adding some unit tests. They should step on our toes if just a single frame of rendered audio is different. So we can at least check for unintended side effects while refactoring.
There is another issue with the notes having custom lengths:
Defining a length
and shrinking the pattern so it ends prior to the note
leaves the note length unaffected. It will ring on.
I think it would feel more natural if the custom note length is truncated at the end of the pattern.
When toying with user-defined note lengths and samples provided in #1852 I came across a couple of rendering issues:
60
to360
) (an edge case. I admit it :D )BYP
button in the Instrument Editor), all custom note lengths are discarded and the entire sample is played back. We could of course argue that activating the filtering and setting a non-zero resonance shouldn't be discarded either. But then the original sample should only be played back till the user-defined length and everything that follows is the result of resonance filtering.