Fix casing of filenames and code in plugins/ (#6350)
No functional changes! No changes to savefiles/presets! Fixes casing of everything that is currently lowercase but should be uppercase. Fixes also some other plugin strings, especially: * opl2 -> OpulenZ (see289887f4fc) * calf -> veal (seeae291e0709) * ladspa_effect -> LadspaEffect (see9c9372f0c8) * remove flp_import (see2d1813fb64)
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* audio_file_processor.cpp - instrument for using audio-files
|
||||
* AudioFileProcessor.cpp - instrument for using audio-files
|
||||
*
|
||||
* Copyright (c) 2004-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
@@ -22,7 +22,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "audio_file_processor.h"
|
||||
#include "AudioFileProcessor.h"
|
||||
|
||||
#include <QPainter>
|
||||
#include <QFileInfo>
|
||||
@@ -72,7 +72,7 @@ Plugin::Descriptor PLUGIN_EXPORT audiofileprocessor_plugin_descriptor =
|
||||
|
||||
|
||||
|
||||
audioFileProcessor::audioFileProcessor( InstrumentTrack * _instrument_track ) :
|
||||
AudioFileProcessor::AudioFileProcessor( InstrumentTrack * _instrument_track ) :
|
||||
Instrument( _instrument_track, &audiofileprocessor_plugin_descriptor ),
|
||||
m_sampleBuffer(),
|
||||
m_ampModel( 100, 0, 500, 1, this, tr( "Amplify" ) ),
|
||||
@@ -111,14 +111,14 @@ audioFileProcessor::audioFileProcessor( InstrumentTrack * _instrument_track ) :
|
||||
|
||||
|
||||
|
||||
audioFileProcessor::~audioFileProcessor()
|
||||
AudioFileProcessor::~AudioFileProcessor()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void audioFileProcessor::playNote( NotePlayHandle * _n,
|
||||
void AudioFileProcessor::playNote( NotePlayHandle * _n,
|
||||
sampleFrame * _working_buffer )
|
||||
{
|
||||
const fpp_t frames = _n->framesLeftForCurrentPeriod();
|
||||
@@ -200,7 +200,7 @@ void audioFileProcessor::playNote( NotePlayHandle * _n,
|
||||
|
||||
|
||||
|
||||
void audioFileProcessor::deleteNotePluginData( NotePlayHandle * _n )
|
||||
void AudioFileProcessor::deleteNotePluginData( NotePlayHandle * _n )
|
||||
{
|
||||
delete (handleState *)_n->m_pluginData;
|
||||
}
|
||||
@@ -208,7 +208,7 @@ void audioFileProcessor::deleteNotePluginData( NotePlayHandle * _n )
|
||||
|
||||
|
||||
|
||||
void audioFileProcessor::saveSettings( QDomDocument & _doc,
|
||||
void AudioFileProcessor::saveSettings( QDomDocument & _doc,
|
||||
QDomElement & _this )
|
||||
{
|
||||
_this.setAttribute( "src", m_sampleBuffer.audioFile() );
|
||||
@@ -232,7 +232,7 @@ void audioFileProcessor::saveSettings( QDomDocument & _doc,
|
||||
|
||||
|
||||
|
||||
void audioFileProcessor::loadSettings( const QDomElement & _this )
|
||||
void AudioFileProcessor::loadSettings( const QDomElement & _this )
|
||||
{
|
||||
if( _this.attribute( "src" ) != "" )
|
||||
{
|
||||
@@ -284,7 +284,7 @@ void audioFileProcessor::loadSettings( const QDomElement & _this )
|
||||
|
||||
|
||||
|
||||
void audioFileProcessor::loadFile( const QString & _file )
|
||||
void AudioFileProcessor::loadFile( const QString & _file )
|
||||
{
|
||||
setAudioFile( _file );
|
||||
}
|
||||
@@ -292,7 +292,7 @@ void audioFileProcessor::loadFile( const QString & _file )
|
||||
|
||||
|
||||
|
||||
QString audioFileProcessor::nodeName( void ) const
|
||||
QString AudioFileProcessor::nodeName( void ) const
|
||||
{
|
||||
return audiofileprocessor_plugin_descriptor.name;
|
||||
}
|
||||
@@ -300,7 +300,7 @@ QString audioFileProcessor::nodeName( void ) const
|
||||
|
||||
|
||||
|
||||
int audioFileProcessor::getBeatLen( NotePlayHandle * _n ) const
|
||||
int AudioFileProcessor::getBeatLen( NotePlayHandle * _n ) const
|
||||
{
|
||||
const auto baseFreq = instrumentTrack()->baseFreq();
|
||||
const float freq_factor = baseFreq / _n->frequency() *
|
||||
@@ -313,7 +313,7 @@ int audioFileProcessor::getBeatLen( NotePlayHandle * _n ) const
|
||||
|
||||
|
||||
|
||||
PluginView * audioFileProcessor::instantiateView( QWidget * _parent )
|
||||
PluginView * AudioFileProcessor::instantiateView( QWidget * _parent )
|
||||
{
|
||||
return new AudioFileProcessorView( this, _parent );
|
||||
}
|
||||
@@ -321,7 +321,7 @@ PluginView * audioFileProcessor::instantiateView( QWidget * _parent )
|
||||
|
||||
|
||||
|
||||
void audioFileProcessor::setAudioFile( const QString & _audio_file,
|
||||
void AudioFileProcessor::setAudioFile( const QString & _audio_file,
|
||||
bool _rename )
|
||||
{
|
||||
// is current channel-name equal to previous-filename??
|
||||
@@ -342,7 +342,7 @@ void audioFileProcessor::setAudioFile( const QString & _audio_file,
|
||||
|
||||
|
||||
|
||||
void audioFileProcessor::reverseModelChanged( void )
|
||||
void AudioFileProcessor::reverseModelChanged( void )
|
||||
{
|
||||
m_sampleBuffer.setReversed( m_reverseModel.value() );
|
||||
m_nextPlayStartPoint = m_sampleBuffer.startFrame();
|
||||
@@ -352,20 +352,20 @@ void audioFileProcessor::reverseModelChanged( void )
|
||||
|
||||
|
||||
|
||||
void audioFileProcessor::ampModelChanged( void )
|
||||
void AudioFileProcessor::ampModelChanged( void )
|
||||
{
|
||||
m_sampleBuffer.setAmplification( m_ampModel.value() / 100.0f );
|
||||
}
|
||||
|
||||
|
||||
void audioFileProcessor::stutterModelChanged()
|
||||
void AudioFileProcessor::stutterModelChanged()
|
||||
{
|
||||
m_nextPlayStartPoint = m_sampleBuffer.startFrame();
|
||||
m_nextPlayBackwards = false;
|
||||
}
|
||||
|
||||
|
||||
void audioFileProcessor::startPointChanged( void )
|
||||
void AudioFileProcessor::startPointChanged( void )
|
||||
{
|
||||
// check if start is over end and swap values if so
|
||||
if( m_startPointModel.value() > m_endPointModel.value() )
|
||||
@@ -397,14 +397,14 @@ void audioFileProcessor::startPointChanged( void )
|
||||
|
||||
}
|
||||
|
||||
void audioFileProcessor::endPointChanged( void )
|
||||
void AudioFileProcessor::endPointChanged( void )
|
||||
{
|
||||
// same as start, for now
|
||||
startPointChanged();
|
||||
|
||||
}
|
||||
|
||||
void audioFileProcessor::loopPointChanged( void )
|
||||
void AudioFileProcessor::loopPointChanged( void )
|
||||
{
|
||||
|
||||
// check that loop point is between start-end points and not overlapping with endpoint
|
||||
@@ -427,7 +427,7 @@ void audioFileProcessor::loopPointChanged( void )
|
||||
pointChanged();
|
||||
}
|
||||
|
||||
void audioFileProcessor::pointChanged( void )
|
||||
void AudioFileProcessor::pointChanged( void )
|
||||
{
|
||||
const f_cnt_t f_start = static_cast<f_cnt_t>( m_startPointModel.value() * ( m_sampleBuffer.frames()-1 ) );
|
||||
const f_cnt_t f_end = static_cast<f_cnt_t>( m_endPointModel.value() * ( m_sampleBuffer.frames()-1 ) );
|
||||
@@ -549,7 +549,7 @@ AudioFileProcessorView::AudioFileProcessorView( Instrument * _instrument,
|
||||
m_waveView = 0;
|
||||
newWaveView();
|
||||
|
||||
connect( castModel<audioFileProcessor>(), SIGNAL( isPlaying( f_cnt_t ) ),
|
||||
connect( castModel<AudioFileProcessor>(), SIGNAL( isPlaying( f_cnt_t ) ),
|
||||
m_waveView, SLOT( isPlaying( f_cnt_t ) ) );
|
||||
|
||||
qRegisterMetaType<f_cnt_t>( "f_cnt_t" );
|
||||
@@ -606,7 +606,7 @@ void AudioFileProcessorView::newWaveView()
|
||||
delete m_waveView;
|
||||
m_waveView = 0;
|
||||
}
|
||||
m_waveView = new AudioFileProcessorWaveView( this, 245, 75, castModel<audioFileProcessor>()->m_sampleBuffer );
|
||||
m_waveView = new AudioFileProcessorWaveView( this, 245, 75, castModel<AudioFileProcessor>()->m_sampleBuffer );
|
||||
m_waveView->move( 2, 172 );
|
||||
m_waveView->setKnobs(
|
||||
dynamic_cast<AudioFileProcessorWaveView::knob *>( m_startKnob ),
|
||||
@@ -624,7 +624,7 @@ void AudioFileProcessorView::dropEvent( QDropEvent * _de )
|
||||
QString value = StringPairDrag::decodeValue( _de );
|
||||
if( type == "samplefile" )
|
||||
{
|
||||
castModel<audioFileProcessor>()->setAudioFile( value );
|
||||
castModel<AudioFileProcessor>()->setAudioFile( value );
|
||||
_de->accept();
|
||||
newWaveView();
|
||||
return;
|
||||
@@ -632,7 +632,7 @@ void AudioFileProcessorView::dropEvent( QDropEvent * _de )
|
||||
else if( type == QString( "clip_%1" ).arg( Track::SampleTrack ) )
|
||||
{
|
||||
DataFile dataFile( value.toUtf8() );
|
||||
castModel<audioFileProcessor>()->setAudioFile( dataFile.content().firstChild().toElement().attribute( "src" ) );
|
||||
castModel<AudioFileProcessor>()->setAudioFile( dataFile.content().firstChild().toElement().attribute( "src" ) );
|
||||
_de->accept();
|
||||
return;
|
||||
}
|
||||
@@ -649,7 +649,7 @@ void AudioFileProcessorView::paintEvent( QPaintEvent * )
|
||||
|
||||
p.drawPixmap( 0, 0, *s_artwork );
|
||||
|
||||
audioFileProcessor * a = castModel<audioFileProcessor>();
|
||||
AudioFileProcessor * a = castModel<AudioFileProcessor>();
|
||||
|
||||
QString file_name = "";
|
||||
int idx = a->m_sampleBuffer.audioFile().length();
|
||||
@@ -691,11 +691,11 @@ void AudioFileProcessorView::sampleUpdated( void )
|
||||
|
||||
void AudioFileProcessorView::openAudioFile( void )
|
||||
{
|
||||
QString af = castModel<audioFileProcessor>()->m_sampleBuffer.
|
||||
QString af = castModel<AudioFileProcessor>()->m_sampleBuffer.
|
||||
openAudioFile();
|
||||
if( af != "" )
|
||||
{
|
||||
castModel<audioFileProcessor>()->setAudioFile( af );
|
||||
castModel<AudioFileProcessor>()->setAudioFile( af );
|
||||
Engine::getSong()->setModified();
|
||||
m_waveView->updateSampleRange();
|
||||
}
|
||||
@@ -706,7 +706,7 @@ void AudioFileProcessorView::openAudioFile( void )
|
||||
|
||||
void AudioFileProcessorView::modelChanged( void )
|
||||
{
|
||||
audioFileProcessor * a = castModel<audioFileProcessor>();
|
||||
AudioFileProcessor * a = castModel<AudioFileProcessor>();
|
||||
connect( &a->m_sampleBuffer, SIGNAL( sampleUpdated() ),
|
||||
this, SLOT( sampleUpdated() ) );
|
||||
m_ampKnob->setModel( &a->m_ampModel );
|
||||
@@ -1284,7 +1284,7 @@ extern "C"
|
||||
// necessary for getting instance out of shared lib
|
||||
PLUGIN_EXPORT Plugin * lmms_plugin_main(Model * model, void *)
|
||||
{
|
||||
return new audioFileProcessor(static_cast<InstrumentTrack *>(model));
|
||||
return new AudioFileProcessor(static_cast<InstrumentTrack *>(model));
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* audio_file_processor.h - declaration of class audioFileProcessor
|
||||
* AudioFileProcessor.h - declaration of class AudioFileProcessor
|
||||
* (instrument-plugin for using audio-files)
|
||||
*
|
||||
* Copyright (c) 2004-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
@@ -40,12 +40,12 @@ class ComboBox;
|
||||
class PixmapButton;
|
||||
|
||||
|
||||
class audioFileProcessor : public Instrument
|
||||
class AudioFileProcessor : public Instrument
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
audioFileProcessor( InstrumentTrack * _instrument_track );
|
||||
virtual ~audioFileProcessor();
|
||||
AudioFileProcessor( InstrumentTrack * _instrument_track );
|
||||
virtual ~AudioFileProcessor();
|
||||
|
||||
virtual void playNote( NotePlayHandle * _n,
|
||||
sampleFrame * _working_buffer );
|
||||
3
plugins/AudioFileProcessor/CMakeLists.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
INCLUDE(BuildPlugin)
|
||||
|
||||
BUILD_PLUGIN(audiofileprocessor AudioFileProcessor.cpp AudioFileProcessor.h MOCFILES AudioFileProcessor.h EMBEDDED_RESOURCES *.png)
|
||||
|
Before Width: | Height: | Size: 245 KiB After Width: | Height: | Size: 245 KiB |
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* bit_invader.cpp - instrument which uses a usereditable wavetable
|
||||
* BitInvader.cpp - instrument which uses a usereditable wavetable
|
||||
*
|
||||
* Copyright (c) 2006-2008 Andreas Brandmaier <andy/at/brandmaier/dot/de>
|
||||
*
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
#include <QDomElement>
|
||||
|
||||
#include "bit_invader.h"
|
||||
#include "BitInvader.h"
|
||||
#include "AudioEngine.h"
|
||||
#include "base64.h"
|
||||
#include "Engine.h"
|
||||
@@ -66,7 +66,7 @@ Plugin::Descriptor PLUGIN_EXPORT bitinvader_plugin_descriptor =
|
||||
}
|
||||
|
||||
|
||||
bSynth::bSynth( float * _shape, NotePlayHandle * _nph, bool _interpolation,
|
||||
BSynth::BSynth( float * _shape, NotePlayHandle * _nph, bool _interpolation,
|
||||
float _factor, const sample_rate_t _sample_rate ) :
|
||||
sample_index( 0 ),
|
||||
sample_realindex( 0 ),
|
||||
@@ -92,13 +92,13 @@ bSynth::bSynth( float * _shape, NotePlayHandle * _nph, bool _interpolation,
|
||||
}
|
||||
|
||||
|
||||
bSynth::~bSynth()
|
||||
BSynth::~BSynth()
|
||||
{
|
||||
delete[] sample_shape;
|
||||
}
|
||||
|
||||
|
||||
sample_t bSynth::nextStringSample( float sample_length )
|
||||
sample_t BSynth::nextStringSample( float sample_length )
|
||||
{
|
||||
float sample_step =
|
||||
static_cast<float>( sample_length / ( sample_rate / nph->frequency() ) );
|
||||
@@ -148,7 +148,7 @@ sample_t bSynth::nextStringSample( float sample_length )
|
||||
***********************************************************************/
|
||||
|
||||
|
||||
bitInvader::bitInvader( InstrumentTrack * _instrument_track ) :
|
||||
BitInvader::BitInvader( InstrumentTrack * _instrument_track ) :
|
||||
Instrument( _instrument_track, &bitinvader_plugin_descriptor ),
|
||||
m_sampleLength(wavetableSize, 4, wavetableSize, 1, this, tr("Sample length")),
|
||||
m_graph(-1.0f, 1.0f, wavetableSize, this),
|
||||
@@ -168,14 +168,14 @@ bitInvader::bitInvader( InstrumentTrack * _instrument_track ) :
|
||||
|
||||
|
||||
|
||||
bitInvader::~bitInvader()
|
||||
BitInvader::~BitInvader()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void bitInvader::saveSettings( QDomDocument & _doc, QDomElement & _this )
|
||||
void BitInvader::saveSettings( QDomDocument & _doc, QDomElement & _this )
|
||||
{
|
||||
|
||||
// Save plugin version
|
||||
@@ -201,7 +201,7 @@ void bitInvader::saveSettings( QDomDocument & _doc, QDomElement & _this )
|
||||
|
||||
|
||||
|
||||
void bitInvader::loadSettings( const QDomElement & _this )
|
||||
void BitInvader::loadSettings( const QDomElement & _this )
|
||||
{
|
||||
// Clear wavetable before loading a new
|
||||
m_graph.clear();
|
||||
@@ -231,7 +231,7 @@ void bitInvader::loadSettings( const QDomElement & _this )
|
||||
|
||||
|
||||
|
||||
void bitInvader::lengthChanged()
|
||||
void BitInvader::lengthChanged()
|
||||
{
|
||||
m_graph.setLength( (int) m_sampleLength.value() );
|
||||
|
||||
@@ -241,7 +241,7 @@ void bitInvader::lengthChanged()
|
||||
|
||||
|
||||
|
||||
void bitInvader::samplesChanged( int _begin, int _end )
|
||||
void BitInvader::samplesChanged( int _begin, int _end )
|
||||
{
|
||||
normalize();
|
||||
//engine::getSongEditor()->setModified();
|
||||
@@ -250,7 +250,7 @@ void bitInvader::samplesChanged( int _begin, int _end )
|
||||
|
||||
|
||||
|
||||
void bitInvader::normalize()
|
||||
void BitInvader::normalize()
|
||||
{
|
||||
// analyze
|
||||
float max = std::numeric_limits<float>::epsilon();
|
||||
@@ -266,7 +266,7 @@ void bitInvader::normalize()
|
||||
|
||||
|
||||
|
||||
QString bitInvader::nodeName() const
|
||||
QString BitInvader::nodeName() const
|
||||
{
|
||||
return( bitinvader_plugin_descriptor.name );
|
||||
}
|
||||
@@ -274,7 +274,7 @@ QString bitInvader::nodeName() const
|
||||
|
||||
|
||||
|
||||
void bitInvader::playNote( NotePlayHandle * _n,
|
||||
void BitInvader::playNote( NotePlayHandle * _n,
|
||||
sampleFrame * _working_buffer )
|
||||
{
|
||||
if ( _n->totalFramesPlayed() == 0 || _n->m_pluginData == nullptr )
|
||||
@@ -290,7 +290,7 @@ void bitInvader::playNote( NotePlayHandle * _n,
|
||||
factor = m_normalizeFactor;
|
||||
}
|
||||
|
||||
_n->m_pluginData = new bSynth(
|
||||
_n->m_pluginData = new BSynth(
|
||||
const_cast<float*>( m_graph.samples() ),
|
||||
_n,
|
||||
m_interpolation.value(), factor,
|
||||
@@ -300,7 +300,7 @@ void bitInvader::playNote( NotePlayHandle * _n,
|
||||
const fpp_t frames = _n->framesLeftForCurrentPeriod();
|
||||
const f_cnt_t offset = _n->noteOffset();
|
||||
|
||||
bSynth * ps = static_cast<bSynth *>( _n->m_pluginData );
|
||||
BSynth * ps = static_cast<BSynth *>( _n->m_pluginData );
|
||||
for( fpp_t frame = offset; frame < frames + offset; ++frame )
|
||||
{
|
||||
const sample_t cur = ps->nextStringSample( m_graph.length() );
|
||||
@@ -318,17 +318,17 @@ void bitInvader::playNote( NotePlayHandle * _n,
|
||||
|
||||
|
||||
|
||||
void bitInvader::deleteNotePluginData( NotePlayHandle * _n )
|
||||
void BitInvader::deleteNotePluginData( NotePlayHandle * _n )
|
||||
{
|
||||
delete static_cast<bSynth *>( _n->m_pluginData );
|
||||
delete static_cast<BSynth *>( _n->m_pluginData );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
PluginView * bitInvader::instantiateView( QWidget * _parent )
|
||||
PluginView * BitInvader::instantiateView( QWidget * _parent )
|
||||
{
|
||||
return( new bitInvaderView( this, _parent ) );
|
||||
return( new BitInvaderView( this, _parent ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -337,7 +337,7 @@ PluginView * bitInvader::instantiateView( QWidget * _parent )
|
||||
|
||||
|
||||
|
||||
bitInvaderView::bitInvaderView( Instrument * _instrument,
|
||||
BitInvaderView::BitInvaderView( Instrument * _instrument,
|
||||
QWidget * _parent ) :
|
||||
InstrumentViewFixedSize( _instrument, _parent )
|
||||
{
|
||||
@@ -470,9 +470,9 @@ bitInvaderView::bitInvaderView( Instrument * _instrument,
|
||||
|
||||
|
||||
|
||||
void bitInvaderView::modelChanged()
|
||||
void BitInvaderView::modelChanged()
|
||||
{
|
||||
bitInvader * b = castModel<bitInvader>();
|
||||
BitInvader * b = castModel<BitInvader>();
|
||||
|
||||
m_graph->setModel( &b->m_graph );
|
||||
m_sampleLengthKnob->setModel( &b->m_sampleLength );
|
||||
@@ -484,7 +484,7 @@ void bitInvaderView::modelChanged()
|
||||
|
||||
|
||||
|
||||
void bitInvaderView::sinWaveClicked()
|
||||
void BitInvaderView::sinWaveClicked()
|
||||
{
|
||||
m_graph->model()->clearInvisible();
|
||||
m_graph->model()->setWaveToSine();
|
||||
@@ -494,7 +494,7 @@ void bitInvaderView::sinWaveClicked()
|
||||
|
||||
|
||||
|
||||
void bitInvaderView::triangleWaveClicked()
|
||||
void BitInvaderView::triangleWaveClicked()
|
||||
{
|
||||
m_graph->model()->clearInvisible();
|
||||
m_graph->model()->setWaveToTriangle();
|
||||
@@ -504,7 +504,7 @@ void bitInvaderView::triangleWaveClicked()
|
||||
|
||||
|
||||
|
||||
void bitInvaderView::sawWaveClicked()
|
||||
void BitInvaderView::sawWaveClicked()
|
||||
{
|
||||
m_graph->model()->clearInvisible();
|
||||
m_graph->model()->setWaveToSaw();
|
||||
@@ -514,7 +514,7 @@ void bitInvaderView::sawWaveClicked()
|
||||
|
||||
|
||||
|
||||
void bitInvaderView::sqrWaveClicked()
|
||||
void BitInvaderView::sqrWaveClicked()
|
||||
{
|
||||
m_graph->model()->clearInvisible();
|
||||
m_graph->model()->setWaveToSquare();
|
||||
@@ -524,7 +524,7 @@ void bitInvaderView::sqrWaveClicked()
|
||||
|
||||
|
||||
|
||||
void bitInvaderView::noiseWaveClicked()
|
||||
void BitInvaderView::noiseWaveClicked()
|
||||
{
|
||||
m_graph->model()->clearInvisible();
|
||||
m_graph->model()->setWaveToNoise();
|
||||
@@ -534,7 +534,7 @@ void bitInvaderView::noiseWaveClicked()
|
||||
|
||||
|
||||
|
||||
void bitInvaderView::usrWaveClicked()
|
||||
void BitInvaderView::usrWaveClicked()
|
||||
{
|
||||
QString fileName = m_graph->model()->setWaveToUser();
|
||||
if (!fileName.isEmpty())
|
||||
@@ -548,7 +548,7 @@ void bitInvaderView::usrWaveClicked()
|
||||
|
||||
|
||||
|
||||
void bitInvaderView::smoothClicked()
|
||||
void BitInvaderView::smoothClicked()
|
||||
{
|
||||
m_graph->model()->smooth();
|
||||
Engine::getSong()->setModified();
|
||||
@@ -557,7 +557,7 @@ void bitInvaderView::smoothClicked()
|
||||
|
||||
|
||||
|
||||
void bitInvaderView::interpolationToggled( bool value )
|
||||
void BitInvaderView::interpolationToggled( bool value )
|
||||
{
|
||||
m_graph->setGraphStyle( value ? Graph::LinearStyle : Graph::NearestStyle);
|
||||
Engine::getSong()->setModified();
|
||||
@@ -566,7 +566,7 @@ void bitInvaderView::interpolationToggled( bool value )
|
||||
|
||||
|
||||
|
||||
void bitInvaderView::normalizeToggled( bool value )
|
||||
void BitInvaderView::normalizeToggled( bool value )
|
||||
{
|
||||
Engine::getSong()->setModified();
|
||||
}
|
||||
@@ -580,7 +580,7 @@ extern "C"
|
||||
// necessary for getting instance out of shared lib
|
||||
PLUGIN_EXPORT Plugin * lmms_plugin_main( Model *m, void * )
|
||||
{
|
||||
return( new bitInvader( static_cast<InstrumentTrack *>( m ) ) );
|
||||
return( new BitInvader( static_cast<InstrumentTrack *>( m ) ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* bit_invader.h - declaration of class bitInvader and bSynth which
|
||||
* BitInvader.h - declaration of class BitInvader and BSynth which
|
||||
* are a wavetable synthesizer
|
||||
*
|
||||
* Copyright (c) 2006-2008 Andreas Brandmaier <andy/at/brandmaier/dot/de>
|
||||
@@ -34,19 +34,19 @@
|
||||
#include "MemoryManager.h"
|
||||
|
||||
class oscillator;
|
||||
class bitInvaderView;
|
||||
class BitInvaderView;
|
||||
class Knob;
|
||||
class LedCheckBox;
|
||||
class PixmapButton;
|
||||
|
||||
class bSynth
|
||||
class BSynth
|
||||
{
|
||||
MM_OPERATORS
|
||||
public:
|
||||
bSynth( float * sample, NotePlayHandle * _nph,
|
||||
BSynth( float * sample, NotePlayHandle * _nph,
|
||||
bool _interpolation, float factor,
|
||||
const sample_rate_t _sample_rate );
|
||||
virtual ~bSynth();
|
||||
virtual ~BSynth();
|
||||
|
||||
sample_t nextStringSample( float sample_length );
|
||||
|
||||
@@ -62,12 +62,12 @@ private:
|
||||
|
||||
} ;
|
||||
|
||||
class bitInvader : public Instrument
|
||||
class BitInvader : public Instrument
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
bitInvader(InstrumentTrack * _instrument_track );
|
||||
virtual ~bitInvader();
|
||||
BitInvader(InstrumentTrack * _instrument_track );
|
||||
virtual ~BitInvader();
|
||||
|
||||
virtual void playNote( NotePlayHandle * _n,
|
||||
sampleFrame * _working_buffer );
|
||||
@@ -103,19 +103,19 @@ private:
|
||||
|
||||
float m_normalizeFactor;
|
||||
|
||||
friend class bitInvaderView;
|
||||
friend class BitInvaderView;
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
class bitInvaderView : public InstrumentViewFixedSize
|
||||
class BitInvaderView : public InstrumentViewFixedSize
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
bitInvaderView( Instrument * _instrument,
|
||||
BitInvaderView( Instrument * _instrument,
|
||||
QWidget * _parent );
|
||||
|
||||
virtual ~bitInvaderView() {};
|
||||
virtual ~BitInvaderView() {};
|
||||
|
||||
protected slots:
|
||||
//void sampleSizeChanged( float _new_sample_length );
|
||||
3
plugins/BitInvader/CMakeLists.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
INCLUDE(BuildPlugin)
|
||||
|
||||
BUILD_PLUGIN(bitinvader BitInvader.cpp BitInvader.h MOCFILES BitInvader.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png")
|
||||
|
Before Width: | Height: | Size: 95 KiB After Width: | Height: | Size: 95 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 434 B After Width: | Height: | Size: 434 B |
|
Before Width: | Height: | Size: 352 B After Width: | Height: | Size: 352 B |
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
@@ -43,8 +43,8 @@ if(LMMS_HAVE_CARLA OR LMMS_HAVE_WEAKCARLA)
|
||||
INCLUDE_DIRECTORIES(${CARLA_INCLUDE_DIRS})
|
||||
LINK_DIRECTORIES(${CARLA_LIBRARY_DIRS})
|
||||
LINK_LIBRARIES(${CARLA_LIBRARIES})
|
||||
BUILD_PLUGIN(carlabase carla.cpp carla.h
|
||||
MOCFILES carla.h
|
||||
BUILD_PLUGIN(carlabase Carla.cpp Carla.h
|
||||
MOCFILES Carla.h
|
||||
EMBEDDED_RESOURCES artwork-patchbay.png artwork-rack.png
|
||||
EXPORT_BASE_NAME carlabase
|
||||
LINK SHARED)
|
||||
@@ -22,7 +22,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "carla.h"
|
||||
#include "Carla.h"
|
||||
|
||||
#include "AudioEngine.h"
|
||||
#include "Engine.h"
|
||||
|
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 45 KiB |
|
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 45 KiB |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.2 KiB |
@@ -1,9 +1,9 @@
|
||||
if(LMMS_HAVE_CARLA OR LMMS_HAVE_WEAKCARLA)
|
||||
ADD_DEFINITIONS(-DCARLA_PLUGIN_PATCHBAY -DCARLA_PLUGIN_SYNTH)
|
||||
INCLUDE(BuildPlugin)
|
||||
INCLUDE_DIRECTORIES(${CARLA_INCLUDE_DIRS} "${CMAKE_CURRENT_SOURCE_DIR}/../carlabase")
|
||||
LINK_DIRECTORIES("${CMAKE_CURRENT_BINARY_DIR}/../carlabase"
|
||||
INCLUDE_DIRECTORIES(${CARLA_INCLUDE_DIRS} "${CMAKE_CURRENT_SOURCE_DIR}/../CarlaBase")
|
||||
LINK_DIRECTORIES("${CMAKE_CURRENT_BINARY_DIR}/../CarlaBase"
|
||||
${CARLA_LIBRARY_DIRS})
|
||||
LINK_LIBRARIES(carlabase)
|
||||
BUILD_PLUGIN(carlapatchbay carlapatchbay.cpp EMBEDDED_RESOURCES logo.png)
|
||||
BUILD_PLUGIN(carlapatchbay CarlaPatchbay.cpp EMBEDDED_RESOURCES logo.png)
|
||||
endif()
|
||||
@@ -22,7 +22,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "carla.h"
|
||||
#include "Carla.h"
|
||||
|
||||
#include "embed.h"
|
||||
#include "plugin_export.h"
|
||||
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.2 KiB |
@@ -1,9 +1,9 @@
|
||||
if(LMMS_HAVE_CARLA OR LMMS_HAVE_WEAKCARLA)
|
||||
ADD_DEFINITIONS(-DCARLA_PLUGIN_RACK -DCARLA_PLUGIN_SYNTH)
|
||||
INCLUDE(BuildPlugin)
|
||||
INCLUDE_DIRECTORIES(${CARLA_INCLUDE_DIRS} "${CMAKE_CURRENT_SOURCE_DIR}/../carlabase")
|
||||
LINK_DIRECTORIES("${CMAKE_CURRENT_BINARY_DIR}/../carlabase"
|
||||
INCLUDE_DIRECTORIES(${CARLA_INCLUDE_DIRS} "${CMAKE_CURRENT_SOURCE_DIR}/../CarlaBase")
|
||||
LINK_DIRECTORIES("${CMAKE_CURRENT_BINARY_DIR}/../CarlaBase"
|
||||
${CARLA_LIBRARY_DIRS})
|
||||
LINK_LIBRARIES(carlabase)
|
||||
BUILD_PLUGIN(carlarack carlarack.cpp EMBEDDED_RESOURCES logo.png)
|
||||
BUILD_PLUGIN(carlarack CarlaRack.cpp EMBEDDED_RESOURCES logo.png)
|
||||
endif()
|
||||
@@ -22,7 +22,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "carla.h"
|
||||
#include "Carla.h"
|
||||
|
||||
#include "embed.h"
|
||||
#include "plugin_export.h"
|
||||
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.2 KiB |
3
plugins/DynamicsProcessor/CMakeLists.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
INCLUDE(BuildPlugin)
|
||||
|
||||
BUILD_PLUGIN(dynamicsprocessor DynamicsProcessor.cpp DynamicsProcessorControls.cpp DynamicsProcessorControlDialog.cpp MOCFILES DynamicsProcessorControls.h DynamicsProcessorControlDialog.h EMBEDDED_RESOURCES *.png)
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* dynamics_processor.cpp - dynamics_processor effect-plugin
|
||||
* DynamicsProcessor.cpp - DynamicsProcessor effect-plugin
|
||||
*
|
||||
* Copyright (c) 2014 Vesa Kivimäki <contact/dot/diizy/at/nbl/dot/fi>
|
||||
* Copyright (c) 2006-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
@@ -24,7 +24,7 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "dynamics_processor.h"
|
||||
#include "DynamicsProcessor.h"
|
||||
#include "lmms_math.h"
|
||||
#include "interpolation.h"
|
||||
#include "RmsHelper.h"
|
||||
@@ -54,7 +54,7 @@ Plugin::Descriptor PLUGIN_EXPORT dynamicsprocessor_plugin_descriptor =
|
||||
const float DYN_NOISE_FLOOR = 0.00001f; // -100dBFS noise floor
|
||||
const double DNF_LOG = 5.0;
|
||||
|
||||
dynProcEffect::dynProcEffect( Model * _parent,
|
||||
DynProcEffect::DynProcEffect( Model * _parent,
|
||||
const Descriptor::SubPluginFeatures::Key * _key ) :
|
||||
Effect( &dynamicsprocessor_plugin_descriptor, _parent, _key ),
|
||||
m_dpControls( this )
|
||||
@@ -69,25 +69,25 @@ dynProcEffect::dynProcEffect( Model * _parent,
|
||||
|
||||
|
||||
|
||||
dynProcEffect::~dynProcEffect()
|
||||
DynProcEffect::~DynProcEffect()
|
||||
{
|
||||
delete m_rms[0];
|
||||
delete m_rms[1];
|
||||
}
|
||||
|
||||
|
||||
inline void dynProcEffect::calcAttack()
|
||||
inline void DynProcEffect::calcAttack()
|
||||
{
|
||||
m_attCoeff = std::pow(10.f, ( DNF_LOG / ( m_dpControls.m_attackModel.value() * 0.001 ) ) / Engine::audioEngine()->processingSampleRate() );
|
||||
}
|
||||
|
||||
inline void dynProcEffect::calcRelease()
|
||||
inline void DynProcEffect::calcRelease()
|
||||
{
|
||||
m_relCoeff = std::pow(10.f, ( -DNF_LOG / ( m_dpControls.m_releaseModel.value() * 0.001 ) ) / Engine::audioEngine()->processingSampleRate() );
|
||||
}
|
||||
|
||||
|
||||
bool dynProcEffect::processAudioBuffer( sampleFrame * _buf,
|
||||
bool DynProcEffect::processAudioBuffer( sampleFrame * _buf,
|
||||
const fpp_t _frames )
|
||||
{
|
||||
if( !isEnabled() || !isRunning () )
|
||||
@@ -165,17 +165,17 @@ bool dynProcEffect::processAudioBuffer( sampleFrame * _buf,
|
||||
// account for stereo mode
|
||||
switch( stereoMode )
|
||||
{
|
||||
case dynProcControls::SM_Maximum:
|
||||
case DynProcControls::SM_Maximum:
|
||||
{
|
||||
sm_peak[0] = sm_peak[1] = qMax( m_currentPeak[0], m_currentPeak[1] );
|
||||
break;
|
||||
}
|
||||
case dynProcControls::SM_Average:
|
||||
case DynProcControls::SM_Average:
|
||||
{
|
||||
sm_peak[0] = sm_peak[1] = ( m_currentPeak[0] + m_currentPeak[1] ) * 0.5;
|
||||
break;
|
||||
}
|
||||
case dynProcControls::SM_Unlinked:
|
||||
case DynProcControls::SM_Unlinked:
|
||||
{
|
||||
sm_peak[0] = m_currentPeak[0];
|
||||
sm_peak[1] = m_currentPeak[1];
|
||||
@@ -237,7 +237,7 @@ extern "C"
|
||||
// necessary for getting instance out of shared lib
|
||||
PLUGIN_EXPORT Plugin * lmms_plugin_main( Model * _parent, void * _data )
|
||||
{
|
||||
return( new dynProcEffect( _parent,
|
||||
return( new DynProcEffect( _parent,
|
||||
static_cast<const Plugin::Descriptor::SubPluginFeatures::Key *>(
|
||||
_data ) ) );
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* dynamics_processor.h - dynamics_processor effect-plugin
|
||||
* DynamicsProcessor.h - DynamicsProcessor effect-plugin
|
||||
*
|
||||
* Copyright (c) 2014 Vesa Kivimäki <contact/dot/diizy/at/nbl/dot/fi>
|
||||
* Copyright (c) 2006-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
@@ -28,17 +28,17 @@
|
||||
#define DYNPROC_H
|
||||
|
||||
#include "Effect.h"
|
||||
#include "dynamics_processor_controls.h"
|
||||
#include "DynamicsProcessorControls.h"
|
||||
|
||||
class RmsHelper;
|
||||
|
||||
|
||||
class dynProcEffect : public Effect
|
||||
class DynProcEffect : public Effect
|
||||
{
|
||||
public:
|
||||
dynProcEffect( Model * _parent,
|
||||
DynProcEffect( Model * _parent,
|
||||
const Descriptor::SubPluginFeatures::Key * _key );
|
||||
virtual ~dynProcEffect();
|
||||
virtual ~DynProcEffect();
|
||||
virtual bool processAudioBuffer( sampleFrame * _buf,
|
||||
const fpp_t _frames );
|
||||
|
||||
@@ -52,7 +52,7 @@ private:
|
||||
void calcAttack();
|
||||
void calcRelease();
|
||||
|
||||
dynProcControls m_dpControls;
|
||||
DynProcControls m_dpControls;
|
||||
|
||||
// this member array is needed for peak detection
|
||||
float m_currentPeak[2];
|
||||
@@ -63,7 +63,7 @@ private:
|
||||
|
||||
RmsHelper * m_rms [2];
|
||||
|
||||
friend class dynProcControls;
|
||||
friend class DynProcControls;
|
||||
|
||||
} ;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* dynamics_processor_control_dialog.cpp - control-dialog for dynamics_processor-effect
|
||||
* DynamicsProcessorControlDialog.cpp - control-dialog for DynamicsProcessor-effect
|
||||
*
|
||||
* Copyright (c) 2014 Vesa Kivimäki <contact/dot/diizy/at/nbl/dot/fi>
|
||||
* Copyright (c) 2006-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
@@ -25,8 +25,8 @@
|
||||
|
||||
|
||||
|
||||
#include "dynamics_processor_control_dialog.h"
|
||||
#include "dynamics_processor_controls.h"
|
||||
#include "DynamicsProcessorControlDialog.h"
|
||||
#include "DynamicsProcessorControls.h"
|
||||
#include "embed.h"
|
||||
#include "Graph.h"
|
||||
#include "Knob.h"
|
||||
@@ -34,8 +34,8 @@
|
||||
#include "ToolTip.h"
|
||||
|
||||
|
||||
dynProcControlDialog::dynProcControlDialog(
|
||||
dynProcControls * _controls ) :
|
||||
DynProcControlDialog::DynProcControlDialog(
|
||||
DynProcControls * _controls ) :
|
||||
EffectControlDialog( _controls )
|
||||
{
|
||||
setAutoFillBackground( true );
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* dynamics_processor_control_dialog.h - control-dialog for dynamics_processor-effect
|
||||
* DynamicsProcessorControlDialog.h - control-dialog for DynamicsProcessor-effect
|
||||
*
|
||||
* * Copyright (c) 2014 Vesa Kivimäki <contact/dot/diizy/at/nbl/dot/fi>
|
||||
* Copyright (c) 2006-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
@@ -29,15 +29,15 @@
|
||||
#include "EffectControlDialog.h"
|
||||
|
||||
|
||||
class dynProcControls;
|
||||
class DynProcControls;
|
||||
|
||||
|
||||
class dynProcControlDialog : public EffectControlDialog
|
||||
class DynProcControlDialog : public EffectControlDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
dynProcControlDialog( dynProcControls * _controls );
|
||||
virtual ~dynProcControlDialog()
|
||||
DynProcControlDialog( DynProcControls * _controls );
|
||||
virtual ~DynProcControlDialog()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* dynamics_processor_controls.cpp - controls for dynamics_processor-effect
|
||||
* DynamicsProcessorControls.cpp - controls for DynamicsProcessor-effect
|
||||
*
|
||||
* Copyright (c) 2014 Vesa Kivimäki <contact/dot/diizy/at/nbl/dot/fi>
|
||||
* Copyright (c) 2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
@@ -26,8 +26,8 @@
|
||||
|
||||
#include <QDomElement>
|
||||
|
||||
#include "dynamics_processor_controls.h"
|
||||
#include "dynamics_processor.h"
|
||||
#include "DynamicsProcessorControls.h"
|
||||
#include "DynamicsProcessor.h"
|
||||
#include "base64.h"
|
||||
#include "Graph.h"
|
||||
#include "Engine.h"
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
#define onedB 1.1220184543019633f
|
||||
|
||||
dynProcControls::dynProcControls( dynProcEffect * _eff ) :
|
||||
DynProcControls::DynProcControls( DynProcEffect * _eff ) :
|
||||
EffectControls( _eff ),
|
||||
m_effect( _eff ),
|
||||
m_inputModel( 1.0f, 0.0f, 5.0f, 0.01f, this, tr( "Input gain" ) ),
|
||||
@@ -55,13 +55,13 @@ dynProcControls::dynProcControls( dynProcEffect * _eff ) :
|
||||
}
|
||||
|
||||
|
||||
void dynProcControls::sampleRateChanged()
|
||||
void DynProcControls::sampleRateChanged()
|
||||
{
|
||||
m_effect->m_needsUpdate = true;
|
||||
}
|
||||
|
||||
|
||||
void dynProcControls::samplesChanged( int _begin, int _end)
|
||||
void DynProcControls::samplesChanged( int _begin, int _end)
|
||||
{
|
||||
Engine::getSong()->setModified();
|
||||
}
|
||||
@@ -69,7 +69,7 @@ void dynProcControls::samplesChanged( int _begin, int _end)
|
||||
|
||||
|
||||
|
||||
void dynProcControls::loadSettings( const QDomElement & _this )
|
||||
void DynProcControls::loadSettings( const QDomElement & _this )
|
||||
{
|
||||
//load knobs, stereomode
|
||||
m_inputModel.loadSettings( _this, "inputGain" );
|
||||
@@ -91,7 +91,7 @@ void dynProcControls::loadSettings( const QDomElement & _this )
|
||||
|
||||
|
||||
|
||||
void dynProcControls::saveSettings( QDomDocument & _doc,
|
||||
void DynProcControls::saveSettings( QDomDocument & _doc,
|
||||
QDomElement & _this )
|
||||
{
|
||||
//save input, output knobs
|
||||
@@ -111,7 +111,7 @@ void dynProcControls::saveSettings( QDomDocument & _doc,
|
||||
}
|
||||
|
||||
|
||||
void dynProcControls::setDefaultShape()
|
||||
void DynProcControls::setDefaultShape()
|
||||
{
|
||||
float shp [200] = { };
|
||||
for ( int i = 0; i<200; i++)
|
||||
@@ -123,19 +123,19 @@ void dynProcControls::setDefaultShape()
|
||||
m_wavegraphModel.setSamples( (float*)&shp );
|
||||
}
|
||||
|
||||
void dynProcControls::resetClicked()
|
||||
void DynProcControls::resetClicked()
|
||||
{
|
||||
setDefaultShape();
|
||||
Engine::getSong()->setModified();
|
||||
}
|
||||
|
||||
void dynProcControls::smoothClicked()
|
||||
void DynProcControls::smoothClicked()
|
||||
{
|
||||
m_wavegraphModel.smoothNonCyclic();
|
||||
Engine::getSong()->setModified();
|
||||
}
|
||||
|
||||
void dynProcControls::addOneClicked()
|
||||
void DynProcControls::addOneClicked()
|
||||
{
|
||||
for( int i=0; i<200; i++ )
|
||||
{
|
||||
@@ -144,7 +144,7 @@ void dynProcControls::addOneClicked()
|
||||
Engine::getSong()->setModified();
|
||||
}
|
||||
|
||||
void dynProcControls::subOneClicked()
|
||||
void DynProcControls::subOneClicked()
|
||||
{
|
||||
for( int i=0; i<200; i++ )
|
||||
{
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* dynamics_processor_controls.h - controls for dynamics_processor-effect
|
||||
* DynamicsProcessorControls.h - controls for DynamicsProcessor-effect
|
||||
*
|
||||
* Copyright (c) 2014 Vesa Kivimäki <contact/dot/diizy/at/nbl/dot/fi>
|
||||
* Copyright (c) 2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
@@ -27,13 +27,13 @@
|
||||
#define DYNPROC_CONTROLS_H
|
||||
|
||||
#include "EffectControls.h"
|
||||
#include "dynamics_processor_control_dialog.h"
|
||||
#include "DynamicsProcessorControlDialog.h"
|
||||
#include "Graph.h"
|
||||
|
||||
class dynProcEffect;
|
||||
class DynProcEffect;
|
||||
|
||||
|
||||
class dynProcControls : public EffectControls
|
||||
class DynProcControls : public EffectControls
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
@@ -44,8 +44,8 @@ public:
|
||||
SM_Unlinked,
|
||||
NumStereoModes
|
||||
};
|
||||
dynProcControls( dynProcEffect * _eff );
|
||||
virtual ~dynProcControls()
|
||||
DynProcControls( DynProcEffect * _eff );
|
||||
virtual ~DynProcControls()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ public:
|
||||
|
||||
virtual EffectControlDialog * createView()
|
||||
{
|
||||
return( new dynProcControlDialog( this ) );
|
||||
return( new DynProcControlDialog( this ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ private slots:
|
||||
void subOneClicked();
|
||||
|
||||
private:
|
||||
dynProcEffect * m_effect;
|
||||
DynProcEffect * m_effect;
|
||||
|
||||
FloatModel m_inputModel;
|
||||
FloatModel m_outputModel;
|
||||
@@ -89,8 +89,8 @@ private:
|
||||
graphModel m_wavegraphModel;
|
||||
IntModel m_stereomodeModel;
|
||||
|
||||
friend class dynProcControlDialog;
|
||||
friend class dynProcEffect;
|
||||
friend class DynProcControlDialog;
|
||||
friend class DynProcEffect;
|
||||
|
||||
} ;
|
||||
|
||||
|
Before Width: | Height: | Size: 555 B After Width: | Height: | Size: 555 B |
|
Before Width: | Height: | Size: 573 B After Width: | Height: | Size: 573 B |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 774 B After Width: | Height: | Size: 774 B |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 563 B After Width: | Height: | Size: 563 B |
|
Before Width: | Height: | Size: 581 B After Width: | Height: | Size: 581 B |
|
Before Width: | Height: | Size: 674 B After Width: | Height: | Size: 674 B |
|
Before Width: | Height: | Size: 699 B After Width: | Height: | Size: 699 B |
|
Before Width: | Height: | Size: 525 B After Width: | Height: | Size: 525 B |
|
Before Width: | Height: | Size: 555 B After Width: | Height: | Size: 555 B |
|
Before Width: | Height: | Size: 927 B After Width: | Height: | Size: 927 B |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
3
plugins/Kicker/CMakeLists.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
INCLUDE(BuildPlugin)
|
||||
|
||||
BUILD_PLUGIN(kicker Kicker.cpp Kicker.h MOCFILES Kicker.h EMBEDDED_RESOURCES artwork.png logo.png)
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* kicker.cpp - drum synthesizer
|
||||
* Kicker.cpp - drum synthesizer
|
||||
*
|
||||
* Copyright (c) 2006-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2014 grejppi <grejppi/at/gmail.com>
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
#include <QDomElement>
|
||||
|
||||
#include "kicker.h"
|
||||
#include "Kicker.h"
|
||||
#include "AudioEngine.h"
|
||||
#include "Engine.h"
|
||||
#include "InstrumentTrack.h"
|
||||
@@ -60,7 +60,7 @@ Plugin::Descriptor PLUGIN_EXPORT kicker_plugin_descriptor =
|
||||
}
|
||||
|
||||
|
||||
kickerInstrument::kickerInstrument( InstrumentTrack * _instrument_track ) :
|
||||
KickerInstrument::KickerInstrument( InstrumentTrack * _instrument_track ) :
|
||||
Instrument( _instrument_track, &kicker_plugin_descriptor ),
|
||||
m_startFreqModel( 150.0f, 5.0f, 1000.0f, 1.0f, this, tr( "Start frequency" ) ),
|
||||
m_endFreqModel( 40.0f, 5.0f, 1000.0f, 1.0f, this, tr( "End frequency" ) ),
|
||||
@@ -81,14 +81,14 @@ kickerInstrument::kickerInstrument( InstrumentTrack * _instrument_track ) :
|
||||
|
||||
|
||||
|
||||
kickerInstrument::~kickerInstrument()
|
||||
KickerInstrument::~KickerInstrument()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void kickerInstrument::saveSettings( QDomDocument & _doc,
|
||||
void KickerInstrument::saveSettings( QDomDocument & _doc,
|
||||
QDomElement & _this )
|
||||
{
|
||||
m_startFreqModel.saveSettings( _doc, _this, "startfreq" );
|
||||
@@ -109,7 +109,7 @@ void kickerInstrument::saveSettings( QDomDocument & _doc,
|
||||
|
||||
|
||||
|
||||
void kickerInstrument::loadSettings( const QDomElement & _this )
|
||||
void KickerInstrument::loadSettings( const QDomElement & _this )
|
||||
{
|
||||
m_versionModel.loadSettings( _this, "version" );
|
||||
|
||||
@@ -152,7 +152,7 @@ void kickerInstrument::loadSettings( const QDomElement & _this )
|
||||
|
||||
|
||||
|
||||
QString kickerInstrument::nodeName() const
|
||||
QString KickerInstrument::nodeName() const
|
||||
{
|
||||
return kicker_plugin_descriptor.name;
|
||||
}
|
||||
@@ -163,7 +163,7 @@ typedef DspEffectLibrary::Distortion DistFX;
|
||||
typedef KickerOsc<DspEffectLibrary::MonoToStereoAdaptor<DistFX> > SweepOsc;
|
||||
|
||||
|
||||
void kickerInstrument::playNote( NotePlayHandle * _n,
|
||||
void KickerInstrument::playNote( NotePlayHandle * _n,
|
||||
sampleFrame * _working_buffer )
|
||||
{
|
||||
const fpp_t frames = _n->framesLeftForCurrentPeriod();
|
||||
@@ -212,7 +212,7 @@ void kickerInstrument::playNote( NotePlayHandle * _n,
|
||||
|
||||
|
||||
|
||||
void kickerInstrument::deleteNotePluginData( NotePlayHandle * _n )
|
||||
void KickerInstrument::deleteNotePluginData( NotePlayHandle * _n )
|
||||
{
|
||||
delete static_cast<SweepOsc *>( _n->m_pluginData );
|
||||
}
|
||||
@@ -220,18 +220,18 @@ void kickerInstrument::deleteNotePluginData( NotePlayHandle * _n )
|
||||
|
||||
|
||||
|
||||
PluginView * kickerInstrument::instantiateView( QWidget * _parent )
|
||||
PluginView * KickerInstrument::instantiateView( QWidget * _parent )
|
||||
{
|
||||
return new kickerInstrumentView( this, _parent );
|
||||
return new KickerInstrumentView( this, _parent );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
class kickerKnob : public Knob
|
||||
class KickerKnob : public Knob
|
||||
{
|
||||
public:
|
||||
kickerKnob( QWidget * _parent ) :
|
||||
KickerKnob( QWidget * _parent ) :
|
||||
Knob( knobStyled, _parent )
|
||||
{
|
||||
setFixedSize( 29, 29 );
|
||||
@@ -240,10 +240,10 @@ public:
|
||||
};
|
||||
|
||||
|
||||
class kickerEnvKnob : public TempoSyncKnob
|
||||
class KickerEnvKnob : public TempoSyncKnob
|
||||
{
|
||||
public:
|
||||
kickerEnvKnob( QWidget * _parent ) :
|
||||
KickerEnvKnob( QWidget * _parent ) :
|
||||
TempoSyncKnob( knobStyled, _parent )
|
||||
{
|
||||
setFixedSize( 29, 29 );
|
||||
@@ -252,10 +252,10 @@ public:
|
||||
};
|
||||
|
||||
|
||||
class kickerLargeKnob : public Knob
|
||||
class KickerLargeKnob : public Knob
|
||||
{
|
||||
public:
|
||||
kickerLargeKnob( QWidget * _parent ) :
|
||||
KickerLargeKnob( QWidget * _parent ) :
|
||||
Knob( knobStyled, _parent )
|
||||
{
|
||||
setFixedSize( 34, 34 );
|
||||
@@ -266,7 +266,7 @@ public:
|
||||
|
||||
|
||||
|
||||
kickerInstrumentView::kickerInstrumentView( Instrument * _instrument,
|
||||
KickerInstrumentView::KickerInstrumentView( Instrument * _instrument,
|
||||
QWidget * _parent ) :
|
||||
InstrumentViewFixedSize( _instrument, _parent )
|
||||
{
|
||||
@@ -281,43 +281,43 @@ kickerInstrumentView::kickerInstrumentView( Instrument * _instrument,
|
||||
const int COL5 = COL4 + 41;
|
||||
const int END_COL = COL1 + 48;
|
||||
|
||||
m_startFreqKnob = new kickerLargeKnob( this );
|
||||
m_startFreqKnob = new KickerLargeKnob( this );
|
||||
m_startFreqKnob->setHintText( tr( "Start frequency:" ), "Hz" );
|
||||
m_startFreqKnob->move( COL1, ROW1 );
|
||||
|
||||
m_endFreqKnob = new kickerLargeKnob( this );
|
||||
m_endFreqKnob = new KickerLargeKnob( this );
|
||||
m_endFreqKnob->setHintText( tr( "End frequency:" ), "Hz" );
|
||||
m_endFreqKnob->move( END_COL, ROW1 );
|
||||
|
||||
m_slopeKnob = new kickerKnob( this );
|
||||
m_slopeKnob = new KickerKnob( this );
|
||||
m_slopeKnob->setHintText( tr( "Frequency slope:" ), "" );
|
||||
m_slopeKnob->move( COL3, ROW1 );
|
||||
|
||||
m_gainKnob = new kickerKnob( this );
|
||||
m_gainKnob = new KickerKnob( this );
|
||||
m_gainKnob->setHintText( tr( "Gain:" ), "" );
|
||||
m_gainKnob->move( COL1, ROW3 );
|
||||
|
||||
m_decayKnob = new kickerEnvKnob( this );
|
||||
m_decayKnob = new KickerEnvKnob( this );
|
||||
m_decayKnob->setHintText( tr( "Envelope length:" ), "ms" );
|
||||
m_decayKnob->move( COL2, ROW3 );
|
||||
|
||||
m_envKnob = new kickerKnob( this );
|
||||
m_envKnob = new KickerKnob( this );
|
||||
m_envKnob->setHintText( tr( "Envelope slope:" ), "" );
|
||||
m_envKnob->move( COL3, ROW3 );
|
||||
|
||||
m_clickKnob = new kickerKnob( this );
|
||||
m_clickKnob = new KickerKnob( this );
|
||||
m_clickKnob->setHintText( tr( "Click:" ), "" );
|
||||
m_clickKnob->move( COL5, ROW1 );
|
||||
|
||||
m_noiseKnob = new kickerKnob( this );
|
||||
m_noiseKnob = new KickerKnob( this );
|
||||
m_noiseKnob->setHintText( tr( "Noise:" ), "" );
|
||||
m_noiseKnob->move( COL5, ROW3 );
|
||||
|
||||
m_distKnob = new kickerKnob( this );
|
||||
m_distKnob = new KickerKnob( this );
|
||||
m_distKnob->setHintText( tr( "Start distortion:" ), "" );
|
||||
m_distKnob->move( COL4, ROW2 );
|
||||
|
||||
m_distEndKnob = new kickerKnob( this );
|
||||
m_distEndKnob = new KickerKnob( this );
|
||||
m_distEndKnob->setHintText( tr( "End distortion:" ), "" );
|
||||
m_distEndKnob->move( COL5, ROW2 );
|
||||
|
||||
@@ -336,16 +336,16 @@ kickerInstrumentView::kickerInstrumentView( Instrument * _instrument,
|
||||
|
||||
|
||||
|
||||
kickerInstrumentView::~kickerInstrumentView()
|
||||
KickerInstrumentView::~KickerInstrumentView()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void kickerInstrumentView::modelChanged()
|
||||
void KickerInstrumentView::modelChanged()
|
||||
{
|
||||
kickerInstrument * k = castModel<kickerInstrument>();
|
||||
KickerInstrument * k = castModel<KickerInstrument>();
|
||||
m_startFreqKnob->setModel( &k->m_startFreqModel );
|
||||
m_endFreqKnob->setModel( &k->m_endFreqModel );
|
||||
m_decayKnob->setModel( &k->m_decayModel );
|
||||
@@ -370,7 +370,7 @@ extern "C"
|
||||
// necessary for getting instance out of shared lib
|
||||
PLUGIN_EXPORT Plugin * lmms_plugin_main( Model * m, void * )
|
||||
{
|
||||
return new kickerInstrument( static_cast<InstrumentTrack *>( m ) );
|
||||
return new KickerInstrument( static_cast<InstrumentTrack *>( m ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* kicker.h - drum synthesizer
|
||||
* Kicker.h - drum synthesizer
|
||||
*
|
||||
* Copyright (c) 2006-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2014 grejppi <grejppi/at/gmail.com>
|
||||
@@ -40,16 +40,16 @@ class LedCheckBox;
|
||||
#define KICKER_PRESET_VERSION 1
|
||||
|
||||
|
||||
class kickerInstrumentView;
|
||||
class KickerInstrumentView;
|
||||
class NotePlayHandle;
|
||||
|
||||
|
||||
class kickerInstrument : public Instrument
|
||||
class KickerInstrument : public Instrument
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
kickerInstrument( InstrumentTrack * _instrument_track );
|
||||
virtual ~kickerInstrument();
|
||||
KickerInstrument( InstrumentTrack * _instrument_track );
|
||||
virtual ~KickerInstrument();
|
||||
|
||||
virtual void playNote( NotePlayHandle * _n,
|
||||
sampleFrame * _working_buffer );
|
||||
@@ -90,18 +90,18 @@ private:
|
||||
|
||||
IntModel m_versionModel;
|
||||
|
||||
friend class kickerInstrumentView;
|
||||
friend class KickerInstrumentView;
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
class kickerInstrumentView : public InstrumentViewFixedSize
|
||||
class KickerInstrumentView : public InstrumentViewFixedSize
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
kickerInstrumentView( Instrument * _instrument, QWidget * _parent );
|
||||
virtual ~kickerInstrumentView();
|
||||
KickerInstrumentView( Instrument * _instrument, QWidget * _parent );
|
||||
virtual ~KickerInstrumentView();
|
||||
|
||||
private:
|
||||
virtual void modelChanged();
|
||||
|
Before Width: | Height: | Size: 114 KiB After Width: | Height: | Size: 114 KiB |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
3
plugins/LadspaBrowser/CMakeLists.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
INCLUDE(BuildPlugin)
|
||||
|
||||
BUILD_PLUGIN(ladspabrowser LadspaBrowser.cpp LadspaBrowser.h LadspaDescription.cpp LadspaDescription.h LadspaPortDialog.cpp LadspaPortDialog.h MOCFILES LadspaBrowser.h LadspaDescription.h LadspaPortDialog.h EMBEDDED_RESOURCES logo.png)
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* ladspa_browser.cpp - dialog to display information about installed LADSPA
|
||||
* LadspaBrowser.cpp - dialog to display information about installed LADSPA
|
||||
* plugins
|
||||
*
|
||||
* Copyright (c) 2006-2008 Danny McRae <khjklujn/at/users.sourceforge.net>
|
||||
@@ -25,7 +25,7 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "ladspa_browser.h"
|
||||
#include "LadspaBrowser.h"
|
||||
|
||||
|
||||
#include <QHBoxLayout>
|
||||
@@ -33,8 +33,8 @@
|
||||
|
||||
|
||||
#include "gui_templates.h"
|
||||
#include "ladspa_description.h"
|
||||
#include "ladspa_port_dialog.h"
|
||||
#include "LadspaDescription.h"
|
||||
#include "LadspaPortDialog.h"
|
||||
#include "TabBar.h"
|
||||
#include "TabButton.h"
|
||||
|
||||
@@ -63,7 +63,7 @@ Plugin::Descriptor PLUGIN_EXPORT ladspabrowser_plugin_descriptor =
|
||||
// necessary for getting instance out of shared lib
|
||||
PLUGIN_EXPORT Plugin * lmms_plugin_main( Model * _parent, void * _data )
|
||||
{
|
||||
return new ladspaBrowser;
|
||||
return new LadspaBrowser;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -71,7 +71,7 @@ PLUGIN_EXPORT Plugin * lmms_plugin_main( Model * _parent, void * _data )
|
||||
|
||||
|
||||
|
||||
ladspaBrowser::ladspaBrowser() :
|
||||
LadspaBrowser::LadspaBrowser() :
|
||||
ToolPlugin( &ladspabrowser_plugin_descriptor, nullptr )
|
||||
{
|
||||
}
|
||||
@@ -79,14 +79,14 @@ ladspaBrowser::ladspaBrowser() :
|
||||
|
||||
|
||||
|
||||
ladspaBrowser::~ladspaBrowser()
|
||||
LadspaBrowser::~LadspaBrowser()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
QString ladspaBrowser::nodeName() const
|
||||
QString LadspaBrowser::nodeName() const
|
||||
{
|
||||
return ladspabrowser_plugin_descriptor.name;
|
||||
}
|
||||
@@ -96,7 +96,7 @@ QString ladspaBrowser::nodeName() const
|
||||
|
||||
|
||||
|
||||
ladspaBrowserView::ladspaBrowserView( ToolPlugin * _tool ) :
|
||||
LadspaBrowserView::LadspaBrowserView( ToolPlugin * _tool ) :
|
||||
ToolPluginView( _tool )
|
||||
{
|
||||
QHBoxLayout * hlayout = new QHBoxLayout( this );
|
||||
@@ -162,15 +162,15 @@ ladspaBrowserView::ladspaBrowserView( ToolPlugin * _tool ) :
|
||||
|
||||
|
||||
|
||||
ladspaBrowserView::~ladspaBrowserView()
|
||||
LadspaBrowserView::~LadspaBrowserView()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
QWidget * ladspaBrowserView::createTab( QWidget * _parent, const QString & _txt,
|
||||
ladspaPluginType _type )
|
||||
QWidget * LadspaBrowserView::createTab( QWidget * _parent, const QString & _txt,
|
||||
LadspaPluginType _type )
|
||||
{
|
||||
QWidget * tab = new QWidget( _parent );
|
||||
tab->setFixedSize( 500, 400 );
|
||||
@@ -188,7 +188,7 @@ QWidget * ladspaBrowserView::createTab( QWidget * _parent, const QString & _txt,
|
||||
layout->addWidget( title );
|
||||
layout->addSpacing( 10 );
|
||||
|
||||
ladspaDescription * description = new ladspaDescription( tab, _type );
|
||||
LadspaDescription * description = new LadspaDescription( tab, _type );
|
||||
connect( description, SIGNAL( doubleClicked( const ladspa_key_t & ) ),
|
||||
SLOT( showPorts( const ladspa_key_t & ) ) );
|
||||
layout->addWidget( description, 1 );
|
||||
@@ -199,9 +199,9 @@ QWidget * ladspaBrowserView::createTab( QWidget * _parent, const QString & _txt,
|
||||
|
||||
|
||||
|
||||
void ladspaBrowserView::showPorts( const ladspa_key_t & _key )
|
||||
void LadspaBrowserView::showPorts( const ladspa_key_t & _key )
|
||||
{
|
||||
ladspaPortDialog ports( _key );
|
||||
LadspaPortDialog ports( _key );
|
||||
ports.exec();
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* ladspa_browser.h - dialog to display information about installed LADSPA
|
||||
* LadspaBrowser.h - dialog to display information about installed LADSPA
|
||||
* plugins
|
||||
*
|
||||
* Copyright (c) 2006-2008 Danny McRae <khjklujn/at/users.sourceforge.net>
|
||||
@@ -34,12 +34,12 @@
|
||||
class TabBar;
|
||||
|
||||
|
||||
class ladspaBrowserView : public ToolPluginView
|
||||
class LadspaBrowserView : public ToolPluginView
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ladspaBrowserView( ToolPlugin * _tool );
|
||||
virtual ~ladspaBrowserView();
|
||||
LadspaBrowserView( ToolPlugin * _tool );
|
||||
virtual ~LadspaBrowserView();
|
||||
|
||||
|
||||
public slots:
|
||||
@@ -50,20 +50,20 @@ private:
|
||||
TabBar * m_tabBar;
|
||||
|
||||
QWidget * createTab( QWidget * _parent, const QString & _txt,
|
||||
ladspaPluginType _type );
|
||||
LadspaPluginType _type );
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
class ladspaBrowser : public ToolPlugin
|
||||
class LadspaBrowser : public ToolPlugin
|
||||
{
|
||||
public:
|
||||
ladspaBrowser();
|
||||
virtual ~ladspaBrowser();
|
||||
LadspaBrowser();
|
||||
virtual ~LadspaBrowser();
|
||||
|
||||
virtual PluginView * instantiateView( QWidget * )
|
||||
{
|
||||
return new ladspaBrowserView( this );
|
||||
return new LadspaBrowserView( this );
|
||||
}
|
||||
|
||||
virtual QString nodeName() const;
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* ladspa_description.cpp - LADSPA plugin description
|
||||
* LadspaDescription.cpp - LADSPA plugin description
|
||||
*
|
||||
* Copyright (c) 2007 Javier Serrano Polo <jasp00/at/users.sourceforge.net>
|
||||
*
|
||||
@@ -22,7 +22,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "ladspa_description.h"
|
||||
#include "LadspaDescription.h"
|
||||
|
||||
#include <QGroupBox>
|
||||
#include <QLabel>
|
||||
@@ -37,8 +37,8 @@
|
||||
|
||||
|
||||
|
||||
ladspaDescription::ladspaDescription( QWidget * _parent,
|
||||
ladspaPluginType _type ) :
|
||||
LadspaDescription::LadspaDescription( QWidget * _parent,
|
||||
LadspaPluginType _type ) :
|
||||
QWidget( _parent )
|
||||
{
|
||||
Ladspa2LMMS * manager = Engine::getLADSPAManager();
|
||||
@@ -113,14 +113,14 @@ ladspaDescription::ladspaDescription( QWidget * _parent,
|
||||
|
||||
|
||||
|
||||
ladspaDescription::~ladspaDescription()
|
||||
LadspaDescription::~LadspaDescription()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void ladspaDescription::update( const ladspa_key_t & _key )
|
||||
void LadspaDescription::update( const ladspa_key_t & _key )
|
||||
{
|
||||
QWidget * description = new QWidget;
|
||||
m_scrollArea->setWidget( description );
|
||||
@@ -200,7 +200,7 @@ void ladspaDescription::update( const ladspa_key_t & _key )
|
||||
|
||||
|
||||
|
||||
void ladspaDescription::rowChanged( int _pluginIndex )
|
||||
void LadspaDescription::rowChanged( int _pluginIndex )
|
||||
{
|
||||
m_currentSelection = m_pluginKeys[_pluginIndex];
|
||||
update( m_currentSelection );
|
||||
@@ -209,7 +209,7 @@ void ladspaDescription::rowChanged( int _pluginIndex )
|
||||
|
||||
|
||||
|
||||
void ladspaDescription::onDoubleClicked( QListWidgetItem * _item )
|
||||
void LadspaDescription::onDoubleClicked( QListWidgetItem * _item )
|
||||
{
|
||||
emit( doubleClicked( m_currentSelection ) );
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* ladspa_description.h - LADSPA plugin description
|
||||
* LadspaDescription.h - LADSPA plugin description
|
||||
*
|
||||
* Copyright (c) 2007 Javier Serrano Polo <jasp00/at/users.sourceforge.net>
|
||||
*
|
||||
@@ -36,12 +36,12 @@ class QListWidgetItem;
|
||||
class QScrollArea;
|
||||
|
||||
|
||||
class ladspaDescription : public QWidget
|
||||
class LadspaDescription : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ladspaDescription( QWidget * _parent, ladspaPluginType _type );
|
||||
virtual ~ladspaDescription();
|
||||
LadspaDescription( QWidget * _parent, LadspaPluginType _type );
|
||||
virtual ~LadspaDescription();
|
||||
|
||||
|
||||
signals:
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* ladspa_port_dialog.cpp - dialog to test a LADSPA plugin
|
||||
* LadspaPortDialog.cpp - dialog to test a LADSPA plugin
|
||||
*
|
||||
* Copyright (c) 2006-2008 Danny McRae <khjklujn/at/users.sourceforge.net>
|
||||
*
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "ladspa_port_dialog.h"
|
||||
#include "LadspaPortDialog.h"
|
||||
|
||||
#include <QTableWidget>
|
||||
#include <QVBoxLayout>
|
||||
@@ -34,7 +34,7 @@
|
||||
#include "Ladspa2LMMS.h"
|
||||
|
||||
|
||||
ladspaPortDialog::ladspaPortDialog( const ladspa_key_t & _key )
|
||||
LadspaPortDialog::LadspaPortDialog( const ladspa_key_t & _key )
|
||||
{
|
||||
Ladspa2LMMS * manager = Engine::getLADSPAManager();
|
||||
|
||||
@@ -165,7 +165,7 @@ ladspaPortDialog::ladspaPortDialog( const ladspa_key_t & _key )
|
||||
|
||||
|
||||
|
||||
ladspaPortDialog::~ladspaPortDialog()
|
||||
LadspaPortDialog::~LadspaPortDialog()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* ladspa_port_dialog.h - dialog to test a LADSPA plugin
|
||||
* LadspaPortDialog.h - dialog to test a LADSPA plugin
|
||||
*
|
||||
* Copyright (c) 2006-2007 Danny McRae <khjklujn/at/users.sourceforge.net>
|
||||
*
|
||||
@@ -34,12 +34,12 @@
|
||||
|
||||
|
||||
|
||||
class ladspaPortDialog : public QDialog
|
||||
class LadspaPortDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ladspaPortDialog( const ladspa_key_t & _key );
|
||||
virtual ~ladspaPortDialog();
|
||||
LadspaPortDialog( const ladspa_key_t & _key );
|
||||
virtual ~LadspaPortDialog();
|
||||
|
||||
};
|
||||
|
||||
|
Before Width: | Height: | Size: 980 B After Width: | Height: | Size: 980 B |
3
plugins/Lb302/CMakeLists.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
INCLUDE(BuildPlugin)
|
||||
|
||||
BUILD_PLUGIN(lb302 Lb302.cpp Lb302.h MOCFILES Lb302.h EMBEDDED_RESOURCES artwork.png logo.png)
|
||||
@@ -1,14 +1,14 @@
|
||||
/*
|
||||
* lb302.cpp - implementation of class lb302 which is a bass synth attempting
|
||||
* Lb302.cpp - implementation of class Lb302 which is a bass synth attempting
|
||||
* to emulate the Roland TB-303 bass synth
|
||||
*
|
||||
* Copyright (c) 2006-2008 Paul Giblock <pgib/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of LMMS - https://lmms.io
|
||||
*
|
||||
* lb302FilterIIR2 is based on the gsyn filter code by Andy Sloane.
|
||||
* Lb302FilterIIR2 is based on the gsyn filter code by Andy Sloane.
|
||||
*
|
||||
* lb302Filter3Pole is based on the TB-303 instrument written by
|
||||
* Lb302Filter3Pole is based on the TB-303 instrument written by
|
||||
* Josep M Comajuncosas for the CSounds library
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
@@ -32,7 +32,7 @@
|
||||
#define _USE_MATH_DEFINES
|
||||
#include <cmath>
|
||||
|
||||
#include "lb302.h"
|
||||
#include "Lb302.h"
|
||||
#include "AutomatableButton.h"
|
||||
#include "Engine.h"
|
||||
#include "InstrumentPlayHandle.h"
|
||||
@@ -93,10 +93,10 @@ Plugin::Descriptor PLUGIN_EXPORT lb302_plugin_descriptor =
|
||||
}
|
||||
|
||||
//
|
||||
// lb302Filter
|
||||
// Lb302Filter
|
||||
//
|
||||
|
||||
lb302Filter::lb302Filter(lb302FilterKnobState* p_fs) :
|
||||
Lb302Filter::Lb302Filter(Lb302FilterKnobState* p_fs) :
|
||||
fs(p_fs),
|
||||
vcf_c0(0),
|
||||
vcf_e0(0),
|
||||
@@ -105,7 +105,7 @@ lb302Filter::lb302Filter(lb302FilterKnobState* p_fs) :
|
||||
};
|
||||
|
||||
|
||||
void lb302Filter::recalc()
|
||||
void Lb302Filter::recalc()
|
||||
{
|
||||
vcf_e1 = exp(6.109 + 1.5876*(fs->envmod) + 2.1553*(fs->cutoff) - 1.2*(1.0-(fs->reso)));
|
||||
vcf_e0 = exp(5.613 - 0.8*(fs->envmod) + 2.1553*(fs->cutoff) - 0.7696*(1.0-(fs->reso)));
|
||||
@@ -117,25 +117,25 @@ void lb302Filter::recalc()
|
||||
};
|
||||
|
||||
|
||||
void lb302Filter::envRecalc()
|
||||
void Lb302Filter::envRecalc()
|
||||
{
|
||||
vcf_c0 *= fs->envdecay; // Filter Decay. vcf_decay is adjusted for Hz and ENVINC
|
||||
// vcf_rescoeff = exp(-1.20 + 3.455*(fs->reso)); moved above
|
||||
};
|
||||
|
||||
|
||||
void lb302Filter::playNote()
|
||||
void Lb302Filter::playNote()
|
||||
{
|
||||
vcf_c0 = vcf_e1;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// lb302FilterIIR2
|
||||
// Lb302FilterIIR2
|
||||
//
|
||||
|
||||
lb302FilterIIR2::lb302FilterIIR2(lb302FilterKnobState* p_fs) :
|
||||
lb302Filter(p_fs),
|
||||
Lb302FilterIIR2::Lb302FilterIIR2(Lb302FilterKnobState* p_fs) :
|
||||
Lb302Filter(p_fs),
|
||||
vcf_d1(0),
|
||||
vcf_d2(0),
|
||||
vcf_a(0),
|
||||
@@ -148,25 +148,25 @@ lb302FilterIIR2::lb302FilterIIR2(lb302FilterKnobState* p_fs) :
|
||||
};
|
||||
|
||||
|
||||
lb302FilterIIR2::~lb302FilterIIR2()
|
||||
Lb302FilterIIR2::~Lb302FilterIIR2()
|
||||
{
|
||||
delete m_dist;
|
||||
}
|
||||
|
||||
|
||||
void lb302FilterIIR2::recalc()
|
||||
void Lb302FilterIIR2::recalc()
|
||||
{
|
||||
lb302Filter::recalc();
|
||||
Lb302Filter::recalc();
|
||||
//m_dist->setThreshold(0.5+(fs->dist*2.0));
|
||||
m_dist->setThreshold(fs->dist*75.0);
|
||||
};
|
||||
|
||||
|
||||
void lb302FilterIIR2::envRecalc()
|
||||
void Lb302FilterIIR2::envRecalc()
|
||||
{
|
||||
float k, w;
|
||||
|
||||
lb302Filter::envRecalc();
|
||||
Lb302Filter::envRecalc();
|
||||
|
||||
w = vcf_e0 + vcf_c0; // e0 is adjusted for Hz and doesn't need ENVINC
|
||||
k = exp(-w/vcf_rescoeff); // Does this mean c0 is inheritantly?
|
||||
@@ -177,7 +177,7 @@ void lb302FilterIIR2::envRecalc()
|
||||
}
|
||||
|
||||
|
||||
float lb302FilterIIR2::process(const float& samp)
|
||||
float Lb302FilterIIR2::process(const float& samp)
|
||||
{
|
||||
float ret = vcf_a*vcf_d1 + vcf_b*vcf_d2 + vcf_c*samp;
|
||||
// Delayed samples for filter
|
||||
@@ -193,11 +193,11 @@ float lb302FilterIIR2::process(const float& samp)
|
||||
|
||||
|
||||
//
|
||||
// lb302Filter3Pole
|
||||
// Lb302Filter3Pole
|
||||
//
|
||||
|
||||
lb302Filter3Pole::lb302Filter3Pole(lb302FilterKnobState *p_fs) :
|
||||
lb302Filter(p_fs),
|
||||
Lb302Filter3Pole::Lb302Filter3Pole(Lb302FilterKnobState *p_fs) :
|
||||
Lb302Filter(p_fs),
|
||||
ay1(0),
|
||||
ay2(0),
|
||||
aout(0),
|
||||
@@ -206,7 +206,7 @@ lb302Filter3Pole::lb302Filter3Pole(lb302FilterKnobState *p_fs) :
|
||||
};
|
||||
|
||||
|
||||
void lb302Filter3Pole::recalc()
|
||||
void Lb302Filter3Pole::recalc()
|
||||
{
|
||||
// DO NOT CALL BASE CLASS
|
||||
vcf_e0 = 0.000001;
|
||||
@@ -215,18 +215,18 @@ void lb302Filter3Pole::recalc()
|
||||
|
||||
|
||||
// TODO: Try using k instead of vcf_reso
|
||||
void lb302Filter3Pole::envRecalc()
|
||||
void Lb302Filter3Pole::envRecalc()
|
||||
{
|
||||
float w,k;
|
||||
float kfco;
|
||||
|
||||
lb302Filter::envRecalc();
|
||||
Lb302Filter::envRecalc();
|
||||
|
||||
// e0 is adjusted for Hz and doesn't need ENVINC
|
||||
w = vcf_e0 + vcf_c0;
|
||||
k = (fs->cutoff > 0.975)?0.975:fs->cutoff;
|
||||
// sampleRateCutoff should not be changed to anything dynamic that is outside the
|
||||
// scope of lb302 (like e.g. the audio engine's sample rate) as this changes the filter's cutoff
|
||||
// scope of LB302 (like e.g. the audio engine's sample rate) as this changes the filter's cutoff
|
||||
// behavior without any modification to its controls.
|
||||
kfco = 50.f + (k)*((2300.f-1600.f*(fs->envmod))+(w) *
|
||||
(700.f+1500.f*(k)+(1500.f+(k)*(sampleRateCutoff/2.f-6000.f)) *
|
||||
@@ -253,7 +253,7 @@ void lb302Filter3Pole::envRecalc()
|
||||
}
|
||||
|
||||
|
||||
float lb302Filter3Pole::process(const float& samp)
|
||||
float Lb302Filter3Pole::process(const float& samp)
|
||||
{
|
||||
float ax1 = lastin;
|
||||
float ay11 = ay1;
|
||||
@@ -271,7 +271,7 @@ float lb302Filter3Pole::process(const float& samp)
|
||||
// LBSynth
|
||||
//
|
||||
|
||||
lb302Synth::lb302Synth( InstrumentTrack * _instrumentTrack ) :
|
||||
Lb302Synth::Lb302Synth( InstrumentTrack * _instrumentTrack ) :
|
||||
Instrument( _instrumentTrack, &lb302_plugin_descriptor ),
|
||||
vcf_cut_knob( 0.75f, 0.0f, 1.5f, 0.005f, this, tr( "VCF Cutoff Frequency" ) ),
|
||||
vcf_res_knob( 0.75f, 0.0f, 1.25f, 0.005f, this, tr( "VCF Resonance" ) ),
|
||||
@@ -332,8 +332,8 @@ lb302Synth::lb302Synth( InstrumentTrack * _instrumentTrack ) :
|
||||
|
||||
vco_shape = BL_SAWTOOTH;
|
||||
|
||||
vcfs[0] = new lb302FilterIIR2(&fs);
|
||||
vcfs[1] = new lb302Filter3Pole(&fs);
|
||||
vcfs[0] = new Lb302FilterIIR2(&fs);
|
||||
vcfs[1] = new Lb302Filter3Pole(&fs);
|
||||
db24Toggled();
|
||||
|
||||
sample_cnt = 0;
|
||||
@@ -352,7 +352,7 @@ lb302Synth::lb302Synth( InstrumentTrack * _instrumentTrack ) :
|
||||
}
|
||||
|
||||
|
||||
lb302Synth::~lb302Synth()
|
||||
Lb302Synth::~Lb302Synth()
|
||||
{
|
||||
for (int i=0; i<NUM_FILTERS; ++i) {
|
||||
delete vcfs[i];
|
||||
@@ -360,7 +360,7 @@ lb302Synth::~lb302Synth()
|
||||
}
|
||||
|
||||
|
||||
void lb302Synth::saveSettings( QDomDocument & _doc,
|
||||
void Lb302Synth::saveSettings( QDomDocument & _doc,
|
||||
QDomElement & _this )
|
||||
{
|
||||
vcf_cut_knob.saveSettings( _doc, _this, "vcf_cut" );
|
||||
@@ -378,7 +378,7 @@ void lb302Synth::saveSettings( QDomDocument & _doc,
|
||||
}
|
||||
|
||||
|
||||
void lb302Synth::loadSettings( const QDomElement & _this )
|
||||
void Lb302Synth::loadSettings( const QDomElement & _this )
|
||||
{
|
||||
vcf_cut_knob.loadSettings( _this, "vcf_cut" );
|
||||
vcf_res_knob.loadSettings( _this, "vcf_res" );
|
||||
@@ -398,7 +398,7 @@ void lb302Synth::loadSettings( const QDomElement & _this )
|
||||
|
||||
// TODO: Split into one function per knob. envdecay doesn't require
|
||||
// recalcFilter.
|
||||
void lb302Synth::filterChanged()
|
||||
void Lb302Synth::filterChanged()
|
||||
{
|
||||
fs.cutoff = vcf_cut_knob.value();
|
||||
fs.reso = vcf_res_knob.value();
|
||||
@@ -415,7 +415,7 @@ void lb302Synth::filterChanged()
|
||||
}
|
||||
|
||||
|
||||
void lb302Synth::db24Toggled()
|
||||
void Lb302Synth::db24Toggled()
|
||||
{
|
||||
vcf = vcfs[db24Toggle.value()];
|
||||
// These recalcFilter calls might suck
|
||||
@@ -424,14 +424,14 @@ void lb302Synth::db24Toggled()
|
||||
|
||||
|
||||
|
||||
QString lb302Synth::nodeName() const
|
||||
QString Lb302Synth::nodeName() const
|
||||
{
|
||||
return( lb302_plugin_descriptor.name );
|
||||
}
|
||||
|
||||
|
||||
// OBSOLETE. Break apart once we get Q_OBJECT to work. >:[
|
||||
void lb302Synth::recalcFilter()
|
||||
void Lb302Synth::recalcFilter()
|
||||
{
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5,14,0))
|
||||
vcf.loadRelaxed()->recalc();
|
||||
@@ -455,14 +455,14 @@ inline float GET_INC(float freq) {
|
||||
return freq/Engine::audioEngine()->processingSampleRate(); // TODO: Use actual sampling rate.
|
||||
}
|
||||
|
||||
int lb302Synth::process(sampleFrame *outbuf, const int size)
|
||||
int Lb302Synth::process(sampleFrame *outbuf, const int size)
|
||||
{
|
||||
const float sampleRatio = 44100.f / Engine::audioEngine()->processingSampleRate();
|
||||
float w;
|
||||
float samp;
|
||||
|
||||
// Hold on to the current VCF, and use it throughout this period
|
||||
lb302Filter *filter = vcf.loadAcquire();
|
||||
Lb302Filter *filter = vcf.loadAcquire();
|
||||
|
||||
if( release_frame == 0 || ! m_playingNote )
|
||||
{
|
||||
@@ -472,7 +472,7 @@ int lb302Synth::process(sampleFrame *outbuf, const int size)
|
||||
if( new_freq )
|
||||
{
|
||||
//printf(" playing new note..\n");
|
||||
lb302Note note;
|
||||
Lb302Note note;
|
||||
note.vco_inc = GET_INC( true_freq );
|
||||
note.dead = deadToggle.value();
|
||||
initNote(¬e);
|
||||
@@ -655,7 +655,7 @@ int lb302Synth::process(sampleFrame *outbuf, const int size)
|
||||
* to be called from process() when a prior edge-to-edge note is done releasing.
|
||||
*/
|
||||
|
||||
void lb302Synth::initNote( lb302Note *n)
|
||||
void Lb302Synth::initNote( Lb302Note *n)
|
||||
{
|
||||
catch_decay = 0;
|
||||
|
||||
@@ -701,7 +701,7 @@ void lb302Synth::initNote( lb302Note *n)
|
||||
}
|
||||
|
||||
|
||||
void lb302Synth::initSlide()
|
||||
void Lb302Synth::initSlide()
|
||||
{
|
||||
// Initiate Slide
|
||||
if (vco_slideinc) {
|
||||
@@ -716,7 +716,7 @@ void lb302Synth::initSlide()
|
||||
}
|
||||
|
||||
|
||||
void lb302Synth::playNote( NotePlayHandle * _n, sampleFrame * _working_buffer )
|
||||
void Lb302Synth::playNote( NotePlayHandle * _n, sampleFrame * _working_buffer )
|
||||
{
|
||||
if( _n->isMasterNote() || ( _n->hasParent() && _n->isReleased() ) )
|
||||
{
|
||||
@@ -740,7 +740,7 @@ void lb302Synth::playNote( NotePlayHandle * _n, sampleFrame * _working_buffer )
|
||||
|
||||
|
||||
|
||||
void lb302Synth::processNote( NotePlayHandle * _n )
|
||||
void Lb302Synth::processNote( NotePlayHandle * _n )
|
||||
{
|
||||
/// Start a new note.
|
||||
if( _n->m_pluginData != this )
|
||||
@@ -775,7 +775,7 @@ void lb302Synth::processNote( NotePlayHandle * _n )
|
||||
|
||||
|
||||
|
||||
void lb302Synth::play( sampleFrame * _working_buffer )
|
||||
void Lb302Synth::play( sampleFrame * _working_buffer )
|
||||
{
|
||||
m_notesMutex.lock();
|
||||
while( ! m_notes.isEmpty() )
|
||||
@@ -793,7 +793,7 @@ void lb302Synth::play( sampleFrame * _working_buffer )
|
||||
|
||||
|
||||
|
||||
void lb302Synth::deleteNotePluginData( NotePlayHandle * _n )
|
||||
void Lb302Synth::deleteNotePluginData( NotePlayHandle * _n )
|
||||
{
|
||||
//printf("GONE\n");
|
||||
if( m_playingNote == _n )
|
||||
@@ -803,13 +803,13 @@ void lb302Synth::deleteNotePluginData( NotePlayHandle * _n )
|
||||
}
|
||||
|
||||
|
||||
PluginView * lb302Synth::instantiateView( QWidget * _parent )
|
||||
PluginView * Lb302Synth::instantiateView( QWidget * _parent )
|
||||
{
|
||||
return( new lb302SynthView( this, _parent ) );
|
||||
return( new Lb302SynthView( this, _parent ) );
|
||||
}
|
||||
|
||||
|
||||
lb302SynthView::lb302SynthView( Instrument * _instrument, QWidget * _parent ) :
|
||||
Lb302SynthView::Lb302SynthView( Instrument * _instrument, QWidget * _parent ) :
|
||||
InstrumentViewFixedSize( _instrument, _parent )
|
||||
{
|
||||
// GUI
|
||||
@@ -1005,14 +1005,14 @@ lb302SynthView::lb302SynthView( Instrument * _instrument, QWidget * _parent ) :
|
||||
}
|
||||
|
||||
|
||||
lb302SynthView::~lb302SynthView()
|
||||
Lb302SynthView::~Lb302SynthView()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void lb302SynthView::modelChanged()
|
||||
void Lb302SynthView::modelChanged()
|
||||
{
|
||||
lb302Synth * syn = castModel<lb302Synth>();
|
||||
Lb302Synth * syn = castModel<Lb302Synth>();
|
||||
|
||||
m_vcfCutKnob->setModel( &syn->vcf_cut_knob );
|
||||
m_vcfResKnob->setModel( &syn->vcf_res_knob );
|
||||
@@ -1038,7 +1038,7 @@ extern "C"
|
||||
PLUGIN_EXPORT Plugin * lmms_plugin_main( Model * m, void * )
|
||||
{
|
||||
|
||||
return( new lb302Synth(
|
||||
return( new Lb302Synth(
|
||||
static_cast<InstrumentTrack *>( m ) ) );
|
||||
}
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
/*
|
||||
* lb302.h - declaration of class lb302 which is a bass synth attempting to
|
||||
* Lb302.h - declaration of class Lb302 which is a bass synth attempting to
|
||||
* emulate the Roland TB-303 bass synth
|
||||
*
|
||||
* Copyright (c) 2006-2008 Paul Giblock <pgib/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of LMMS - https://lmms.io
|
||||
*
|
||||
* lb302FilterIIR2 is based on the gsyn filter code by Andy Sloane.
|
||||
* Lb302FilterIIR2 is based on the gsyn filter code by Andy Sloane.
|
||||
*
|
||||
* lb302Filter3Pole is based on the TB-303 instrument written by
|
||||
* Lb302Filter3Pole is based on the TB-303 instrument written by
|
||||
* Josep M Comajuncosas for the CSounds library
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
@@ -42,11 +42,11 @@ static const int NUM_FILTERS = 2;
|
||||
|
||||
class automatableButtonGroup;
|
||||
class Knob;
|
||||
class lb302SynthView;
|
||||
class Lb302SynthView;
|
||||
class LedCheckBox;
|
||||
class NotePlayHandle;
|
||||
|
||||
class lb302FilterKnobState
|
||||
class Lb302FilterKnobState
|
||||
{
|
||||
public:
|
||||
float cutoff;
|
||||
@@ -57,11 +57,11 @@ class lb302FilterKnobState
|
||||
};
|
||||
|
||||
|
||||
class lb302Filter
|
||||
class Lb302Filter
|
||||
{
|
||||
public:
|
||||
lb302Filter(lb302FilterKnobState* p_fs);
|
||||
virtual ~lb302Filter() {};
|
||||
Lb302Filter(Lb302FilterKnobState* p_fs);
|
||||
virtual ~Lb302Filter() {};
|
||||
|
||||
virtual void recalc();
|
||||
virtual void envRecalc();
|
||||
@@ -69,7 +69,7 @@ class lb302Filter
|
||||
virtual void playNote();
|
||||
|
||||
protected:
|
||||
lb302FilterKnobState *fs;
|
||||
Lb302FilterKnobState *fs;
|
||||
|
||||
// Filter Decay
|
||||
float vcf_c0; // c0=e1 on retrigger; c0*=ed every sample; cutoff=e0+c0
|
||||
@@ -78,11 +78,11 @@ class lb302Filter
|
||||
float vcf_rescoeff; // Resonance coefficient [0.30,9.54]
|
||||
};
|
||||
|
||||
class lb302FilterIIR2 : public lb302Filter
|
||||
class Lb302FilterIIR2 : public Lb302Filter
|
||||
{
|
||||
public:
|
||||
lb302FilterIIR2(lb302FilterKnobState* p_fs);
|
||||
virtual ~lb302FilterIIR2();
|
||||
Lb302FilterIIR2(Lb302FilterKnobState* p_fs);
|
||||
virtual ~Lb302FilterIIR2();
|
||||
|
||||
virtual void recalc();
|
||||
virtual void envRecalc();
|
||||
@@ -102,10 +102,10 @@ class lb302FilterIIR2 : public lb302Filter
|
||||
};
|
||||
|
||||
|
||||
class lb302Filter3Pole : public lb302Filter
|
||||
class Lb302Filter3Pole : public Lb302Filter
|
||||
{
|
||||
public:
|
||||
lb302Filter3Pole(lb302FilterKnobState* p_fs);
|
||||
Lb302Filter3Pole(Lb302FilterKnobState* p_fs);
|
||||
|
||||
//virtual void recalc();
|
||||
virtual void envRecalc();
|
||||
@@ -127,7 +127,7 @@ class lb302Filter3Pole : public lb302Filter
|
||||
|
||||
|
||||
|
||||
class lb302Note
|
||||
class Lb302Note
|
||||
{
|
||||
public:
|
||||
float vco_inc;
|
||||
@@ -135,12 +135,12 @@ public:
|
||||
};
|
||||
|
||||
|
||||
class lb302Synth : public Instrument
|
||||
class Lb302Synth : public Instrument
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
lb302Synth( InstrumentTrack * _instrument_track );
|
||||
virtual ~lb302Synth();
|
||||
Lb302Synth( InstrumentTrack * _instrument_track );
|
||||
virtual ~Lb302Synth();
|
||||
|
||||
virtual void play( sampleFrame * _working_buffer );
|
||||
virtual void playNote( NotePlayHandle * _n,
|
||||
@@ -168,7 +168,7 @@ public:
|
||||
private:
|
||||
void processNote( NotePlayHandle * n );
|
||||
|
||||
void initNote(lb302Note *Note);
|
||||
void initNote(Lb302Note *Note);
|
||||
void initSlide();
|
||||
|
||||
private:
|
||||
@@ -208,11 +208,11 @@ private:
|
||||
vco_shape_t vco_shape;
|
||||
|
||||
// Filters (just keep both loaded and switch)
|
||||
lb302Filter* vcfs[NUM_FILTERS];
|
||||
Lb302Filter* vcfs[NUM_FILTERS];
|
||||
|
||||
// User settings
|
||||
lb302FilterKnobState fs;
|
||||
QAtomicPointer<lb302Filter> vcf;
|
||||
Lb302FilterKnobState fs;
|
||||
QAtomicPointer<Lb302Filter> vcf;
|
||||
|
||||
int release_frame;
|
||||
|
||||
@@ -249,7 +249,7 @@ private:
|
||||
|
||||
int process(sampleFrame *outbuf, const int size);
|
||||
|
||||
friend class lb302SynthView;
|
||||
friend class Lb302SynthView;
|
||||
|
||||
NotePlayHandle * m_playingNote;
|
||||
NotePlayHandleList m_notes;
|
||||
@@ -257,13 +257,13 @@ private:
|
||||
} ;
|
||||
|
||||
|
||||
class lb302SynthView : public InstrumentViewFixedSize
|
||||
class Lb302SynthView : public InstrumentViewFixedSize
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
lb302SynthView( Instrument * _instrument,
|
||||
Lb302SynthView( Instrument * _instrument,
|
||||
QWidget * _parent );
|
||||
virtual ~lb302SynthView();
|
||||
virtual ~Lb302SynthView();
|
||||
|
||||
private:
|
||||
virtual void modelChanged();
|
||||
@@ -59,7 +59,7 @@ TODO:
|
||||
The original TB-303's square wave is not 50% duty cycle. The peaks are
|
||||
supposed to slope down slightly. It would be nice to be able to
|
||||
configure this. In fact, each waveform could have a parameter knob to
|
||||
change some aspect of the wave. See lb302.cpp:643 for more info.
|
||||
change some aspect of the wave. See Lb302.cpp:643 for more info.
|
||||
|
||||
TODO:
|
||||
Must decide on proper action to take when a slide note is interrupted
|
||||
@@ -70,10 +70,10 @@ TODO:
|
||||
TODO:
|
||||
The default filter's distortion could use some work.
|
||||
effectLib::distortion<> gets the job done, but the coefficients need
|
||||
to more closely match that of lb302Filter3Pole's tanh distortion.
|
||||
to more closely match that of Lb302Filter3Pole's tanh distortion.
|
||||
|
||||
TODO:
|
||||
Slide decay needs a better knob mapping. sqrt()? lb302.cpp:588
|
||||
Slide decay needs a better knob mapping. sqrt()? Lb302.cpp:588
|
||||
|
||||
TODO:
|
||||
Consider making the slide trigger set the note to slide TO as opposed
|
||||
|
Before Width: | Height: | Size: 97 KiB After Width: | Height: | Size: 97 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 730 B After Width: | Height: | Size: 730 B |
|
Before Width: | Height: | Size: 525 B After Width: | Height: | Size: 525 B |
|
Before Width: | Height: | Size: 64 KiB After Width: | Height: | Size: 64 KiB |
|
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 58 KiB |
|
Before Width: | Height: | Size: 539 B After Width: | Height: | Size: 539 B |
|
Before Width: | Height: | Size: 678 B After Width: | Height: | Size: 678 B |
|
Before Width: | Height: | Size: 484 B After Width: | Height: | Size: 484 B |
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 776 B After Width: | Height: | Size: 776 B |
|
Before Width: | Height: | Size: 510 B After Width: | Height: | Size: 510 B |
|
Before Width: | Height: | Size: 498 B After Width: | Height: | Size: 498 B |
|
Before Width: | Height: | Size: 711 B After Width: | Height: | Size: 711 B |