dguitar.players.sound
Class EventStream

java.lang.Object
  extended bydguitar.players.sound.EventStream

public class EventStream
extends java.lang.Object

An EventStream is the ordered list of PerformanceEvents on a specific virtual track, representing the behavior of a single string through an entire performance.

Author:
crnash

Field Summary
(package private)  PerformanceEvent first
          The first event in this event stream.
(package private)  PerformanceEvent last
          The last event in this event stream.
(package private)  int lastEventEndOffset
          The last event parsed.
(package private)  int lastEventLocation
          The location of the last event.
(package private)  SongEvent lastNoteOnEvent
          The last note on event parsed.
(package private)  SongTrack track
          The track to which this stream of events belongs.
(package private)  int virtualTrackIndex
          The virtual track within track that produced this stream of events
 
Constructor Summary
EventStream(SongTrack songTrack, int v)
           
 
Method Summary
 void addEvents(java.util.List events, int location)
          Add a list of song events as PerformanceEvents to this event stream.
 void close()
           
private  void closeOpenNote()
           
private  void connect(PerformanceEvent perfEvent)
           
 PerformanceEvent getFirst()
           
 SongTrack getTrack()
           
 int getVirtualTrackIndex()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

track

SongTrack track
The track to which this stream of events belongs.


virtualTrackIndex

int virtualTrackIndex
The virtual track within track that produced this stream of events


first

PerformanceEvent first
The first event in this event stream. It will typically not be null since tracks should begin with an initialization event.


last

PerformanceEvent last
The last event in this event stream.


lastEventEndOffset

int lastEventEndOffset
The last event parsed.


lastEventLocation

int lastEventLocation
The location of the last event.


lastNoteOnEvent

SongEvent lastNoteOnEvent
The last note on event parsed.

Constructor Detail

EventStream

public EventStream(SongTrack songTrack,
                   int v)
Parameters:
songTrack -
v -
Method Detail

addEvents

public void addEvents(java.util.List events,
                      int location)
Add a list of song events as PerformanceEvents to this event stream.

Parameters:
events - the list of events to add
location - the offset to apply to these events, in resolution units

closeOpenNote

private void closeOpenNote()

connect

private void connect(PerformanceEvent perfEvent)

getFirst

public PerformanceEvent getFirst()
Returns:
Returns the first.

getTrack

public SongTrack getTrack()
Returns:
Returns the track.

getVirtualTrackIndex

public int getVirtualTrackIndex()
Returns:
Returns the virtualTrackIndex.

close

public void close()