From 545eda648551d6471a6b6bdfbbb49092e03a7f8b Mon Sep 17 00:00:00 2001 From: mkp Date: Thu, 26 Jun 2025 15:03:16 +0200 Subject: [PATCH 1/2] Also add a segmented patch cord to the test Also save with Max 9.0.7, which is now the latest bundled version --- .../tests/test_baselines/FrozenTest.amxd.txt | 20 +++++++++--------- maxdiff/tests/test_baselines/Test.amxd.txt | 14 ++++++------ maxdiff/tests/test_files/FrozenTest.amxd | Bin 414102 -> 411119 bytes maxdiff/tests/test_files/Test.amxd | Bin 39543 -> 36497 bytes 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/maxdiff/tests/test_baselines/FrozenTest.amxd.txt b/maxdiff/tests/test_baselines/FrozenTest.amxd.txt index 3b54a00..f9afad0 100644 --- a/maxdiff/tests/test_baselines/FrozenTest.amxd.txt +++ b/maxdiff/tests/test_baselines/FrozenTest.amxd.txt @@ -2,21 +2,21 @@ MIDI Effect Device ------------------- Device is frozen ----- Contents ----- -Test.amxd: 39511 bytes, modified at 2024/10/21 12:50:20 UTC <= Device +Test.amxd: 36528 bytes, modified at 2025/06/26 12:53:53 UTC <= Device ParamAbstraction.maxpat: 1570 bytes, modified at 2024/05/24 13:59:36 UTC, 2 instances -MyAbstraction.maxpat: 2015 bytes, modified at 2024/10/21 12:18:20 UTC, 6 instances +MyAbstraction.maxpat: 2015 bytes, modified at 2025/02/14 11:10:38 UTC, 6 instances AbstractionWithParameter.maxpat: 1569 bytes, modified at 2024/05/24 13:59:36 UTC, 2 instances hz-icon.svg: 484 bytes, modified at 2024/05/24 13:59:36 UTC, 3 instances beat-icon.svg: 533 bytes, modified at 2024/05/24 13:59:36 UTC, 3 instances fpic.png: 7094 bytes, modified at 2024/05/24 13:59:36 UTC, 5 instances -shakerkicksnare.aif: 352854 bytes, modified at 2024/10/21 12:21:12 UTC, 2 instances -VisibleBang.js: 317 bytes, modified at 2024/10/21 12:21:12 UTC, 1 instance -my-maxnode-basic.js: 464 bytes, modified at 2024/10/21 12:21:12 UTC, 1 instance -times3.gendsp: 2047 bytes, modified at 2024/10/21 12:21:12 UTC, 1 instance -myxfade.genjit: 3156 bytes, modified at 2024/10/21 12:21:12 UTC, 2 instances -mystorage.json: 239 bytes, modified at 2024/10/21 12:21:12 UTC, 1 instance -myTestTable: 410 bytes, modified at 2024/10/21 12:21:12 UTC, 1 instance -TestScript.js: 87 bytes, modified at 2024/10/21 12:21:12 UTC, 1 instance +shakerkicksnare.aif: 352854 bytes, modified at 2025/02/14 11:10:38 UTC, 2 instances +VisibleBang.js: 317 bytes, modified at 2025/02/14 11:10:38 UTC, 1 instance +my-maxnode-basic.js: 464 bytes, modified at 2025/02/14 11:10:38 UTC, 1 instance +times3.gendsp: 2047 bytes, modified at 2025/02/14 11:10:38 UTC, 1 instance +myxfade.genjit: 3156 bytes, modified at 2025/02/14 11:10:38 UTC, 2 instances +mystorage.json: 239 bytes, modified at 2025/02/14 11:10:38 UTC, 1 instance +myTestTable: 410 bytes, modified at 2025/02/14 11:10:38 UTC, 1 instance +TestScript.js: 87 bytes, modified at 2025/02/14 11:10:38 UTC, 1 instance collContent.txt: 8 bytes, modified at 2024/05/24 13:59:36 UTC, NOT FOUND IN PATCH Total - Counting every abstraction instance - Indicates loading time diff --git a/maxdiff/tests/test_baselines/Test.amxd.txt b/maxdiff/tests/test_baselines/Test.amxd.txt index 6669878..432637f 100644 --- a/maxdiff/tests/test_baselines/Test.amxd.txt +++ b/maxdiff/tests/test_baselines/Test.amxd.txt @@ -39,7 +39,7 @@ project: collContent.txt ----------- patcher ----------- -appversion: 8.6.4-x64-1 | rect: [91, 153, 1288, 310] | openrect: [0, 0, 0, 169] | default_fontsize: 10.0 | default_fontname: Arial Bold | gridsize: [8, 8] | boxanimatetime: 500 | latency: 0 | is_mpe: 0 | platform_compatibility: 0 | autosave: 0 +appversion: 9.0.7-x64-1 | rect: [91, 153, 1288, 310] | openrect: [0, 0, 0, 169] | default_fontsize: 10.0 | default_fontname: Arial Bold | gridsize: [8, 8] | boxanimatetime: 500 | latency: 0 | is_mpe: 0 | external_mpe_tuning_enabled: 0 | platform_compatibility: 0 | autosave: 0 ----------- objects ----------- [comment NOTE: after any changes to this device, also update FrozenTest.amxd] [poly~ MyAbstraction] @@ -50,7 +50,7 @@ appversion: 8.6.4-x64-1 | rect: [91, 153, 1288, 310] | openrect: [0, 0, 0, 169] [coll] [p ImplicitDependencies] varname: ImplicitDependencies ----------- patcher ----------- - appversion: 8.6.4-x64-1 | rect: [60, 130, 639, 710] + appversion: 9.0.7-x64-1 | rect: [60, 130, 639, 710] ----------- objects ----------- [js TestScript] filename: TestScript | parameter_enable: 0 [comment We would expect implicit dependencies for these but they don't seem to be added.] bubble: 1 | bubbleside: 2 | linecount: 2 @@ -68,7 +68,7 @@ appversion: 8.6.4-x64-1 | rect: [91, 153, 1288, 310] | openrect: [0, 0, 0, 169] [buffer~ test shakerkicksnare.aif] [gen~ @gen times3.gendsp] [sfplay~ @audiofile shakerkicksnare.aif] - [node.script my-maxnode-basic.js] autostart: 0 | defer: 0 | watch: 0 + [node.script my-maxnode-basic.js] autostart: 0 | defer: 0 | watch: 0 | textfile: {'filename': 'my-maxnode-basic.js', 'flags': 0, 'embed': 0, 'autowatch': 1} [comment JSUI using script file] bubble: 1 [jsui] filename: VisibleBang.js [live.menu] pictures: [hz-icon.svg, beat-icon.svg] | remapsvgcolors: 1 | parameter: | usepicture: 1 | usesvgviewbox: 1 @@ -83,7 +83,7 @@ appversion: 8.6.4-x64-1 | rect: [91, 153, 1288, 310] | openrect: [0, 0, 0, 169] [message read myTestTable] (0) => (0) [table myTestTable] [bpatcher ThisWasAnAbstractionBeforeEmbeddingIt.maxpat] embed: 1 ----------- patcher ----------- - appversion: 8.6.4-x64-1 | rect: [927, 431, 640, 480] + appversion: 9.0.7-x64-1 | rect: [927, 431, 640, 480] ----------- objects ----------- [live.comment Embedded] [live.numbox] parameter: @@ -97,7 +97,7 @@ appversion: 8.6.4-x64-1 | rect: [91, 153, 1288, 310] | openrect: [0, 0, 0, 169] [button] [gen @t exponent] ----------- patcher ----------- - appversion: 8.6.4-x64-1 | classnamespace: dsp.gen | rect: [84, 144, 653, 641] + appversion: 9.0.7-x64-1 | classnamespace: dsp.gen | rect: [84, 144, 653, 641] ----------- objects ----------- [codebox] //============================================================ @@ -140,7 +140,7 @@ appversion: 8.6.4-x64-1 | rect: [91, 153, 1288, 310] | openrect: [0, 0, 0, 169] [coll @embed 1] coll_data: {'count': 2, 'data': [{'key': 0, 'value': ['test']}, {'key': 1, 'value': ['another', 'test']}]} | embed: 1 | precision: 6 [p MySubpatcher] ----------- patcher ----------- - appversion: 8.6.4-x64-1 | rect: [805, 282, 271, 250] + appversion: 9.0.7-x64-1 | rect: [805, 282, 271, 250] ----------- objects ----------- [live.dial] parameter: [t b b] @@ -165,6 +165,6 @@ appversion: 8.6.4-x64-1 | rect: [91, 153, 1288, 310] | openrect: [0, 0, 0, 169] [button] (0) => (0) [t 3] | order: 1 [t 2] (0) => (0) [print] [message read collContent.txt] (0) => (0) [coll] -[loadbang] (0) => (0) [message read collContent.txt] +[loadbang] (0) => (0) [message read collContent.txt] | midpoints: [685.5, 84.0, 638.5, 84.0] [t 1] (0) => (0) [print] [t 3] (0) => (0) [print] diff --git a/maxdiff/tests/test_files/FrozenTest.amxd b/maxdiff/tests/test_files/FrozenTest.amxd index a7c18a4e724bf7cb0b71c02e528c4a7192dcf13c..8b90116406c6b3ae80f59fdc45e7c1bef381f500 100644 GIT binary patch delta 1005 zcmbQXSn_?h*lHjT*#YPmNn zvJ|lJnVabu=qQ*Of=E+~$&H0Fn|E_qFf&?CHcS_mfS3)mj#CN6{K@h>(;RA=pt6$GijuUmhd-8$;?#=U@Etv?1VbSDLH&swLPCm}> zy!pN73m(FHq9@0N+e7tOY-AH_Dp_YDm{6Ah2Z2aY46DsWLYNndV6f< z&S7TRyr95cTrD>IjJelEYsRqrZECB6A&{4G0S$AX{on2qL2D%Vy2ADFZCyqRrnsQ3B@YowcZmM!`-qaumMG@0h6Yf2VG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g8K^JRdBt>)$d|Bd2wZju5>XX#Zgas)Y?X&DippT{ zwzLmPId!ZhF*fckw%k3^8Bpbe6(vh{ES%CtW$mFW7t;OJJw$;$hAOoo&@Eg*6(WoR zqk`Ly;Qb@HpbvWt+ZaNZ>Qs4O>*#_;fuNv_04aNnp*T>%?;m1gSV4^i7SxcI2+RO2 zXc2I$b>xO?W8ejKAAmvM58^OA%oBi|gTZM)a^MVT-iA3iAX(EoTXI>|Z~2{Nl4@V_ z@pPuTv%$s)L&}C22TC2vVFgi~A*7IwFdM{ts>fro21`8JS#Kk4p2<;WVZ*ek;gb)O z7fg&=tbRIm%5}2*(SJuK`etOMJtJS7Z}YAXJZ<+TE|E4_ObssnYxa0Z`UJJ+1S<_xO)eAnl*!Bql`*Iy?P+yU>;7y94Npxj8$$)6W` zC2>zkXJFpjoLO!^fbVlxyke4;Caq_WqeEihrc=x gtjUc0xPDT8ojfXUtwVt*`upSF>E~<7-!N_fKmY&$ From 429fb43d7d4000c14e4527766be0e5816787860f Mon Sep 17 00:00:00 2001 From: mkp Date: Thu, 26 Jun 2025 15:03:48 +0200 Subject: [PATCH 2/2] Ignore the midpoints patchline property --- maxdiff/patch_printer.py | 8 +++++++- maxdiff/tests/test_baselines/Test.amxd.txt | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/maxdiff/patch_printer.py b/maxdiff/patch_printer.py index a68fcb9..ceac85a 100644 --- a/maxdiff/patch_printer.py +++ b/maxdiff/patch_printer.py @@ -110,7 +110,7 @@ def print_patcher_summary_recursive( "maxclass", # used in box name "text", # shown in box name "id", # used only for lines - "patching_rect", # different every time + "patching_rect", # not relevant for patch diffing (event ordering is shown with "order" property") "numinlets", # cached from inlet objects "numoutlets", # cached from outlet objects "outlettype", # cached from outlet objects @@ -153,6 +153,10 @@ def print_patcher_summary_recursive( #### patch cords #### + skip_line_properties = [ + "midpoints", # not relevant for patch diffing (event ordering is captured with "order" property") + ] + if len(patcher["lines"]) == 0: return summary_string @@ -170,6 +174,8 @@ def print_patcher_summary_recursive( for key, val in line.items(): if key == "patchline": for key2, val2 in val.items(): + if key2 in skip_line_properties: + continue if key2 == "source": from_name = f"[{ids_to_names[val2[0]]}]" from_outlet = f"({val2[1]})" diff --git a/maxdiff/tests/test_baselines/Test.amxd.txt b/maxdiff/tests/test_baselines/Test.amxd.txt index 432637f..15cfe92 100644 --- a/maxdiff/tests/test_baselines/Test.amxd.txt +++ b/maxdiff/tests/test_baselines/Test.amxd.txt @@ -165,6 +165,6 @@ appversion: 9.0.7-x64-1 | rect: [91, 153, 1288, 310] | openrect: [0, 0, 0, 169] [button] (0) => (0) [t 3] | order: 1 [t 2] (0) => (0) [print] [message read collContent.txt] (0) => (0) [coll] -[loadbang] (0) => (0) [message read collContent.txt] | midpoints: [685.5, 84.0, 638.5, 84.0] +[loadbang] (0) => (0) [message read collContent.txt] [t 1] (0) => (0) [print] [t 3] (0) => (0) [print]