Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

TSE3::MidiFilter Class Reference

Simple MidiEvent filter. More...

#include <MidiFilter.h>

Inheritance diagram for TSE3::MidiFilter:

Inheritance graph
[legend]
Collaboration diagram for TSE3::MidiFilter:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 MidiFilter ()
 MidiFilter (const MidiFilter &)
virtual ~MidiFilter ()
MidiFilteroperator= (const MidiFilter &)
bool status () const
void setStatus (bool s)
bool channelFilter (int c) const
void setChannelFilter (int c, bool val)
int channel () const
void setChannel (int c)
int port () const
void setPort (int p)
Clock offset () const
void setOffset (Clock o)
int timeScale () const
void setTimeScale (int t)
Clock quantise () const
void setQuantise (Clock q)
Clock minLength () const
void setMinLength (Clock ml)
Clock maxLength () const
void setMaxLength (Clock ml)
int transpose () const
void setTranspose (int t)
int minVelocity () const
void setMinVelocity (int v)
int maxVelocity () const
void setMaxVelocity (int v)
Clock velocityScale () const
void setVelocityScale (int v)
virtual MidiEvent filter (const MidiEvent &e) const
virtual void save (std::ostream &o, int i) const
virtual void load (std::istream &i, SerializableLoadInfo &info)

Detailed Description

Simple MidiEvent filter.

This the a standard (and comprehensive) Filter object type that is used by the TSE3 library.

There is provision for the following features:

Command classes
Use the following command classes to manipute this object in a undo/redo environment.

Author:
Pete Goodliffe
Version:
3.00
See also:
Filter


Constructor & Destructor Documentation

TSE3::MidiFilter::MidiFilter  ) 
 

Creates a MidiFilter with the default parameters which leave unchanged.

TSE3::MidiFilter::MidiFilter const MidiFilter  ) 
 

virtual TSE3::MidiFilter::~MidiFilter  )  [virtual]
 


Member Function Documentation

MidiFilter& TSE3::MidiFilter::operator= const MidiFilter  ) 
 

bool TSE3::MidiFilter::status  )  const [inline]
 

Returns the status value.

A value of false means the filter blocks all output, returning MidiCommand_Invalid instead of output

Returns:
The status value
See also:
setStatus

void TSE3::MidiFilter::setStatus bool  s  ) 
 

Set the status value.

Parameters:
s The new status value to set
See also:
status

bool TSE3::MidiFilter::channelFilter int  c  )  const [inline]
 

Returns the value of a MIDI channel filter.

If true then events on this MIDI channel are allowed to pass through filter. If false, events are not passed through filter.

Parameters:
c MIDI channel to find channel filter status of
Returns:
The status of the MIDI channel's filter
See also:
setChannelFilter

void TSE3::MidiFilter::setChannelFilter int  c,
bool  val
 

Sets the value of a channel filter.

Parameters:
c MIDI channel to set filter status of
val New MIDI channel filter status value
See also:
channelFilter

int TSE3::MidiFilter::channel  )  const [inline]
 

Returns the MIDI channel value.

A value of MidiCommand::SameChannel means do not force to a particular channel.

Returns:
MIDI channel events will be forced to
See also:
setChannel

void TSE3::MidiFilter::setChannel int  c  ) 
 

Set the channel value.

Parameters:
c New MIDI channel events will be forced to
See also:
channel

int TSE3::MidiFilter::port  )  const [inline]
 

Returns the MIDI port value.

A value of MidiCommand::SamePort means do not force to a particular port.

Returns:
MIDI port number events will be forced to
See also:
setPort

void TSE3::MidiFilter::setPort int  p  ) 
 

Set the port value.

Parameters:
p New MIDI port number events will be forced to
See also:
port

Clock TSE3::MidiFilter::offset  )  const [inline]
 

Returns the time offset value.

Returns:
Clock value added to each MidiEvent
See also:
setOffset

void TSE3::MidiFilter::setOffset Clock  o  ) 
 

Sets the time offset value.

Parameters:
o New Clock value added to each MidiEvent
See also:
offset

int TSE3::MidiFilter::timeScale  )  const [inline]
 

