From 5d7b49d0a06cb85a189458617f26ab1e6348bee4 Mon Sep 17 00:00:00 2001 From: Mattijs Kneppers Date: Thu, 4 Jul 2024 14:54:17 +0200 Subject: [PATCH] Add the statistics functionality to the ReadMe --- maxdiff/README.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/maxdiff/README.md b/maxdiff/README.md index bc29183..f6d06b1 100644 --- a/maxdiff/README.md +++ b/maxdiff/README.md @@ -18,12 +18,28 @@ Removing the comments from the new MIDI Effect: For `.amxd` files: * The scripts will also tell you what device type it is. -* If a device is frozen, you will see an overview of the content frozen into the deivce. NOTE: We recommend never to commit frozen devices to a git repo, instead to include the dependencies as separate files. +* If a device is frozen, you will see an overview and statistics of the content frozen into the device. NOTE: We recommend never to commit frozen devices to a git repo, instead to include the dependencies as separate files. ### Why? Readable diffs are very useful for patch code review, or for a sanity check before committing (did I really change nothing else expect removing all my debug messages and prints?). +### Using the frozen device statistics + +It currently supports two different ways to count object instances and connections: + +* Total - Counting every abstraction instance - Indicates loading time +* Unique - Counting abstractions once - Indicates maintainability + +This provides the ability to quantify refactoring efforts. Of course there is more to refactoring than these statistics, but this does make refactoring work more tangible and is another tool that illustrates Ableton's commitment to quality of Max work. + +Note that we typically don't commit frozen devices to a repo, so the typical way to use this feature is: + +1. Commit the device and its dependencies in **un**frozen state. +2. Temporarily freeze the device. +3. Run `python3 ./maxdiff/amxd_textconv.py ` to get the statistics. +4. Discard the freezing. + ### What does not work Typical things you can do with text-based code that will not work with Max patches or devices: