LOAD

From STX Wiki
Jump to navigationJump to search

The LOAD command is used to load macro code, spu code and sound files, making them available for use in the STx programming environment.

Macros, signal processing units and sound files must be loaded before they can be used!Information about the currently active sound file is stored in the variables CSF (= fullfilepath) and CSFH (= srate channels samples code type mode). If no sound file is active, the variable CSF is empty. See Shell Environment for more details.Sound files opened with write access (/Write) cannot be shared with other users or processes.The sound file management is normally performed by the application STx . All other applications should use the STx APPMSG interface to attach or select sound files.The script library BSF implements a set of functions for using sound files and segments in scripts.To attach the directory of the current sound file to a (temporary) table item use the command NEW TABLE * /Soundfiledirectory. This attachment (and the temporary item) can be removed with "DELETE diritemname" without deleting the sound file directory itself. The directory table is deleted automatically when the sound file is unloaded.

LOAD SOURCECODE

LOAD MACROCODE|SPUCODE src1 [ src2 ... ] [ /T ] [ /Nolog ] [ /S ]

Load all source code from the specified source files (src1 etc). The command loads all sections containing source code, preprocesses them and adds them to the shell environment.

/T

If specified, src1 is interpreted as a simple table, rather than a file item.

/N

Suppress log window output.

/S

If specified, errors will generate warning messages rather than error messages. See The Silent Flag for details.

LOAD SOUNDFILE

The LOAD SOUNDFILE command loads a sound file into the shell's sound file list and make it the current sound file. Once you have finished with a sound file, you can unload it with the UNLOAD command.

LOAD SOUNDFILE soundfilepath [ srate channels code start ] [/R|W] [ /S ]

Load a sound file or activate an already loaded sound file (make it the current sound file). The access-mode options (/R|W) are only processed if the sound file is not already loaded. If the parameters srate, channels, code and start are specified, this file is treated as a non-standard-format sound file.

soundfilepath
The name of the file to open (including a relative or absolute path).
srate
The sampling rate in Hertz (>= 1).
channels
The number of channels (>= 1).
code
The sample code. The following sample codes are supported: PCM8, PCM16, PCM24, PCM32 or FLOAT (32 bit).
start
The header size (>=0); This is the offset of first signal sample from the beginning of the file.
/R|W
Specify whether the sound file should be opened in read-only (/R) or read/write mode (/W). The default mode is read/write.

/S

If specified, errors will generate warning messages rather than error messages. See The Silent Flag for details.

LOAD SOUNDFILE index|name /Index|Select [ /L ]

Activate (make it the current sound file) a loaded sound file, identified by its (zero-based) index or name. This command can be used in macros to check if a sound file is already open/loaded.

/L
If specified, errors will generate warning messages rather than error messages. See The Silent Flag for details.

LOAD SOUNDFILE soundfilepath srate channels code type /Create [ /S ]

Create and load a new (empty) sound file (make it the current sound file). See LOAD SOUNDFILE above for a description of the parameters soundfilepath, srate, channels and code. Note that this command will fail if the sound file soundfilepath already exists.

type
The file format. The following formats are supported: WAVE (Windows WAVE format), ST5 (old S_TOOLS 5 file format) or BINARY (raw format, without header).
/Create
This option is mandatory.

/S

If specified, errors will generate warning messages rather than error messages. See The Silent Flag for details.

LOAD SOUNDFILE table /Directory [ /Load ] [ /S ]

Attach a directory table table to a sound file. Only one table can be attached to a sound file. The table must be created with the /Directory option (e.g. with: NEW TABLE * /Directory). The directory table of a sound file can be accessed by all shells! Use the option /Load if STx should try to load the directory stored in the sound file (only for files created by S_TOOLS 5).

/S
If specified, errors will generate warning messages rather than error messages. See The Silent Flag for details.

Navigation menu

Personal tools