SF_Adder

Sonic Flow Blocks Reference Guide

The purpose of SF_Adder is to sum an arbitrary number of input signals together and output the sum. The sum is calculated pointwise.

SF_Adder (const char* name = 0);

This is the constructor of a SF_Adder block. Following attributes of the class are specified in the constructor:

virtual ~SF_Adder ();

This is the destructor.

virtual void finish ();
virtual void initialize ();
virtual void execute ();

The initialize - execute - finish chain of function calls is used to carry out the simulation of a block. See SF_Block.

The initialize does nothing specific.

The execute carries out the actual simulation process. First, the output frame is filled with the value set with set_value or zero by default. Secondly, each input signal X is summed pointwise to the output signal.

The finish does nothing.

inline void set_initial_value (SF_Sample a);

This function is used to set the value, to which the output frame is initialized before the summing. If no value is set, zero is used as default.

inline SF_Sample get_initial_value ();

This function returns the initial value.

enum Input_Indices {X};

enum Output_Indices {Y};


Last modified: Wed Dec 2 14:55:33 1998
jarno.seppanen@cs.tut.fi
Audio Research Group