Pd

Plugdata

– this part of page is still semi-official – semi home is here – Sequencing, resp. here for Pd.

– Plugdata: GEM replaced Ofelia + Pd_Lua forking in Else – under non-programmer hostile to coding – Modular Synthesis Forum – KVR Audio. GEM replaced Ofelia in Plugdata | PURE DATA forum~ 
My official view is here: Plugdata: GEM replaced Ofelia + Pd_Lua forking in Else – under non-programmer hostile to coding – Modular Synthesis Forum – KVR Audio
– I am back to Ableton now..   threat of Pd_Lua being annexed by non-programmer put me off from using Pg, specially after losing Ofelia.. also issue is that these Ph.D. guys like Ben and Alex never do any vids like Andrew Robinson, Hearing Glass, Amazing Stuff, Cycling74, nor they share any bit complete device w/ some documentation – they r effectively making Pg closed source/ self showing off place..

I. Envelo-sequencer

To issue w/ idea of Enseq: Beside using exponents is definitely handy, I need also time to get Splines to work – cause despite putting more exponent curve together allow change bending and alter its center point, but does not allow came from increasing to decreasing in rising slope and vice versa and leaving (partly cause of that) long straight lines.

Project it paused for a while, but u can see it how it is evolving in M4L which is actually Plugdata anyway..

Download patch here.
28. 9. 2023 - last update..
Download gama version unfinished underconstruction test patch here.
14. 3. 2024 - last update.

1) Intro 

– this was meant to be just starting phase, using easiest way for shape: exponent and ADSR.
It is plan to also use – Keplers Harmonic Laws (as Kepler intended in 1640s to use it for music, that is why it´s named Harmonic law)
Semi-chaotic Attractors..
B-spline curves
Lissajous/ torusish and parametric shapes.
Brickman Musinum 
And it may get some use of harmony based specially on Jadasohn..
It will provide basic just routing of notes and shapes to audio part, which is tough left up to finish.. 

2) Basic of the patch

So far the idea here is use classical +1 Float loop w/ Metro (rpic) to trigger sequencer and also guide shape of envelopes – so hence Envelo-sequencer. This allow to use ramp up normalize 0-1 values that can be trimmed and combined and keep track of breaking points that can be further use in modulation.. plus this also allow to use tracks vary-speed or change direction or pause/prolong ..
The
 envelope is broken into 12 parts (plus note on/ off) each have 2 equations (each can go inverse) and u can mix/ interpolate the shape between them.
The equations also have predefined setting in radio that allow use 
exponents and time of breaking points in musical intervals – this intervals are set as well tempered (not equal).
Also ADR is not set in ms/ or notation but with ratios to each others .. but ms and notation is displayed – the idea is, that the time is not known in advance…  
Each envelope can still be jammed with modulation of ADSR parameters – this jamming can also be done over each ADSR setting: each value of every single envelope is stored in text file (text define), same way like its final shape is stored in array – each step have one envelope in one array and these are then stored per bar.
To save CPU u can then run env. from array and further modulate it or go to audio with phasor.
The Envelope also have 4 sub-envelops to make
4 voices differently (so each envelope can have over 100 vales)).. to make GUI usable with these amount of parameters, almost each window can be expanded.
The option for bending are far wider compare to DAW envelopes – see chapter exponent use bellow.
Nother bonus is, that u get triggers for ADR values – that allow further modulate shape or other parameters, u can use parts ADSR in nother track,

3) Description of patch

ROUTING

Signal start in Metro – here slow down to 10 ms, but should rung in 1 ms. which is looped to right in +1loop w float object and then streamed left to envelope and will be stream also to right for sequencer… (maybe)
This 1 ms ticks is going in two lanes (I ve tried to avoid this strange double-decker bus, but it did not work … so DUNO how to get rid of this.))first (higher – Logic stream) is setting value for triggering logic operators, second Clock stream is streaming value for ADRS.


