Name Flacho v1.0.1
Created At 2009-03-03 3:28am
Submitted By markvp
Type blue.orchestra.BlueSynthBuilder

Flacho, by Mark Van Peteghem

This instrument lets you experiment with flanger and chorusing, and the combination of them,
on a variety of signals. You can optionally put a filter and a parallel filter on them.

p4: pitch if below 20, otherwise frequency
p5: amplitude, in decibels if 0 or negative (calculated with ampdbfs), fraction of 0dbfs if positive (between 0 and 1)

On top you see knobs, a checkbox and a dropdownlist for the envelope, the effects envelope and the LFO.
See the comment of the UDO mvpLFO for more explanation.

Most knobs below that come in groups of three with two checkboxes:
- The first knob sets the 'default' value of the parameter
- The first checkbox determines whether the effects envelope is used on this parameter.
- The second knob scales the effects envelope when adding it to the default value.
This happens such that the parameter has the default value in the sustain part.
- The second checkbox determines whether the LFO is used on this parameter.
- The third knob scales the LFO signal when adding it to the default value.
This happens such that the parameter is the default value in the delay, and after that
the default value is the average of the minimum and maximum value.
Adding the effects envelope and/or LFO allows you to create dynamic effects.
Make these bigger for funny sounds; otherwise keep them low or turn them off.
LFO strengths of even less than 0.01 times the maximum value are often still audible
and more pleasing and less crazy than higher values.

On the left you have the two sources. The dropdown boxes let you choose the source types.
Between parentheses you see what par A and par B do with the source, e.g. pw for a square wave.
Some source types don't use par A or par B, for these there is nothing between parentheses.
Other source types only use par A, there you see the effect between parentheses.
Other source types use both, there you see the effects between parentheses separated
by a comma.

If one of the source types is none, the other is used.
They should not be both none.
If they are both not none, you can choose how to mix them, their frequency ratio,
and whether you want a phase difference between them or detuning, and how the
phase difference or detuning changes.
See the comment of the UDO mvpMix for more explanation.

In the middle you first have the chorusing. You can choose between no chorusing,
or 2, 3 or 4 voices. You can also specify the frequency deviation.
If you use 3 or 4 voices, you can specify the strength of the outer voices with respect
to the middle voice(s).
- If strength is 0, only the inner voice(s) are present.
- If strength is 0.5, all voices have the same strength.
- If strength is 1, only the outer voices are present.

Below that you see the flanger. You can turn it on or off, and specify the delay
(relative to the period of the signal, 0 to 2) and the amount of feedback.

Below that you can specify how the effects envelope and the LFO change the pitch
(the 'default' pitch is p4, so there are only two knobs here).

On the right you see the filter and the parallel filter. The filter filters the signal if it is turned on.
The parallel filter adds a filtered version of the signal to what you already have.
If x is the signal after chorusing and flanger, xf is the filtered signal of x, and xp is the parallel filtered signal of x,
you get the following:
Filter off, parallel filter off: x
Filter on, parallel filter off: xf
Filter off, parallel filter on: x + xp
Filter on, parallel filter on: xf + xp
For both filters you can choose balancing, but you may also consider using the volume adjust knob to save CPU load.

The panning has three modes:
- Normal
- Split components: divides the two sources between left and right; 0 means same on left and right
If one of the source types is none, normal panning is used
- Split chorusing: divides the voices of the chorusing between left and right; 0 means same on left and right
If no chorusing is used, normal panning is used

The knob 'Volume adjust' lets you adjust the volume, so you can make different presets sound equally loud.
It simply multiplies the volume by ampdb of its value. You can let the instrument calculate the optimal value
for that by making a condition true near the end of the code, using the UDO mvpPrintAmpCorrection2.
This knob can also be used in automation to change the volume.

The text box labeled 'Suggested pitches' is only informative, it doesn't influence the produced sound.
It helps you remind for which pitches the preset sounds good.