Visual Improvement for GEN1_ENVTIME and DCA

Forums

I’ve always found it difficult to understand how the envelope timing and DCA envelope affected the sample. It wasn’t clear which parts of the sample were being affected.

That’s why I implemented this visual guide.

If you think it could be useful, I’ll make the effort to submit the patch via GitHub, as you suggested last time.

Best regards :)

File attachments

ok, nice, thanks

but this needs work, specially regarding the Env.Time parameter value semantics.... (I know it's borderline stupid and tricky, but stay we me...)

  1. when set to "Auto" (ie. special value zero (=0)) it means that each DCA EG stage has a maximum length to half the total sample length (usually equals offset-end - offset-start); in your patch you don't seem to account for this, at all;
  2. when not set to "Auto" (ie. with a value greater than zero (>0)) it actually means an opaque but absolute interval of time for each EG stage--we'll need to look at the code cf. drumkv1::updateEnvTimes() to have a clue on that--and that might just be the stupid part of it; the bad news are we cannot change or outsmart that now; now, problem is you seem to take the value as a percentage of the total sample length, not even accounting for any offset-start/end subset, which is, sorry to tell, wrong.
  3. gradients don't seem to follow the DCA EG stage slopes, at least correctly; but this might be skewed from the issues outlined above.

I really think it's a very nice and good improvement (samplv1 might benefit on this too once these said issues are cleared), ntl!

cheers

The power of suggestion.
I swear, during testing, I thought it was actually working.

It might be completely imprecise, but it helps me anyway. As far as I'm concerned, I'm keeping it as is.
Often, what is represented as "send time" corresponds roughly to where the sound ends when there is no attack time.
In fact, if you hadn't told me, I'd still believe it was working :).

I realize that for it to help others, it would need to be done properly—but that won't be me doing it. :)

Thanks for taking the time to take a look at it.

PS
At least the idea is on the table. We don't really know what's happening without checking the code, but it has become evident that the current way of handling timing and the envelope isn't intuitive. It’s hard to grasp; it requires visual references.

If you haven't compiled it yet, I encourage you to do so; it really feels like it's working while you're editing, giving a genuine sense of control.

I was intrigued. How can the editing experience improve if it doesn't provide a true representation of what is actually happening?

It’s not just a suggestion. It works simply because is a symbolic representation that also incorporates the concept of send time and the DCA distribution within that send time.

Just as the current DCA graph works and serves as a purely symbolic reference, this one does too.

I am not advocating for its inclusion; I simply wanted to mention it because I find the effect interesting and, at first glance, intriguing. Mystery solved.

maybe you misunderstood me,

didn't say it does not work, just said it's incorrect and not quite following in function, which might or certainly give the wrong sense of intuitiveness ...

please re-read my 3 points above, they are still relevant to the cause.

br.

Permalink

Now there’s real control. Thank you! :D

I’ve submitted the PR: https://github.com/rncbc/drumkv1/pull/56

The revisions are:

  1. Higher contrast and a more legible relief map.
  2. Explicit separators.

This ensures readability across all color themes, even the most extreme ones, such as KXStudio.

  1. Comments referring to my nickname have been removed. This is my own method for managing patches without getting confused, but the comments don’t make sense in the official branch.

I’ve attached a screenshot to demonstrate the improved readability:

Default Scheme Color

KXStudio Scheme Color

File attachments
Permalink

awesome!

PR#56 is now merged.

took the chance in restyling the code and to stage separation line colors (nothing too serious I hope;))

please check 9b22b02 [G3N-es-develop]

thanks

ps. ftr. I think the stage separator lines should be dimmed further, otherwise someone would come asking why you cannot change the corresponding DCA1 EG parameters when hovering with the mouse, oh well :S

My only concern is that omitting the final delimiter creates the impression that Decay2 applies to the entire remaining sample duration... which isn't the case.
It also creates confusion. It looks as though Decay2 is labeling the bar to its left.
If we want to identify the blocks, I believe that centering the text and ensuring each phase has its own boundary is the most readable and appropriate approach.

