Skip to content

Commit

Permalink
Add the statistics functionality to the ReadMe
Browse files Browse the repository at this point in the history
  • Loading branch information
Mattijs Kneppers committed Jul 4, 2024
1 parent b77d63f commit 5d7b49d
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion maxdiff/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <path/to/device.amxd>` 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:
Expand Down

0 comments on commit 5d7b49d

Please sign in to comment.