Attack is first, which is gated by Spigot, normalize to 0-1 in Clock norm and then bended w Bending functions.
Attack can finally mix Root/ Power ratio – Cheers to Urs saying there is no business for that…  hope that such synths developers will be out of business.. of course not, but its big disappointment from Uhe..
It is obvious, but if u select TOP, Leaning of Bottom is not surprisingly useless…
May be similarly obvious, that in 50:50 Lean mix, you got centric – circlish like bend..
Finally signal is gated w/ second Spigot – leaving 0 message.
The idea is, that closing 0 is triggered to spigot w/ signal sooner giving go trigger in signal chain, than the one that really close the spigot – this will also leave 0 that does not distract other routed signals (zeros like to push others to same level – as we know)).


Decay starts when two logics are met at “and” logic operator: bigger then Attack and Smaller then Release. There is again value normalization w/ additional clock 0 that subtract previous attack value. 
Then there is Bending function can. Value is then scaled for sustain – Trim sustain.  Inversion is done already in expression w/ power exponents, inverted is only final multiplication for Sustain level.
Signal is then again gated like in Attack w/ spigot (0 closing).

Release is taking value leaving to 0 gain from sustain and subtract from it and scaled it..  – it use set $1 in message object (which needs to be triggered/ banged during its phase).
Signals are routed to tabwrite object, which send signal to Array – X2 set for 2000 samples (ms).

It size can be change and it can display multiple Envelopes (they also said two in once in Plugdata)..
ADSR sliders in bottom are for Bending fnct – there will be two function – to make regular DAW envelope (see pic bellow)..
Future pic here will show (in case u would not believe)), that u can modulate ADSR parameters live – ).

4) Use of exponets

Regular DAW envelope use 50:50 mix of root and power – yellow curves (there are only few of them just for ilustration) – w/ just centric bending.
Automation and curves modules basically use full lines..

With this Enveloseuqencer, u can set bending to whatever direction and set mix of curves as u like – no need to rely just on blind AD modulation, tough they still have its use for some type of sounds…
..

Lpic: Power between 1-2 is power 2 value (so 3/2 is 3/2^2 etc. – this may not be accurate but is better then without power which is way beyond its values and not fluent)

 

 

 

Abs values are not necessary for in 0-1 range – in Pd it can be write like:
Attack – convex
1 – (1-x)^4    – moved right (up)

x^1/4  –  moved left (down)
1 – (1-x)^4* 0.5  +  x^1/4* 0.5 – centric
Concave – bend down

x^4
1-(1-x)^1/4

..
Decay – convex
1-(x^4)
(1-x)^1/4


(1-x)^4
1-(x^1/4)

 in Pd expression:
Attack – convex
expr 1-pow(1-$f1, $f2);
pow($f1, $f3); 
Concave – bend down
pow($f1, $f4);
 1-pow(1-$f1, $f5)

..
Decay
expr 1-(pow($f1, $f2));
pow(1-$f1, $f3);

(pow(1-$f1, $f4));
 1-(pow($f1, $f5));

Simple exponent blender

Patch bellow allows to blend two functions (here ^1/2 and -(x-1)^2+1 – both in convex and concave shape (which synth envelopes nor curve modules does not allows – they say there would not be business for that …

Direction of bending is in relation to centric (circular like) bending (expressed w/ mix of two equations)  – obviously convex attack shape is looking like moved left…

– obviously x is the value of 0 – 1 ramp up scaled from metro-based +1loop.

– 1 – x^ – is 
– (1-x)^ – is inverting ramp up

Technique shown by Omar Misa (Pure Data | FB groupfor interpolating values.. 

It took only two decades to make these shapes in sort of standard manner…
– Direction of bending is in relation to centric (circular like) bending (expressed w/ mix of two equations)  – obviously convex attack shape is looking like moved left…
          – obviously Attack and Decay have inverse bending, so its mirrored same like looking shape have L (down) vs R (up) inversed and similarly are inversed Convex and Concave shapes.
– For highlighting the idea – illustration purposes – pow4 and root1/4 are compared..

Power/ Root ambivalence
– Power and root can be supplement w/ 1- 

I. Convex – bend up shapes 
– As u can see, both Attack and Decay have sliders bending set to – TOP.

II. Convex – bend down shapes 
– As u can see, both Attack and Decay have sliders bending set to

1) Power/ Power – A: 1 – (1-x)^4;  D: 1 – (1x^4)
– this is the standard cnvx. for automation or curve modules

1) PinvP – A: x^4; D: (1-x)^4
This shape is use for concave automation (curve modules) and Envgen in Pd allow this w/ just adding negative sign.

– this root shape is awkward and not used in BW. Tough it is weird it is necessary counterpart to power that in 50:50 mix create centric bending.

2) inv+revRrevR – A  1-(1-x)^1/4;  D: 1-x^1/4
 ..

