Flanger#1362
Conversation
|
Thank you for your quick hack, but my first impression is not so different from #1256. To confirm the true flanger sound, I am hearing some tracks through one of calf-plugins. Calf flanger can produce "Jet flyby" as usual without additional effect such as feedback or stereo phase shift. And I remember nearly same sound made by Mixxx flanger before #1256. I can not look into the code now sorry. |
|
This is the original 30 Dec 2015 Version: It has a sample rate depending sound. Which sample rate do you use? @44100 we had before a delay range 0.22 ms ... 11 ms. I have just noticed that I lost a decimal point adopting the range of hardware flangers. |
Be-ing
left a comment
There was a problem hiding this comment.
Thank you for working on this, we are getting towards a good flanger effect. There are still some details to figure out as noted in the comments below.
|
|
||
| EffectManifestParameter* regen = manifest.addParameter(); | ||
| regen->setId("regen"); | ||
| regen->setName(QObject::tr("Regen.")); |
There was a problem hiding this comment.
How about renaming this to "Feedback"?
This new parameter is really fun, thanks! :)
There was a problem hiding this comment.
Regen is the established name for that on hardware flangers.
There was a problem hiding this comment.
Okay, then set the full name to "Regeneration" and use "Regen" (no ".") for the shortName.
| manual->setId("manual"); | ||
| manual->setName(QObject::tr("Manual")); | ||
| manual->setDescription(QObject::tr("Controls the delay offset of the LFO (low frequency oscillator).\n" | ||
| "With width at zero, it allows to manual sweep over the entire delay range.")); |
There was a problem hiding this comment.
I don't understand what this does. I hear no difference when I manipulate the parameter.
There was a problem hiding this comment.
If width is fully right, it has no effect. If width is on half, you can shift the delay loop by manual. If width is zero, you can perform you own lfo loops using manual.
This is described here https://www.premierguitar.com/articles/Get_More_Out_of_Your_Flanger a standard behaviour on hardware flangers.
I am happy if you can propose a better tool tip.
|
|
||
|
|
||
| // With and Manual is limited by amount of amplitude that remains from width | ||
| // to kMaxDelaMS |
There was a problem hiding this comment.
typo in comment: kMaxDelayMs
|
|
||
| namespace { | ||
| constexpr double kMaxDelayMs = 13.0; | ||
| constexpr double kMinDelayMs = 0.22; |
There was a problem hiding this comment.
Where did these numbers come from? Are they arbitrary values you determined by guessing and checking what sounds good? It is fine if that is the case as long as you document it in a comment.
| width->setControlHint(EffectManifestParameter::ControlHint::KNOB_LINEAR); | ||
| width->setSemanticHint(EffectManifestParameter::SemanticHint::UNKNOWN); | ||
| width->setUnitsHint(EffectManifestParameter::UnitsHint::UNKNOWN); | ||
| width->setDefaultLinkType(EffectManifestParameter::LinkType::LINKED); |
There was a problem hiding this comment.
This is not suitable as a parameter to link to the metaknob by default because there is no way to make the effect not change the sound by manipulating this parameter. When the metaknob is fully left, the effect should not be heard.
There was a problem hiding this comment.
That is no requirement for the super knob, because this use case is issued with the dry /wet knob. Mapping super to the Mix will just duplicate that behaviour.
There was a problem hiding this comment.
The Mix parameter is redundant anyway. I have kept it because it was the old depth knob. Can we remove it?
There was a problem hiding this comment.
It is a requirement that every effect can make no audible change with the default metaknob linking, otherwise there is no way to bring in the effect without a sudden change without abusing the chain dry/wet knob which manipulates all the effects of the chain together.
There was a problem hiding this comment.
I propose keeping the metaknob linked to the Mix knob by default. Linking the metaknob to the Width parameter is a valid use case, but I don't think it should be the default.
There was a problem hiding this comment.
Could we make it so the effect does not make an audible change when Width is 0? If so, let's remove the Mix parameter and leave Width linked to the metaknob.
There was a problem hiding this comment.
Linking to width does not work, because width sets the width that is cycled around the manual position.
| regen->setControlHint(EffectManifestParameter::ControlHint::KNOB_LINEAR); | ||
| regen->setSemanticHint(EffectManifestParameter::SemanticHint::UNKNOWN); | ||
| regen->setUnitsHint(EffectManifestParameter::UnitsHint::UNKNOWN); | ||
| regen->setDefault(0.0); |
There was a problem hiding this comment.
How about making this 0.25 or 0.50 by default?
| period->setUnitsHint(EffectManifestParameter::UnitsHint::BEATS); | ||
| period->setMinimum(0.00); | ||
| period->setMaximum(4.00); | ||
| period->setMaximum(20.00); |
There was a problem hiding this comment.
20 beats? Why? How does that make sense musically? How about 16 beats? Maybe we should go back to a logarithmic scale for this parameter.
There was a problem hiding this comment.
I do not mid about the maximum.
20 just marches our original version @96 kHz. Hardware flangers have a Max around 10 s that's 20 for a 120 BPM track.
Real flangers have also a speed (fast fully right) parameter with a Hz scale. I like this when using, but it does not match our other effects.
How about that? @sohet?
There was a problem hiding this comment.
This is synced to the tempo, so the time in seconds is irrelevant. The maximum is important because turning the parameter to the maximum should be useful somehow. I can't think of a musical context in which a 20 beat period would make sense. A maximum of 16 beats or 4 bars with a 4/4 time signature seems to be a reasonable maximum. Then the user can also know the center of the knob is 8 beats and 1/4 of the knob is 4 beats (or 1 bar in 4/4).
There was a problem hiding this comment.
20 beats? Why? How does that make sense musically? How about 16 beats? Maybe we should go back to a logarithmic scale for this parameter.
I don't want the max value to be shorter than the current 20. How about 32 and logarithmic scale?
Real flangers have also a speed (fast fully right) parameter with a Hz scale. I like this when using, but it does not match our other effects. How about that?
I also like the way.
There was a problem hiding this comment.
Is this always going to be in beats rather than hertz where a beat is detected? It's often musically desirable to have an effect that is not synced to the tempo, to create tension
There was a problem hiding this comment.
@christophski I tried adding a button parameter to disable tempo syncing in #1257 but I did not think it was useful. For Echo, yes it is helpful, but I don't think it is for Flanger.
| SampleUtil::clear(delayLeft, numSamples); | ||
| SampleUtil::clear(delayRight, numSamples); | ||
| pState->previousPeriodFrames = -1; | ||
| pState->prev_regen = -1; |
There was a problem hiding this comment.
extra space to the left of the =
| const double width_delta = (width - pState->prev_width) / | ||
| (numSamples / kChannels); | ||
| const double width_start = pState->prev_width + width_delta; | ||
| pState->prev_width = width; |
There was a problem hiding this comment.
We are using this parameter ramping technique in several effects now. Perhaps you could factor it out to a common function.
|
True flanger is comming back! It seems that the deley shorter than 2ms is needed for "Jet flyby".
44100 or 48000.
In the case of Calf flanger LV2 plugin, the value "Min delay" ranges from 0.1 to 10ms . Even min. value 0.1ms can do well, and has a merit not blurring kick so much. Max. value 10ms exposes deleyed sound itself, and almost useless. I also apply the range 0.1-10ms to Mixxx, and get good result for me. |
|
"manual" parameter is a bit difficult to be grasped and used. How about these alternatives?
Any way, the sweet spot lies around 1ms, so logarithmic scale seems to be appropriate to the knob. |
Did you mean |
No, "manual" is as is from the knob and scales "width" within the limit. So if manual = min, width = 0 irrespective of the knob position. If this manner is against your intuition, then the first alternative (Calf plugins) is your choice. Both "manual" and "width" can always change the values and sound in the implimentation. I think it to be suit for general use in spite of my preference for the other. |
The warning appears when "LoadSelectedTrack" is evoked by a controller via xml. |
And all controls mapped to buttons (not knobs) directly by xml (not via js) suffer from this warning. |
|
Ok,I have now implemented the missing midi conversion functions. |
The warning does not appear any more, thank you. (I noticed now another bug not specific to flanger. An effect seems to be inserted twice to the line when group_[Headphone]_enable.) |
|
Does it mean I can merge this now? group_[Headphone]_enable issue: Do you use this plain branch or a combination with other branches? |
On this issue, current master and this branch are at the same state. I don't mind which Pull the bug will be fixed at.
My wish list within this Pull is,
Adjusting LFO waveforms, parameter relations, ranges and defaults may be later. |
|
One more point,
|
|
Ready! |
|
It's good here too. Just one thing, previously, tweaking the amplitude was fine, but current implementation feels like making small jumps so it's not as natural as before (maybe it resets the position, or maybe previously it attempted to soften the change, I don't know). |
|
The width parameter is now logarithmic. Ramping for the width parameter is in place. Mmm I will test it again. |
|
@JosepMaJAZ: it works for me, do you have a receipt to reproduce the issue? |
|
Mmm... I have to apologize... It might have been the song that I tried it with initially, since now that I'm checking it with other songs it works as expected. What I heard was as if the width (LFO amplitude) parameter affected the delay without ramping, which seemed to cause small delay jumps. |
|
It sounds almost fine, but still remains one issue. When enabled for the first time to the deck, the right channel outputs in most cases loud sound for a moment and then silence. If "regen" is 0, the disturbance disappears mostly except initial faint noise from the right. |
|
@sohet: Good catch, thank you. Got it! |
|
Thank you, @daschuer. LGTM! |
|
Greate! Thank you for review and testing. |
|
Since this was merged I can't use [Library],MoveFocusBackward etc. with my controller anymore. |
This is now a "complete" Flanger as known from stomp boxes.
Try it out.