Recherche Google
OpenMusic 6 – User ManualOM Objects > OM Basic Objects > Text File Tools > File-Box > Introduction
previous pagenext page

Introduction to the File-Box

Programming with the File-Box takes place in an internal editor, which resembles the OMLoop editor. This editor has a few additional features : the StreamFile tool and the InitDo box. Like OMLoop, it is evaluated from the outside.

Iterations : OMLoop

Connate Elements

Functions of the Text File I/O Package : Writing and Reading

A number of functions of the package are used for writing or reading files in the Text-Box.

The file-write function writes something in a file.

The file-read-line function reads one line in a text file.

The file-write-line function writes something in a line.

The file-eof-p function reads a text file whose number of lines is unknown.

To access these functions, go to Functions / Basic Tools / Text File I/O.

StreamFile : a Pointer to Read and Write Files

The StreamFile box represents a file pointer , that is :

  • an access to a file on the computer drive
  • a position in the file .

It is an indispensable element for the File-Box : it is required to read from a file, or write to a file.

  • Several StreamFile boxes can be used in a File-Box, if several files must be read or written at the same time.

  • A StreamFile box is added by default in the File-Box editor.

    To add another StreamFile box, click on the icon in the upper right corner of the window.

Using Connate Functions
Initdo

The Initdo module resembles the Eachtime module. It performs an action before the iteration starts.

Using Initdo in Iterative Processes
previous pagenext page
About...(c) Ircam - Centre PompidouMade with Scenari