3) 50:50 Power/ Root 
– this is the standard cnvx. shape for envelope.

Decay subpatch showing decay equations..

III. One example
– I ve just kept same ADSR values (also amount of bending – exponents) and mess randomly with root/ power mix: first pic isjust pure root env. which u cannot get in DAWs or synths.) second pure power, which u also cannot get, since they use 50:50 root/ power.. 🙂
– however, while having some extra function is nice, in the end it is always about use. Bitter rule: often simplest things (often analog) with least options getting hack of a sound..
    – this is specially useful when u need some extra precision and variety – for sound that is similar to human speech, or otherwise specially treated tunes (do not expect miracles here, since music often needs to be simple)…
    – also, mixing root/ power is just beginning – there is tons more to do.. break slope into more curves, do additional adding/ subtracting.. modulate exponents, give them scale like intervals…

X) Funtion in progress

While 
As u can see exponential function is exponential – 1 – 2 – 3 – 4 step is equal to 2 – 4 – 8 – 16.

It is siple power 2.

ADR setting

In setting for ADR Attack can be set as Master or Slave of Decay – bound to decay: to ratio set by Dec.

This setting is defined by A-AD Mix, which is weighted sum of either AD or AD-R – which setting of Attack according to Decay.
     This may not be always extra useful, but it is helpful when one wants to sync w/ goniometric modulation.
     Values in lighter-green boundary are not adjustable – they are outcome of AD/ AD-R setting.
Scale – constant dividing value: 8 is one 1/8 etc.

AD and AD-R ration and fine are setting particular ratio, which define fraction of already set constant fraction set by Scale.

Envelope body setting

– abstraction are generally just GUI (taking also care for storing/ loading), significant part of processing is taking apart in Body subfiles – marked as Bd for each line: like f. e. Ka-Bd (Lpic bellow – green) – so called body for Key-Amp.

– Amp has couple further subfiles: 1) AD and AD-R – setting just ratio for particular par.
     2) Attack and Decay/ Release.

ADR Points

– points P2-4-8-10 are anchor points.
Each slope has 6 points – 2 anchor points, 3 mid-points and 2 final points: 6 is closing upward slope w/ 1, 12 is closing downward one w/ 0 – both values are fixed (and so have no setting – instead P6 is P5* offset and instead of P12 is P11* offset).
P1 is (by default) slave to P2 anchor point.

Not offset
a) Raw – value of ratio w/ fine tuning (Rw).
b) b scaled to P2 – representing time value.
c) b scaled to P2 w/ offset – representing level value before offset of P1
d) c + offset – representing final Level (L+).

P2 offset
P2 has 0.25 offset (R) – 1/2 from 0.75 (Mid-orange) is 0.375 (L-org).

P1 & 2 offset
P1 has 0.5 offset (R) from previous 0.375, so final output leve(L+) is 0.875 (L-orng.)

P3 is (by default) slave of P4

No offset
P3-4 have no offset, so its Time is still 1/2 from 0.5 –: 0.25.

P4 offset
P3 has no offset, so its Time is still 0.25, but P4 is 0.25 offset – hence final level (L+) is 1/2 from 0.75 – 0.375.

P3 & 4 offset
P4 has 0.25 offset (org.) – 1/2 from 0.75 (Mid-orange) is 0.375 + P3 has 0.5 offset (org) so final output level is 0.875

P3 w/ P2 (by default) slave of P4

– ratio is rt of diference P2 – P4. 
In master M modes P3 is defined solo (second M is just inversed).
     In Mab modes P2-4 are defined according the P3 (Mb in inverse mode).
Trim is trimming 6 digits value to 3 digits -trimmed is only display value, otherwise is used full 8 digits (or it is trimmed to 8 dgts). 
     If value is trimmed, red light at the bottom flash out. 
Open file opens particular data file, Load load it and store surprisingly store it.

