Class SongNode

java.lang.Object
  extended by SongNode

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
 void blockingPlayFromMeOn(int instrument)
          Collect all the notes from this node on in an part (then a score) and plays blocking all other events so that only the score plays.
 void blockingPlayFromMeOn(String songName, double tempo, int timeSignatureTop, int timeSignatureBottom, int instrument)
          Collect all the notes from this node on in an part (then a score) and then plays blocking all other events so that only the score plays.
 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.
 jm.music.data.Score makeMyScore(int instrument)
          Collect all the notes from this node on in an part (then a score) and returns the score
 jm.music.data.Score makeMyScore(String songName, double tempo, int timeSignatureTop, int timeSignatureBottom, int instrument)
          Collect all the notes from this node on in an part (then a score) and then returns the score.
 SongNode next()
          Provides public access to the next node.
 void playFromMeOn(int instrument)
          Collect all the notes from this node on in an part (then a score) and play.
 void playFromMeOn(String songName, double tempo, int timeSignatureTop, int timeSignatureBottom, int instrument)
          Collect all the notes from this node on in an part (then a score) and then play it.
 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


makeMyScore

public jm.music.data.Score makeMyScore(int instrument)
Collect all the notes from this node on in an part (then a score) and returns the score

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

makeMyScore

public jm.music.data.Score makeMyScore(String songName,
                                       double tempo,
                                       int timeSignatureTop,
                                       int timeSignatureBottom,
                                       int instrument)
Collect all the notes from this node on in an part (then a score) and then returns the score. Written from modified code by Dawn Finney

Parameters:
songName - name of the Score
tempo - tempo for the score
timeSignatureTop - the top part of the time signature
timeSignatureBottom - the bottom part of the time signature
instrument - MIDI instrument (program) to be used in playing this list

playFromMeOn

public void playFromMeOn(int instrument)
Collect all the notes from this node on in an part (then a score) and play. The name of the score defaults to "My Song." The time signature defaults to 3,4. The tempo dafaults to 120.0. Written from modified code by Dawn Finney

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

playFromMeOn

public void playFromMeOn(String songName,
                         double tempo,
                         int timeSignatureTop,
                         int timeSignatureBottom,
                         int instrument)
Collect all the notes from this node on in an part (then a score) and then play it. Written from modified code by Dawn Finney

Parameters:
songName - name of the Score
tempo - tempo for the score
timeSignatureTop - the top part of the time signature
timeSignatureBottom - the bottom part of the time signature
instrument - MIDI instrument (program) to be used in playing this list

blockingPlayFromMeOn

public void blockingPlayFromMeOn(int instrument)
Collect all the notes from this node on in an part (then a score) and plays blocking all other events so that only the score plays. After the score is finished, all other events will resume. The name of the score defaults to "My Song." The time signature defaults to 3,4. The tempo dafaults to 120.0. Written from modified code by Dawn Finney

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

blockingPlayFromMeOn

public void blockingPlayFromMeOn(String songName,
                                 double tempo,
                                 int timeSignatureTop,
                                 int timeSignatureBottom,
                                 int instrument)
Collect all the notes from this node on in an part (then a score) and then plays blocking all other events so that only the score plays. After the score is finished, all other events will resume. Written from modified code by Dawn Finney

Parameters:
songName - name of the Score
tempo - tempo for the score
timeSignatureTop - the top part of the time signature
timeSignatureBottom - the bottom part of the time signature
instrument - MIDI instrument (program) to be used in playing this list