Yes, increasing the separator width makes it stand out better as an integrated element of the graph. Yes, it might need to be toned down a bit more.
(In any case, sooner or later someone will ask to control the DCA from there as well—there’s no escaping that, and it wouldn't be a crazy idea either—it’s just that, for now, there’s no point in overcomplicating things.)

Regardless, your judgment prevails; I’m just offering my perspective.

If we want to avoid the separator being perceived as an interactive element, I think a solution could be to use separators that are more integrated into the relief map.
I haven't tested this; it's just a concept. We would need to determine the minimum distinguishable value across all color scenarios:

	const QColor rgbAttackStart = rgbDark;
	const QColor rgbAttackEnd   = lighten_rgb(rgbDark, 25);
	const QColor rgbAttackSep   = lighten_rgb(rgbAttackEnd, 10);
	
	const QColor rgbDelay1Start = rgbAttackEnd;
	const QColor rgbDelay1End   = lighten_rgb(rgbDark, int(25.0f * m_fDca1Level2));
	const QColor rgbDelay1Sep   = lighten_rgb(rgbDelay1End, 10);
	
	const QColor rgbDelay2Start = rgbDelay1End;
	const QColor rgbDelay2End   = rgbDark;
	const QColor rgbDelay2Sep   = lighten_rgb(rgbDelay2End, 10);

PR: https://github.com/rncbc/drumkv1/pull/57/commits

There were several things causing problems from my initial premise:

  1. Contrast
    We were working with very little contrast range. To improve visibility, I slightly lowered the level at the end of Attack and the beginning of Decay2.
    We’re not lying: before reaching the maximum Attack point, the brightness value needs to be lower. The same applies after Decay1. We’ve simply exaggerated the step.
    With this step, a separator would hardly be necessary, but it’s more legible with one.

I opted for the margin trick instead of drawing a new line. This way, the divisions are not only more legible, but also integrated into the graphic, avoiding the impression that they’re draggable elements.

  1. Dca2 Start
    This has been a real headache. It behaves in two different ways.
    It’s always released, but when it isn’t at zero, it also acts as an extension of Dca1.

I’ve reflected this behavior with a conditional that creates a gradual gradient from Decay1, and a cutoff when the value is close to 0.

  1. The implicit block
    You didn’t want to add a delimiter at the end of Decay2, and your intuition was right.
    It wasn’t necessary, precisely because there was already another natural delimiter: the silent section. We simply forgot to include it.

It seems to work well with any color scheme. Interestingly, this time it looks best in KXStudio because it offers high contrast.
But it looks especially elegant in Wontom_Soup—or at least, I think so.

Imagen

File attachments

True. I'm sorry; I didn't know how to fix it.

I've disabled all of Kate's automatic indentation and copy-paste features (the prime suspect) to see if that solves it.

Thanks.

Permalink

After testing, I have confirmed that each phase is one-third the length:

	const uint32_t iAttackLength
		= ::lrintf(fMaxFrames * qBound(0.0f, m_fDca1Attack, 1.0f) / 3);
	const uint32_t iDecay1Length
		= ::lrintf(fMaxFrames * qBound(0.0f, m_fDca1Decay1, 1.0f) / 3);
	const uint32_t iDecay2Length
		= ::lrintf(fMaxFrames * qBound(0.0f, m_fDca1Decay2, 1.0f) / 3);

The testing method involves replacing the end of the phase with an "offset end" and then setting the phase to 100.

The sound still ends at that point.

In auto mode, it also corresponds to one-third.

UPDATED!!!

This applies when Env.Time is at 100%.

However, if we reduce the Env.Time, the phase time increases instead of decreasing... ?¿?¿?

What I mean is that if we increase the time from the phase to compensate for the loss, the point doesn't line up... we end up with more phase than indicated.

I'm going to try something to see if that's it.

Permalink

My previous assumption was wrong, but I think I found it, and it holds up in the "Auto" mode as well:

	const uint32_t iAttackLength
		= ::lrintf(fMaxFrames * qBound(0.0f, m_fDca1Attack, 1.0f) * m_fDca1Attack);
	const uint32_t iDecay1Length
		= ::lrintf(fMaxFrames * qBound(0.0f, m_fDca1Decay1, 1.0f) * m_fDca1Decay1);
	const uint32_t iDecay2Length
		= ::lrintf(fMaxFrames * qBound(0.0f, m_fDca1Decay2, 1.0f) * m_fDca1Decay2);

Confirmed, it has passed the tests. It works.

Why?¿?¿?

Permalink

https://github.com/rncbc/samplv1/pull/48/changes
Sorry for the back-and-forth and for submitting another PR, but I realized the previous revision wasn't quite right.

Guides

1_
The "Release" phase doesn't work the same way as in DrumkV1; its duration is determined from the start.
This means it overlaps with the other phases.

2_
When a phase exceeds the sample's duration, its timing continues beyond the sample's boundaries.
I’ve added a "frames" label to clarify this, as it can be relevant depending on your specific settings.

When a loop is active, these indicators essentially serve only to show the duration of each phase in terms of samples.

3_
The silence zone is no longer labeled, as it could be confusing. It now simply marks the end of the "Decay" phase when "Sustain" is set to 0.

I believe this version is much clearer and more helpful.

PS
I’ve taken a peek into the Qtractor kitchen. You’ve got something in the works that smells absolutely wonderful.

File attachments

https://github.com/rncbc/samplv1/pull/49

Label release end

Release label on the right
1 Avoids visual conflicts with the other phases
2 Clearly indicates that it is a final phase
3 In the 'released' state, we know the end but not the beginning

It is more coherent.

I leave this for your consideration.
Thank you for your patience.

File attachments

Add new comment

The content of this field is kept private and will not be shown publicly.

Markdown

  • Parses markdown and converts it to HTML.
  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type='1 A I'> <li> <dl> <dt> <dd> <h2 id='jump-*'> <h3 id> <h4 id> <h5 id> <h6 id> <img src alt height width> <strike> <pre> <p> <br>
  • Lines and paragraphs break automatically.

Filtered HTML

  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <b> <i> <pre> <img src alt height width> <strike>
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.
File attachments
Unlimited number of files can be uploaded to this field.
2 MB limit.
Allowed types: jpg jpeg gif png txt doc docx xls xlsx pdf ppt pps odt ods odp zip gz bz2 xz patch diff wav ogg flac ogv mp4 qtz.