Commit 33c0c4ee authored by Arshia Cont's avatar Arshia Cont
Browse files

Harmlibv1.2 for two harmo instances (work by Carlo Laurenzi)

parent ffd45775
BPM 60
;;;; Performing general tests on Table operations for debugging
print General Tests
$t := [$x | $x in 1 .. 20 : 2] ;; creates impair numbers up to 10
print Table: ($t)
print Lace test of 3: (@lace($t, 3))
;$index := [1,3,4]
;print Subindexing: ($t[($index)])
;;;;;;;;; Load Library
@INSERT "zInclude/Lib_Stroppa-harms1.2.txt"
;@INSERT "Stroppa_/Auras_2015/Auras_Scores/AscoLibs/Lib_Stroppa-harms1.txt"
antescofo::suivi 0
antescofo::version
;;print Db -6.0 gives (@db2linear(-6.0))
;;;;;;;;;;;; INITIALIZATIONS Harmonizers Bank01 "hr"
::InitHarmsA(5, "hr")
curve hr_out_gain -150.0, 0.0 3.0 ; All Gain values are in DB
::transA([0, 0, 0, 0, 0], 0.5)
::transgainA([1, 2, 3, 4, 5], [-150, -150, -150, -150, -150], 0.5)
;;;;;;;;;;;; INITIALIZATIONS Harmonizers Bank02 "hrm"
::InitHarmsB(5, "hrm")
curve hrm_out_gain -150.0, 0.0 3.0 ; All Gain values are in DB
::transB([0, 0, 0, 0, 0], 0.5)
::transgainB([1, 2, 3, 4, 5], [-150, -150, -150, -150, -150], 0.5)
NOTE C4 5.0 Trans_OfSilence
::transA([100, -100, -50, 50],3.0)
::transB([110, -110, -40, 60],6.0)
NOTE C#4 3.0 "GainControl A"
loop gcA 2.0
{
::transgainA([1, 2, 3, 4], [-50.0, -12.0, -12.0, -32.0], 1.0)
1.0 ::transgainA([1, 2, 3, 4], [-12.0, -50.0, -32.0, -12,0], 1.0)
}
NOTE D4 5.0 "GainControl B"
abort gcA
loop gcB 2.0
{
::transgainB([1, 2, 3, 4], [-50.0, -12.0, -12.0, -32.0], 1.0)
1.0 ::transgainB([1, 2, 3, 4], [-12.0, -50.0, -32.0, -12,0], 1.0)
}
NOTE C4 5.0 Trans_Interval
abort gcB
;::transinterval([4], [-1200], 2)
print "::transinterval doesn't work yet!"
NOTE E4 5.0 SingleHarm-Jitter
abort ::transA
::transgainA([1, 2, 3, 4], [-3.0, -150, -150, -150], 1.0)
$random1 := @random()
loop hr1-jitter2 200ms @abort:= { curve hr1_gain -3.0, -96. 60ms }
{
@local $temp
curve slider @Grain := 0.01s,
@Action :=
{
$temp := $hr1
print $hr1
::set_harmintervalA(1, $hr1)
}
{
$hr1
{
{ (10*(-0.5*$random1)) }
100ms { (10*(0.5*@random())) }
100ms { (10*(-0.5*@random())) }
}
}
200ms $random1 := $temp
}
NOTE F4 5.0 Trans-Jitter
abort hr1-jitter2
::transB( [-200, 200], 2.0)
2.0 ::transB( [-100, 100, -50], 5.0)
2.0 ::transB( [-300, 600, -200, 100], 2.0)
NOTE G4 5.0 "Trans-Reordering"
; Aborting ::transB will cut off all hrm harms! So you'd need to reinitiate their levels!
abort ::transB
;;; IMPORTANT NOTE: The above is NOT effective if ::transB has already finished (auto-kill) like a Group
;;; Scrambling (random re-ordering)
$transpositions := [ -75, -25, 25, 75]
$loop := 2.0
NOTE G4 5.0 "Scramble Transposition"
print Scramble Transposition
loop scrambleA $loop
{
::transA($transpositions, $loop)
$loop $transpositions := @scramble($transpositions)
}
loop scrambleB $loop
{
::transB($transpositions, $loop)
$loop $transpositions := @scramble($transpositions)
}
NOTE G4 5.0 "Permutation Transposition"
abort scrambleA
abort scrambleB
print Permutation Transposition
;;; Permuting the same list in a loop
$transpositions := [ -75, -25, 25, 75]
$loop := 2.0
loop permutation $loop
{
::transA($transpositions, $loop)
$loop $transpositions := @permute($transpositions, (@rand_int(@size($transpositions))))
}
NOTE G4 5.0 "Order_Reversal Transposition"
abort permutation
print Order_Reversal Transposition
;;; Order reversal
$transpositions := [ -75, -25, 25, 75]
$loop := 2.0
loop reversal $loop
{
::transA($transpositions, $loop)
$loop $transpositions := @reverse($transpositions)
}
NOTE G4 5.0 "Rotating Transposition"
abort reversal
print Rotating Transposition
;;; 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
}
NOTE G4 5.0 "END-of-score"
abort rotate
......@@ -88,7 +88,6 @@
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 1232.5, 360.0, 37.0, 18.0 ],
"presentation_rect" : [ 1229.0, 362.5, 0.0, 0.0 ],
"text" : "clear"
}
......@@ -2713,13 +2712,13 @@
}
],
"parameters" : {
"obj-84::obj-35" : [ "[9]", "Level", 0 ],
"obj-76::obj-21::obj-6" : [ "live.tab[3]", "live.tab[1]", 0 ],
"obj-25" : [ "harms.gain~", "harms.gain~", 0 ],
"obj-84::obj-32" : [ "[10]", "[2]", 0 ],
"obj-76::obj-35" : [ "[5]", "Level", 0 ],
"obj-84::obj-21::obj-6" : [ "live.tab[1]", "live.tab[1]", 0 ],
"obj-76::obj-21::obj-6" : [ "live.tab[3]", "live.tab[1]", 0 ],
"obj-84::obj-35" : [ "[9]", "Level", 0 ],
"obj-76::obj-32" : [ "[8]", "[2]", 0 ],
"obj-84::obj-32" : [ "[10]", "[2]", 0 ]
"obj-84::obj-21::obj-6" : [ "live.tab[1]", "live.tab[1]", 0 ],
"obj-25" : [ "harms.gain~", "harms.gain~", 0 ]
}
,
"dependency_cache" : [ {
......
{
"patcher" : {
"fileversion" : 1,
"appversion" : {
"major" : 6,
"minor" : 1,
"revision" : 9,
"architecture" : "x86"
}
,
"rect" : [ 1.0, 44.0, 1404.0, 500.0 ],
"bglocked" : 0,
"openinpresentation" : 1,
"default_fontsize" : 12.0,
"default_fontface" : 0,
"default_fontname" : "Arial",
"gridonopen" : 0,
"gridsize" : [ 15.0, 15.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",
"fontsize" : 12.0,
"id" : "obj-60",
"maxclass" : "newobj",
"numinlets" : 1,
"numoutlets" : 2,
"outlettype" : [ "", "" ],
"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",
"fontsize" : 12.0,
"id" : "obj-219",
"maxclass" : "newobj",
"numinlets" : 1,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 50.0, 122.0, 150.0, 20.0 ],
"text" : "expr 1200.*log($f1)/log(2.)"
}
}
, {
"box" : {
"fontname" : "Arial",
"fontsize" : 12.0,
"id" : "obj-150",
"maxclass" : "newobj",
"numinlets" : 2,
"numoutlets" : 2,
"outlettype" : [ "", "" ],
"patching_rect" : [ 50.0, 100.0, 68.0, 20.0 ],
"text" : "route mute"
}
}
, {
"box" : {
"comment" : "",
"id" : "obj-220",
"maxclass" : "inlet",
"numinlets" : 0,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 50.0, 40.0, 25.0, 25.0 ]
}
}
, {
"box" : {
"comment" : "",
"id" : "obj-221",
"maxclass" : "outlet",
"numinlets" : 1,
"numoutlets" : 0,
"patching_rect" : [ 50.0, 202.0, 25.0, 25.0 ]
}
}
, {
"box" : {
"comment" : "",
"id" : "obj-222",
"maxclass" : "outlet",
"numinlets" : 1,
"numoutlets" : 0,
"patching_rect" : [ 80.0, 202.0, 25.0, 25.0 ]
}
}
],
"lines" : [ {
"patchline" : {
"destination" : [ "obj-219", 0 ],
"disabled" : 0,
"hidden" : 0,
"source" : [ "obj-150", 1 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-221", 0 ],
"disabled" : 0,
"hidden" : 0,
"source" : [ "obj-150", 0 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-222", 0 ],
"disabled" : 0,
"hidden" : 0,
"source" : [ "obj-219", 0 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-150", 0 ],
"disabled" : 0,
"hidden" : 0,
"source" : [ "obj-220", 0 ]
}
}
]
}
,
"patching_rect" : [ 1500.0, 65.0, 65.0, 20.0 ],
"saved_object_attributes" : {
"default_fontface" : 0,
"default_fontname" : "Arial Bold",
"default_fontsize" : 10.0,
"description" : "",
"digest" : "",
"fontface" : 0,
"fontname" : "Arial Bold",
"fontsize" : 10.0,
"globalpatchername" : "",
"tags" : ""
}
,
"text" : "p dispatch"
}
}
, {
"box" : {
"fontname" : "Arial",
"fontsize" : 12.0,
"id" : "obj-112",
"maxclass" : "flonum",
"numinlets" : 1,
"numoutlets" : 2,
"outlettype" : [ "float", "bang" ],
"parameter_enable" : 0,
"patching_rect" : [ 1770.0, 90.0, 50.0, 20.0 ],
"presentation" : 1,
"presentation_rect" : [ 1296.0, 342.0, 50.0, 20.0 ]
}
}
, {
"box" : {
"fontname" : "Arial",
"fontsize" : 12.0,
"id" : "obj-126",
"maxclass" : "newobj",
"numinlets" : 0,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 1770.0, 45.0, 73.0, 20.0 ],
"presentation" : 1,
"presentation_rect" : [ 1296.0, 318.0, 73.0, 20.0 ],
"text" : "r hrm5_gain"
}
}
, {
"box" : {
"fontname" : "Arial",
"fontsize" : 12.0,
"id" : "obj-127",
"maxclass" : "flonum",
"numinlets" : 1,
"numoutlets" : 2,
"outlettype" : [ "float", "bang" ],
"parameter_enable" : 0,
"patching_rect" : [ 1590.0, 300.0, 50.0, 20.0 ],
"presentation" : 1,
"presentation_rect" : [ 1296.0, 279.0, 50.0, 20.0 ]
}
}
, {
"box" : {
"fontname" : "Arial",
"fontsize" : 12.0,
"id" : "obj-128",
"maxclass" : "newobj",
"numinlets" : 0,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 1590.0, 255.0, 73.0, 20.0 ],
"presentation" : 1,
"presentation_rect" : [ 1296.0, 258.0, 73.0, 20.0 ],
"text" : "r hrm4_gain"
}
}
, {
"box" : {
"fontname" : "Arial",
"fontsize" : 12.0,
"id" : "obj-129",
"maxclass" : "flonum",
"numinlets" : 1,
"numoutlets" : 2,
"outlettype" : [ "float", "bang" ],
"parameter_enable" : 0,
"patching_rect" : [ 1590.0, 234.0, 50.0, 20.0 ],
"presentation" : 1,
"presentation_rect" : [ 1296.0, 212.0, 50.0, 20.0 ]
}
}
, {
"box" : {
"fontname" : "Arial",
"fontsize" : 12.0,
"id" : "obj-130",
"maxclass" : "newobj",
"numinlets" : 0,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 1590.0, 189.0, 73.0, 20.0 ],
"presentation" : 1,
"presentation_rect" : [ 1296.0, 188.0, 73.0, 20.0 ],
"text" : "r hrm3_gain"
}
}
, {
"box" : {
"fontname" : "Arial",
"fontsize" : 12.0,
"id" : "obj-132",
"maxclass" : "flonum",
"numinlets" : 1,
"numoutlets" : 2,
"outlettype" : [ "float", "bang" ],
"parameter_enable" : 0,
"patching_rect" : [ 1590.0, 165.0, 50.0, 20.0 ],
"presentation" : 1,
"presentation_rect" : [ 1296.0, 140.0, 50.0, 20.0 ]
}
}
, {
"box" : {
"fontname" : "Arial",
"fontsize" : 12.0,
"id" : "obj-138",
"maxclass" : "newobj",
"numinlets" : 0,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 1590.0, 120.0, 73.0, 20.0 ],
"presentation" : 1,
"presentation_rect" : [ 1296.0, 118.0, 73.0, 20.0 ],
"text" : "r hrm2_gain"
}
}
, {
"box" : {
"fontname" : "Arial",
"fontsize" : 12.0,
"id" : "obj-140",
"maxclass" : "flonum",
"numinlets" : 1,
"numoutlets" : 2,
"outlettype" : [ "float", "bang" ],
"parameter_enable" : 0,
"patching_rect" : [ 1590.0, 90.0, 50.0, 20.0 ],
"presentation" : 1,
"presentation_rect" : [ 1296.0, 72.0, 50.0, 20.0 ]
}
}
, {
"box" : {
"fontname" : "Arial",
"fontsize" : 12.0,
"id" : "obj-141",
"maxclass" : "newobj",
"numinlets" : 0,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 1590.0, 45.0, 73.0, 20.0 ],
"presentation" : 1,
"presentation_rect" : [ 1296.0, 48.0, 73.0, 20.0 ],
"text" : "r hrm1_gain"
}
}
, {
"box" : {
"fontname" : "Arial",
"fontsize" : 12.0,
"id" : "obj-142",
"maxclass" : "flonum",
"numinlets" : 1,
"numoutlets" : 2,
"outlettype" : [ "float", "bang" ],
"parameter_enable" : 0,
"patching_rect" : [ 1695.0, 300.0, 50.0, 20.0 ],
"presentation" : 1,
"presentation_rect" : [ 1199.0, 436.0, 50.0, 20.0 ]
}
}
, {
"box" : {
"fontname" : "Arial",
"fontsize" : 12.0,
"id" : "obj-143",
"maxclass" : "newobj",
"numinlets" : 0,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 1696.0, 277.0, 89.0, 20.0 ],
"presentation" : 1,
"presentation_rect" : [ 1199.0, 413.0, 89.0, 20.0 ],
"text" : "r hrm_out_gain"
}
}
, {
"box" : {
"id" : "obj-144",
"maxclass" : "toggle",
"numinlets" : 1,
"numoutlets" : 1,
"outlettype" : [ "int" ],
"parameter_enable" : 0,
"patching_rect" : [ 1545.0, 301.0, 20.0, 20.0 ],
"presentation" : 1,
"presentation_rect" : [ 1255.0, 279.0, 20.0, 20.0 ]
}
}
, {
"box" : {
"fontname" : "Arial",
"fontsize" : 12.0,
"id" : "obj-145",
"maxclass" : "newobj",
"numinlets" : 1,
"numoutlets" : 2,
"outlettype" : [ "", "" ],
"patcher" : {
"fileversion" : 1,
"appversion" : {
"major" : 6,
"minor" : 1,
"revision" : 9,
"architecture" : "x86"
}
,
"rect" : [ 0.0, 0.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",
"fontsize" : 12.0,
"id" : "obj-219",
"maxclass" : "newobj",
"numinlets" : 1,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 50.0, 122.0, 150.0, 20.0 ],
"text" : "expr 1200.*log($f1)/log(2.)"
}
<