A newer version of Max is available. Click here to access the latest version of this document.

The Snapshot API

For advanced users and those creating standalone patchers, Snapshots can be accessed via the Snapshots API. These can be used in Javascript with the js object.

Snapshot Methods

snapshot

Arguments

userpath [String] (optional)
index [Number] (optional)
name [String] (optional)

Take a snapshot at the current index.

restore

Arguments

index [Number] (optional)

Restore a snapshot at the given index.

addsnapshot

Arguments

userpath [String] (optional)
index [Number] (optional)
name [String] (optional)

Append (no arguments) or add a snapshot at the given index.

deletesnapshot

Arguments

index [Number]

Delete a snapshot at the given index.

getnumsnapshots

Get the total number of snapshots.

getsnapshotname

Arguments

index [Number]

Get the name of the snapshot at the given index.

setsnapshotname

Arguments

index [Number]
name [String]

Set the name of the snapshot at the given index.

getembedsnapshot

Arguments

index [Number]

Query the 'embed' state of a snapshot. Returns 1 if the snapshot at the index is embedded, 0 if not.

setembedsnapshot

Arguments

index [Number]
embedstate [Number]

Set the embed state of the snapshot at the index.

movesnapshot

Arguments

srcindex [Number]
dstindex [Number]

Change a snapshot's index.

Snapshot API Example

  • snapshotAPI-example.maxpat
  • See Also

    Name Description
    JavaScript Usage JavaScript Usage