Returns the time scale value.

A value of 100 will have no effect. The value is a percentage that ranges from 1 to 500.

Returns:
The time scale value
See also:
setTimeScale

void TSE3::MidiFilter::setTimeScale int  t  ) 
 

Set the time scale value.

Parameters:
t New time scale value
See also:
timeScale

Clock TSE3::MidiFilter::quantise  )  const [inline]
 

Returns the quantise value. This is a linear quantise resolution that MidiEvent times will be 'snapped' to.

A value of zero means do not quantise.

Returns:
The quantise resolution value
See also:
setQuantise

void TSE3::MidiFilter::setQuantise Clock  q  ) 
 

Set the quantise value.

Parameters:
q New quantise resolution value
See also:
quantise

Clock TSE3::MidiFilter::minLength  )  const [inline]
 

Returns the minimum note length. This is applied to MidiCommand_NoteOn events to ensure that they are of at least a certain duration.

A value of 0 represents no minimum length.

Returns:
The minimum note length
See also:
setMinLength

void TSE3::MidiFilter::setMinLength Clock  ml  ) 
 

Set the minimum length value.

Parameters:
q New minimum length value
See also:
minLength

Clock TSE3::MidiFilter::maxLength  )  const [inline]
 

Returns the minimum note length. This is applied to MidiCommand_NoteOn events to ensure that they are of at least a certain duration.

A value of -1 represents to maximum length.

Returns:
The maximum note length
See also:
setMaxLength

void TSE3::MidiFilter::setMaxLength Clock  ml  ) 
 

Set the maximum length value.

Parameters:
lm New maximum length value
See also:
minLength

int TSE3::MidiFilter::transpose  )  const [inline]
 

Returns the transpose value. This is an integer number that is added to the value of notes in any note-related MidiEvent.

This can range between -127 to +127

Returns:
The transpose value
See also:
setTranspose

void TSE3::MidiFilter::setTranspose int  t  ) 
 

Set the transport value.

Parameters:
t New transport value
See also:
transpose

int TSE3::MidiFilter::minVelocity  )  const [inline]
 

Returns the minimum velocity window value. Note with veloicties below this value will have their velocity set to this value. This is useful to prevent quiet notes from not being heard, for example.

A value of 0 will have no effect, and is considered 'off'.

Returns:
Minimum velocity window value
See also:
setMinVelocity

void TSE3::MidiFilter::setMinVelocity int  v  ) 
 

Set the minimum velocity window value.

Parameters:
v New minimum velocity window value
See also:
minVelocity

int TSE3::MidiFilter::maxVelocity  )  const [inline]
 

Returns the maximum velocity window value. Note with velocities above this value will have their veolcity set to this value. This is useful to prevent loud notes from drowning out other notes, for example.

A value of 127 will have no effect, and is considered 'off'.

Returns:
Maximum velocity window value
See also:
setMaxVelocity

void TSE3::MidiFilter::setMaxVelocity int  v  ) 
 

Set the maximum velocity window value.

Parameters:
v New maximum velocity window value.
See also:
maxVelocity

Clock TSE3::MidiFilter::velocityScale  )  const [inline]
 

Returns the velocity scale value. This value scales the time value of a MidiEvent.

A value of 100 will have no effect. The value is a percentage that ranges from 1 to 200.

Returns:
Velocity scale value
See also:
setVelocityScale

void TSE3::MidiFilter::setVelocityScale int  v  ) 
 

Set the velocity scale value.

Parameters:
v New velocity scale value
See also:
velocityScale

virtual MidiEvent TSE3::MidiFilter::filter const MidiEvent e  )  const [virtual]
 

Implements TSE3::Filter.

virtual void TSE3::MidiFilter::save std::ostream &  o,
int  i
const [virtual]
 

Reimplemented from TSE3::Serializable.

virtual void TSE3::MidiFilter::load std::istream &  i,
SerializableLoadInfo info
[virtual]
 

Reimplemented from TSE3::Serializable.


The documentation for this class was generated from the following file:
Generated on Wed May 25 14:46:31 2005 for TSE3 by doxygen 1.3.2