cleaned up all the arpeggio-direction-hacks - now the values are UP (0) to RANDOM (3) at *all* places
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@514 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -386,7 +386,7 @@ arpAndChordsTabWidget::arpAndChordsTabWidget(
|
||||
m_arpDirectionBtnGrp->addButton( arp_up_and_down_btn );
|
||||
m_arpDirectionBtnGrp->addButton( arp_random_btn );
|
||||
|
||||
m_arpDirectionBtnGrp->setInitValue( UP - 1 );
|
||||
m_arpDirectionBtnGrp->setInitValue( UP );
|
||||
|
||||
|
||||
QLabel * mode_lbl = new QLabel( tr( "Mode:" ), m_arpGroupBox );
|
||||
@@ -479,7 +479,6 @@ void arpAndChordsTabWidget::processNote( notePlayHandle * _n )
|
||||
// now follows code for arpeggio
|
||||
|
||||
if( _n->baseNote() == FALSE ||
|
||||
( m_arpDirectionBtnGrp->value() + 1) == OFF ||
|
||||
!m_arpGroupBox->isActive() ||
|
||||
( _n->released() && _n->releaseFramesDone() >=
|
||||
_n->actualReleaseFramesToDo() ) )
|
||||
@@ -553,8 +552,7 @@ void arpAndChordsTabWidget::processNote( notePlayHandle * _n )
|
||||
continue;
|
||||
}
|
||||
|
||||
arpDirections dir = static_cast<arpDirections>(
|
||||
m_arpDirectionBtnGrp->value() + 1 );
|
||||
const int dir = m_arpDirectionBtnGrp->value();
|
||||
// process according to arpeggio-direction...
|
||||
if( dir == UP )
|
||||
{
|
||||
@@ -678,7 +676,7 @@ void arpAndChordsTabWidget::loadSettings( const QDomElement & _this )
|
||||
m_arpGateKnob->loadSettings( _this, "arpgate" );
|
||||
m_arpDirectionBtnGrp->loadSettings( _this, "arpdir" );
|
||||
|
||||
// Keep compatibility with version 2.1 file format
|
||||
// Keep compatibility with version 0.2.1 file format
|
||||
if( _this.hasAttribute( "arpsyncmode" ) )
|
||||
{
|
||||
m_arpTimeKnob->setSyncMode(
|
||||
|
||||
@@ -533,6 +533,12 @@ void multimediaProject::upgrade( void )
|
||||
!el.attribute( "arpdisabled" )
|
||||
.toInt() );
|
||||
}
|
||||
else if( !el.hasAttribute( "chord-enabled" ) )
|
||||
{
|
||||
el.setAttribute( "chord-enabled", TRUE );
|
||||
el.setAttribute( "arp-enabled",
|
||||
el.attribute( "arpdir" ).toInt() != 0 );
|
||||
}
|
||||
}
|
||||
|
||||
list = elementsByTagName( "channeltrack" );
|
||||
@@ -572,6 +578,26 @@ void multimediaProject::upgrade( void )
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if( version < "0.3.0-rc2" )
|
||||
{
|
||||
QDomNodeList list = elementsByTagName( "arpandchords" );
|
||||
for( int i = 0; !list.item( i ).isNull(); ++i )
|
||||
{
|
||||
QDomElement el = list.item( i ).toElement();
|
||||
if( el.attribute( "arpdir" ).toInt() > 0 )
|
||||
{
|
||||
el.setAttribute( "arpdir",
|
||||
el.attribute( "arpdir" ).toInt() - 1 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( !m_head.hasAttribute( "mastervol" ) )
|
||||
{
|
||||
m_head.setAttribute( "mastervol", 100 );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user