The tsKit Reference Manual

— Version 0.0 —

Part of the Thesis A Real-Time 3D Visualization

Toolkit for Sound and other Signals

Andreas Lücke, Technische Fachhochschule Berlin, Germany

The tsKit Reference Manual

Contents

1 Property Nodes — Classes for storing signal data and properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

6

1.2 tsKit — Node that initializes all tsKit classes to the type system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

7

1.3 tsTime — Node storing time and speed for synchronized media feedback . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

8

1.3.1  New Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.3.2  Action behavior: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.3.3  Last changes: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.3.4  Changed Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.3.5  Field-Sensors and CBs. . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

1.4 tsDataBase — Base class for all ts nodes representing a time media signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

12

1.4.2  Common data access methods: . . . . . . . . . . . . . . . . . . 13
1.4.3  Action behaviour: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

1.5 tsData1Base — Base class for nodes representing a one dimensional time signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

15

1.5.1  Common data access methods: . . . . . . . . . . . . . . . . . . 16
1.5.2  Action behaviour: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

1.6 tsData1NFloat — Class for a node storing a non-regular sampled float signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

17

1.6.1  New Fields: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
1.6.2  Common data access methods: . . . . . . . . . . . . . . . . . . 19
1.6.3  Action behaviour: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

1.7 tsData1RFloat — Node storing a regularly sampled float signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

20

1.7.1  New Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
1.7.2  Common data access methods: . . . . . . . . . . . . . . . . . . 22
1.7.3  Action behaviour: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

1.8 tsData1RFloatFile — Node storing a regular sampled float signal beeing read from file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

24

1.8.1  New Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
1.8.2  Action behaviour: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

1.9 tsData2Base — Base class for nodes representing a 2 dimensional time media signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

27

1.9.1  Common data access methods: . . . . . . . . . . . . . . . . . . 28
1.9.2  Action behaviour: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

1.10 tsData2RNFloat — Node storing a two dimensional float signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

29

1.10.1 New Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
1.10.2 Common data access methods: . . . . . . . . . . . . . . . . . . 32
1.10.3 Action behaviour: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

1.11 tsData2RNFloatFile — Node storing a 2dim float signal beeing read in from a file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

33

1.11.1 New Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
1.11.2 Action behaviour: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
1.12 tsNormal — Node storing normals as 3 byte vectors . . . . . . . . 36
1.12.1 Action behaviour: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
2  Feedback Nodes — Classes for rendering a feedback. . . . . .  38

2.1 tsLine — Feedback node, rendering a one dimensional signal as a line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

38

2.1.1  Action behaviour: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

2.2 tsSurface — Feedback node, drawing a two dimensional signal as a surface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

41

2.2.1  Action behaviour: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
2.3  tsAudio — Feedback node rendering a signal to a audio stream 44
2.3.1  New Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
2.3.2  Action behaviour: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
2.3.3  Synchronizing staff: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
3  GUI Nodes — Nodes building a GUI for a node. . . . . . . .  47

3.1 tsTimeCtrlUI — GUI node that represents a graphical userinterface for a node of class tsTime . . . . . . . . . . . . . . . . . . . . . . . .

47

3.1.1  Callbacks to update GUI’s widgets . . . . . . . . . . . . . . . 48
3.1.2  Action behaviour: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49

4 SoXtComponents — Components building a user interface for a node. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

50

4.1 tsRendererViewer — An ExaminerViewer that renders its scene into a movie file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

51

4.1.1  movie parameter access: . . . . . . . . . . . . . . . . . . . . . . . . . 52

4.2 FieldEditor — This SoXtComponent builds a generic dialog for the fields one nodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

53

4.2.2  Building Widgets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??

4.2.4 Operations on fields — These all operate on one field of the node . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

??

4.2.6  Callbacks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ??

4.2.6.1 Button Pressed Callbacks — Callback for when a button is pressed or other action occurs . . . . . . . . . . . . . . . . . . . . . . . . . . . .

??

4.3 GraphViewer — A SoXtPlaneViewer showing an iconic version of an Inventor scene graph . . . . . . . . . . . . . . . . . . . . . . . . . . . .

54

