Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion maxdiff/patch_printer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand All @@ -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]})"
Expand Down
20 changes: 10 additions & 10 deletions maxdiff/tests/test_baselines/FrozenTest.amxd.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions maxdiff/tests/test_baselines/Test.amxd.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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
Expand All @@ -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: <enum: [one, two, three] | longname: live.menu | mmax: 2 | modmode: 0 | shortname: live.menu | type: 2> | usepicture: 1 | usesvgviewbox: 1
Expand All @@ -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: <longname: EmbeddedParam | modmode: 3 | shortname: Embedded | type: 0 | unitstyle: 0>
Expand All @@ -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]
//============================================================
Expand Down Expand Up @@ -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: <longname: In a subpatcher | modmode: 0 | shortname: live.dial | type: 0 | unitstyle: 0>
[t b b]
Expand Down
Binary file modified maxdiff/tests/test_files/FrozenTest.amxd
Binary file not shown.
Binary file modified maxdiff/tests/test_files/Test.amxd
Binary file not shown.