31 virtual status_t
SaveToArchive(
const MessageRef & archive)
const;
43 const OrderedKeysHashtable<uint32, uint64> &
GetChordsTable()
const {
return _chords;}
53 status_t
PutChord(uint32 whichChord, uint64 chordValue);
68 uint32
GetSongLengthInChords(
bool useLoopingLogic)
const {
return ((useLoopingLogic)&&(_chords.HasItems())) ? MUSCLE_NO_LIMIT : (_chords.GetLastKeyWithDefault()+1);}
83 virtual ConstMessageRef
SeniorUpdate(
const ConstMessageRef & seniorDoMsg);
89 virtual status_t
JuniorUpdate(
const ConstMessageRef & juniorDoMsg);
95 uint32 CalculateChecksumForChord(uint32 whichChord, uint64 chordValue)
const {
return ((whichChord+1)*CalculateChecksumForUint64(chordValue));}
96 void MoveChordsBackOneStartingAt(uint32 whichChord);
97 void SetToDefaultStateAux();
100 OrderedKeysHashtable<uint32, uint64> _chords;
102 Hashtable<uint8, uint32> _noteHistogram;
virtual ConstMessageRef SeniorUpdate(const ConstMessageRef &seniorDoMsg)
Updates our state as specified in the (seniorDoMsg).
uint64 GetAllUsedNotesChord() const
Returns a bit-chord that describes the full set of all the notes that are currently used anywhere in ...
void DeleteChordAt(uint32 whichChord)
Deletes the chord at the given index (if any).
A slight specialization of the IDatabaseObject class, just so I can add some application-specific hel...
virtual String ToString() const
Returns a string representation of this object, for debugging purposes.
status_t UpdateFromArchive(const ConstMessageRef &archive)
Incrementally updates this sheet's contents, based on the information in the Message.
virtual status_t SaveToArchive(const MessageRef &archive) const
Saves this sheet's current contents into (archive)
virtual status_t SetFromArchive(const ConstMessageRef &archive)
Replaces this sheet's current contents with the contents from (archive)
status_t PutChord(uint32 whichChord, uint64 chordValue)
Places the specified chord into our chords-set.
virtual status_t JuniorUpdate(const ConstMessageRef &juniorDoMsg)
Updates our state as specified in the (juniorDoMsg).
void SetSongFilePath(const String &songFilePath)
Set the user-visible file-path string for this piece of music.
uint64 GetChordAtIndex(uint32 whichChord, bool useLoopingLogic) const
Convenience method – returns the chord at the specified chord-index, or 0 if there are no notes at t...
const String & GetSongFilePath() const
Returns the current user-visible file-path string for this piece of music.
MusicSheet & operator=(const MusicSheet &rhs)
Assignment operator.
virtual void SetToDefaultState()
Clears our state to the state of a just-constructed MusicSheet object.
void InsertChordAt(uint32 whichChord)
Inserts space for a new chord at the given index.
virtual uint32 CalculateChecksum() const
Calculates our current checksum from scratch (expensive!)
void RemoveChord(uint32 whichChord)
Convenience method; removes the given chord from the chords-set, if it exists.
The choir namespace contains the code specific to the ZGChoir demonstration application.
const OrderedKeysHashtable< uint32, uint64 > & GetChordsTable() const
Read-only access to our current table of chords.
This object is the in-memory representation of a song, as a collection of notes over time...
uint32 GetSongLengthInChords(bool useLoopingLogic) const
Returns the length of this song, in chords (i.e.
virtual uint32 GetCurrentChecksum() const
Returns the checksum of this object (which is updated whenever this object's contents change) ...