add echo, planted, stomp transforms

This commit is contained in:
Chris Danford
2003-11-07 05:17:41 +00:00
parent 0e05d91242
commit cf579908cb
10 changed files with 203 additions and 29 deletions
+15 -9
View File
@@ -174,15 +174,6 @@ void NoteData::RemoveHoldNote( int iHoldIndex )
m_HoldNotes.erase(m_HoldNotes.begin()+iHoldIndex, m_HoldNotes.begin()+iHoldIndex+1);
}
bool NoteData::IsThereATapAtRow( int iRow ) const
{
for( int t=0; t<m_iNumTracks; t++ )
if( GetTapNote(t, iRow) != TAP_EMPTY )
return true;
return false;
}
int NoteData::GetFirstRow() const
{
return BeatToNoteRow( GetFirstBeat() );
@@ -606,3 +597,18 @@ void NoteData::EliminateAllButOneTap(int row)
m_TapNotes[track][row] = TAP_EMPTY;
}
}
int NoteData::GetNumTracksHeldAtRow( int row )
{
// Optimization opportunity:
// Search more efficiently knowing that m_HoldNotes is sorted.
int iNumTracksHeld = 0;
float fBeat = NoteRowToBeat(row);
for( unsigned i=0; i<m_HoldNotes.size(); i++ )
{
const HoldNote& hn = m_HoldNotes[i];
if( fBeat >= hn.fStartBeat && fBeat <= hn.fEndBeat )
iNumTracksHeld++;
}
return iNumTracksHeld;
}