<-- -->
 

The  cgraph object

Name
Synopsis
Options
Description
Substitution
Examples


NAME  top

cgraph - Creation of a breakpoint graph drawing interface.

SYNOPSIS  top

cgraph name ?options?

OPTIONS  top

-label       character string
                        will replace the name label of the graph  ; default  name

-min     int | float
                        determines the minimum value of the graph  ; default  0

-max     int | float
                        determines the maximum value of the graph  ; default  100
 
-unit    character string
                        determines the unit of measurement for the graph  ; default  x

-rel     log | lin | raw
                        determines whether the graph will be linear or log or raw data  ; default  lin

-init    int | float
                         determines the initial value of the graph  ; default  0 | -min

-gen    int
                        determines the number of the function table to use  ; default  automatic

-size    int | float
                        determines the power-of-2 size for the function  ; default  user preference

-func    "list"
                        determines the initial breakpoint function ; default none


DESCRIPTION  top

The cgraph command creates interface objects used to manipulate time-variant functions in the x-y plane. The function will span from min to max in the y dimension according to the relationship defined while time is always represented in the x plane.

If the -func flag is given, it must be followed by a list of x - y  value pairs describing the function such as:

    "0 val1 time2 val2 time3 val3 time4 val4 ... 1 valx"

The time values must be in ascending order and be floating points between 0 and 1. The first time must be 0 and the last time must be 1. The times get scaled automatically to values in seconds. The y axis values must be between the -min and -max. If -func is given, any -init flag is ignored.

When compiled, graph values are converted to function tables in the score using the gen05 method for logarithmic representations (-rel log), the gen07 for linear representation (-rel lin) and the gen02 for raw data representation (-rel raw). The use of the (-rel raw) method is recommended when access to the actual graph data is desired.  If the -size flag is specified, the size of the table will be set to that value. If not, the default "gen size" value in the Main window will be used. If the -gen flag is specified, that number will be used to define the number of this function in the score; otherwise, the number of the function is generated automatically. If a function is to be used in the orchestra (ie: for an oscil, envelope, etc.), the user should specify a function number using the -gen flag and refer to that number in the orchestra.

The -label flag allows a label name in the interface that is different than the name of the graph. The -unit flag defines the unit that is displayed in the cross hair when points are added to the graph.
 

SUBSTITUTION  top

Graphs are always substituted in the orchestra through the global variable gkname.
 

EXAMPLE  top

The definition:
     cgraph gain -unit db -min -24 -max 24 -func "0 -24 .1 24 .3 0 .8 0 1 -24"
produces a graph titled gain. Its y-axis, representing decibels is initialized with an adsr type envelope, and its value can vary linearly from -24 to +24. At compilation the following function will be generated in the score:
     f14 0 8192 -7 ...
and will be useable in the orchestra for any appropriate purpose.



Copyright © 1996