FLsetsnap — Stores the current status of all FLTK valuators into a snapshot location.
FLsetsnap stores the current status of all valuators present in the orchestra into a snapshot location (in memory).
inumsnap -- current number of snapshots.
inumval -- number of valuators (whose value is stored in a snapshot) present in current orchestra.
index -- a number referring unequivocally to a snapshot. Several snapshots can be stored in the same bank.
ifn (optional) -- optional argument referring to an already allocated table, to store values of a snapshot.
The FLsetsnap opcode stores current status of all valuators present in the orchestra into a snapshot location (in memory). Any number of snapshots can be stored in the current bank. Banks are structures that only exist in memory, there are no other reference to them other that they can be accessed by FLsetsnap, FLsavesnap, FLloadsnap and FLgetsnap opcodes. Only a single bank can be present in memory.
If the optional ifn argument refers to an already allocated and valid table, the snapshot will be stored in the table instead of in the bank. So that table can be accessed from other Csound opcodes.
The index argument unequivocally refers to a determinate snapshot. If the value of index refers to a previously stored snapshot, all its old values will be replaced with current ones. If index refers to a snapshot that doesn't exist, a new snapshot will be created. If the index value is not adjacent with that of a previously created snapshot, some empty snapshots will be created. For example, if a location with index 0 contains the only and unique snapshot present in a bank and the user stores a new snapshot using index 5, all locations between 1 and 4 will automatically contain empty snapshots. Empty snapshots don't contain any data and are neutral.
FLsetsnap outputs the current number of snapshots (the inumsnap argument) and the total number of values stored in each snapshot (inumval). inumval is equal to the number of valuators present in the orchestra.