improved FLP-filter a lot

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@118 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Tobias Doerffel
2006-04-05 13:24:13 +00:00
parent 78cc84b9bf
commit 3992e5c954
46 changed files with 8100 additions and 112 deletions

View File

@@ -514,8 +514,7 @@ void arpAndChordsTabWidget::processNote( notePlayHandle * _n )
// correctly... -> arp_frames frames silence at the start of every note!
int cur_frame = ( ( m_arpModeComboBox->value() != FREE ) ?
cnphv.first()->totalFramesPlayed() :
_n->totalFramesPlayed() )
+ arp_frames - 1;
_n->totalFramesPlayed() ) + arp_frames - 1;
// used for loop
fpab_t frames_processed = 0;
@@ -536,6 +535,8 @@ void arpAndChordsTabWidget::processNote( notePlayHandle * _n )
// init with zero
int cur_arp_idx = 0;
// in sorted mode: is it our turn or do we have to be quiet for
// now?
if( m_arpModeComboBox->value() == SORT &&
( ( cur_frame / arp_frames ) % total_range ) /
range != (Uint32) _n->index() )

View File

@@ -180,6 +180,7 @@ configManager::configManager( void ) :
m_pluginDir( "/usr/lib/lmms" ),
#endif
m_vstDir( QDir::home().absolutePath() ),
m_flDir( QDir::home().absolutePath() ),
m_currentPage( 0 )
{
}
@@ -557,6 +558,14 @@ void configManager::setArtworkDir( const QString & _ad )
void configManager::setFLDir( const QString & _fd )
{
m_flDir = _fd;
}
void configManager::accept( void )
{
if( m_workingDir.right( 1 ) != "/" )
@@ -821,12 +830,18 @@ bool configManager::loadConfigFile( void )
}
m_workingDir = value( "paths", "workingdir" );
m_vstDir = value( "paths", "vstdir" );
m_flDir = value( "paths", "fldir" );
if( m_vstDir == "" )
{
m_vstDir = QDir::home().absolutePath();
}
if( m_flDir == "" )
{
m_flDir = QDir::home().absolutePath();
}
if( root.isElement() )
{
QString cfg_file_ver = root.toElement().attribute( "version" );
@@ -872,6 +887,7 @@ void configManager::saveConfigFile( void )
setValue( "paths", "artwork", m_artworkDir );
setValue( "paths", "workingdir", m_workingDir );
setValue( "paths", "vstdir", m_vstDir );
setValue( "paths", "fldir", m_flDir );
QDomDocument doc( "lmms-config-file" );

View File

@@ -458,16 +458,19 @@ void envelopeTabWidget::processAudioBuffer( sampleFrame * _ab,
f_cnt_t envelopeTabWidget::envFrames( void )
f_cnt_t envelopeTabWidget::envFrames( const bool _only_vol )
{
f_cnt_t ret_val = m_envLFOWidgets[VOLUME]->m_pahdFrames;
for( int i = VOLUME+1; i < TARGET_COUNT; ++i )
if( _only_vol == FALSE )
{
if( m_envLFOWidgets[i]->used() &&
m_envLFOWidgets[i]->m_pahdFrames > ret_val )
for( int i = VOLUME+1; i < TARGET_COUNT; ++i )
{
ret_val = m_envLFOWidgets[i]->m_pahdFrames;
if( m_envLFOWidgets[i]->used() &&
m_envLFOWidgets[i]->m_pahdFrames > ret_val )
{
ret_val = m_envLFOWidgets[i]->m_pahdFrames;
}
}
}
return( ret_val );
@@ -476,15 +479,19 @@ f_cnt_t envelopeTabWidget::envFrames( void )
f_cnt_t envelopeTabWidget::releaseFrames( void )
f_cnt_t envelopeTabWidget::releaseFrames( const bool _only_vol )
{
f_cnt_t ret_val = m_envLFOWidgets[VOLUME]->m_rFrames;
for( int i = VOLUME+1; i < TARGET_COUNT; ++i )
f_cnt_t ret_val = m_envLFOWidgets[VOLUME]->used() ?
m_envLFOWidgets[VOLUME]->m_rFrames : 0;
if( m_envLFOWidgets[VOLUME]->used() == FALSE )
{
if( m_envLFOWidgets[i]->used() &&
m_envLFOWidgets[i]->m_rFrames > ret_val )
for( int i = VOLUME+1; i < TARGET_COUNT; ++i )
{
ret_val = m_envLFOWidgets[i]->m_rFrames;
if( m_envLFOWidgets[i]->used() &&
m_envLFOWidgets[i]->m_rFrames > ret_val )
{
ret_val = m_envLFOWidgets[i]->m_rFrames;
}
}
}
return( ret_val );

View File

@@ -251,7 +251,7 @@ void notePlayHandle::noteOff( const f_cnt_t _s )
if( m_instrumentTrack != NULL )
{
m_releaseFramesToDo = tMax<f_cnt_t>( 10,
m_instrumentTrack->m_envWidget->releaseFrames() );
m_instrumentTrack->m_envWidget->releaseFrames() );
if( !configManager::inst()->value( "ui",
"manualchannelpiano" ).toInt() )
{
@@ -280,7 +280,8 @@ void notePlayHandle::noteOff( const f_cnt_t _s )
f_cnt_t notePlayHandle::actualReleaseFramesToDo( void ) const
{
return( ( m_instrumentTrack != NULL ) ?
m_instrumentTrack->m_envWidget->releaseFrames() : 0 );
m_instrumentTrack->m_envWidget->releaseFrames(
arpBaseNote() ) : 0 );
}

View File

@@ -114,6 +114,7 @@ setupDialog::setupDialog( engine * _engine, configTabs _tab_to_open ) :
m_workingDir( configManager::inst()->workingDir() ),
m_vstDir( configManager::inst()->vstDir() ),
m_artworkDir( configManager::inst()->artworkDir() ),
m_flDir( configManager::inst()->flDir() ),
m_disableChActInd( configManager::inst()->value( "ui",
"disablechannelactivityindicators" ).toInt() ),
m_manualChPiano( configManager::inst()->value( "ui",
@@ -137,7 +138,7 @@ setupDialog::setupDialog( engine * _engine, configTabs _tab_to_open ) :
m_tabBar->setFixedWidth( 72 );
QWidget * ws = new QWidget( settings );
ws->setFixedSize( 360, 240 );
ws->setFixedSize( 360, 300 );
QWidget * general = new QWidget( ws );
general->setFixedSize( 360, 240 );
@@ -245,7 +246,7 @@ setupDialog::setupDialog( engine * _engine, configTabs _tab_to_open ) :
QWidget * directories = new QWidget( ws );
directories->setFixedSize( 360, 200 );
directories->setFixedSize( 360, 260 );
QVBoxLayout * dir_layout = new QVBoxLayout( directories );
dir_layout->setSpacing( 0 );
dir_layout->setMargin( 0 );
@@ -289,7 +290,6 @@ setupDialog::setupDialog( engine * _engine, configTabs _tab_to_open ) :
connect( vstdir_select_btn, SIGNAL( clicked() ), this,
SLOT( openVSTDir() ) );
// artwork-dir
tabWidget * artwork_tw = new tabWidget( tr(
"Artwork directory" ).toUpper(),
@@ -309,12 +309,33 @@ setupDialog::setupDialog( engine * _engine, configTabs _tab_to_open ) :
connect( artworkdir_select_btn, SIGNAL( clicked() ), this,
SLOT( openArtworkDir() ) );
// FL Studio-dir
tabWidget * fl_tw = new tabWidget( tr(
"FL Studio installation directory" ).toUpper(),
directories );
fl_tw->setFixedHeight( 56 );
m_fdLineEdit = new QLineEdit( m_flDir, fl_tw );
m_fdLineEdit->setGeometry( 10, 20, 300, 16 );
connect( m_fdLineEdit, SIGNAL( textChanged( const QString & ) ), this,
SLOT( setFLDir( const QString & ) ) );
QPushButton * fldir_select_btn = new QPushButton(
embed::getIconPixmap( "project_open", 16, 16 ),
"", fl_tw );
fldir_select_btn->setFixedSize( 24, 24 );
fldir_select_btn->move( 320, 20 );
connect( fldir_select_btn, SIGNAL( clicked() ), this,
SLOT( openFLDir() ) );
dir_layout->addWidget( lmms_wd_tw );
dir_layout->addSpacing( 10 );
dir_layout->addWidget( vst_tw );
dir_layout->addSpacing( 10 );
dir_layout->addWidget( artwork_tw );
dir_layout->addSpacing( 10 );
dir_layout->addWidget( fl_tw );
dir_layout->addStretch();
@@ -623,6 +644,7 @@ void setupDialog::accept( void )
configManager::inst()->setWorkingDir( m_workingDir );
configManager::inst()->setVSTDir( m_vstDir );
configManager::inst()->setArtworkDir( m_artworkDir );
configManager::inst()->setFLDir( m_flDir );
// tell all audio-settings-widget to save their settings
for( aswMap::iterator it = m_audioIfaceSetupWidgets.begin();
@@ -847,6 +869,33 @@ void setupDialog::setArtworkDir( const QString & _ad )
void setupDialog::openFLDir( void )
{
#ifdef QT4
QString new_dir = QFileDialog::getExistingDirectory( this,
tr( "Choose FL Studio installation directory" ),
m_flDir );
#else
QString new_dir = QFileDialog::getExistingDirectory( m_flDir, 0, 0,
tr( "Choose FL Studio installation directory" ), TRUE );
#endif
if( new_dir != QString::null )
{
m_fdLineEdit->setText( new_dir );
}
}
void setupDialog::setFLDir( const QString & _fd )
{
m_flDir = _fd;
}
void setupDialog::audioInterfaceChanged( const QString & _iface )
{
for( aswMap::iterator it = m_audioIfaceSetupWidgets.begin();

View File

@@ -741,7 +741,7 @@ void songEditor::setTempo( int _new_bpm )
void songEditor::setMasterVolume( volume _vol )
{
m_masterVolumeSlider->setValue( _vol );
m_masterVolumeSlider->setValue( 200 - _vol );
}
@@ -749,7 +749,7 @@ void songEditor::setMasterVolume( volume _vol )
void songEditor::setMasterPitch( int _master_pitch )
{
m_masterPitchSlider->setValue( _master_pitch );
m_masterPitchSlider->setValue( -_master_pitch );
}

View File

@@ -96,10 +96,14 @@ trackContainer::trackContainer( engine * _engine ) :
trackContainer::~trackContainer()
{
eng()->getProjectJournal()->setJournalling( FALSE );
while( m_trackWidgets.size() )
{
removeTrack( m_trackWidgets.front()->getTrack() );
}
eng()->getProjectJournal()->setJournalling( TRUE );
}