From 35ce4ec589df2b0b00421ca8d17cfd8f00eb97b8 Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Sun, 16 Jan 2011 13:18:22 -0500 Subject: [PATCH] Set up the header for TimeSignatureSegments. I know there is a magic number in here, but if anyone needs 64 in the bottom, either it's insane or a strange mission. Probably both. --- src/TimingData.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/TimingData.h b/src/TimingData.h index 70630bb2bb..a3d34ae3fd 100644 --- a/src/TimingData.h +++ b/src/TimingData.h @@ -90,6 +90,17 @@ struct StopSegment struct TimeSignatureSegment { TimeSignatureSegment() : m_iStartRow(-1), m_iNumerator(4), m_iDenominator(4) { } + TimeSignatureSegment( int r, int n ) { + m_iStartRow = max( 0, r ); + m_iNumerator = n; + m_iDenominator = 64; // Hope we don't need this many. + } + TimeSignatureSegment( int r, int n, int d ) { + m_iStartRow = max( 0, r ); + m_iNumerator = n; + m_iDenominator = d; + } + int m_iStartRow; int m_iNumerator; int m_iDenominator; @@ -165,6 +176,8 @@ public: void SetStopAtBeat( float fBeat, float fSeconds ) { SetStopAtRow( BeatToNoteRow(fBeat), fSeconds ); } void SetStopAtBeat( float fBeat, float fSeconds, bool bDelay ) { SetStopAtRow( BeatToNoteRow(fBeat), fSeconds, bDelay ); } // (sm-ssc) float GetStopAtRow( int iNoteRow, bool &bDelayOut ) const; + void SetTimeSignatureAtRow( int iRow, int iNumerator, int iDenominator ); + void SetTimeSignatureAtRow( float fBeat, int iNumerator, int iDenominator ) { SetTimeSignatureAtRow( BeatToNoteRow(fBeat), iNumerator, iDenominator ); } int GetWarpToRow( int iWarpBeginRow ) const; void SetDelayAtRow( int iNoteRow, float fSeconds ); // sm-ssc void MultiplyBPMInBeatRange( int iStartIndex, int iEndIndex, float fFactor );