Programmer Guide/Introduction: Difference between revisions

From STX Wiki
Jump to navigationJump to search
No edit summary
No edit summary
Line 40: Line 40:


*Normally a shell item is visible only inside a shell, but it is possible to share selected items between shells by using . This technique is used for the workspace and the project  
*Normally a shell item is visible only inside a shell, but it is possible to share selected items between shells by using . This technique is used for the workspace and the project  
*All shell items must be deleted before the shell is finished. If the shell executes a user script, using the [[Programmer_Guide/BScript]] application, an  [[Programmer_Guide/Macro_Library/APPCLEANUP|application cleanup]] function is used to delete shell items which was created but not deleted by the script.
*All shell items must be deleted before the shell is finished. If the shell executes a user script, using the [[Programmer_Guide/BScript|BScript]] application, an  [[Programmer_Guide/Macro_Library/APPCLEANUP|application cleanup]] function is used to delete shell items which was created but not deleted by the script.
 
Shell items are connecting {{STX}} with the operation system and its peripherals.
:*The GUI is implemented by the [[Programmer_Guide/Shell_Items/Display|display]]-, the [[Programmer_Guide/Shell_Items/Graph|graph]]- and the [[Programmer_Guide/Shell_Items/Dialog|dialog]] items.
:*The [[Programmer_Guide/Shell_Items/File|file]] item can be used to create and access files of several formats, but also the test the existence of a file and to scan directories.
:*[[Programmer_Guide/Shell_Items/Table|tables]] implements simple database features but can also be used as numerical objects in expressions.
:*The [[Programmer_Guide/Shell_Items/Wave|wave]] item addresses signals stored in soundfiles and/or virtual sequences of synthetic signals. The interface to the sound devices of system for playback and recording is also implemented via the wave items.
:*Via the [[Programmer_Guide/Shell_Items/SPU|SPU]] items a programmable signal processing circuit subsystem is implemented. [[Programmer_Guide/Shell_Items/SPU|SPUs]] can be connected to [[Programmer_Guide/Shell_Items/Graph|graphs]], [[Programmer_Guide/Shell_Items/Value|value items]] and to other [[Programmer_Guide/Shell_Items/SPU|SPUs]].
:*The [[Programmer_Guide/Shell_Items/Value|value]] item can be used as input for [[Programmer_Guide/Shell_Items/SPU|SPUs]], as timer and as numerical object in expressions.
:[[Programmer_Guide/Shell_Items/DCOM|DCOM]] and [[Programmer_Guide/Shell_Items/DDECONV|DDECONV]] items implements interfaces to other applications.

Revision as of 12:21, 15 April 2011

This chapter contains a general introduction to the structure of the STx programming and execution environment.

Application Environment

The application environment contains all the data structures and functionallities which are available to the whole application.

Loaded Sourcefiles

All scripts, macros, classes and spu's must be loaded from the sourcefile before they can be executed or instantiated. All loaded sources are available to the whole application. Shell commands: LOAD sourcefiles UNLOAD sourcefiles LIST loaded sourcefiles and code objects

Active Shells

All running shells are registered in the application envrionment.

Global Variables

The application environment contains a global variable space, which can be accessed from the whole application. All name prefix character @ is used to address the global variable space. The global variables are used for configuration purposes and should not be changed. The following table shows some of the most important global variables.

name description
@WORK The full pathname of the working directory
@ROOT the full pathname of the STx installation directory
@TEMPDIR The full pathname of the directory for temporary files
@DATASETFILE The full pathname of the active project file
@MASTER The id of the master shell
@OSVER The operating system version
@PROFILE The full pathname of the workspace file

Shell

A shell is the command interpreter and the envrionment executing the loaded code objects. It is created with the SHELL command and ends when the last macro running in the shell is finished (EXIT). All shell are registered in the application environment. A shell can exchange messages with other shells. If a shell is started via the command SHELL mainmacro {arguments}, the macro mainmacro takes control of the shell. If this macro is finished, the shell is also ended

Message Loop

A shell can receive and send messages. The messages are used to communicate with other shells, with the shell items owned by a shell and with the main window of the application. To access the message queue and process messages the command MSG or the library macros GETMESSAGE, DISPATCHMSG, MSGQUEUE, POSTMESSAGE and SETMSGHANDLER can be used.

Shell Items

A shell maintains a list of the owned [Programmer_Guide/Shell_Items|shell items]]. A shell item is owned by a shell if it was created in a macro or instance of a class executed by the shell. Shell items are managed by the commands NEW and DELETE.

  • Normally a shell item is visible only inside a shell, but it is possible to share selected items between shells by using . This technique is used for the workspace and the project
  • All shell items must be deleted before the shell is finished. If the shell executes a user script, using the BScript application, an application cleanup function is used to delete shell items which was created but not deleted by the script.

Shell items are connecting STx with the operation system and its peripherals.

  • The GUI is implemented by the display-, the graph- and the dialog items.
  • The file item can be used to create and access files of several formats, but also the test the existence of a file and to scan directories.
  • tables implements simple database features but can also be used as numerical objects in expressions.
  • The wave item addresses signals stored in soundfiles and/or virtual sequences of synthetic signals. The interface to the sound devices of system for playback and recording is also implemented via the wave items.
  • Via the SPU items a programmable signal processing circuit subsystem is implemented. SPUs can be connected to graphs, value items and to other SPUs.
  • The value item can be used as input for SPUs, as timer and as numerical object in expressions.
DCOM and DDECONV items implements interfaces to other applications.

Navigation menu

Personal tools