Commit abc3736a authored by Carlo Laurenzi's avatar Carlo Laurenzi
Browse files

Changes to Delay library + max abstractions

parent f3da693e
{
"patcher" : {
"fileversion" : 1,
"appversion" : {
"major" : 6,
"minor" : 1,
"revision" : 9,
"architecture" : "x86"
}
,
"rect" : [ 25.0, 69.0, 640.0, 480.0 ],
"bglocked" : 0,
"openinpresentation" : 0,
"default_fontsize" : 10.0,
"default_fontface" : 0,
"default_fontname" : "Arial Bold",
"gridonopen" : 0,
"gridsize" : [ 10.0, 10.0 ],
"gridsnaponopen" : 0,
"statusbarvisible" : 2,
"toolbarvisible" : 1,
"boxanimatetime" : 200,
"imprint" : 0,
"enablehscroll" : 1,
"enablevscroll" : 1,
"devicewidth" : 0.0,
"description" : "",
"digest" : "",
"tags" : "",
"boxes" : [ {
"box" : {
"fontname" : "Arial Bold",
"fontsize" : 10.0,
"id" : "obj-1",
"maxclass" : "newobj",
"numinlets" : 2,
"numoutlets" : 4,
"outlettype" : [ "signal", "signal", "signal", "signal" ],
"patching_rect" : [ 310.0, 190.0, 101.0, 18.0 ],
"text" : "DelayControl 4 dell"
}
}
, {
"box" : {
"fontname" : "Arial Bold",
"fontsize" : 10.0,
"id" : "obj-2",
"maxclass" : "newobj",
"numinlets" : 1,
"numoutlets" : 2,
"outlettype" : [ "signal", "signal" ],
"patching_rect" : [ 310.0, 130.0, 98.0, 18.0 ],
"text" : "DelayControl 8 del"
}
}
],
"lines" : [ ],
"dependency_cache" : [ {
"name" : "DelayControl.maxpat",
"bootpath" : "/Users/laurenzi/Documents/PRODUCTION/Prod anciennes/Stroppa_/Auras_2015",
"patcherrelativepath" : ".",
"type" : "JSON",
"implicit" : 1
}
, {
"name" : "auras.delv.02~.maxpat",
"bootpath" : "/Users/laurenzi/Documents/PRODUCTION/Prod anciennes/Stroppa_/Auras_2015/lib/Arshia",
"patcherrelativepath" : "./lib/Arshia",
"type" : "JSON",
"implicit" : 1
}
, {
"name" : "bD.pat",
"bootpath" : "/Users/laurenzi/Documents/PRODUCTION/Prod anciennes/Stroppa_/Auras_2015/lib/chamber-lib",
"patcherrelativepath" : "./lib/chamber-lib",
"type" : "TEXT",
"implicit" : 1
}
, {
"name" : "parMod2",
"bootpath" : "/Users/laurenzi/Documents/PRODUCTION/Prod anciennes/Stroppa_/Auras_2015/lib/chamber-lib",
"patcherrelativepath" : "./lib/chamber-lib",
"type" : "maxb",
"implicit" : 1
}
, {
"name" : "DelayControl.js",
"bootpath" : "/Users/laurenzi/Documents/PRODUCTION/Prod anciennes/Stroppa_/Auras_2015",
"patcherrelativepath" : ".",
"type" : "TEXT",
"implicit" : 1
}
]
}
}
BPM 60
;;;;;;;;; Load Library
@INSERT "zInclude/Lib_ofSil-harms1.txt"
/* Convenient Macro for setting Harmonizers
Note: In the score, harmonizers are set using semi-tones. THe GIZMO object however uses pitch scale.
We convert semi-tones to pitch-scale factor using (@pow(2., $x/12)) expression.
*/
@MACRO_DEF harms($h1, $h2, $h3, $h4)
{
group harms
{
@harm(1, $h1)
@harm(2, $h2)
@harm(3, $h3)
@harm(4, $h4)
}
}
;------------- Definition of AutoWah:
; A classic midi to hz convertor
$diapason := 440
@FUN_DEF midicent2hz($X) {
$diapason* @exp( ( ($X/100.0)-69.0) * @log(2.0)/12)
}
@MACRO_DEF wahwah($p,$dur)
{
curve wahwah-out 0.0 60ms
abort autowah
curve autowah @action := wah-params $freq $gain, @grain:=0.01s
{
$freq
{
{ (@midicent2hz($p)) } ;@type "exp_out"
$dur/2 { (@midicent2hz($p+2400)) } ;@type "exp_out"
$dur/2 { (@midicent2hz($p)) }
}
$gain
{
{0.0} @type "exp_in"
0.05 {1.0} @type "exp_in"
($dur-0.15) {0.9} @type "exp_in"
0.1 {0.0}
}
}
}
;;;;;;;;;;;; INITIALIZATIONS
; global level control for all harms in DB (post)
curve hr-out-db-ctrl -96, 0. 300ms
; individual harm level controls in DB (post). Needs to be set before hr-out-db-ctrl
curve hr1-out -96, -96 300ms
curve hr2-out -96, -96 300ms
curve hr3-out -96, -96 300ms
curve hr4-out -96, -96 300ms
fs1_fre 0.0
fs2_fre 0.0
fs3_fre 0.0
fs4_fre 0.0
curve fs1-out -96, -96 100ms ; individual fs level in DB
curve fs2-out -96, -96 100ms
curve fs3-out -96, -96 100ms
curve fs4-out -96, -96 100ms
curve fs-out-db-ctrl -96, -0. 100ms ; global post level fs in DB
; wah wah initialization
wah-Q 5.0
wah-filter gainresonant
curve wahwah-out -96, -96 300ms
NOTE C4 5.0
curve hr1-out -6. 300ms
curve hr2-out -3. 300ms
curve hr3-out -6. 300ms
curve hr4-out -4. 300ms
; hr-out-db-ctrl controls harm levels in DB
curve hr-out-db-ctrl -6.0 500ms
; Harms macro sets scalar value in semi-tones
@harms(-0.25,0.5,-0.5,0.25)
@harms(0.,0.,0.,0.)
NOTE D4 5.0
curve hr-out-db-ctrl 0.0 500ms
curve hr1-out 0. 300ms
loop hr1-baland 2.0 @abort:= { curve hr1-out -96. 60ms }
{
curve slider @Grain := 0.05s, @Action :=
{
@harm(1, $hr1)
}
{
$hr1
{
{ -1. } /*@type "exp"*/
1 { 1. }
1 { -1. }
}
}
}
NOTE E4 5.0 SingleHarm-Jitter
curve hr-out-db-ctrl 0.0 500ms
curve hr1-out 0. 300ms
loop hr1-jitter 200ms @abort:= { curve hr1-out -96. 60ms }
{
curve slider @Grain := 0.01s, @Action :=
{
@harm(1, $hr1)
}
{
$hr1
{
{ -0.25 } /*@type "exp"*/
100ms { 0.25 }
100ms { -0.25 }
}
}
}
abort hr1-jitter
curve hr1-out 0. 300ms
$random1 := @random()
loop hr1-jitter2 200ms @abort:= { curve hr1-out -96. 60ms }
{
@local $temp
curve slider @Grain := 0.01s,
@Action :=
{
$temp := $hr1
@harm(1, $hr1)
}
{
$hr1
{
{ (-0.5*$random1) } /*@type "exp"*/
100ms { (0.5*@random()) }
100ms { (-0.5*@random()) }
}
}
200ms $random1 := $temp
}
abort hr1-jitter2
NOTE F4 5.0 Trans
curve hr1-out 0. 300ms
curve hr2-out 0. 300ms
::trans( [-200, 200], 2.0)
curve hr3-out 0. 300ms
::trans( [-100, 100, -50], 2.0)
curve hr4-out 0. 300ms
::trans( [-100, 100, -50, 50], 2.0)
NOTE G4 5.0 Trans-Reordering
; Aborting ::trans will cut off all harms! So you'd need to reinitiate their levels!
abort ::trans
;;; IMPORTANT NOTE: The above is NOT effective if ::trans has already finished (auto-kill) like a Group
curve hr1-out 0. 300ms
curve hr2-out 0. 300ms
curve hr3-out 0. 300ms
curve hr4-out 0. 300ms
;;; Scrambling (random re-ordering)
$transpositions := [ -75, -25, 25, 75]
$loop := 2.0
loop scramble $loop
{
::trans($transpositions, $loop)
$loop $transpositions := @scramble($transpositions)
}
abort scramble
;;; Permuting the same list in a loop
$transpositions := [ -75, -25, 25, 75]
$loop := 2.0
loop permutation $loop
{
::trans($transpositions, $loop)
$loop $transpositions := @permute($transpositions, (@rand_int(@size($transpositions))))
}
abort permutation
;;; Order reversal
$transpositions := [ -75, -25, 25, 75]
$loop := 2.0
loop reversal $loop
{
::trans($transpositions, $loop)
$loop $transpositions := @reverse($transpositions)
}
abort reversal
;;; Rotation
$transpositions := [ -75, -25, 25, 75]
$loop := 2.0
loop rotate $loop
{
::trans($transpositions, $loop)
$loop $transpositions := @rotate($transpositions, 1) ; use negative for left rotation
}
abort rotate
NOTE C4 5.0 fs-Jitter
curve fs-out-db-ctrl 0.0 500ms
curve fs1-out 0. 100ms
loop fs1-jitter 100ms @abort:= { curve fs1-out -96. 60ms }
{
curve slider @Grain := 0.005s, @Action := fs1_fre $f1
{
$f1
{
{ -50. } /*@type "exp"*/
50ms { 50 }
50ms { -50 }
}
}
}
abort fs1-jitter
NOTE F4 5.0 wahwah
@wahwah(6900, 3.0)
@wahwah(6900, 1.0)
@wahwah(5800, 3.0)
@wahwah(5800, 1.0)
group wah
{
@wahwah(5800, 1.0)
0.5 @wahwah(5800, 1.0)
0.5 @wahwah(5800, 1.0)
0.5 @wahwah(5800, 1.0)
}
group wah
{
@wahwah(6900, 1.0)
1.0 @wahwah(6900, 1.0)
0.5 @wahwah(6900, 1.0)
0.5 @wahwah(6900, 1.0)
}
This diff is collapsed.
{
"patcher" : {
"fileversion" : 1,
"appversion" : {
"major" : 6,
"minor" : 1,
"revision" : 9,
"architecture" : "x86"
}
,
"rect" : [ 39.0, 56.0, 630.0, 462.0 ],
"bglocked" : 0,
"openinpresentation" : 0,
"default_fontsize" : 10.0,
"default_fontface" : 0,
"default_fontname" : "Arial Bold",
"gridonopen" : 0,
"gridsize" : [ 10.0, 10.0 ],
"gridsnaponopen" : 0,
"statusbarvisible" : 2,
"toolbarvisible" : 1,
"boxanimatetime" : 200,
"imprint" : 0,
"enablehscroll" : 1,
"enablevscroll" : 1,
"devicewidth" : 0.0,
"description" : "",
"digest" : "",
"tags" : "",
"boxes" : [ {
"box" : {
"id" : "obj-1",
"maxclass" : "slider",
"numinlets" : 1,
"numoutlets" : 1,
"orientation" : 2,
"outlettype" : [ "" ],
"parameter_enable" : 0,
"patching_rect" : [ 186.0, 45.0, 15.0, 135.0 ],
"relative" : 1
}
}
, {
"box" : {
"fontname" : "Geneva",
"fontsize" : 9.0,
"frgb" : 0.0,
"id" : "obj-2",
"linecount" : 2,
"maxclass" : "comment",
"numinlets" : 1,
"numoutlets" : 0,
"patching_rect" : [ 186.0, 28.0, 24.0, 29.0 ],
"text" : "max"
}
}
, {
"box" : {
"id" : "obj-3",
"maxclass" : "multislider",
"numinlets" : 1,
"numoutlets" : 2,
"outlettype" : [ "", "" ],
"parameter_enable" : 0,
"patching_rect" : [ 125.0, 217.0, 83.0, 85.0 ],
"peakcolor" : [ 0.498039, 0.498039, 0.498039, 1.0 ],
"setminmax" : [ 0.0, 127.0 ],
"setstyle" : 3,
"settype" : 0
}
}
, {
"box" : {
"bgcolor" : [ 0.866667, 0.866667, 0.866667, 1.0 ],
"fontname" : "Geneva",
"fontsize" : 9.0,
"htextcolor" : [ 0.870588, 0.870588, 0.870588, 1.0 ],
"id" : "obj-4",
"maxclass" : "number",
"numinlets" : 1,
"numoutlets" : 2,
"outlettype" : [ "int", "bang" ],
"parameter_enable" : 0,
"patching_rect" : [ 366.0, 100.0, 84.0, 18.0 ],
"triscale" : 0.9
}
}
, {
"box" : {
"fontname" : "Geneva",
"fontsize" : 9.0,
"frgb" : 0.0,
"id" : "obj-5",
"maxclass" : "comment",
"numinlets" : 1,
"numoutlets" : 0,
"patching_rect" : [ 243.0, 78.0, 28.0, 18.0 ],
"text" : "type"
}
}
, {
"box" : {
"fontname" : "Geneva",
"fontsize" : 9.0,
"id" : "obj-6",
"items" : [ "fixe", ",", "aléatoire", ",", "sinus", ",", "triangle" ],
"labelclick" : 1,
"maxclass" : "umenu",
"numinlets" : 1,
"numoutlets" : 3,
"outlettype" : [ "int", "", "" ],
"parameter_enable" : 0,
"patching_rect" : [ 242.0, 100.0, 108.0, 18.0 ]
}
}
, {
"box" : {
"id" : "obj-7",
"maxclass" : "slider",
"numinlets" : 1,
"numoutlets" : 1,
"orientation" : 2,
"outlettype" : [ "" ],
"parameter_enable" : 0,
"patching_rect" : [ 126.0, 44.0, 15.0, 135.0 ],
"relative" : 1
}
}
, {
"box" : {
"fontname" : "Geneva",
"fontsize" : 9.0,
"id" : "obj-8",
"maxclass" : "newobj",
"numinlets" : 4,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 126.0, 190.0, 240.0, 18.0 ],
"text" : "parMod3"
}
}
, {
"box" : {
"fontname" : "Geneva",
"fontsize" : 9.0,
"frgb" : 0.0,
"id" : "obj-9",
"linecount" : 6,
"maxclass" : "comment",
"numinlets" : 1,
"numoutlets" : 0,
"patching_rect" : [ 45.0, 325.0, 545.0, 74.0 ],
"text" : "MODULE PAR MOD Certains modules (harm, 1-3 paramètres des spats) devraient être variés de façon très lente pendant leur activation. La modulation, basée sur une table interpolante (aléatoire, sinus ou triangle), est ajoutée à la valeur de référence selon un coéfficient. Puisque ce type de traitement est utilisé plusieurs fois, il vaudrait peut-être la peine de l'abstraire et de faire un patch \"PAR MOD\", auquel on envoie un paramètre, une table et les valeurs de fréquence (ou durée) et amplitude, et que l'on branche sur n'importe quel paramètre d'un effet. Cela me permettra, si cette expérience est bonne, de l'utiliser pour d'autres paramètres, si je trouve que pendant les répétitions cela fonctionne bien."
}
}
, {
"box" : {
"fontname" : "Geneva",
"fontsize" : 9.0,
"frgb" : 0.0,
"id" : "obj-10",
"maxclass" : "comment",
"numinlets" : 1,
"numoutlets" : 0,
"patching_rect" : [ 369.0, 78.0, 59.0, 18.0 ],
"text" : "temps (ms)"
}
}
, {
"box" : {
"fontname" : "Geneva",
"fontsize" : 9.0,
"frgb" : 0.0,
"id" : "obj-11",
"maxclass" : "comment",
"numinlets" : 1,
"numoutlets" : 0,
"patching_rect" : [ 126.0, 27.0, 24.0, 18.0 ],
"text" : "min"
}
}
],
"lines" : [ {
"patchline" : {
"destination" : [ "obj-8", 1 ],
"disabled" : 0,
"hidden" : 0,
"source" : [ "obj-1", 0 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-8", 3 ],
"disabled" : 0,
"hidden" : 0,
"source" : [ "obj-4", 0 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-8", 2 ],
"disabled" : 0,
"hidden" : 0,
"source" : [ "obj-6", 0 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-8", 0 ],
"disabled" : 0,
"hidden" : 0,
"source" : [ "obj-7", 0 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-3", 0 ],
"disabled" : 0,
"hidden" : 0,
"source" : [ "obj-8", 0 ]
}
}
],
"dependency_cache" : [ {
"name" : "parMod3.maxpat",
"bootpath" : "/Users/laurenzi/StroppaLibs/Stroppa-FXLib",
"patcherrelativepath" : ".",
"type" : "JSON",
"implicit" : 1
}
]
}
}
This diff is collapsed.
; ============================== STROPPA Delay LIBRARY ==================================== (12-10-2015)
;
; last updated (10-10-2015)
; ================================================================================================
/* NOTES:
Two things should be defined for this Library:
1. A Delay Matrix, whose name is always $delinit and defined as
as $delinit := [ (X) | (Y)] where
Y = Max # of delays to be used
X = # of points (outputs ; 2 max)
This should be defined BEFORE getting here.
2. An Antescofo map called $delunitpresets that contains presets for delay parameters (del, fbk, gain, panmin, panmax)
It should be defined by user.
Ranges : del (0-1), fbk (dB), gain (dB), pan (0-100)
Definition example: