TimingData is note rows internally. Don't convert from note rows to
beats, and then back to note rows.
This commit is contained in:
@@ -67,9 +67,8 @@ void TimingData::AddStopSegment( const StopSegment &seg )
|
||||
}
|
||||
|
||||
/* Change an existing BPM segment, merge identical segments together or insert a new one. */
|
||||
void TimingData::SetBPMAtBeat( float fBeat, float fBPM )
|
||||
void TimingData::SetBPMAtRow( int iNoteRow, float fBPM )
|
||||
{
|
||||
int iNoteRow = BeatToNoteRow( fBeat );
|
||||
float fBPS = fBPM / 60.0f;
|
||||
unsigned i;
|
||||
for( i=0; i<m_BPMSegments.size(); i++ )
|
||||
@@ -93,9 +92,8 @@ void TimingData::SetBPMAtBeat( float fBeat, float fBPM )
|
||||
}
|
||||
}
|
||||
|
||||
void TimingData::SetStopAtBeat( float fBeat, float fSeconds )
|
||||
void TimingData::SetStopAtRow( int iRow, float fSeconds )
|
||||
{
|
||||
int iRow = BeatToNoteRow( fBeat );
|
||||
unsigned i;
|
||||
for( i=0; i<m_StopSegments.size(); i++ )
|
||||
if( m_StopSegments[i].m_iStartRow == iRow )
|
||||
|
||||
@@ -49,8 +49,10 @@ public:
|
||||
|
||||
void GetActualBPM( float &fMinBPMOut, float &fMaxBPMOut ) const;
|
||||
float GetBPMAtBeat( float fBeat ) const;
|
||||
void SetBPMAtBeat( float fBeat, float fBPM );
|
||||
void SetStopAtBeat( float fBeat, float fSeconds );
|
||||
void SetBPMAtRow( int iNoteRow, float fBPM );
|
||||
void SetBPMAtBeat( float fBeat, float fBPM ) { SetBPMAtRow( BeatToNoteRow(fBeat), fBPM ); }
|
||||
void SetStopAtRow( int iNoteRow, float fSeconds );
|
||||
void SetStopAtBeat( float fBeat, float fSeconds ) { SetStopAtRow( BeatToNoteRow(fBeat), fSeconds ); }
|
||||
void MultiplyBPMInBeatRange( int iStartIndex, int iEndIndex, float fFactor );
|
||||
void AddBPMSegment( const BPMSegment &seg );
|
||||
void AddStopSegment( const StopSegment &seg );
|
||||
|
||||
Reference in New Issue
Block a user