4.5 SoSceneViewer — The SceneViewer component lets you select between different viewers (Examiner, tsRenderer, Walk ….

56

4.6  Error — Class that is used to display an error message . . . . . 58

4.7 libInventorWidget — Component libray from the Open Inventor demo source code at

      /usr/share/src/Inventor/samples/widgets/.

Original README file: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

59

5 Elements — Internal classes for data propagation through a scene graph. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

61

5.1 tsTimeElement — Element storing time information for synchronizing all feedback nodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

61

5.2 tsNodeElement — Base class for storing a tsData node and a type(SoType) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

65

5.2.3  Data that is propagated . . . . . . . . . . . . . . . . . . . . . . . . . ??

5.3 tsData1Element — Element for storing all one dimensional signal data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

67

5.4  tsData2Element — Element for all 2 dimensional signal data 69
5.5  tsNormalElement — Element for propagating normal data . . 72

6 Applications and Converters. — Applications and Converters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

75

6.1 tsRenderer — A viewer using a tsRendererViewer (→4.1, page 51). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

75

6.2  tsgview — An extended version of the standard gview. . . . . 76

6.3 tsSceneViewer — An extended version of the standard SceneViewer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

76

6.4  cqt3 — A constant-Q wavelet analyzer for AIFF files. . . . . 77

6.5 aqt2gridcompl — A converter from .aqt files to a simple binary format .grid. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

77

7  Examples — Some example scene graphs. . . . . . . . . . . . . . . . .  79
7.1  halloTsKit.iv — . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
7.2  tsAudio.iv — . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
7.3  tsLine.iv — . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
7.4  tsSurface.iv — . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
Class Graph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84

This Manual is part of the thesis

’A Real-Time 3D Visualization Toolkit for Sound and other Signals’

by Andreas Lücke, Computer Sience, Technische Fachhochschule Berlin, Germany, 1997.

              e-mail: andreas@cnmat.berkeley.edu

The tsKit software build in this thesis is based on Open Inventor Version

2.1.x and is available at http://www.cnmat.berkeley.edu/~andreas!

For further Information about OpenInventor from SiliconGraphics (http://www.sgi.com) see

• Open Inventor Home Page at

  http://www.sgi.com/Technology/Inventor

• Summary of The Inventor Mentor at

  http://www.sgi.com/Technology/Inventor/VRML/TIMSummary.html

• Open Inventor Nodes Quick Reference (Postscript Version) at

  http://www.sgi.com/Technology/Inventor/PostScript/quickRef.ps

• Open Inventor Manual Pages at

  http://mimsy.mit.edu/Transom/inventorman.html

1 Property Nodes

1

Property Nodes

Classes for storing signal data and properties.

Names

1.1  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  7
1.2  class  tsKit : public SoNode

Node that initializes all tsKit classes to the type system . . . . . . 7

typedef signed long long stamp t

1.3  class  tsTime : public SoNode

Node storing time and speed for synchronized media feedback …. 8

1.4  class  tsDataBase : public SoNode

Base class for all ts nodes representing a time media signal …. 12

1.5  class  tsData1Base : public tsDataBase

Base class for nodes representing a one dimensional time signal . . 15

1.6  class  tsData1NFloat : public tsData1Base

Class for a node storing a nonregular sampled float signal . . . . . 17

1.7  class  tsData1RFloat : public tsData1Base

Node storing a regularly sampled float signal . . . . . . . . . . . . . . . . . . . . . 20

1.8  class  tsData1RFloatFile : public tsData1RFloat

Node storing a regular sampled float signal beeing read from file

24

1.9 class tsData2Base : public tsDataBase Base class for nodes representing a 2 dimensional time media signal

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
1.10  class  tsData2RNFloat : public tsData2Base

Node storing a two dimensional float signal . . . . . . . . . . . . . . . . . . . . . 29

1.11  class  tsData2RNFloatFile : public tsData2RNFloat

Node storing a 2dim float signal beeing read in from a file . . . . . . . 33

1.12  class  tsNormal : public SoNode

Node storing normals as 3 byte vectors . . . . . . . . . . . . . . . . . . . . . . . . . 36

Objects of these classes can be part of the Open Inventor’s scene graph. They store data and propertys of signal data.

See Also:  Feedback Nodes

1.1

Names

typedef signed long long

stamp t  used for USTs

1.2

class tsKit : public SoNode

Node that initializes all tsKit classes to the type system

Inheritance

SoNode  ∨

{1.2 \atop tsKit}

Public Members

static void

initClasses ()  Initializes all tsKit classes.

SoINTERNAL static void initClass () Makes this class known to the

OpenInventor type system.

Protected Members

tsKit ()  Constructor
virtual  ~tsKit ()  Destructor

Node that initializes all tsKit classes to the type system. This job summarised in one node to do all initialization in one run. This node must be put as the first tsKit node in a file

   tsKit

or static method tsKit::initClasses() must be called before other tsKit nodes are instanciated or refered.

Note: When extending the tsKit and adding new nodes, this class must extended with the initClass() calls of your class. Initialize base classes before derived classes!

See Also: tsLine tsSurface tsAudio tsTime tsTimeCtrlUI tsData1RFloat tsData1NFloat tsData1RFloatFile tsData2RNFloat tsData2RNFloatFile

Author:  (c) Andreas Lücke
Version:  0.0

1.3

class tsTime : public SoNode

Node storing time and speed for synchronized media feedback

Inheritance

SoNode  ∨

{1.3 \atop tsTime}

Public Members

1.3.1  New Fields  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
tsTime ()  Constructor
virtual  ~tsTime ()  Destructor

1.3.2 Action behavior: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

SoINTERNAL static void

initClass () Makes this class known to the OpenInventor type system.

Protected Members

void makeTimeConsistent () makes field ”time” consistent to changes in field ”speed”

void makeSpeedConsistent () makes field ”speed” consistent to changes in field ”time”

1.3.3  Last changes:  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.3.4  Changed Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

SoSFTime*

gobalRealTime global time field, NULL if not existing.

1.3.5 Field-Sensors and CBs. . . . . . . . . . . . . . . . . . . . . . . . . . 11

Node storing time and speed for synchronized media feedback. A node of this class stores the properties time and speed for feedback of ts feedback nodes. It garants a consistent setting of these information, including a UST (Unified System Time) stamp of the time, when the time or speed has been changed last time.

When field ’speed’ != 0.0 (not stopped) ’time’ field is automatically changed according to the content of field ’speed’.

ACTION BEHAVIOR:

Sets ’time’, ’speed’, a time stamp and a reference to itself in the tsTimeElement.

See Also:  {\tt tsTimeElement} {\tt tsTimeCtrlUI} \\
Author:  (c) Andreas Lücke
Version:  0.0

New Fields^{1.3.1}

Names

SoSFTime time Field storing feedback time. Changing accordingly ’speed’ field content.

SoSFFloat speed  Field storing feedback speed.

1.3.2

Action behavior:

Names

virtual void

doAction (SoAction *action)

does default action behaviour. Sets time/speed in tsTimeElement.

virtual void

GLRender (SoGLRenderAction *action) does GLrender begaviour, calls doAction()

virtual void

getBoundingBox (SoGetBoundingBoxAction *action) calls doAction()

virtual void

callback (SoCallbackAction *action)

calls doAction()

virtual void

pick (SoPickAction *action)

calls doAction()

1.3.3

Last changes:

Names

float  lastSpeed
stamp t  lastUST  Time stamp when the clock was

valid last time!

SbBool  lastValid

Stuff to remember last changes.

1.3.4

Changed Values

Names

float  changedSpeed

stamp t changedUST UST of last changing. Feedback should be addapted to meet this!

SbBool timeChanged Flag, to remember if ”time” has changed.

SbBool speedChanged Flag, to remember if ”speed” has changed.

Stuff to remember changed values, set on last traversal.

1.3.5

Field-Sensors and CBs.

Names

static void

updateTimeFieldCB (void *userData,

SoSensor* sensor) This CB is called from

                          updateTimeFieldSensor  to

increment the ’time’ field

SoFieldSensor

timeFldSensor

static void

timeFldChangedCB (void *userData,

SoSensor* sensor) Called immediately after field ’time’ has been changed.

SoFieldSensor speedFldSensor

static void

speedFldChangedCB (void *userData,

SoSensor* sensor) Called immediately after field ’speed’ has been changed.

Sensors and their callbacks, to guard changes of fields ”time” ”speed”.

1.4

class tsDataBase : public SoNode

Base class for all ts nodes representing a time media signal

Inheritance

SoNode  ∨

1.4 tsDataBase

>   1.9 tsData2Base

>   1.5 tsData1Base

Public Members

1.4.1 SoSFNode node  handle for engine connection … 13

1.4.2 Common data access methods: . . . . . . . . . . . . . . . 13

1.4.3 Action behaviour: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Protected Members

tsDataBase () private Constructor for abstarct classes

virtual  ~tsDataBase () Destructor

Base class for all ts nodes representing a time media signal. Defines common infrastructure for all derived classes.

See Also:  tsData1Base tsData2Base
Author:  (c) Andreas Lücke
Version:  0.0

1.4.1

SoSFNode node

handle for engine connection

Fhis field represents the whole node, to make it easier to connect with engines!!! (tsEngines only)

1.4.2

Common data access methods:

Names returnes a value as a pointer!

virtual int getNum () returns number points sampled in time

virtual int getNumValues () returns number points sampled in all dimensions

virtual const void*

getValueTime (int index )

returnes a value as a pointer!

virtual float getTime (int index)

returns time when data at<index> is sampled?

virtual const float

getTimeMin () returns time of first sample point

virtual const float

getTimeMax () returns time of last sample point

virtual int getIndex (float time, int startIndex = 0) returns index of a point in time. Starts search from startIndex (optional)

virtual SbBool

isRegularSampled ()

returnsTRUE if data is regular sampled

1.4.3

Action behaviour:

Names

virtual void

doAction (SoAction *action)

does default action behaviour

virtual void

GLRender (SoGLRenderAction *action)

does GLrender begaviour, calls doAction()

virtual void

getBoundingBox (SoGetBoundingBoxAction *action) calls doAction()

virtual void

callback (SoCallbackAction *action)

calls doAction()

virtual void

pick (SoPickAction *action)

calls doAction()

1.5

class tsData1Base : public tsDataBase

Base class for nodes representing a one dimensional time signal

Inheritance

SoNode  ∨

1.4 tsDataBase  ∨

1.5 tsData1Base

                >

1.7 tsData1RFloat

                >

1.6 tsData1NFloat

Public Members 1.5.1 Common data access methods: . . . . . . . . . . . . . . . 16

1.5.2 Action behaviour: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

static void

initClass () Makes this class known to the OpenInventor type system.

Protected Members

tsData1Base () private Constructor for abstarct classes

virtual  ~tsData1Base () Destructor

Base class for nodes representing a one dimensional time signal.

See Also:  tsLine tsData2Base
Author:  (c) Andreas Lücke
Version:  0.0

1.5.1

Common data access methods:

Names

virtual int getNum () returns number points sampled in time

virtual int getNumValues () returns number points sampled in all dimensions

virtual float

getTime (int index)

returns point in time, where indexed value is sampled

virtual const float

getTimeMin () returns time of first sample point

virtual const float

getTimeMax () returns time of first sample point

virtual int getIndex (float time, int startIndex = 0)

returns index of a point in time. Starts search from startIndex (optional)

virtual void

getValueMinMax ( float& min, float& max) returns minimum/maximum of data values

virtual SbBool

isRegularSampled ()

returnsTRUE if data is regular sampled

1.5.2

Action behaviour:

Names

virtual void

doAction (SoAction *action)

does default action behaviour

virtual void GLRender (SoGLRenderAction *action)

does GLrender begaviour, calls doAction()

virtual void

getBoundingBox (SoGetBoundingBoxAction *action) calls doAction()

virtual void

callback (SoCallbackAction *action)

calls doAction()

virtual void

pick (SoPickAction *action)

calls doAction()

1.6

class tsData1NFloat : public tsData1Base

Class for a node storing a non-regular sampled float signal

Inheritance

SoNode  ∨

1.4 tsDataBase  ∨

1.5 tsData1Base  ∨

1.6 tsData1NFloat

Public Members

1.6.1  New Fields:  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

1.6.2 Common data access methods: . . . . . . . . . . . . . . . 19

tsData1NFloat ()Constructor

1.6.3 Action behaviour: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 SoINTERNAL static void

initClass () Makes this class known to the OpenInventor type system.

Protected Members

virtual ~tsData1NFloat () Destructor

Class for a node storing a non-regular sampled float signal.

See Also:  tsLine tsData1RFloat
Author:  (c) Andreas Lcke
Version:  0.0

New Fields:^{1.6.1}

Names

1.6.1.1 SoMFFloat

time Field containing signal sample points. . . . . . . . . . . . . . . . . . . . . . . . . 18

1.6.1.2 SoMFFloat
data  Field containing signal data… 19

1.6.1.1

SoMFFloat time

Field containing signal sample points.

Field containing the points in time (seconds) where signal is sampled. Must contain the same number of values than the <data> field!

1.6.1.2

SoMFFloat data

Field containing signal data.

Field containing values of signal sampled at points in< <time> field. Must contain the same number of values than the <time> field!

1.6.2

Common data access methods:

Names

virtual int getNum () returns number points sampled in time

virtual int getNumValues () returns number points sampled in all dimensions

virtual float

getTime (int index)

returns time when data a t<index> is sampled

virtual const float

getTimeMin () returns time of first sample point

virtual const float

getTimeMax () returns time of last sample point

virtual int getIndex (float time, int startIndex = 0)

returns index of a point in time. Starts search from startIndex (optional)

virtual const void*

getValue (int index)

returnes a value as a pointer!

virtual void getValueMinMax ( float& min, float& max)

virtual SbBool

isRegularSampled ()

returns FALSE because data is not regular sampled

1.6.3

Action behaviour:

Names

virtual void

doAction (SoAction *action)

does default action behaviour. Sets signal data in tsData1Element.

virtual void

GLRender (SoGLRenderAction *action) does GLrender begaviour, calls doAction()

virtual void

getBoundingBox (SoGetBoundingBoxAction *action) calls doAction()

virtual void

callback (SoCallbackAction *action)

calls doAction()

virtual void

pick (SoPickAction *action)

calls doAction()

1.7

class tsData1RFloat : public tsData1Base

Node storing a regularly sampled float signal

Inheritance

SoNode  ∨

1.4 tsDataBase  ∨

1.5 tsData1Base  ∨

1.7 tsData1RFloat

                      >

1.8 tsData1RFloatFile

Public Members

1.7.1  New Fields  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

1.7.2 Common data access methods: . . . . . . . . . . . . . . . 22

1.7.3 Action behaviour: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

SoINTERNAL static void

initClass () Makes this class known to the OpenInventor type system.

Protected Members

virtual ~tsData1RFloat () Destructor

Node storing a regularly sampled float signal. This tsData node stores a regularly sampled float signal of one dimension.

See Also:  tsData1RFloatFile tsLine
Author:  (c) Andreas Lücke
Version:  0.0

New Fields^{1.7.1}

Names 1.7.1.1 SoSFFloat startTime Field containing signal’s start

time. . . . . . . . . . . . . . . . . . . . . . . . . . 22

1.7.1.2 SoSFFloat interval Field containing signal’s sample interval. . . . . . . . . . . . . . . . . . . . . . . 22

1.7.1.3 SoMFFloat
data  Field containing signal data. … 22

1.7.1.1

SoSFFloat startTime

Field containing signal’s start time.

Field containing the time (in seconds) when signal starts.

1.7.1.2

SoSFFloat interval

Field containing signal’s sample interval.

Field containing the interval (in seconds) between 2 following sample points .

1.7.1.3

SoMFFloat data

Field containing signal data.

Field containing signal values regular sampled according to fields <startTime> and <interval>.

1.7.2

Common data access methods:

Names

virtual SoType getRealClassTypeId ()

virtual int getNum () returns number points sampled in time

virtual int getNumValues () returns total number points sampled in all dimensions.

virtual float

getTime (int index)

returns time when data a t<index> is sampled

virtual const float

getTimeMin () returns time of first sample point

virtual const float

getTimeMax () returns time of last sample point

virtual int getIndex (float time, int startIndex = 0)

returns index of a point in time. Starts search from startIndex (optional)

virtual const void*

getValue (int index)

returnes a value as a pointer!

virtual void getValueMinMax ( float& min, float& max)

virtual SbBool

isRegularSampled ()

returns TRUE because data is regular sampled.

1.7.3

Action behaviour:

Names

virtual void

doAction (SoAction *action)

does default action behaviour. Sets signal data in tsData1Element.

virtual void GLRender (SoGLRenderAction *action)

does GLrender begaviour, calls doAction()

virtual void

getBoundingBox (SoGetBoundingBoxAction *action) calls doAction()

virtual void

callback (SoCallbackAction *action)

calls doAction()

virtual void

pick (SoPickAction *action)

calls doAction()

1.8

class tsData1RFloatFile : public tsData1RFloat

Node storing a regular sampled float signal beeing read from file

Inheritance

SoNode  ∨

1.4 tsDataBase  ∨

1.5 tsData1Base  ∨

1.7 tsData1RFloat

∨ 1.8

tsData1RFloatFile

Public Members

1.8.1  New Fields  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

1.8.2 Action behaviour: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

SoINTERNAL static void

initClass () Makes this class known to the OpenInventor type system.

int readFile (const SbString file)

Reads in file content. Called from constructor.

Protected Members

int readFileAudio (const SbString file) returnes TRUE, if reading an audio file was succesfull.

int readFileMatlab (const SbString file) returnes TRUE, if reading an audio file was succesfull. Not yet implemented!

SbBool fileReadOrError Flag to remember, if reading the file has been tried without success.

virtual ~tsData1RFloatFile ()

Destructor

Node storing a regular sampled float signal beeing read from file. If field <filename> is not empty, file with filename taken from field <filename> is read in on construction time (better on first traversal! Future work). Otherwise it habits exactly like its parent class tsData1RFloat. Node’s signal data in field <data> is NOT saved when scene graph is written to a file, until field is touched once! Field content is assumed to be the dafault value for this field. Touching this field, deletes his default status and makes it beeing written as a normal Inventor node.

The following file formats are detected:

Audio files currently recognized by the SGI audiofile library. If field <interval> is not empty (default), the file is resampled to this sample frequency. To big changes in frequency produce error messages from the audiofile library, doing the resampling, but can be ignored.

Future work: Matlab ASCII files representing a one dimensional vector of values (converted to float).

See Also:  tsLine tsData1RFloat tsData2RNFloatFile
Author:  (c) Andreas Lücke
Version:  0.0

New Fields^{1.8.1}

Names

1.8.1.1 SoSFString

filename Field containing the filename of the file to be read in . . . . . . . . . . . . 26

1.8.1.1

SoSFString filename

Field containing the filename of the file to be read in

Field containing the filename of the file to be read in. Changes are not yet recognized. Reading is done only once! (future work!).

1.8.2

Action behaviour:

Names

virtual void

doAction (SoAction *action)

does default action behaviour. Sets signal data in tsData1Element.

virtual void

GLRender (SoGLRenderAction *action)

does GLrender begaviour, calls doAction()

virtual void

getBoundingBox (SoGetBoundingBoxAction *action) calls doAction()

virtual void

callback (SoCallbackAction *action)

calls doAction()

virtual void pick (SoPickAction *action)

calls doAction()

1.9

class tsData2Base : public tsDataBase

Base class for nodes representing a 2 dimensional time media signal

Inheritance

SoNode  ∨

1.4 tsDataBase  ∨

1.9 tsData2Base

                >

1.10 tsData2RNFloat

Public Members

virtual SoType

getRealClassTypeId ()

alternative, becasue original get-TypeId() is NOT VIRTUAL !!

1.9.1 Common data access methods: . . . . . . . . . . . . . . . 28

1.9.2 Action behaviour: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

Protected Members

tsData2Base () private Constructor for abstarct classes

virtual  ~tsData2Base () Destructor

Base class for nodes representing a 2 dimensional time media signal.

See Also:  tsSurface tsData1Base
Author:  (c) Andreas Lücke
Version:  0.0

1.9.1

Common data access methods:

Names

virtual float

getTime (int index)

virtual int getNumValues() const;

virtual const float getTimeMin ()

virtual const float getTimeMax ()

virtual int getIndex (float time, int startIndex = 0)

virtual const void* getValueTime (int index )

virtual void getValueMinMax ( float& min, float& max)

virtual SbBool isRegularSampled ()

virtual void

getDim2MinMax ( float& min, float& max) returns Min/Max in dim2

virtual int getIndex2 (float dim2Value, int startIndex = 0) returns index in dim2 (???)

virtual int getNum2 () returnsnumber points sampled in dim2

1.9.2

Action behaviour:

Names virtual void GLRender (SoGLRenderAction *action)

does GLrender begaviour, calls doAction()

virtual void

getBoundingBox (SoGetBoundingBoxAction *action) calls doAction()

virtual void

callback (SoCallbackAction *action)

calls doAction()

virtual void

pick (SoPickAction *action)

calls doAction()

1.10

class tsData2RNFloat : public tsData2Base

Node storing a two dimensional float signal

Inheritance

SoNode  ∨

1.4 tsDataBase  ∨

1.9 tsData2Base  ∨

1.10 tsData2RNFloat

>

1.11 tsData2RNFloatFile

Public Members

1.10.1  New Fields  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

1.10.2 Common data access methods: . . . . . . . . . . . . . . . 32 1.10.3 Action behaviour: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

static void

initClass () Makes this class known to the OpenInventor type system.

Protected Members

virtual ~tsData2RNFloat () Destructor

Node storing a two dimensional float signal. Time axis is sampled regularly. 2nd dimension is non-regular sampled, but the same for all points in time.

See Also:  tsSurface tsData2RNFloatFile
Author:  (c) Andreas Lücke
Version:  0.0

New Fields^{1.10.1}

Names 1.10.1.1SoSFFloat startTime Field containing start time of the

time axis. . . . . . . . . . . . . . . . . . . . . . . 31

1.10.1.2SoSFFloat interval Field containing sample interval of the time axis. . . . . . . . . . . . . . . . . . . 31

1.10.1.3SoMFFloat

dim2 Field containing sample points of 2nd dimension. . . . . . . . . . . . . . . . . 31

1.10.1.4SoMFFloat
data  Field containing signal data. … 31

1.10.1.1

SoSFFloat startTime

Field containing start time of the time axis.

1 Property Nodes Field containing the time (in seconds) when signal starts at the the time axis.

1.10.1.2

SoSFFloat interval

Field containing sample interval of the time axis.

Field containing the interval (in seconds) between 2 following sample points .

1.10.1.3

SoMFFloat dim2

Field containing sample points of 2nd dimension.

Field containing values of the 2nd dimension, where data in field <data> is sampled.

1.10.1.4

SoMFFloat data

Field containing signal data.

Field containing values of the signal sampled at points in <time> field.

1.10.2

Common data access methods:

Names

virtual SoType getRealClassTypeId ()

virtual int getNum () returns number points sampled in time

virtual int getNumValues () returns total number points sampled in all dimensions.

virtual float

getTime (int index)

returns time when data a t<index> is sampled

virtual const float

getTimeMin () returns time of first sample point

virtual const float

getTimeMax () returns time of last sample point

virtual int getIndex (float time, int startIndex = 0)

returns index of a point in time. Starts search from startIndex (optional)

virtual const void*

getValue (int index, int index2)

returnes a value as a pointer!

virtual void getValueMinMax ( float& min, float& max)

virtual SbBool

isRegularSampled ()

returns TRUE because data is regular sampled.

virtual int getIndex2 (float dim2Value, int startIndex = 0) returns index in dim2 (???)

virtual int getNum2 () returnsnumber points sampled in dim2

virtual void

getDim2MinMax ( float& min, float& max) returns Min/Max in dim2

1.10.3

Action behaviour:

Names

virtual void

doAction (SoAction *action)

does default action behaviour

virtual void

GLRender (SoGLRenderAction *action) does GLrender begaviour, calls doAction()

virtual void

getBoundingBox (SoGetBoundingBoxAction *action) calls doAction()

virtual void

callback (SoCallbackAction *action)

does SoCallbackAction behaviour. Calls doAction()

virtual void

pick (SoPickAction *action)

calls doAction()

1.11

class tsData2RNFloatFile : public tsData2RNFloat

Node storing a 2dim float signal beeing read in from a file

Inheritance

SoNode  ∨

1.4 tsDataBase  ∨

1.9 tsData2Base  ∨

1.10 tsData2RNFloat

∨ 1.11

tsData2RNFloatFile

Public Members

1.11.1  New Fields  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

1.11.2 Action behaviour: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

SoINTERNAL static void

initClass () Makes this class known to the OpenInventor type system.

int readFile (const SbString file)

Reads in file content. Called from constructor.

Protected Members

int readFileGrid (const SbString file)

returnes TRUE, if reading an GRID file was succesfull.

int readFileMatlab (const SbString file)

returnes TRUE, if reading an audio file was succesfull. Not yet implemented!

float frequency log (float value)

Does conversion GRID file’s raw frequency data to log frequency. Used by readFileGrid().

float dB (float value) Does conversion GRID file’s raw amplitude/pahe data to dB amplitude. Used by readFileGrid().

SbBool fileReadOrError Flag to remember, if reading the file has been tried without success.

virtual ~tsData2RNFloatFile ()

Destructor

static void dataChangedSensorCB (void *userData,

SoSensor* sensor) for debugging:

Node storing a 2dim float signal beeing read in from a file. Time axis is sampled regularly. 2nd dimension is non-regular sampled, but the same for all points in time.If field <filename> is not empty file with filename taken from field <filename> is read in on construction time (better on first traversal! Future work). Otherwise it habits exactly like its parent class tsData1RFloat. Node’s signal data in field <data> is NOT saved when scene graph is written to a file, until field is touched once. Field content is assumed to be the dafault value for this field. Touching this field, deletes his default status and makes it beeing written as a normal Inventor node.

The following file formats are detected:

Grid format format: Private hack to store spectral data of the wavelet analysis system from Daniel D.P.W. Ellis (filename postfix: ”.grid”). See cqt3 (→6.4, page 77) and aqt2gridcompl (→6.5, page 77) for generating and converting this file format.

Future work: SDIFF: CNMAT’s Sound Description Interchange Format. (filename postfix: ”.sdiff”)

Matlab ASCII files representing a one dimensional vector of values (converted to float).

See Also:  tsData1Base tsData2Base
Author:  (c) Andreas Lcke
Version:  0.0

New Fields^{1.11.1}

Names

1.11.1.1SoSFString

filename Field containing the filename of the file to be read in . . . . . . . . . . . . 36

1.11.1.1

SoSFString filename

Field containing the filename of the file to be read in

Field containing the filename of the file to be read in. Changes are not yet recognized. Reading is done only once! (future work!).

1.11.2

Action behaviour:

Names

virtual void

GLRender (SoGLRenderAction *action) does GLrender begaviour, calls doAction()

virtual void

getBoundingBox (SoGetBoundingBoxAction *action) calls doAction()

virtual void

callback (SoCallbackAction *action)

calls doAction()

virtual void

pick (SoPickAction *action)

calls doAction()

1.12

class tsNormal : public SoNode

Node storing normals as 3 byte vectors

Inheritance

SoNode  ∨

1.12 tsNormal

Public Members New Fields

tsNormal ()  Constructor
virtual  ~tsNormal ()  Destructor

1.12.1 Action behaviour: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

static void

initClass () Makes this class known to the OpenInventor type system.

Node storing normals as 3 byte vectors. This node is used for efficient storing normals of tsKit shapes. Bevause there is no standard data type for storing 3byte vectors, they are packet into 32 bit integer in a field of type SoMFInt32.

See Also:  tsSurface
Author:  (c) Andreas Lücke
Version:  0.0

1.12.1

Action behaviour:

Names

virtual void

doAction (SoAction *action)

does default action behaviour. Sets normal data in tsNormalElement.

virtual void

GLRender (SoGLRenderAction *action)

does GLrender begaviour, calls doAction()

virtual void

getBoundingBox (SoGetBoundingBoxAction *action) calls doAction()

virtual void

callback (SoCallbackAction *action)

calls doAction()

virtual void

pick (SoPickAction *action)

calls doAction()

2 Feedback Nodes

2

Feedback Nodes

Classes for rendering a feedback.

Names 2.1 class tsLine : public SoVertexShape

Feedback node, rendering a one dimensional signal as a line …. 38

2.2  class  tsSurface : public SoVertexShape

Feedback node, drawing a two dimensional signal as a surface … 41

2.3  class  tsAudio : public SoNode

Feedback node rendering a signal to a audio stream . . . . . . . . . . . . . . 44

Objects of these classes can be part of the Open Inventor’s scene graph. They render data from Property Nodes into a visual or auditive feedback.

See Also:  Property Nodes

2.1

class tsLine : public SoVertexShape

Feedback node, rendering a one dimensional signal as a line

Inheritance

{2.1 \atop tsLine}

SoVertexShape  ∨

Public Members

SoSFTime past  Old stuff, out of date.
SoSFTime future  Old stuff, out of date.
SoSFFloat complexity  Old stuff, out of date.

static void

initClass () Makes this class known to the OpenInventor type system. static void initClass();

tsLine ()  Constructor

virtual SbBool

affectsState () Becasue it is a feedback node, it does not affect the state of an action!

Protected Members 2.1.1 Action behaviour: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

Feedback node, rendering a one dimensional signal as a line. Time is mapped to the X-axis, signal values (spectra: amplitude) to Y-axis.

Takes time to render for from tsTimeElement. Takes signal data from a tsData2Element, normal vectors from a tsNormalElement. Material and draw style is standard. Texture mapping is not yet implemented!

See Also:  tsSurface tsData1Base
Author:  (c) Andreas Lücke
Version:  0.0

2.1.1

Action behaviour:

Names

virtual void

GLRender (SoGLRenderAction *action)

This implements the GL rendering action.

void GLRenderRegular (tsData1RFloat* dataNode, GLenum GLMode, float timeNow, int startIdx, int endIdx)

Called from GLRender(), renders regular sampled signal data (ts-Data1RFloat, ...).

void GLRenderNonregular (tsData1NFloat* dataNode, GLenum GLMode, float timeNow, int startIdx, int endIdx)

Called from GLRender(), renders irregular sampled signal data (ts-Data1NFloat, ...).

2.1.1.1 virtual void

generatePrimitives (SoAction *action)

Produces primitive representation for picking. . . . . . . . . . . . . . . . . . . . 40

2.1.1.2 virtual void

computeBBox (SoAction *action, SbBox3f &box,

SbVec3f &center) Computes the bounding box and center of a shape . . . . . . . . . . . . . . . 41

2.1.1.1

virtual void generatePrimitives (SoAction *action)

Produces primitive representation for picking.

Generates a representation of the shape in primitives (points,lines and triangels, here lines only). Implementing this method, the picking mechanism for all vertex shapes can be employed.

2.1.1.2

virtual void computeBBox (SoAction *action, SbBox3f &box, SbVec3f &center)

Computes the bounding box and center of a shape Computes the bounding box and center of a shape. Called from a inherited doBoundingBox() method.

2.2

class tsSurface : public SoVertexShape

Feedback node, drawing a two dimensional signal as a surface

Inheritance

SoVertexShape  ∨

2.2 tsSurface

Public Members

SoSFTime past  Old stuff, out of date.
SoSFTime future  Old stuff, out of date.
SoSFFloat complexity  Old stuff, out of date.

static void

initClass () Makes this class known to the OpenInventor type system.

tsSurface ()  Constructor
virtual  ~tsSurface ()  Destructor

virtual SbBool

affectsState () Becasue it is a feedback node, it does not affect the state of an action!

Protected Members 2.2.1 Action behaviour: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42

Feedback node, drawing a two dimensional signal as a surface. Uses GL TRIANGLE STRIP as GLMode.

Time is mapped to the X-axis, 2nd dimension (spectra: frequency) to Z-axis, signal values (spectra: amplitude) to Y-axis.

Takes time to render for from tsTimeElement.

Takes signal data from a tsData2Element, normal vectors from a tsNormalElement.

Material and draw style is standard.

Texture mapping is not yet implemented!

See Also:  tsLine tsAudio tsData2Base
Author:  (c) Andreas Lücke
Version:  0.0

2.2.1

Action behaviour:

Names

virtual void

GLRender (SoGLRenderAction *action) This implements the GL rendering action.

void GLRenderRegular (SoState *state, tsData2RNFloat* node, GLenum GLMode, tsNormal* normals, float now, int startIdx, int endIdx) Called from GLRender(), renders regular sampled signal data. Only implemented type!

void GLComputeNormals (const tsData2Base* dataNode, TS VEC3B FIELD TYPE& normalField)

Called from GLRender(), when we have to compute our nodes ourself.

2.2.1.1 SbVec3f GLcomputeNormal (const tsData2RNFloat* dataNode, int indexT, int index2)

Computes one normal vector for a vertex in a tsData2RNFloat node

43

2.2.1.2 virtual void

generatePrimitives (SoAction *action)

Produces primitive representation for picking. . . . . . . . . . . . . . . . . . . . 43

2.2.1.3 virtual void

computeBBox (SoAction *action, SbBox3f &box, SbVec3f &center)

Computes the bounding box and center of a shape . . . . . . . . . . . . . . . 44

2.2.1.1

SbVec3f GLcomputeNormal (const tsData2RNFloat* dataNode, int indexT, int index2)

Computes one normal vector for a vertex in a tsData2RNFloat node

Computes one normal vector for a vertex in a tsData2RNFloat node. Called from GLComputeNormals().

2.2.1.2

virtual void generatePrimitives (SoAction *action)

Produces primitive representation for picking.

Generates a (very reduced) representation of the shape in primitives (points,lines and triangels, here triangles). Implementing this method, the picking mechanism for all vertex shapes can be employed. Until now, only a bounding box sized rectangular in the X/Y plane is generated. Ok for picking!

2.2.1.3

virtual void computeBBox (SoAction *action, SbBox3f &box, SbVec3f &center)

Computes the bounding box and center of a shape

Computes the bounding box and center of a shape. Called from a inherited doBoundingBox() method.

2.3

class tsAudio : public SoNode

Feedback node rendering a signal to a audio stream

Inheritance

SoNode  ∨

{2.3 \atop tsAudio}

Public Members

2.3.1  New Fields  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
tsAudio ()  Constructor
virtual  ~tsAudio ()  Destructor

Protected Members 2.3.2 Action behaviour: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

2.3.3 Synchronizing staff: . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

Scrubber* pScrubber The object we employ for reading and playing audio.

char pScrubberFileName [200] Feedback node rendering a signal to a audio stream. Until now, it only redners

a tsData1RFloatFile node.

Takes time and speed to render for from tsTimeElement. Takes signal data from a file in tsData1RFloatFile.

This node ceates and communicates an object of class ’Scubber’. This is a sample rate converter written by Tobias Kunze(tkunze@engr.sgi.com). It builds a separate thread for reading, converting and playing audio frames from an audio file. This code is used for simplicity.

Limitation:

- To have access to a file, currently only signal data from a tsData1RFloatFile can be played back. The nodes field ’filename’ is directly read and used. This is not very systematically!

- Use SoComplexity as quality of Scrubber/RingSound .

- Give Audio Haardware back when not playing, so other applications (movieplayer) can use it.

See Also:  tsData1RFloat (→1.7, page 20)
Author:  (c) Andreas Lücke, Tobias Kunze
Version:  0.0

New Fields^{2.3.1}

Names 2.3.1.1 SoSFFloat IORateRatio Field storing ratio of input and

output sample rate . . . . . . . . . . . . . 45

2.3.1.1

SoSFFloat IORateRatio

Field storing ratio of input and output sample rate

Field storing ratio of input and output sample rate. This can be used to scale use of processor power! Nearest possible output sample rate is taken.

2.3.2

Action behaviour:

Names

2.3.2.1 virtual void

GLRender (SoGLRenderAction *action) Not yet implemented! This implements the GL rendering action . 46

virtual void

getBoundingBox (SoGetBoundingBoxAction *action) Not yet implemented! Computes the duration in time.

virtual void

callback (SoCallbackAction *action)

Does nothing yet!

2.3.2.1

virtual void GLRender (SoGLRenderAction *action)

Not yet implemented! This implements the GL rendering action

Not yet implemented! This implements the GL rendering action. Until a new tsAudioAction is implemented, the audio rednering is done here.

2.3.3

Synchronizing staff:

Names

float  lastSpeed
stamp t lastUST

3 GUI Nodes

GUI Nodes^{3}

Nodes building a GUI for a node.

Names

3.1  class  tsTimeCtrlUI : public SoNode

GUI node that represents a graphical userinterface for a node of class tsTime . . . . . . . . . . . . . . . . . . . 47

Objects of these classes build a graphical user interface. GUI nodes are derived from SoNode and can therefore be part of the scene graph.

3.1

class tsTimeCtrlUI : public SoNode

GUI node that represents a graphical userinterface for a node of class tsTime

Inheritance

SoNode  ∨

3.1 tsTimeCtrlUI

Public Members

SoSFTime start  old stuff
SoSFTime end  old stuff

static void

initClass () Makes this class known to the OpenInventor type system.

tsTimeCtrlUI () Constructor

void setTime (SbTime t)

Sets time. Calls tsTime::setTime() of attached tsTimeNode.

void setSpeed (float sp)

Sets speed. Calls tsTime::setSpeed() of attached tsTimeNode.

void  stop ()  stops playing (speed = 0.0), buit

remembers speed.

void  play ()  plays with remembered speed for-

wards.

void  backwards ()  plays with remembered speed back-

wards.

Protected Members 3.1.1 Callbacks to update GUI’s widgets . . . . . . . . . . . . 48

TsVkTimeCtrl*

vkTimeCtrl The ViewKit Component we employ.

3.1.2 Action behaviour: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49

void  updateUI ()  Updates the GUI content from the

tsTime field in nodeToEdit.

GUI node that represents a graphical userinterface for a node of class tsTime. Builds a TsVkTimeCtrl component derived from VkVomponent and reports changes to the tsTime node.

See Also:  tsTime (→1.3, page 8)
Author:  (c) Andreas Lücke
Version:  0.0

3.1.1

Callbacks to update GUI’s widgets

Names

static void speedChangedCB (void *data, SoSensor *sensor)

static void

pastChangedCB (void *data, SoSensor *sensor)

static void futureChangedCB (void *data, SoSensor *sensor)

static void

complexityChangedCB (void *data, SoSensor *sensor)

3.1.2

Action behaviour:

Names

virtual void

GLRender (SoGLRenderAction *action)

Does GLrender begaviour, calls doAction()

virtual void

getBoundingBox (SoGetBoundingBoxAction *action) Calls doAction()

virtual void

callback (SoCallbackAction *action)

Calls doAction()

4 SoXtComponents

4

SoXtComponents

Components building a user interface for a node.

Names

4.1  class  tsRendererViewer : public SoXtExaminerViewer

An ExaminerViewer that renders its scene into a movie file . . . . . . 51

4.2  class  FieldEditor : public SoXtComponent

This SoXtComponent builds a generic dialog for the fields one nodes . . . . . . . . . . . . . . . . . . . . . . . . . . 53

4.3  class  GraphViewer : public SoXtPlaneViewer

A SoXtPlaneViewer showing an iconic version of an Inventor scene graph . . . . . . . . . . . . . . . . . . . . 54

4.4  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
4.5  class  SoSceneViewer : public SoXtComponent

The SceneViewer component lets you select between different viewers (Examiner, tsRenderer, Walk

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
4.6  class  Error  Class that is used to display an er-

ror message . . . . . . . . . . . . . . . . . . . . 58

4.7 libInventorWidget Component libray from the Open Inventor demo source code at

/usr/share/src/Inventor/samples/widgets/.

Original README file: . . . . . . . 59

Objects of these classes build a graphical user interface. They allow viewing of scenes (viewers) or editing of node parameters (editors) in a window. GUI nodes are derived from SoNode and can therefore be part of the scene graph.

4.1

class tsRendererViewer : public SoXtExaminerViewer

An ExaminerViewer that renders its scene into a movie file

Inheritance

SoXtExaminerViewer ∨

4.1 tsRendererViewer

Public Members

tsRendererViewer ( Widget parent = NULL, const char *name = NULL, SbBool buildInsideParent = TRUE, SoXtFullViewer::BuildFlag flag = BUILD ALL, SoXtViewer::Type type = BROWSER)

constructor

~tsRendererViewer ()

destructor

void setStartTime (SbTime start)

sets the time, when to start the rendering

void setLength (SbTime length)

sets the duration to render

void setSpeed (float speed)

sets the speed for rendering

4.1.1 movie parameter access: . . . . . . . . . . . . . . . . . . . . . . . 52

Protected Members stuff to store a grabed frame:

float  speed  speed for rendering

dmedia parameters for conversion/compression/movie file:

An ExaminerViewer that renders its scene into a movie file. Currently the movie file format is a JPEG, to be played with dmplay.

There is also a stand alone program using this viewer class called // tt tsRendererViewer.

Frames are grabed from the screen. Creates an extra SoXtRenderArea for rendering the frames Limitations:

- fixed Framesize 640x480, JPEG

- full frames, no fields!

- audio file name -> movie file comment

- no dialog for movie file settings (length, speed, quality)

See Also:  tsgview tsSceneViewer
Author:  (c) Andreas Lücke
Version:  0.0

4.1.1

movie parameter access:

Names

MVid  getMovieId () returnes the movie Id

MVid getImageTrackId ()

returnes the Id of the image track

MVid getAudioTrackId ()

returnes the Id of the audio track, NULL if no audio

DMparams*

getMovieParams ()

returns the movie parameters

DMparams*

getImageParams ()

returns the image parameters

DMparams* getAudioParams ()

returns the audio parameters

4.2

class FieldEditor : public SoXtComponent

This SoXtComponent builds a generic dialog for the fields one nodes

Inheritance

SoXtComponent  ∨

4.2 FieldEditor

Public Members 4.2.1 FieldEditor (SoNode *node,

Widget parent = NULL, const char *name = NULL)

Constructor . . . . . . . . . . . . . . . . . . . . 54

~FieldEditor () Destructor

static int getNumFields (SoNode *node)

the check to be made before an editor is constructed.

void setFinishCallback (FieldEditorCB *cb,

const void *userData = NULL) Sets a callback to call when editing is finished.

This SoXtComponent builds a generic dialog for the fields one nodes.

See Also:  GraphViewer (→4.3, page 54)
Author:  Silicon Graphics Inc., extensions by Andreas Lücke
Version:  0.0

4.2.1

FieldEditor (SoNode *node, Widget parent = NULL, const char *name = NULL)

Constructor

Constructor. Takes pointer to node whose fields we are to edit, along with parent and widget name

4.3

class GraphViewer : public SoXtPlaneViewer

A SoXtPlaneViewer showing an iconic version of an Inventor scene graph

Inheritance

SoXtPlaneViewer ∨

4.3 GraphViewer

Public Members

GraphViewer (Widget parent = NULL, const char *name = NULL)

~GraphViewer ()

virtual void

setSceneGraph (SoNode *newScene) the graph itself

void  update ()  graph. Sets up the array of Graph-

Icons.

void select (SoPath *path)

anywhere in the path (i.e., there may be other nodes above it.

void  deselectAll ()  Deselects the current selection

void addSelectionCallback (SoSelectionPathCB *f,

void *userData = NULL) represented by the selected graph icon.

void removeSelectionCallback (SoSelectionPathCB *f, void *userData = NULL)

void addDeselectionCallback (SoSelectionPathCB *f, void *userData = NULL)

represented by the deselected graph icon.

void removeDeselectionCallback (SoSelectionPathCB *f, void *userData = NULL)

virtual Widget

getWidget ()  Redefine this from the base class

SoNode* getDisplayGraph ()

Returns the scene graph representing the display graph

A SoXtPlaneViewer showing an iconic version of an Inventor scene graph. This iconic version is referred to as the display graph.

See Also:  FieldEditor (→4.2, page 53)
Author:  Silicon Graphics Inc., extensions by Andreas Lücke
Version:  0.0

4.4

Names

class  MyColorEditor components, forward declarations
enum  SvEManipMode

struct SoSceneViewerData SoSceneViewerData

4.5

class SoSceneViewer : public SoXtComponent

The SceneViewer component lets you select between different viewers (Examiner, tsRenderer, Walk

Inheritance

SoXtComponent  ∨

4.5 SoSceneViewer

Public Members

SoSceneViewer ( Widget parent = NULL, const char *name = NULL, SbBool buildInsideParent = TRUE, SoSelection *root = NULL, const char *envFile = NULL)

~SoSceneViewer ()

void  viewAll ()
void  viewSelection ()

void saveHomePosition ()

void setCamera (SoCamera *cam)

SoCamera*

getCamera () and perspective), the user shouldn’t cache the camera.

void  newData ()

void showMenu (SbBool onOrOff) Show/hide the pulldown menu bar (default shown)

SbBool  isMenuShown ()

void setDecoration (SbBool onOrOff) Show/hide the viewer component trims (default shown)

SbBool  isDecoration ()

void setHeadlight (SbBool onOrOff)

Show/hide headlight (default on) and get to the headlight node.

SbBool  isHeadlight ()

SoDirectionalLight* getHeadlight ()

void setDrawStyle (SoXtViewer::DrawType type, SoXtViewer::DrawStyle style)

SoXtViewer::DrawStyle getDrawStyle (SoXtViewer::DrawType type)

void setBufferingType (SoXtViewer::BufferType type)

SoXtViewer::BufferType getBufferingType ()

void setViewing (SbBool onOrOff)

Turn viewing on/off (Default to on) in the viewers.

SbBool  isViewing ()

void setTransparencyType (SoGLRenderAction::TransparencyType type)

Set/get the level of transparency type

SoGLRenderAction::TransparencyType getTransparencyType ()

Widget getRenderAreaWidget ()

returns the current render area widget

void setUserModeEventCallback (SoXtRender-AreaEventCB *fcn) set the EXPLORER user mode callback routine

Protected Members SoEXTENDER SoSceneViewer ( Widget parent,

const char *name,

SbBool buildInsideParent, SoSelection *root, const char *envFile, SbBool buildNow) when they are ready for it to be built.

virtual const char*

getDefaultWidgetName ()

redefine these

virtual const char* getDefaultTitle ()

virtual const char* getDefaultIconTitle ()

The SceneViewer component lets you select between different viewers (Examiner, tsRenderer, Walk ..) and lets you perform some simple attribute assignment, and some manipulation of data.

Limitations: - GraphViewer has a different selection than the SceneViewer itself.

See Also:  FieldEditor (→4.2, page 53)
Author:  Silicon Graphics Inc., extensions by Andreas Lücke
Version:  0.0

class Error^{4.6}

Class that is used to display an error message

Public Members

Error (Widget parent, const char *message) Constructor - takes parent widget and error message

~Error ()  Destructor

Class that is used to display an error message.

See Also:  tsSceneViewer (→6.3, page 76)
Author:  Silicon Graphics Inc.
Version:  0.0

4.7

libInventorWidget

Component libray from the Open Inventor demo source code at

                         /usr/share/src/Inventor/samples/widgets/.

Original README file:

This directory contains source code for a library,
libInventorWidget.a, containing various sample Xt components,
and other useful code.  It also contains
The sample components in libInventorWidget.a:
---------------------------------------------
MySimpleMaterialEditor:
    A simple material editor
MyMaterialPalette:
    A component which display palettes of materials using
    an array of spheres
MyTextureEditor:
    A component which displays palettes of textures, as well
    as let you edit how the texture is applied to an object.
MyColorEditor:
MyColorPatch:
MyColorSlider:
MyColorWheel:
MySlider:
MyThumbWheel:
    Componenets that used be in the Inventor 1.0 library.
Other useful code in libInventorWidget.a:
-----------------------------------------
MyDropSite:
    Code for implementing drag-and-drop of file icons from the

    desktop into an Inventor application.
MyFileRead:
    Code for reading files into Inventor applications.  First
    it tries to read the file as an Inventor file.  If that fails
    it uses /usr/sbin/routeprint to convert the file to Inventor
    format using FTR rules.  See the man page on routeprint.
The application, componentTest, in this directory, uses some of the
components in the library.  Run componentTest without any arguments
to get a usage message.
The SceneViewer program in ../../demos/SceneViewer uses some of the
components as well as the drag-and-drop and file reading code.

5 Elements

Elements^{5}

Internal classes for data propagation through a scene graph.

Names

typedef signed long long stamp t

5.1  class  tsTimeElement : public SoReplacedElement

Element storing time information for synchronizing all feedback nodes . . . . . . . . . . . . . . . . . . . . . . . . . . 61

5.2  class  tsNodeElement : public SoReplacedElement

Base class for storing a tsData node and a type(SoType) . . . . . . 65

5.3  class  tsData1Element : public tsNodeElement

Element for storing all one dimensional signal data . . . . . . . . . . . . . . 67

5.4  class  tsData2Element : public tsNodeElement

Element for all 2 dimensional signal data . . . . . . . . . . . . . . . . . . . . . . . . 69

5.5  class  tsNormalElement : public tsNodeElement

Element for propagating normal data . . . . . . . . . . . . . . . . . . . . . . . . . . . 72

Elements are internal classes and are not created by the user. These classes are only important for programmers who wants to build new node classes.

5.1

class tsTimeElement : public SoReplacedElement

Element storing time information for synchronizing all feedback nodes Inheritance

SoReplacedElement ∨

5.1 tsTimeElement

Public Members

virtual void

init (SoState *state)

Initializes element

static void

set (SoState *state, SbTime now, float speed,

stamp t ust, SoNode *node) Sets the data the element to be stored and propagated.

static const tsTimeElement*

getInstance (SoState *state)

Returns the top (current) instance of the element in the state

static const SbTime

getTime (SoState *state)

Returns the ’time’ stored in the current (and therefore valid) element in the stack. Inline for speed.

static float

getSpeed (SoState *state)

Returns the ’speed’ stored in the current (and therefore valid) element in the stack. Inline for speed.

static float

getUST (SoState *state)

Returns the ’UST’ (Unified System Time) stored in the current (and therefore valid) element in the stack. Inline for speed.

5.1.1 static SoNode*

getNode (SoState *state)

Returns the node reference to the ’tsTime’ node stored in the current (and therefore valid) element in the stack . . . . . . . . . . . . . . . . . . . . 64

virtual SbBool

matches (const SoElement *elt)

Inventor internal: Returns TRUE if the element matches another element, based on node-id

5.1.2 virtual SoElement*

copyMatchInfo ()

Inventor internal: Create and return a copy of this element . . . . . 64

5.1.3 virtual void

push (SoState *state)

Inventor internal pushes/pops element . . . . . . . . . . . . . . . . . . . . . . . . . . . 64

5.1.4 virtual void

pop (SoState *state,

const SoElement *prevTopElement) Inventor internal: Pushes/pops element . . . . . . . . . . . . . . . . . . . . . . . . . . 64

static float

getDefault () Returns the default 3-D or 4-D coordinate

SoINTERNAL static void

initClass () Makes this class known to the OpenInventor type system.

virtual ~tsTimeElement ()

Element storing time information for synchronizing all feedback nodes.

See Also:  tsTime (→1.3, page 8)
Author:  Andreas Lücke
Version:  0.0

5.1.1

static SoNode* getNode (SoState *state)

Returns the node reference to the ’tsTime’ node stored in the current (and therefore valid) element in the stack Returns the node reference to the ’tsTime’ node stored in the current (and therefore valid) element in the stack. Inline for speed. This reference is used by the ’tsTimeCtrlUI’ class to build a GUI for that tsTime node.

5.1.2

virtual SoElement* copyMatchInfo ()

Inventor internal: Create and return a copy of this element

Inventor internal: Create and return a copy of this element. The only operation supported by the copy is matches() (the copy will be unitialized except for the nodeId).

5.1.3

virtual void push (SoState *state)

Inventor internal pushes/pops element

Inventor internal pushes/pops element. Allows for side effects to occur. Default methods do nothing.

5.1.4

virtual void pop (SoState *state, const SoElement *pre- vTopElement)

Inventor internal: Pushes/pops element

Inventor internal: Pushes/pops element. Allows for side effects to occur. Default methods do nothing.

5.2

class tsNodeElement : public SoReplacedElement

Base class for storing a tsData node and a type(SoType)

Inheritance

SoReplacedElement ∨

5.2 tsNodeElement

>

5.5 tsNormalElement

>

5.4 tsData2Element

>

5.3 tsData1Element

Public Members

virtual void

init (SoState *state)

Makes this class known to the OpenInventor type system.

static void

set (SoState *state, const tsDataBase * dataNode,

SoType dataNodeType) Sets the data the element to be stored and propagated.

static const tsNodeElement*

getInstance (SoState *state)

Returns the top (current and therefore valid) instance of the element in the state.

static const tsDataBase* getPtr (SoState *state, SoNode *node)

Returns the pointer stored in the current (and therefore valid) element in the stack. Inline for speed.

static SoType

getType (SoState *state)

Returns the type stored in the current (and therefore valid) element in the stack. Inline for speed.

virtual SbBool

matches (const SoElement *elt)

Inventor internal: Returns TRUE if the element matches another element, based on node-id.

5.2.1 virtual SoElement*

copyMatchInfo ()

Inventor internal: Create and return a copy of this element . . . . . 67

5.2.2 virtual void

push (SoState *state)

Inventor internal: Pushes/pops element . . . . . . . . . . . . . . . . . . . . . . . . . . 67

virtual void

pop (SoState *state, const SoElement *prevTopElement)

static void

initClass () Initializes the tsNodeElement class

virtual ~tsNodeElement () Destructor

Base class for storing a tsData node and a type(SoType) . Elements are an internal class family, that is used for Inventor’s traversal mechanism and are NOT used for black box use of tsKit.

Author:  Andreas Lücke
Version:  0.0

5.2.1

virtual SoElement* copyMatchInfo ()

Inventor internal: Create and return a copy of this element

Inventor internal: Create and return a copy of this element. The only operation supported by the copy is matches() (the copy will be unitialized except for the nodeId).

5.2.2

virtual void push (SoState *state)

Inventor internal: Pushes/pops element

Inventor internal: Pushes/pops element. Allows for side effects to occur. Default methods do nothing.

5.3

class tsData1Element : public tsNodeElement

Element for storing all one dimensional signal data

Inheritance

SoReplacedElement ∨

5.2 tsNodeElement

∨ 5.3

tsData1Element

Public Members

virtual void

init (SoState *state) Initializes this element.

static void set (SoState *state, const tsDataBase * dataNode,

SoType dataNodeType) Sets the data the element to be stored and propagated.

static const tsData1Element*

getInstance (SoState *state)

Returns the top (current) instance of the element in the state

static const tsDataBase*

getPtr (SoState *state, SoNode *node)

Returns the pointer stored in the current (and therefore valid) element in the stack. Inline for speed.

static SoType

getType (SoState *state)

Returns the type stored in the current (and therefore valid) element in the stack. Inline for speed.

virtual SbBool

matches (const SoElement *elt)

Inventor internal: Returns TRUE if the element matches another element, based on node-id.

5.3.1 virtual SoElement*

copyMatchInfo ()

Inventor internal: Create and return a copy of this element . . . . . 69

5.3.2 virtual void

push (SoState *state)

Inventor internal: Pushes/pops element . . . . . . . . . . . . . . . . . . . . . . . . . . 69

virtual void

pop (SoState *state, const SoElement *prevTopElement)

static void

initClass () Makes this class known to the OpenInventor type system.

virtual ~tsData1Element () Destructor

Element for storing all one dimensional signal data. Element for storing a pointer to a node derived from tsData1Base for propagating all 1 dimensional signal data. Note: Elements are an internal class family, that is used for Inventor’s traversal mechanism and are NOT used for black box use of tsKit.

5.3.1

virtual SoElement* copyMatchInfo ()

Inventor internal: Create and return a copy of this element

Inventor internal: Create and return a copy of this element. The only operation supported by the copy is matches() (the copy will be unitialized except for the nodeId).

5.3.2

virtual void push (SoState *state)

Inventor internal: Pushes/pops element

Inventor internal: Pushes/pops element. Allows for side effects to occur. Default methods do nothing.

5.4

class tsData2Element : public tsNodeElement

Element for all 2 dimensional signal data

Inheritance

∨ 5.4

SoReplacedElement ∨

5.2 tsNodeElement

tsData2Element

Public Members

virtual void

init (SoState *state)

Initializes this element.

static void

set (SoState *state, const tsDataBase * dataNode,

SoType dataNodeType) Sets the data the element to be stored and propagated.

static const tsData2Element*

getInstance (SoState *state)

Returns the top (current) instance of the element in the state

5.4.1 static const tsDataBase*

getPtr (SoState *state, SoNode *node)

Returns the pointer stored in the current (and therefore valid) element in the stack . . . . . . . . . . . . . . 71

5.4.2 static SoType

getType (SoState *state)

Returns the type stored in the current (and therefore valid) element in the stack . . . . . . . . . . . . . . . . . . . . 71

virtual SbBool

matches (const SoElement *elt)

Inventor internal: Returns TRUE if the element matches another element, based on node-id

5.4.3 virtual SoElement*

copyMatchInfo ()

Inventor internal: Create and return a copy of this element . . . . . 71

5.4.4 virtual void

push (SoState *state)

Inventor internal: Pushes/pops element . . . . . . . . . . . . . . . . . . . . . . . . . . 72

virtual void

pop (SoState *state, const SoElement *prevTopElement)

SoINTERNAL static void initClass ()

virtual ~tsData2Element ()

Element for all 2 dimensional signal data. Element for storing and propagating a pointer to a node derived from tsData2Base for all 2 dimensional signal data. Note: Elements are an internal class family, that is used for Inventor’s traversal mechanism and are NOT used for black box use of tsKit.

See Also:  tsData1Element (→5.3, page 67)
Author:  (c) Andreas Lücke
Version:  0.0

5.4.1

static const tsDataBase* getPtr (SoState *state, SoNode *node)

Returns the pointer stored in the current (and therefore valid) element in the stack

Returns the pointer stored in the current (and therefore valid) element in the stack. Inline for speed.

5.4.2

static SoType getType (SoState *state)

Returns the type stored in the current (and therefore valid) element in the stack

Returns the type stored in the current (and therefore valid) element in the stack. Inline for speed.

5.4.3

virtual SoElement* copyMatchInfo ()

Inventor internal: Create and return a copy of this element

Inventor internal: Create and return a copy of this element. The only operation supported by the copy is matches() (the copy will be unitialized except for the nodeId).

5.4.4

virtual void push (SoState *state)

Inventor internal: Pushes/pops element

Inventor internal: Pushes/pops element. Allows for side effects to occur. Default methods do nothing.

5.5

class tsNormalElement : public tsNodeElement

Element for propagating normal data

Inheritance

SoReplacedElement ∨

5.2 tsNodeElement

∨ 5.5

tsNormalElement

Public Members

virtual void

init (SoState *state)

Initializes this element.

static void

set (SoState *state, tsNormal * dataNode,

SoType dataNodeType) Sets the data the element to be stored and propagated.

static const tsNormalElement*

getInstance (SoState *state)

Returns the top (current) instance of the element in the state

static tsNormal* getPtr (SoState *state, SoNode *node)

Returns the pointer stored in the current (and therefore valid) element in the stack. Inline for speed.

5.5.1 static SoType

getType (SoState *state)

Returns the type stored in the current (and therefore valid) element in the stack . . . . . . . . . . . . . . . . . . . . 74

virtual SbBool

matches (const SoElement *elt)

Inventor internal: Returns TRUE if the element matches another element, based on node-id

5.5.2 virtual SoElement*

copyMatchInfo ()

Inventor internal: Create and return a copy of this element . . . . . 74

5.5.3 virtual void

push (SoState *state)

Inventor internal: Pushes/pops element . . . . . . . . . . . . . . . . . . . . . . . . . . 74

virtual void

pop (SoState *state, const SoElement *prevTopElement)

SoINTERNAL static void

initClass () Makes this class known to the OpenInventor type system.

virtual ~tsNormalElement () Destructor

Element for propagating normal data. Element for storing a pointer to a node derived from tsNormal for propagating normal data. Note: Elements are an internal class family, that is used for Inventor’s traversal mechanism and are NOT used for black box use of tsKit.

See Also:  tsNormal (→1.12, page 36)
Author:  Andreas Lücke
Version:  0.0

5.5.1

static SoType getType (SoState *state)

Returns the type stored in the current (and therefore valid) element in the stack

Returns the type stored in the current (and therefore valid) element in the stack. Inline for speed.

5.5.2

virtual SoElement* copyMatchInfo ()

Inventor internal: Create and return a copy of this element

Inventor internal: Create and return a copy of this element. The only operation supported by the copy is matches() (the copy will be unitialized except for the nodeId).

5.5.3

virtual void push (SoState *state)

Inventor internal: Pushes/pops element

Inventor internal: Pushes/pops element. Allows for side effects to occur. Default methods do nothing.

6 Applications and Converters.

6

Applications and Converters.

Applications and Converters.

Names 6.1 tsRenderer A viewer using a tsRender-

erViewer (→4.1, page 51).

75

6.2 tsgview An extended version of the standard gview. . . . . . . . . . . . . . . . . . . . 76

6.3 tsSceneViewer An extended version of the standard SceneViewer. . . . . . . . . . . . 76

6.4  cqt3  A constant-Q wavelet analyzer for

AIFF files. . . . . . . . . . . . . . . . . . . . . 77

6.5 aqt2gridcompl A converter from .aqt files to a simple binary format .grid. . . . . 77

tsRenderer^{6.1}

A viewer using a tsRendererViewer (→4.1, page 51).

USAGE:

tsRenderer -t <startTime> -l <length> -s <speed> -o <output> -F <format>
file.iv

Author:  Andreas Lücke.
Version:  0.0

tsgview^{6.2}

An extended version of the standard gview.

USAGE: tsgview [ivFile— < ivFile]

This tsgview is extended by the following features:

• Node-icons are annotated with their class name (except class SoSeparator).

• For nodes for which a node specific editor exist are edited with these instead of using the generic editor-dialog.

Author:  Silicon Graphics Inc., extensions by Andreas Lücke.
Version:  0.0

6.3

tsSceneViewer

An extended version of the standard SceneViewer.

USAGE: tsSceneViewer [ivFile]

A viewer using a SoSceneViewer (→4.5, page 56) component. This SceneViewer is extended by the following features:

• Using a tsRenderer (→6.1, page 75) instead of the SoXtExaminerViewer.

• Opening an extra GraphViewer (→4.3, page 54) for viewing and editing scene graph as an icon graph.

Author:  Silicon Graphics Inc., extensions by Andreas Lücke.
Version:  0.0

cqt3^{6.4}

A constant-Q wavelet analyzer for AIFF files.

USAGE:

cqt3 [-q Qfact][-b bins/oct][-o octs][-s][-d][-v] inSnd [outFT]

Type cqt3 without options for this usage message:

-q Qfact   is the q-factor of the bins       (  16.0)
-b bins    is the number of filter per 8ve   (    12)
-o octs    is the # of 8ves, starting at top (     6)
-g guard   is the proportion of the spectrum (   0.5)
-s         switches out 3dB/oct HF boost     (in )
-d         switches out kernel dc canc'l'n   (in )
-v         verbose mode
inSnd      is a SNDF soundfile for input
outFT      is a PVOC-type file,              (inStem+'.aqt')

Use aqt2gridcompl (→6.5, page 77) to generate a file that can be read by the tsKit node tsData2RNFloatFile (→1.11, page 33).

See Also:  aqt2gridcompl (→6.5, page 77)
Author:  Daniel D. P. W. Ellis.
Version:  0.0

6.5

aqt2gridcompl

A converter from .aqt files to a simple binary format .grid.

  USAGE: aqt2gridcompl inFile.aqt outFile.grid [numRows]

Type aqt2gridcompl without options for this usage message:

 infile.aqt           .aqt file to convert (including postfix .aqt)
 outFille             gridcompl file to write (including postfix .grid)
 numRows              number of rows the  gridcompl will contain (20)

6 Applications and Converters. This converter takes the output file from cqt3 (→6.4, page 77) and converters

it to a .grid file that a node if type tsData2RHFloatFile can read.

It was necessary to write this converter, because the .aqt files are VERY big.

See Also:  cqt3 (→6.4, page 77)
Author:  Andreas Lücke.
Version:  0.0

7 Examples

Examples^{7}

Some example scene graphs.

Names

7.1  halloTsKit.iv  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
7.2  tsAudio.iv  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
7.3  tsLine.iv  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
7.4  tsSurface.iv  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82

7.1

halloTsKit.iv

.

#Inventor V2.1 ascii
Separator {
tsKit {   }
tsTime { }
tsTimeCtrlUI { }
tsData2RNFloat
{
data [
0.0 , 0.0 , 0.0 , 0.0 , 0.0 ,
0.0 , 0.0 , 0.3 , 0.0 , 0.0 ,
0.0 , 0.5 , 1.0 , 0.5 , 0.0 ,
0.0 , 0.0 , 0.0 , 0.0 , 0.0 ,
]
dim2 [
1.0 , 2.0 , 3.0 , 4.0 , 5.0
]
startTime 0.0
interval .5
}
Material { diffuseColor .3 .3 .8}

    tsSurface {
past      3.0
future      3.0
    }
}

Author:  Andreas Lücke.

tsAudio.iv^{7.2}

.

#Inventor V2.1 ascii
PerspectiveCamera {}
Separator {
    tsKit {    }
    Separator {
tsTime {
    fields [ sftime time, sffloat speed ]
    time 0.3
    speed .0
}
tsTimeCtrlUI {
}
tsData1RFloatFile {
    fields [ SFFloat startTime, SFFloat interval, SFString filename ]
    startTime 0
    interval 0.00001
    filename "/usr/people/andreas_local/data/sounds/massiveA.pianoCool.mono.5s.aifc"
}
Transform {
    translation 0 0 0
    scaleFactor 36.67 27.32 2
}
Material {
    diffuseColor  0.1 0.1 0.1
}
LightModel {

    model BASE_COLOR
}
DEF shape2 tsLine {
    fields [ SFTime past, SFTime future,  ]
    past .2
    future .2
}
tsAudio { IORateRatio .5}
    }
}

Author:  Andreas Lücke.

tsLine.iv^{7.3}

.

#Inventor V2.1 ascii
Separator {
PerspectiveCamera {}
    tsKit {
    }
    Separator {
tsTime {
    fields [ sftime time, sffloat speed ]
    time 1.17
    speed .5
}
tsTimeCtrlUI {
}
Material {
    diffuseColor  0.1 0.1 0.1
}
LightModel {
    model BASE_COLOR

}
tsData1RFloatFile {
fields [ SFFloat startTime, SFFloat interval, SFString filename ]
startTime 0
interval 0.0001
filename "/usr/people/andreas_local/data/sounds/massiveA.pianoCool.mono.5s.aifc"
}
Transform {
translation 0 0 0
scaleFactor 36.67 27.32 2
}
DEF shape2 tsLine {
fields [ SFTime past, SFTime future,  ]
past 11.5
future 10.4
}
}
}

Author:  Andreas Lücke.

7.4

tsSurface.iv

.

#Inventor V2.1 ascii
Separator {

tsKit {
}
Separator {
tsTime {
fields [ sftime time, sffloat speed ]
time 1.17
speed .5
}
Separator {

#     rendercaching off
    Transform {
translation 0 20.22 -45.66
scaleFactor 41.01 0.22 1
    }
    DEF specdata tsData2RNFloatFile {
fields [ SFFloat interval, SFString filename ]
interval 0.020037
# filename "/usr/people/andreas_local/data/sounds/1.o8g.25.grid"
filename "/usr/people/andreas_local/data/sounds/massiveA.pianoCool.mono.5s.grid"
    }
#     tsSurface {
# fields [ SFTime past, SFTime future,  ]
# past 0.5
# future 1.5
#     }
}
    }
}

Author:  Andreas Lücke.

Class Graph

Class Graph

{1.2 \atop tsKit}  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  7
{1.3 \atop tsTime}  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  8
1.4 tsDataBase  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  12
>   1.9 tsData2Base  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  27

>

1.10

tsData2RNFloat  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  29

      >

1.11

tsData2RNFloatFile  . . . . . . . . . . . . . . . . . . . . . . .  33
>   1.5 tsData1Base  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  15

>

1.7

tsData1RFloat  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  20

      >

1.8

tsData1RFloatFile  . . . . . . . . . . . . . . . . . . . . . . . .  24

>

This page has been automatically generated with DOC++  84

1.6 tsData1NFloat  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  17

Class Graph

1.12 tsNormal  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  36

{2.1 \atop tsLine}  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  38

2.2 tsSurface  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  41

{2.3 \atop tsAudio}  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  44

3.1

tsTimeCtrlUI  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  47

4.1

tsRendererViewer  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  51

4.2 FieldEditor  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  53

4.3 GraphViewer  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  54

4.5 SoSceneViewer  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  56

Class Graph

{4.6 \atop Error}  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  58

5.1

tsTimeElement  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  61

5.2

tsNodeElement  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  65

>

5.5

tsNormalElement  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  72

>

5.4

tsData2Element  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  69

>

5.3

tsData1Element  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  67

This page has been automatically generated with DOC++  86