No offset
..

Slaves & Masters

P3 point is (by default) slave of P4, but can be slave of P2, or can be Master or inverse M.
     It can also enslave P2-4: Ma – P2 is P3 – P2 and P3 + P4, Mb vice versa.
Similarly P1 can be also its own Master or inversed Master (Md).
P5 & 7 are top counterparts of P1 – having similarly options: be also its own master or inversed master. 
No Slave nor Master: P6 is bound to decay – it cannot be offset and its level and time is 1.
P5, 6, 7 and 12 are P1 counterparts. P6 & 12 are bound to 1 resp 0 – and so cannot be set otherwise and so setting have no meaning and instead of these points are P5 & 11 offsets.
     P5 & 7 are by default measured inversely – from the top as P4-8 slaves.
          As P1, they can stay as own Masters (but cannot enslave (same like P1) other points.

Master are by default anchor points, but as mentioned can be enslaved, P3 can bound to P2, or set P2-4.
P2-4 are masters unless this setting is not overwritten by P3. 

Scale

– exponent specially follow same fnct as pitch and they can also be modulated by keys.

– 2^(x/12) – where x is number of the step. 
Step is counted from 0 as f. e. C3, so 12/12 is 1 so 2^1 is 2 – 2x frequency and hence obviously f. e. C4 (resp. P8 interval). 

c3 – exponent value for first step representing flat line is 2^0/12, so final equation is x^(2^0/12) res. x^1, resp. x.) for starting first octave.
     g3 exponent is 2^7/12 resp. 2^1/2 – equal to 1.498 … so equation represent G3 curvature is x^(2^(7/12)).
c4 exponent is 2^12/12 resp 2^1 – equal to 2: hence 2x frequency/ value for starting second octave – .. it is 13. step (because first step is 0).
     g4 exponent is 2^19/12 resp. 3/2 – equal to 2, 
996… so equation represent g4 curvature is x^(2^(3/2))
c5 exponent is 2^24/12 resp. 2^2 – equal to 4 – which is 4x frequency/ value for starting third octave

Fraction

Modulation

FXs

Chords

– is set for fundamental and so restricted to 48
– by default in 12 half-steps – 7 whole-steps.
b) 6 steps
c) 24 hs/ 14.

Microtuning 
I. Based on chords
1)  Interpolation
2) 

II. Envgen and Vline

– vline and envgen are in audiorate – so can do waveform modulation..
Envlosequencer is oriented to amp envelope for each step and its modulation/ automation (in bar/ note length) 
                      – ADR are metro based and serves substeps of sequencer step, which further have 4-5 nother steps.. 12 for all envelope 
                      – tough vline/envgen audirote modulation is nice, when it is broken into 12 subparts, the difference to run only on metro is not that big..
– both sends 0-1 ramp in times specified in ms from message flag – so for more values u need pack.
        – 0-1 range can hence define sustain value in decay slope and split envelope slope to more steps ..
compare to envelosequencer there is no need for 2 spigots – that need two float triggers.
                  Plus u need 3 more triggers to subtract previous values, scaled it and subtract/ scaled for sustain in decay and release, tough this also trigger particular phases – step and making it more musically usable.,.
But each part needs to be banged and have trigger value…

1) Envgen

– while my patch above is slightly from time to time bit buggy, this one does not look like that much better and also need some patience and dedication..

The Rpic is showing more option.
Right 1) is setting values right into Envgen – than I think tough u cannot change them – since it does not like $f1-2..
Obviously 150 is time in ms, 1 is reached value for attack and 0 for decay – hence in case 0.5 it will sustain 0.5 value.
On right there is second 2) option to set value into message object.
On left is option to set AD time in envgen and set AD exponents in message objects..
– same way u can attack, sustain release ..  but I am now struggling to put basic value (that are DAW envelopes using) for attack in Envgen:
expr 1-pow($f1-1, $f2);
pow($f1, $f3);
pow($f1, $f4);
1-pow(1-$f1, $f5);
– and simultaneously
xfade between convex/ concave (up down bending) and root/ power (left, right bending) – as u can see in pic above.


2) Vline envelope

Leave a Reply

Your email address will not be published. Required fields are marked *