Skip to content
Open
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
27 changes: 27 additions & 0 deletions notes/performance-moonshot/MAX-TESTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Max 9 test procedure

General instructions. Read this before you start.

- Start each test from a terminal with the command shown in the table. `max9` is the Max launcher command.
- The log used is this file: `~/.wine-ableton/drive_c/users/theo/AppData/Roaming/Cycling '74/Max 9/Logs/Max.log`. To search it, run: `grep "TEXT" "<log path>"`.
- The harness patches are in the repository folder `tools/max-harness/`. Use the full path to a patch in each command.
- The community patches (jit.mo-Worms, jit.mo-Alphablend, cpu-tester-gen, waveshaper, mc.karplus, Big Scope best practices) are not in the repository. Get them with the source links in `tools/max-harness/DOWNLOADED-PATCHES-MANIFEST.md`. The Node test also needs the file `outlet-methods.js` in the same folder as its patch; the manifest gives its source.
- If Max is open when a test tells you to start it fresh, do MAX-T14 first to stop Max completely.
- Do each test in order. One test at a time. Record the result of each test.

| Test | Name | Max file | Description | Instructions | Pass conditions |
|---|---|---|---|---|---|
| MAX-T01 | Start and draw check | `cycle~.maxhelp` (comes with Max, in `resources/help/msp/` in the Max program folder) | Max starts and draws a patch window correctly. | 1. Run: `max9 "<path to cycle~.maxhelp>"`.<br>2. Wait 20 seconds.<br>3. Look at the window. | A window with the name cycle~.maxhelp is open. The text in it is sharp and complete. The boxes and the lines between them are visible. Max did not crash. |
| MAX-T02 | Second file goes to the same Max | any small patch, for example `t01-dsp-probe.maxpat` | A second start of the launcher sends the file to the Max that already runs. | 1. Keep Max open from MAX-T01.<br>2. Run: `max9 "<path to t01-dsp-probe.maxpat>"`.<br>3. Wait 10 seconds. | The patch opens as a new window in the same Max. There is only one Max program in the process list (`pgrep -c Max.exe` shows 1). |
| MAX-T03 | Audio engine start and driver list | `t01-dsp-probe.maxpat` | The patch lists the audio drivers and starts the audio engine. It runs by itself when it opens. | 1. Run: `max9 "<path to t01-dsp-probe.maxpat>"`.<br>2. Wait 15 seconds.<br>3. Search the log for `HARNESS t01` and for `PipeASIO`. | The log shows `HARNESS t01 loaded`. The log shows a driver list that contains `ad_asio "PipeASIO Driver"`. No error lines about the audio engine appear after the marker. |
| MAX-T04 | Switch to PipeASIO | `t02-pipeasio-switch.maxpat` | The patch switches the audio driver to PipeASIO while Max runs, then starts the audio engine. It runs by itself when it opens. | 1. Run: `max9 "<path to t02-pipeasio-switch.maxpat>"`.<br>2. Wait 20 seconds.<br>3. Search the log for `HARNESS t02`.<br>4. Run: `pw-dump \| grep '"Max"'`. | The log shows `HARNESS t02 loaded`. The pw-dump output shows a node with the name Max. In Max, the Audio Status window shows the driver ad_asio with the device PipeASIO Driver. Max did not crash. |
| MAX-T05 | Web view (CEF) | `t03-jweb-cef.maxpat` | The patch shows a web page inside a patch window. This tests the built-in browser component. | 1. Run: `max9 "<path to t03-jweb-cef.maxpat>"`.<br>2. Wait 20 seconds.<br>3. Look at the large area in the patch window. | The area shows the page "Example Domain" with black text on a light background. An empty gray area is a fail. |
| MAX-T06 | 3D graphics | `jit.mo-Worms.maxpat` | The patch opens a separate render window and draws moving colored lines with OpenGL. | 1. Run: `max9 "<path to jit.mo-Worms.maxpat>"`.<br>2. Wait 15 seconds.<br>3. Look at the render window (its name is one letter: w).<br>4. Search the log for `OpenGL`. | The render window shows colored lines that move all the time. The log shows a line with `OpenGL Version`. Max did not crash. |
| MAX-T07 | Video playback | `jit.mo-Alphablend.maxpat` | The patch plays two movie files that come with Max and mixes them in a render window. | 1. Run: `max9 "<path to jit.mo-Alphablend.maxpat>"`.<br>2. Wait 20 seconds.<br>3. Look at the render window. | The render window shows moving video: ducks on water, mixed with a second picture. A black or frozen window is a fail. |
| MAX-T08 | Node for Max | `t06-node-auto.maxpat` (must be in one folder together with `outlet-methods.js`) | The patch starts a JavaScript program in the bundled Node.js, sends it a message, and receives the answer. It runs by itself when it opens. | 1. Run: `max9 "<path to t06-node-auto.maxpat>"`.<br>2. Wait 25 seconds.<br>3. Search the log for `example2`. | The log shows `HARNESS t06 node loaded`, then `start success`, then the answer line `example2 4 5 6 seven`. |
| MAX-T09 | gen~ code build | `cpu-tester-gen.maxpat`, then `waveshaper.maxpat` (the first one also needs `cpu-tester-gen-sub.maxpat` in the same folder) | gen~ builds machine code inside Max when a patch loads. The first patch builds 64 gen~ objects. | 1. Run: `max9 "<path to cpu-tester-gen.maxpat>"`.<br>2. Wait 20 seconds.<br>3. Run: `max9 "<path to waveshaper.maxpat>"`.<br>4. Wait 15 seconds.<br>5. Search the log for `gen` and for `error`. | Both patches open. The log shows no error lines that contain gen. Max did not crash. |
| MAX-T10 | Many-channel audio objects | `mc.karplus.maxpat` | The patch loads multichannel (mc) objects. | 1. Run: `max9 "<path to mc.karplus.maxpat>"`.<br>2. Wait 15 seconds.<br>3. Search the log for `error`. | The patch opens. No new error lines appear in the log. Max did not crash. |
| MAX-T11 | Dense interface | `Big Scope best practices.maxpat` | The patch loads a display object that redraws all the time. Caution: do not start the audio engine with this patch open. It has a direct sound output. | 1. Run: `max9 "<path to Big Scope best practices.maxpat>"`.<br>2. Wait 15 seconds.<br>3. Look at the window. Do not click the speaker button. | The patch opens and draws completely. Max stays responsive: the window moves when you drag its title bar. Max did not crash. |
| MAX-T12 | MIDI ports | `t09-midi-probe.maxpat` | The patch lists the MIDI ports. It runs by itself when it opens. Connect a MIDI device by USB before you start Max. | 1. Connect a MIDI device.<br>2. Run: `max9 "<path to t09-midi-probe.maxpat>"`.<br>3. Wait 15 seconds.<br>4. Search the log for `midi`. | The log shows the name of the connected device. No line shows `midi_mme: error` for the device. If the device port does not open, the test is a fail. |
| MAX-T13 | Menu object click | `t11-umenu-click.maxpat` | A person clicks a menu object. This click crashed old Max versions. This test needs a person or an input tool. It cannot run by itself. | 1. Run: `max9 "<path to t11-umenu-click.maxpat>"`.<br>2. Wait 10 seconds.<br>3. Click the menu that shows the word alpha.<br>4. Click the entry gamma in the list that opens.<br>5. Search the log for `gamma`. | The list opens under the menu. After the click, the menu shows gamma and the log shows a line with `gamma`. Max did not crash. |
| MAX-T14 | Complete stop | no file | Max stops completely when you close it. | 1. Close all Max windows, or run: `WINEPREFIX=~/.wine-ableton ~/.local/opt/wine-d2d1-nspa-11.13/bin/wine taskkill /IM Max.exe`.<br>2. Wait 15 seconds.<br>3. Run: `pgrep -f "Max.exe\|Max Helper"`. | The command in step 3 shows no processes. If Max processes stay after 15 seconds, the test is a fail. Record a fail and then force the stop: run the same taskkill command two more times, first with `/F /IM Max.exe`, then with `/F /IM "Max Helper.exe"` in place of `/IM Max.exe`. |
Loading