Nsound  0.9.4
Public Member Functions | Protected Attributes | List of all members
Nsound::Instrument Class Referenceabstract

The Nsound Instrument baseclass. All Nsound instruments extend this class. More...

#include <Nsound/Instrument.h>

Inheritance diagram for Nsound::Instrument:
Inheritance graph
[legend]

Public Member Functions

 Instrument (const float64 &sample_rate)
 
virtual ~Instrument ()
 
virtual AudioStream play ()=0
 Plays a demo for this instrument. More...
 
virtual AudioStream play (const float64 &duration, const float64 &frequency)=0
 Plays a static note for this instrument. More...
 
virtual std::string getInfo ()=0
 Returns information about who wrote this instrument and how to use it. More...
 

Protected Attributes

float64 sample_rate_
 

Detailed Description

The Nsound Instrument baseclass. All Nsound instruments extend this class.

Definition at line 50 of file Instrument.h.

Constructor & Destructor Documentation

Nsound::Instrument::Instrument ( const float64 sample_rate)
inline

Definition at line 54 of file Instrument.h.

54 :sample_rate_(sample_rate){};
float64 sample_rate_
Definition: Instrument.h:76
virtual Nsound::Instrument::~Instrument ( )
inlinevirtual

Definition at line 57 of file Instrument.h.

57 {};

Member Function Documentation

virtual AudioStream Nsound::Instrument::play ( )
pure virtual
virtual AudioStream Nsound::Instrument::play ( const float64 duration,
const float64 frequency 
)
pure virtual
virtual std::string Nsound::Instrument::getInfo ( )
pure virtual

Returns information about who wrote this instrument and how to use it.

Implemented in Nsound::Hat, Nsound::DrumKickBass, Nsound::OrganPipe, Nsound::FluteSlide, Nsound::Clarinet, Nsound::DrumBD01, and Nsound::GuitarBass.

Member Data Documentation

float64 Nsound::Instrument::sample_rate_
protected

The documentation for this class was generated from the following file: