philmiller84/MusicGen-proto — pull request #1 by playadom (2014-07-23 19:46:17+00:00)
Title: Dakota

Added classes for upper and lower level events: upper level events are events that represent the potential to create multiple events on a lower level line.

The class UpperLevelEvent uses an EventIterator to store the Events that are generated from the UpperLevelEvent. Because of this, I had to add the line "if (aggrLineRef != null)" to EventIterator's CreateEventAtPosition method, since the EventIterator internal to an UpperLevelEvent shouldn't involve the aggregate, but I'd like to use EventIterator for this purpose and not another type of iterator, so adding the flexibility to not always depend on the aggregate might be useful for this.

Added interface called Generator specifying a method for upper level objects that spit out objects onto a lower level line.

Added a test class ArpeggioByMidiNumber that has the potential to create multiple NoteEvents on a lower level line while existing as a single object on an upper level line.

Ran into some issues involving EventIterator; these are detailed in comments in my version of the EventIterator class.

One such issue is that an EventLine doesn't appear to own a single EventIterator -- calling GetEventIterator creates a new EventIterator in the scope of main in MusicGen. This makes it impossible to refer to a single EventIterator object belonging to an EventLine from the EventLine itself.

The bug I'm currently trying to tackle is in the methods I've added to EventIterator which are used to either dispense the events in an EventIterator into another EventIterator, or to dispense every lower level event generated by an EventIterator of upper level events into an EventIterator, using the first of the dispensing methods.