Naming conventions

Filename suffixes

Every filename must end with a valid suffix to ensure cross-platform compatibility.

  • Max patches: .pat, or .mxt for patches in text format, or .mxb for patches in binary format
  • Collections: .txt (If you say “coll foo”, Max will load the file “foo.txt” in your search path.)
  • Tables: .mxb (If you say “table foo.mxb, Max will load the file “foo.txt” in your search path.)
  • Help patches: .help.pat (so that Max’s help system will find them)
  • Sound files: .aif, .aiff, .wav, .snd, .mp3, etc.
  • SDIF files: .sdif
  • Java source code: .java
  • Javascript source code: .js
  • MIDI files: .mid
  • PDF files: .pdf
  • Text files: .txt
  • XML files: .xml
  • Image files: .gif, .jpg, .png, etc.

All filenames must be unique

It must be possible to have “everything from CNMAT” (the MMJ Depot, all CNMAT’s externals, our recommended third-party externals, etc.) in one’s search path with no name conflicts.

Whenever possible avoid name conflicts with other third-party externals, patches, packages, etc.

CNMAT does not have a filename prefix for all the patches in the MMJ Depot. (E.g., our envelope follower is called “envelope-follower~”, not “cnmat.envelope-follower~”.)

All filenames should be descriptive

Patches names should say what the patch does clearly and succinctly. It’s a bit of an art to find the “sweet spot” between completely descriptive byt annoyingly long and hard to type patch names versus terse and noninformative patch names.

The name of a patch should say what the patch does, not what context the author of the patch originally intended it to be used in. E.g., a GUI wrapper around lookup~ should not be called “phasor-groove~” just because it was written to sit between a phasor~ object and a groove~ object.