tactu5
Class Note

java.lang.Object
  extended by tactu5.Note
All Implemented Interfaces:
Cloneable

public class Note
extends Object
implements Cloneable

Class Note defines a single sound event.
It's possible to create a new instance of the object passing a variable numbers of parameters.
Though some parameters could seem arbitrary, because Tactu5 does not implement any sound generator, using them in the suggested way allows to utilize properly some advanced methods.

Author:
Alessandro Capozzo - www.abstract-codex.net - summer - autumn 2007
See Also:
T5Notes, Sequence, Cluster

Constructor Summary
Note(float d, boolean r)
           
Note(float d, boolean r, String c)
           
Note(float f, float d)
           
Note(float f, float d, float p)
           
Note(float f, float d, float p, boolean r)
           
Note(float f, float d, float p, float v, float s, boolean r)
           
Note(float f, float d, float p, float v, float s, boolean r, String c, int ch)
           
 
Method Summary
 Object clone()
           
 int getChannel()
          Get a channel number.
 String getComment()
          Get a comment.
 float getDuration()
          Get the duration value in milliseconds.
 float getFrequency()
          Get the the frequency value in Hz.
 float getPan()
          Get the pan value.
 float getSustain()
          Get the sustain value in milliseconds.
 float getVelocity()
          Get the velocity value.
 void invertRest()
          Invert the boolean value for identify a rest.
 boolean isThisARest()
          Return a boolean value, true if the sound value is a rest, false if is a note.
 void setChannel(int ch)
          Set a channel number.
 void setComment(String c)
          Write a comment.
 void setDuration(float d)
          Set the duration value of an event.
 void setFrequency(float f)
          Set the the frequency value in Hz.
 void setPan(float p)
          Set the pan value of an event.
 void setSustain(float s)
          Set the sustain value of an event.
 void setVelocity(float v)
          Set the velocity value of an event.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Note

public Note(float d,
            boolean r)

Note

public Note(float d,
            boolean r,
            String c)

Note

public Note(float f,
            float d)

Note

public Note(float f,
            float d,
            float p)

Note

public Note(float f,
            float d,
            float p,
            boolean r)

Note

public Note(float f,
            float d,
            float p,
            float v,
            float s,
            boolean r)

Note

public Note(float f,
            float d,
            float p,
            float v,
            float s,
            boolean r,
            String c,
            int ch)
Method Detail

clone

public Object clone()
Overrides:
clone in class Object

isThisARest

public boolean isThisARest()
Return a boolean value, true if the sound value is a rest, false if is a note.

Returns:
A boolean value.

invertRest

public void invertRest()
Invert the boolean value for identify a rest.


getFrequency

public float getFrequency()
Get the the frequency value in Hz.

Returns:
float.

setFrequency

public void setFrequency(float f)
Set the the frequency value in Hz.


getDuration

public float getDuration()
Get the duration value in milliseconds.


getSustain

public float getSustain()
Get the sustain value in milliseconds.

Returns:
float

getPan

public float getPan()
Get the pan value.

Returns:
float

getVelocity

public float getVelocity()
Get the velocity value.

Returns:
float

getComment

public String getComment()
Get a comment. You could use a comment to assign some custom value to the event.

Returns:
String

getChannel

public int getChannel()
Get a channel number. You could use this value as a change channel parameter.

Returns:
int

setDuration

public void setDuration(float d)
Set the duration value of an event.


setSustain

public void setSustain(float s)
Set the sustain value of an event.


setPan

public void setPan(float p)
Set the pan value of an event.


setVelocity

public void setVelocity(float v)
Set the velocity value of an event.


setComment

public void setComment(String c)
Write a comment. You could use a comment to assign some custom value to the event.


setChannel

public void setChannel(int ch)
Set a channel number. You could use this value as a change channel parameter.



Processing library tactu5 by Alessandro Capozzo. (C) 2012