imported DrumSynth, dropped dot drawing and some fixes
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@595 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
@@ -75,8 +75,7 @@ QPixmap * audioFileProcessor::s_artwork = NULL;
|
||||
|
||||
|
||||
audioFileProcessor::audioFileProcessor( instrumentTrack * _channel_track ) :
|
||||
instrument( _channel_track, &audiofileprocessor_plugin_descriptor ),
|
||||
m_drawMethod( sampleBuffer::LINE_CONNECT )
|
||||
instrument( _channel_track, &audiofileprocessor_plugin_descriptor )
|
||||
{
|
||||
connect( &m_sampleBuffer, SIGNAL( sampleUpdated() ), this,
|
||||
SLOT( sampleUpdated() ) );
|
||||
@@ -106,7 +105,7 @@ audioFileProcessor::audioFileProcessor( instrumentTrack * _channel_track ) :
|
||||
"Mode, start- and end-point, amplify-value and so on "
|
||||
"are not reset, so please don't wonder if your sample "
|
||||
"doesn't sound like the original one..." ) );
|
||||
|
||||
|
||||
m_reverseButton = new pixmapButton( this, NULL, NULL );
|
||||
m_reverseButton->setCheckable( TRUE );
|
||||
m_reverseButton->move( 160, 124 );
|
||||
@@ -184,38 +183,6 @@ audioFileProcessor::audioFileProcessor( instrumentTrack * _channel_track ) :
|
||||
"AudioFileProcessor returns if a note is longer than "
|
||||
"the sample between start- and end-point." ) );
|
||||
|
||||
m_viewLinesPB = new pixmapButton( this, NULL, NULL );
|
||||
m_viewLinesPB->move( 154, 158 );
|
||||
if( m_drawMethod == sampleBuffer::LINE_CONNECT )
|
||||
{
|
||||
m_viewLinesPB->setChecked( TRUE );
|
||||
}
|
||||
connect( m_viewLinesPB, SIGNAL( toggled( bool ) ), this,
|
||||
SLOT( lineDrawBtnToggled( bool ) ) );
|
||||
m_viewLinesPB->setWhatsThis(
|
||||
tr( "Activate this button, if your sample should be drawn "
|
||||
"with connected lines. This doesn't change the "
|
||||
"sound itself. It just gives you another view to your "
|
||||
"sample." ) );
|
||||
|
||||
m_viewDotsPB = new pixmapButton( this, NULL, NULL );
|
||||
m_viewDotsPB->move( 204, 158 );
|
||||
if( m_drawMethod == sampleBuffer::DOTS )
|
||||
{
|
||||
m_viewDotsPB->setChecked( TRUE );
|
||||
}
|
||||
connect( m_viewDotsPB, SIGNAL( toggled( bool ) ), this,
|
||||
SLOT( dotDrawBtnToggled( bool ) ) );
|
||||
m_viewDotsPB->setWhatsThis(
|
||||
tr( "Activate this button, if your sample should be drawn "
|
||||
"with dots. This doesn't change the sound itself. "
|
||||
"It just gives you another view to your sample." ) );
|
||||
|
||||
automatableButtonGroup * view_group = new automatableButtonGroup( this,
|
||||
NULL, NULL );
|
||||
view_group->addButton( m_viewLinesPB );
|
||||
view_group->addButton( m_viewDotsPB );
|
||||
|
||||
setAcceptDrops( TRUE );
|
||||
}
|
||||
|
||||
@@ -473,12 +440,11 @@ void audioFileProcessor::paintEvent( QPaintEvent * )
|
||||
void audioFileProcessor::sampleUpdated( void )
|
||||
{
|
||||
m_graph = QPixmap( 245, 75 );
|
||||
m_graph.fill( Qt::transparent );
|
||||
QPainter p( &m_graph );
|
||||
p.drawPixmap( 2, 172, m_graph );
|
||||
p.setPen( QColor( 64, 255, 160 ) );
|
||||
m_sampleBuffer.visualize( p, QRect( 2, 2, m_graph.width() - 4,
|
||||
m_graph.height() - 4 ),
|
||||
m_drawMethod );
|
||||
m_graph.height() - 4 ) );
|
||||
update();
|
||||
}
|
||||
|
||||
@@ -494,30 +460,6 @@ void audioFileProcessor::reverseBtnToggled( bool _on )
|
||||
|
||||
|
||||
|
||||
void audioFileProcessor::lineDrawBtnToggled( bool _on )
|
||||
{
|
||||
if( _on == TRUE )
|
||||
{
|
||||
m_drawMethod = sampleBuffer::LINE_CONNECT;
|
||||
sampleUpdated();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void audioFileProcessor::dotDrawBtnToggled( bool _on )
|
||||
{
|
||||
if( _on == TRUE )
|
||||
{
|
||||
m_drawMethod = sampleBuffer::DOTS;
|
||||
sampleUpdated();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void audioFileProcessor::ampKnobChanged( float _val )
|
||||
{
|
||||
m_sampleBuffer.setAmplification( _val / 100.0f );
|
||||
@@ -598,8 +540,8 @@ const QStringList & audioFileProcessor::subPluginFeatures::supported_extensions(
|
||||
void )
|
||||
{
|
||||
static QStringList extensions = QStringList()
|
||||
<< "wav" << "ogg" << "spx" << "au" << "voc"
|
||||
<< "aif" << "aiff" << "flac" << "raw";
|
||||
<< "wav" << "ogg" << "ds" << "spx" << "au"
|
||||
<< "voc" << "aif" << "aiff" << "flac" << "raw";
|
||||
return( extensions );
|
||||
}
|
||||
|
||||
|
||||
@@ -91,8 +91,6 @@ protected slots:
|
||||
void ampKnobChanged( float _new_value );
|
||||
void startKnobChanged( float _new_value );
|
||||
void endKnobChanged( float _new_value );
|
||||
void lineDrawBtnToggled( bool _on );
|
||||
void dotDrawBtnToggled( bool _on );
|
||||
void sampleUpdated( void );
|
||||
|
||||
|
||||
@@ -110,15 +108,11 @@ private:
|
||||
|
||||
sampleBuffer m_sampleBuffer;
|
||||
|
||||
sampleBuffer::drawMethods m_drawMethod;
|
||||
|
||||
QPixmap m_graph;
|
||||
volumeKnob * m_ampKnob;
|
||||
knob * m_startKnob;
|
||||
knob * m_endKnob;
|
||||
pixmapButton * m_openAudioFileButton;
|
||||
pixmapButton * m_viewLinesPB;
|
||||
pixmapButton * m_viewDotsPB;
|
||||
pixmapButton * m_reverseButton;
|
||||
pixmapButton * m_loopButton;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user