Class SongNode

java.lang.Object
  extended bySongNode

public class SongNode
extends Object


Constructor Summary
SongNode()
          When we make a new element, the next part is empty, and ours is a blank new part
 
Method Summary
 jm.music.data.Phrase collect()
          Collect all nodes in this SongPart and return the composite Phrase
 SongNode copyNode()
          copyNode returns a copy of this node
 void insertAfter(SongNode nextOne)
          Insert the input SongNode AFTER this node, and make whatever node comes NEXT become the next of the input node.
 SongNode next()
          Provides public access to the next node.
 void repeatNext(SongNode nextOne, int count)
          Repeat the input phrase for the number of times specified.
 void repeatNextInserting(SongNode nextOne, int count)
          Repeat the input phrase for the number of times specified.
 void setNext(SongNode nextOne)
          Creates a link between the current node and the input node
 void setPhrase(jm.music.data.Phrase thisPhrase)
          setPhrase takes a Phrase and makes it the one for this node
 void showFromMeOn(int instrument)
          Collect all the notes from this node on in an part (then a score) and open it up for viewing.
 void weave(SongNode nextOne, int count, int skipAmount)
          Weave the input phrase count times every skipAmount nodes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SongNode

public SongNode()
When we make a new element, the next part is empty, and ours is a blank new part

Method Detail

setPhrase

public void setPhrase(jm.music.data.Phrase thisPhrase)
setPhrase takes a Phrase and makes it the one for this node

Parameters:
thisPhrase - the phrase for this node

setNext

public void setNext(SongNode nextOne)
Creates a link between the current node and the input node

Parameters:
nextOne - the node to link to

copyNode

public SongNode copyNode()
copyNode returns a copy of this node

Returns:
another song node with the same notes

repeatNextInserting

public void repeatNextInserting(SongNode nextOne,
                                int count)
Repeat the input phrase for the number of times specified. But do an insertion, to save the rest of the list.

Parameters:
nextOne - node to be copied into the list
count - number of times to copy it in.

repeatNext

public void repeatNext(SongNode nextOne,
                       int count)
Repeat the input phrase for the number of times specified. It always appends to the current node, NOT insert.

Parameters:
nextOne - node to be copied in to list
count - number of times to copy it in.

insertAfter

public void insertAfter(SongNode nextOne)
Insert the input SongNode AFTER this node, and make whatever node comes NEXT become the next of the input node.

Parameters:
nextOne - SongNode to insert after this one

weave

public void weave(SongNode nextOne,
                  int count,
                  int skipAmount)
Weave the input phrase count times every skipAmount nodes

Parameters:
nextOne - node to be copied into the list
count - how many times to copy
skipAmount - how many nodes to skip per weave

next

public SongNode next()
Provides public access to the next node.

Returns:
a SongNode instance (or null)

showFromMeOn

public void showFromMeOn(int instrument)
Collect all the notes from this node on in an part (then a score) and open it up for viewing.

Parameters:
instrument - MIDI instrument (program) to be used in playing this list

collect

public jm.music.data.Phrase collect()
Collect all nodes in this SongPart and return the composite Phrase