Merge https://github.com/LMMS/lmms into stable-0.4
@@ -332,14 +332,12 @@ CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/lmms.rc.in ${CMAKE_BINARY_DIR}/lmms.rc)
|
||||
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/plugins/zynaddsubfx/zynaddsubfx.rc.in ${CMAKE_BINARY_DIR}/plugins/zynaddsubfx/zynaddsubfx.rc)
|
||||
|
||||
# set compiler flags
|
||||
#SET(CMAKE_BUILD_TYPE relwithdebug)
|
||||
SET(CMAKE_C_FLAGS "-O2 -g -Wall ${CMAKE_C_FLAGS}")
|
||||
SET(CMAKE_CXX_FLAGS "-O2 -g -fno-exceptions -Wall ${CMAKE_CXX_FLAGS}")
|
||||
#SET(CMAKE_C_FLAGS_${CMAKE_BUILD_TYPE} "${CMAKE_C_FLAGS}")
|
||||
#SET(CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE} "${CMAKE_CXX_FLAGS}")
|
||||
SET(WERROR_FLAGS "-Wall -Werror -Werror=unused-function -Wno-sign-compare -Wno-strict-overflow")
|
||||
SET(CMAKE_C_FLAGS "-O2 -g ${WERROR_FLAGS} ${CMAKE_C_FLAGS}")
|
||||
SET(CMAKE_CXX_FLAGS "-O2 -g -fno-exceptions ${WERROR_FLAGS} ${CMAKE_CXX_FLAGS}")
|
||||
|
||||
|
||||
# people simply updating SVN will still have this and mess up build with it
|
||||
# people simply updating git will still have this and mess up build with it
|
||||
FILE(REMOVE include/lmmsconfig.h)
|
||||
|
||||
FILE(GLOB lmms_INCLUDES ${CMAKE_SOURCE_DIR}/include/*.h)
|
||||
|
||||
|
Before Width: | Height: | Size: 808 B After Width: | Height: | Size: 829 B |
|
Before Width: | Height: | Size: 559 B After Width: | Height: | Size: 623 B |
|
Before Width: | Height: | Size: 977 B After Width: | Height: | Size: 610 B |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 687 B |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 476 B |
|
Before Width: | Height: | Size: 656 B After Width: | Height: | Size: 681 B |
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 619 B |
|
Before Width: | Height: | Size: 644 B After Width: | Height: | Size: 614 B |
|
Before Width: | Height: | Size: 809 B After Width: | Height: | Size: 549 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 923 B |
|
Before Width: | Height: | Size: 771 B After Width: | Height: | Size: 812 B |
|
Before Width: | Height: | Size: 629 B After Width: | Height: | Size: 842 B |
|
Before Width: | Height: | Size: 1015 B After Width: | Height: | Size: 410 B |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 275 B After Width: | Height: | Size: 522 B |
|
Before Width: | Height: | Size: 270 B After Width: | Height: | Size: 691 B |
|
Before Width: | Height: | Size: 314 B After Width: | Height: | Size: 677 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 540 B |
|
Before Width: | Height: | Size: 754 B After Width: | Height: | Size: 523 B |
|
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 221 KiB |
|
Before Width: | Height: | Size: 980 B After Width: | Height: | Size: 514 B |
|
Before Width: | Height: | Size: 191 B After Width: | Height: | Size: 191 B |
|
Before Width: | Height: | Size: 207 B After Width: | Height: | Size: 207 B |
|
Before Width: | Height: | Size: 519 B After Width: | Height: | Size: 459 B |
|
Before Width: | Height: | Size: 734 B After Width: | Height: | Size: 360 B |
@@ -214,6 +214,13 @@ TrackContainerView QFrame{
|
||||
background-color: #49515b;
|
||||
}
|
||||
|
||||
nStateButton {
|
||||
max-height: 26px;
|
||||
max-width: 26px;
|
||||
min-height: 26px;
|
||||
min-width: 26px;
|
||||
}
|
||||
|
||||
trackOperationsWidget > QPushButton {
|
||||
max-height: 26px;
|
||||
max-width: 26px;
|
||||
@@ -395,6 +402,11 @@ QTreeView {
|
||||
alternate-background-color: #747474;
|
||||
}
|
||||
|
||||
TrackContainerView QLabel
|
||||
{
|
||||
background: none;
|
||||
}
|
||||
|
||||
/* Plugins */
|
||||
|
||||
TripleOscillatorView knob {
|
||||
|
||||
|
Before Width: | Height: | Size: 789 B After Width: | Height: | Size: 817 B |
@@ -178,6 +178,16 @@ public:
|
||||
|
||||
void setStep( const float step );
|
||||
|
||||
float centerValue() const
|
||||
{
|
||||
return m_centerValue;
|
||||
}
|
||||
|
||||
void setCenterValue( const float centerVal )
|
||||
{
|
||||
m_centerValue = centerVal;
|
||||
}
|
||||
|
||||
static void linkModels( AutomatableModel* m1, AutomatableModel* m2 );
|
||||
static void unlinkModels( AutomatableModel* m1, AutomatableModel* m2 );
|
||||
|
||||
@@ -241,6 +251,7 @@ private:
|
||||
float m_maxValue;
|
||||
float m_step;
|
||||
float m_range;
|
||||
float m_centerValue;
|
||||
|
||||
// most objects will need this temporarily (until sampleExact is
|
||||
// standard)
|
||||
|
||||
@@ -140,7 +140,7 @@ protected:
|
||||
|
||||
|
||||
|
||||
const int RAW_MIDI_PARSE_BUF_SIZE = 16;
|
||||
const uint32_t RAW_MIDI_PARSE_BUF_SIZE = 16;
|
||||
|
||||
|
||||
class MidiClientRaw : public MidiClient
|
||||
|
||||
@@ -52,6 +52,17 @@ public:
|
||||
handleState( bool _varying_pitch = false );
|
||||
virtual ~handleState();
|
||||
|
||||
inline const f_cnt_t frameIndex() const
|
||||
{
|
||||
return m_frameIndex;
|
||||
}
|
||||
|
||||
inline void setFrameIndex( f_cnt_t _index )
|
||||
{
|
||||
m_frameIndex = _index;
|
||||
}
|
||||
|
||||
|
||||
|
||||
private:
|
||||
f_cnt_t m_frameIndex;
|
||||
|
||||
@@ -132,6 +132,11 @@ private:
|
||||
void setPosition( const QPoint & _p );
|
||||
bool updateAngle();
|
||||
|
||||
int angleFromValue( float value, float minValue, float maxValue, float totalAngle ) const
|
||||
{
|
||||
return static_cast<int>( ( value - 0.5 * ( minValue + maxValue ) ) / ( maxValue - minValue ) * m_totalAngle ) % 360;
|
||||
}
|
||||
|
||||
inline float pageSize() const
|
||||
{
|
||||
return( qMax<float>( ( model()->maxValue() -
|
||||
|
||||
@@ -60,7 +60,7 @@ public:
|
||||
|
||||
static int stringToNoteKey( const QString& str )
|
||||
{
|
||||
int m_key;
|
||||
int m_key = NoteKey::C;
|
||||
|
||||
|
||||
QString sKey = str.left( str.length() - 1 );
|
||||
@@ -156,31 +156,19 @@ bool HydrogenImport::readSong()
|
||||
if( nodeList.isEmpty() )
|
||||
{
|
||||
printf( "Error reading song: song node not found\n" );
|
||||
return NULL;
|
||||
return false;
|
||||
}
|
||||
QDomNode songNode = nodeList.at( 0 );
|
||||
|
||||
QString m_sSongVersion = LocalFileMng::readXmlString( songNode , "version", "Unknown version" );
|
||||
|
||||
|
||||
|
||||
|
||||
float fBpm = LocalFileMng::readXmlFloat( songNode, "bpm", 120 );
|
||||
float fVolume = LocalFileMng::readXmlFloat( songNode, "volume", 0.5 );
|
||||
float fMetronomeVolume = LocalFileMng::readXmlFloat( songNode, "metronomeVolume", 0.5 );
|
||||
QString sName( LocalFileMng::readXmlString( songNode, "name", "Untitled Song" ) );
|
||||
QString sAuthor( LocalFileMng::readXmlString( songNode, "author", "Unknown Author" ) );
|
||||
QString sNotes( LocalFileMng::readXmlString( songNode, "notes", "..." ) );
|
||||
QString sLicense( LocalFileMng::readXmlString( songNode, "license", "Unknown license" ) );
|
||||
bool bLoopEnabled = LocalFileMng::readXmlBool( songNode, "loopEnabled", false );
|
||||
QString sMode = LocalFileMng::readXmlString( songNode, "mode", "pattern" );
|
||||
|
||||
|
||||
float fHumanizeTimeValue = LocalFileMng::readXmlFloat( songNode, "humanize_time", 0.0 );
|
||||
float fHumanizeVelocityValue = LocalFileMng::readXmlFloat( songNode, "humanize_velocity", 0.0 );
|
||||
float fSwingFactor = LocalFileMng::readXmlFloat( songNode, "swing_factor", 0.0 );
|
||||
|
||||
|
||||
QDomNode instrumentListNode = songNode.firstChildElement( "instrumentList" );
|
||||
if ( ( ! instrumentListNode.isNull() ) )
|
||||
{
|
||||
@@ -195,33 +183,8 @@ bool HydrogenImport::readSong()
|
||||
QString sDrumkit = LocalFileMng::readXmlString( instrumentNode, "drumkit", "" ); // drumkit
|
||||
QString sName = LocalFileMng::readXmlString( instrumentNode, "name", "" ); // name
|
||||
float fVolume = LocalFileMng::readXmlFloat( instrumentNode, "volume", 1.0 ); // volume
|
||||
bool bIsMuted = LocalFileMng::readXmlBool( instrumentNode, "isMuted", false ); // is muted
|
||||
float fPan_L = LocalFileMng::readXmlFloat( instrumentNode, "pan_L", 0.5 ); // pan L
|
||||
float fPan_R = LocalFileMng::readXmlFloat( instrumentNode, "pan_R", 0.5 ); // pan R
|
||||
float fFX1Level = LocalFileMng::readXmlFloat( instrumentNode, "FX1Level", 0.0 ); // FX level
|
||||
float fFX2Level = LocalFileMng::readXmlFloat( instrumentNode, "FX2Level", 0.0 ); // FX level
|
||||
float fFX3Level = LocalFileMng::readXmlFloat( instrumentNode, "FX3Level", 0.0 ); // FX level
|
||||
float fFX4Level = LocalFileMng::readXmlFloat( instrumentNode, "FX4Level", 0.0 ); // FX level
|
||||
float fGain = LocalFileMng::readXmlFloat( instrumentNode, "gain", 1.0, false, false ); // instrument gain
|
||||
|
||||
|
||||
int fAttack = LocalFileMng::readXmlInt( instrumentNode, "Attack", 0, false, false ); // Attack
|
||||
int fDecay = LocalFileMng::readXmlInt( instrumentNode, "Decay", 0, false, false ); // Decay
|
||||
float fSustain = LocalFileMng::readXmlFloat( instrumentNode, "Sustain", 1.0, false, false ); // Sustain
|
||||
int fRelease = LocalFileMng::readXmlInt( instrumentNode, "Release", 1000, false, false ); // Release
|
||||
|
||||
float fRandomPitchFactor = LocalFileMng::readXmlFloat( instrumentNode, "randomPitchFactor", 0.0f, false, false );
|
||||
|
||||
bool bFilterActive = LocalFileMng::readXmlBool( instrumentNode, "filterActive", false );
|
||||
float fFilterCutoff = LocalFileMng::readXmlFloat( instrumentNode, "filterCutoff", 1.0f, false );
|
||||
float fFilterResonance = LocalFileMng::readXmlFloat( instrumentNode, "filterResonance", 0.0f, false );
|
||||
QString sMuteGroup = LocalFileMng::readXmlString( instrumentNode, "muteGroup", "-1", false );
|
||||
QString sMidiOutChannel = LocalFileMng::readXmlString( instrumentNode, "midiOutChannel", "-1", false, false );
|
||||
QString sMidiOutNote = LocalFileMng::readXmlString( instrumentNode, "midiOutNote", "60", false, false );
|
||||
int nMuteGroup = sMuteGroup.toInt();
|
||||
bool isStopNote = LocalFileMng::readXmlBool( instrumentNode, "isStopNote", false );
|
||||
int nMidiOutChannel = sMidiOutChannel.toInt();
|
||||
int nMidiOutNote = sMidiOutNote.toInt();
|
||||
|
||||
if ( sId.isEmpty() ) {
|
||||
printf( "Empty ID for instrument. skipping \n" );
|
||||
@@ -246,21 +209,8 @@ bool HydrogenImport::readSong()
|
||||
continue;
|
||||
}
|
||||
QString sFilename = LocalFileMng::readXmlString( layerNode, "filename", "" );
|
||||
bool sIsModified = LocalFileMng::readXmlBool( layerNode, "ismodified", false );
|
||||
QString sMode = LocalFileMng::readXmlString( layerNode, "smode", "forward" );
|
||||
unsigned sStartframe = LocalFileMng::readXmlInt( layerNode, "startframe", 0 );
|
||||
unsigned sLoopFrame = LocalFileMng::readXmlInt( layerNode, "loopframe", 0 );
|
||||
int sLoops = LocalFileMng::readXmlInt( layerNode, "loops", 0 );
|
||||
unsigned sEndframe = LocalFileMng::readXmlInt( layerNode, "endframe", 0 );
|
||||
bool sUseRubber = LocalFileMng::readXmlInt( layerNode, "userubber", 0, false );
|
||||
float sRubberDivider = LocalFileMng::readXmlFloat( layerNode, "rubberdivider", 0.0 );
|
||||
int sRubberCsettings = LocalFileMng::readXmlInt( layerNode, "rubberCsettings", 1 );
|
||||
int sRubberPitch = LocalFileMng::readXmlFloat( layerNode, "rubberPitch", 0.0 );
|
||||
|
||||
float fMin = LocalFileMng::readXmlFloat( layerNode, "min", 0.0 );
|
||||
float fMax = LocalFileMng::readXmlFloat( layerNode, "max", 1.0 );
|
||||
float fGain = LocalFileMng::readXmlFloat( layerNode, "gain", 1.0 );
|
||||
float fPitch = LocalFileMng::readXmlFloat( layerNode, "pitch", 0.0, false, false );
|
||||
if ( nLayer == 0 )
|
||||
{
|
||||
drum_track[sId] = ( InstrumentTrack * ) track::create( track::InstrumentTrack,engine::getBBTrackContainer() );
|
||||
@@ -310,13 +260,10 @@ bool HydrogenImport::readSong()
|
||||
if ( ! pNoteListNode.isNull() ) {
|
||||
QDomNode noteNode = pNoteListNode.firstChildElement( "note" );
|
||||
while ( ! noteNode.isNull() ) {
|
||||
unsigned nPosition = LocalFileMng::readXmlInt( noteNode, "position", 0 );
|
||||
float fLeadLag = LocalFileMng::readXmlFloat( noteNode, "leadlag", 0.0 , false , false );
|
||||
int nPosition = LocalFileMng::readXmlInt( noteNode, "position", 0 );
|
||||
float fVelocity = LocalFileMng::readXmlFloat( noteNode, "velocity", 0.8f );
|
||||
float fPan_L = LocalFileMng::readXmlFloat( noteNode, "pan_L", 0.5 );
|
||||
float fPan_R = LocalFileMng::readXmlFloat( noteNode, "pan_R", 0.5 );
|
||||
int nLength = LocalFileMng::readXmlInt( noteNode, "length", -1, true );
|
||||
float nPitch = LocalFileMng::readXmlFloat( noteNode, "pitch", 0.0, false, false );
|
||||
QString sKey = LocalFileMng::readXmlString( noteNode, "key", "C0", false, false );
|
||||
QString nNoteOff = LocalFileMng::readXmlString( noteNode, "note_off", "false", false, false );
|
||||
|
||||
|
||||
@@ -75,7 +75,9 @@ audioFileProcessor::audioFileProcessor( InstrumentTrack * _instrument_track ) :
|
||||
m_startPointModel( 0, 0, 1, 0.0000001f, this, tr( "Start of sample") ),
|
||||
m_endPointModel( 1, 0, 1, 0.0000001f, this, tr( "End of sample" ) ),
|
||||
m_reverseModel( false, this, tr( "Reverse sample" ) ),
|
||||
m_loopModel( false, this, tr( "Loop") )
|
||||
m_loopModel( false, this, tr( "Loop") ),
|
||||
m_stutterModel( false, this, tr( "Stutter" ) ),
|
||||
m_nextPlayStartPoint( 0 )
|
||||
{
|
||||
connect( &m_reverseModel, SIGNAL( dataChanged() ),
|
||||
this, SLOT( reverseModelChanged() ) );
|
||||
@@ -85,6 +87,8 @@ audioFileProcessor::audioFileProcessor( InstrumentTrack * _instrument_track ) :
|
||||
this, SLOT( loopPointChanged() ) );
|
||||
connect( &m_endPointModel, SIGNAL( dataChanged() ),
|
||||
this, SLOT( loopPointChanged() ) );
|
||||
connect( &m_stutterModel, SIGNAL( dataChanged() ),
|
||||
this, SLOT( stutterModelChanged() ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -102,9 +106,25 @@ void audioFileProcessor::playNote( notePlayHandle * _n,
|
||||
{
|
||||
const fpp_t frames = _n->framesLeftForCurrentPeriod();
|
||||
|
||||
// Magic key - a frequency < 20 (say, the bottom piano note if using
|
||||
// a A4 base tuning) restarts the start point. The note is not actually
|
||||
// played.
|
||||
if( m_stutterModel.value() == true && _n->frequency() < 20.0 )
|
||||
{
|
||||
m_nextPlayStartPoint = m_sampleBuffer.startFrame();
|
||||
return;
|
||||
}
|
||||
|
||||
if( !_n->m_pluginData )
|
||||
{
|
||||
if( m_stutterModel.value() == true && m_nextPlayStartPoint >= m_sampleBuffer.endFrame() )
|
||||
{
|
||||
// Restart playing the note if in stutter mode, not in loop mode,
|
||||
// and we're at the end of the sample.
|
||||
m_nextPlayStartPoint = m_sampleBuffer.startFrame();
|
||||
}
|
||||
_n->m_pluginData = new handleState( _n->hasDetuningInfo() );
|
||||
((handleState *)_n->m_pluginData)->setFrameIndex(m_nextPlayStartPoint);
|
||||
}
|
||||
|
||||
if( m_sampleBuffer.play( _working_buffer,
|
||||
@@ -115,12 +135,25 @@ void audioFileProcessor::playNote( notePlayHandle * _n,
|
||||
applyRelease( _working_buffer, _n );
|
||||
instrumentTrack()->processAudioBuffer( _working_buffer,
|
||||
frames,_n );
|
||||
emit isPlaying( _n->totalFramesPlayed() * _n->frequency() / m_sampleBuffer.frequency() );
|
||||
int framesPosition;
|
||||
if( m_stutterModel.value() == true )
|
||||
{
|
||||
framesPosition = m_nextPlayStartPoint;
|
||||
}
|
||||
else
|
||||
{
|
||||
framesPosition = _n->totalFramesPlayed() * _n->frequency() / m_sampleBuffer.frequency();
|
||||
}
|
||||
emit isPlaying( framesPosition );
|
||||
}
|
||||
else
|
||||
{
|
||||
emit isPlaying( 0 );
|
||||
}
|
||||
if( m_stutterModel.value() == true )
|
||||
{
|
||||
m_nextPlayStartPoint = ((handleState *)_n->m_pluginData)->frameIndex();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -246,6 +279,12 @@ void audioFileProcessor::ampModelChanged( void )
|
||||
}
|
||||
|
||||
|
||||
void audioFileProcessor::stutterModelChanged()
|
||||
{
|
||||
m_nextPlayStartPoint = m_sampleBuffer.startFrame();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void audioFileProcessor::loopPointChanged( void )
|
||||
@@ -254,6 +293,7 @@ void audioFileProcessor::loopPointChanged( void )
|
||||
( m_sampleBuffer.frames()-1 ) );
|
||||
const f_cnt_t f2 = static_cast<f_cnt_t>( m_endPointModel.value() *
|
||||
( m_sampleBuffer.frames()-1 ) );
|
||||
m_nextPlayStartPoint = f1;
|
||||
m_sampleBuffer.setStartFrame( qMin<f_cnt_t>( f1, f2 ) );
|
||||
m_sampleBuffer.setEndFrame( qMax<f_cnt_t>( f1, f2 ) );
|
||||
emit dataChanged();
|
||||
@@ -295,7 +335,7 @@ AudioFileProcessorView::AudioFileProcessorView( Instrument * _instrument,
|
||||
|
||||
m_reverseButton = new pixmapButton( this );
|
||||
m_reverseButton->setCheckable( TRUE );
|
||||
m_reverseButton->move( 184, 124 );
|
||||
m_reverseButton->move( 174, 124 );
|
||||
m_reverseButton->setActiveGraphic( PLUGIN_NAME::getIconPixmap(
|
||||
"reverse_on" ) );
|
||||
m_reverseButton->setInactiveGraphic( PLUGIN_NAME::getIconPixmap(
|
||||
@@ -308,7 +348,7 @@ AudioFileProcessorView::AudioFileProcessorView( Instrument * _instrument,
|
||||
|
||||
m_loopButton = new pixmapButton( this );
|
||||
m_loopButton->setCheckable( TRUE );
|
||||
m_loopButton->move( 220, 124 );
|
||||
m_loopButton->move( 200, 124 );
|
||||
m_loopButton->setActiveGraphic( PLUGIN_NAME::getIconPixmap(
|
||||
"loop_on" ) );
|
||||
m_loopButton->setInactiveGraphic( PLUGIN_NAME::getIconPixmap(
|
||||
@@ -322,6 +362,23 @@ AudioFileProcessorView::AudioFileProcessorView( Instrument * _instrument,
|
||||
"This is useful for things like string and choir "
|
||||
"samples." ) );
|
||||
|
||||
m_stutterButton = new pixmapButton( this );
|
||||
m_stutterButton->setCheckable( true );
|
||||
m_stutterButton->move( 226, 124 );
|
||||
m_stutterButton->setActiveGraphic( PLUGIN_NAME::getIconPixmap(
|
||||
"stutter_on" ) );
|
||||
m_stutterButton->setInactiveGraphic( PLUGIN_NAME::getIconPixmap(
|
||||
"stutter_off" ) );
|
||||
toolTip::add( m_stutterButton,
|
||||
tr( "Continue sample playback across notes" ) );
|
||||
m_stutterButton->setWhatsThis(
|
||||
tr( "Enabling this option makes the sample continue playing "
|
||||
"across different notes - if you change pitch, or the note "
|
||||
"length stops before the end of the sample, then the next "
|
||||
"note played will continue where it left off. To reset the "
|
||||
"playback to the start of the sample, insert a note at the bottom "
|
||||
"of the keyboard (< 20 Hz)") );
|
||||
|
||||
m_ampKnob = new knob( knobStyled, this );
|
||||
m_ampKnob->setVolumeKnob( TRUE );
|
||||
m_ampKnob->move( 17, 108 );
|
||||
@@ -501,6 +558,7 @@ void AudioFileProcessorView::modelChanged( void )
|
||||
m_endKnob->setModel( &a->m_endPointModel );
|
||||
m_reverseButton->setModel( &a->m_reverseModel );
|
||||
m_loopButton->setModel( &a->m_loopModel );
|
||||
m_stutterButton->setModel( &a->m_stutterModel );
|
||||
sampleUpdated();
|
||||
}
|
||||
|
||||
|
||||
@@ -74,6 +74,7 @@ private slots:
|
||||
void reverseModelChanged();
|
||||
void ampModelChanged();
|
||||
void loopPointChanged();
|
||||
void stutterModelChanged();
|
||||
|
||||
|
||||
signals:
|
||||
@@ -90,6 +91,9 @@ private:
|
||||
FloatModel m_endPointModel;
|
||||
BoolModel m_reverseModel;
|
||||
BoolModel m_loopModel;
|
||||
BoolModel m_stutterModel;
|
||||
|
||||
f_cnt_t m_nextPlayStartPoint;
|
||||
|
||||
friend class AudioFileProcessorView;
|
||||
|
||||
@@ -131,6 +135,7 @@ private:
|
||||
pixmapButton * m_openAudioFileButton;
|
||||
pixmapButton * m_reverseButton;
|
||||
pixmapButton * m_loopButton;
|
||||
pixmapButton * m_stutterButton;
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
BIN
plugins/audio_file_processor/stutter_off.png
Normal file
|
After Width: | Height: | Size: 526 B |
BIN
plugins/audio_file_processor/stutter_on.png
Normal file
|
After Width: | Height: | Size: 588 B |
@@ -224,6 +224,9 @@ enum FLP_Events
|
||||
FLP_Text_ChanGroupName = FLP_Text + 39,
|
||||
FLP_Text_PlayListItems = FLP_Text + 41,
|
||||
|
||||
FLP_Event_EffectParams = 225,
|
||||
FLP_Event_PlaylistItems = 233,
|
||||
|
||||
FLP_CmdCount
|
||||
|
||||
} ;
|
||||
@@ -1330,7 +1333,7 @@ if( p.currentEffectChannel <= NumFxChannels )
|
||||
// case 216: pi[2] /= p.versionSpecificFactor
|
||||
// case 229: pi[1] /= p.versionSpecificFactor
|
||||
|
||||
case 225:
|
||||
case FLP_Event_EffectParams:
|
||||
{
|
||||
enum FLP_EffectParams
|
||||
{
|
||||
@@ -1361,7 +1364,7 @@ qDebug( "FX-ch: %d param: %x value:%x\n", ch, param, val );
|
||||
break;
|
||||
}
|
||||
|
||||
case 233: // playlist items
|
||||
case FLP_Event_PlaylistItems: // playlist items
|
||||
{
|
||||
const int bpi = 28;
|
||||
const int imax = text_len / bpi;
|
||||
|
||||
@@ -574,9 +574,9 @@ public:
|
||||
uint32_t srate;
|
||||
float att; // a coefficient the output is multiplied with
|
||||
float att_max; // a memory for the highest attenuation - used for display
|
||||
unsigned int pos; // where we are actually in our sample buffer
|
||||
unsigned int buffer_size;
|
||||
unsigned int overall_buffer_size;
|
||||
int pos; // where we are actually in our sample buffer
|
||||
int buffer_size;
|
||||
int overall_buffer_size;
|
||||
bool is_active;
|
||||
bool debug;
|
||||
bool auto_release;
|
||||
|
||||
@@ -634,7 +634,6 @@ static bool get_graph(Fx &fx, int subindex, float *data, int points, float res =
|
||||
{
|
||||
for (int i = 0; i < points; i++)
|
||||
{
|
||||
typedef std::complex<double> cfloat;
|
||||
double freq = 20.0 * pow (20000.0 / 20.0, i * 1.0 / points);
|
||||
data[i] = dB_grid(fx.freq_gain(subindex, freq, fx.srate), res, ofs);
|
||||
}
|
||||
|
||||
@@ -231,7 +231,6 @@ bool monosynth_audio_module::get_graph(int index, int subindex, float *data, int
|
||||
return false;
|
||||
for (int i = 0; i < points; i++)
|
||||
{
|
||||
typedef complex<double> cfloat;
|
||||
double freq = 20.0 * pow (20000.0 / 20.0, i * 1.0 / points);
|
||||
|
||||
const dsp::biquad_d1_lerp<float> &f = subindex ? filter2 : filter;
|
||||
@@ -410,7 +409,16 @@ void monosynth_audio_module::delayed_note_on()
|
||||
envelope1.advance();
|
||||
envelope2.advance();
|
||||
queue_note_on = -1;
|
||||
float modsrc[modsrc_count] = { 1, velocity, inertia_pressure.get_last(), modwheel_value, envelope1.value, envelope2.value, 0.5+0.5*lfo1.last, 0.5+0.5*lfo2.last};
|
||||
float modsrc[modsrc_count] = {
|
||||
1,
|
||||
velocity,
|
||||
inertia_pressure.get_last(),
|
||||
modwheel_value,
|
||||
(float)envelope1.value,
|
||||
(float)envelope2.value,
|
||||
(float)(0.5+0.5*lfo1.last),
|
||||
(float)(0.5+0.5*lfo2.last)
|
||||
};
|
||||
calculate_modmatrix(moddest, moddest_count, modsrc);
|
||||
set_frequency();
|
||||
lookup_waveforms();
|
||||
@@ -445,7 +453,16 @@ void monosynth_audio_module::calculate_step()
|
||||
envelope2.advance();
|
||||
lfo1.get();
|
||||
lfo2.get();
|
||||
float modsrc[modsrc_count] = { 1, velocity, inertia_pressure.get_last(), modwheel_value, envelope1.value, envelope2.value, 0.5+0.5*lfo1.last, 0.5+0.5*lfo2.last};
|
||||
float modsrc[modsrc_count] = {
|
||||
1,
|
||||
velocity,
|
||||
inertia_pressure.get_last(),
|
||||
modwheel_value,
|
||||
(float)envelope1.value,
|
||||
(float)envelope2.value,
|
||||
(float)(0.5+0.5*lfo1.last),
|
||||
(float)(0.5+0.5*lfo2.last)
|
||||
};
|
||||
calculate_modmatrix(moddest, moddest_count, modsrc);
|
||||
last_stretch1 = (int32_t)(65536 * dsp::clip(*params[par_stretch1] + 0.01f * moddest[moddest_o1stretch], 1.f, 16.f));
|
||||
return;
|
||||
@@ -480,7 +497,16 @@ void monosynth_audio_module::calculate_step()
|
||||
|
||||
// mod matrix
|
||||
// this should be optimized heavily; I think I'll do it when MIDI in Ardour 3 gets stable :>
|
||||
float modsrc[modsrc_count] = { 1, velocity, inertia_pressure.get(), modwheel_value, env1, env2, 0.5+0.5*lfov1, 0.5+0.5*lfov2};
|
||||
float modsrc[modsrc_count] = {
|
||||
1,
|
||||
velocity,
|
||||
inertia_pressure.get(),
|
||||
modwheel_value,
|
||||
(float)env1,
|
||||
(float)env2,
|
||||
(float)(0.5+0.5*lfov1),
|
||||
(float)(0.5+0.5*lfov2)
|
||||
};
|
||||
calculate_modmatrix(moddest, moddest_count, modsrc);
|
||||
|
||||
set_frequency();
|
||||
|
||||
@@ -232,9 +232,6 @@ class ToneStackLT
|
||||
void setparams
|
||||
(double R1, double R2, double R3, double R4,
|
||||
double C1, double C2, double C3) {
|
||||
int blah[4];
|
||||
int *bp;
|
||||
bp = blah;
|
||||
}
|
||||
|
||||
void updatecoefs (sample_t ** ports)
|
||||
|
||||
@@ -25,8 +25,6 @@ void _init(); // forward declaration
|
||||
#define _WINDOWS_DLL_EXPORT_
|
||||
#endif
|
||||
|
||||
#line 10 "allpass_1895.xml"
|
||||
|
||||
#include "ladspa-util.h"
|
||||
|
||||
#define MIN(a,b) ((a) < (b) ? (a) : (b))
|
||||
@@ -155,7 +153,6 @@ static void activateAllpass_n(LADSPA_Handle instance) {
|
||||
LADSPA_Data last_delay_time = plugin_data->last_delay_time;
|
||||
unsigned int sample_rate = plugin_data->sample_rate;
|
||||
long write_phase = plugin_data->write_phase;
|
||||
#line 48 "allpass_1895.xml"
|
||||
unsigned int minsize, size;
|
||||
|
||||
if (plugin_data->max_delay && *plugin_data->max_delay > 0)
|
||||
@@ -187,7 +184,6 @@ static void activateAllpass_n(LADSPA_Handle instance) {
|
||||
}
|
||||
|
||||
static void cleanupAllpass_n(LADSPA_Handle instance) {
|
||||
#line 70 "allpass_1895.xml"
|
||||
Allpass_n *plugin_data = (Allpass_n *)instance;
|
||||
free(plugin_data->buffer);
|
||||
free(instance);
|
||||
@@ -224,15 +220,14 @@ static LADSPA_Handle instantiateAllpass_n(
|
||||
unsigned long s_rate) {
|
||||
Allpass_n *plugin_data = (Allpass_n *)malloc(sizeof(Allpass_n));
|
||||
LADSPA_Data *buffer = NULL;
|
||||
unsigned int buffer_mask;
|
||||
LADSPA_Data delay_samples;
|
||||
LADSPA_Data feedback;
|
||||
LADSPA_Data last_decay_time;
|
||||
LADSPA_Data last_delay_time;
|
||||
unsigned int sample_rate;
|
||||
long write_phase;
|
||||
unsigned int buffer_mask = 0;
|
||||
LADSPA_Data delay_samples = 0;
|
||||
LADSPA_Data feedback = 0;
|
||||
LADSPA_Data last_decay_time = 0;
|
||||
LADSPA_Data last_delay_time = 0;
|
||||
unsigned int sample_rate = 0;
|
||||
long write_phase = 0;
|
||||
|
||||
#line 44 "allpass_1895.xml"
|
||||
sample_rate = s_rate;
|
||||
|
||||
plugin_data->buffer = buffer;
|
||||
@@ -281,8 +276,7 @@ static void runAllpass_n(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
unsigned int sample_rate = plugin_data->sample_rate;
|
||||
long write_phase = plugin_data->write_phase;
|
||||
|
||||
#line 74 "allpass_1895.xml"
|
||||
int i;
|
||||
unsigned int i;
|
||||
|
||||
ignore(max_delay);
|
||||
|
||||
@@ -423,8 +417,7 @@ static void runAddingAllpass_n(LADSPA_Handle instance, unsigned long sample_coun
|
||||
unsigned int sample_rate = plugin_data->sample_rate;
|
||||
long write_phase = plugin_data->write_phase;
|
||||
|
||||
#line 74 "allpass_1895.xml"
|
||||
int i;
|
||||
unsigned int i;
|
||||
|
||||
ignore(max_delay);
|
||||
|
||||
@@ -537,7 +530,6 @@ static void activateAllpass_l(LADSPA_Handle instance) {
|
||||
LADSPA_Data last_delay_time = plugin_data->last_delay_time;
|
||||
unsigned int sample_rate = plugin_data->sample_rate;
|
||||
long write_phase = plugin_data->write_phase;
|
||||
#line 48 "allpass_1895.xml"
|
||||
unsigned int minsize, size;
|
||||
|
||||
if (plugin_data->max_delay && *plugin_data->max_delay > 0)
|
||||
@@ -569,7 +561,6 @@ static void activateAllpass_l(LADSPA_Handle instance) {
|
||||
}
|
||||
|
||||
static void cleanupAllpass_l(LADSPA_Handle instance) {
|
||||
#line 70 "allpass_1895.xml"
|
||||
Allpass_l *plugin_data = (Allpass_l *)instance;
|
||||
free(plugin_data->buffer);
|
||||
free(instance);
|
||||
@@ -606,15 +597,14 @@ static LADSPA_Handle instantiateAllpass_l(
|
||||
unsigned long s_rate) {
|
||||
Allpass_l *plugin_data = (Allpass_l *)malloc(sizeof(Allpass_l));
|
||||
LADSPA_Data *buffer = NULL;
|
||||
unsigned int buffer_mask;
|
||||
LADSPA_Data delay_samples;
|
||||
LADSPA_Data feedback;
|
||||
LADSPA_Data last_decay_time;
|
||||
LADSPA_Data last_delay_time;
|
||||
unsigned int sample_rate;
|
||||
long write_phase;
|
||||
unsigned int buffer_mask = 0;
|
||||
LADSPA_Data delay_samples = 0;
|
||||
LADSPA_Data feedback = 0;
|
||||
LADSPA_Data last_decay_time = 0;
|
||||
LADSPA_Data last_delay_time = 0;
|
||||
unsigned int sample_rate = 0;
|
||||
long write_phase = 0;
|
||||
|
||||
#line 44 "allpass_1895.xml"
|
||||
sample_rate = s_rate;
|
||||
|
||||
plugin_data->buffer = buffer;
|
||||
@@ -646,9 +636,6 @@ static void runAllpass_l(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
/* Output (array of floats of length sample_count) */
|
||||
LADSPA_Data * const out = plugin_data->out;
|
||||
|
||||
/* Max Delay (s) (float value) */
|
||||
const LADSPA_Data max_delay = *(plugin_data->max_delay);
|
||||
|
||||
/* Delay Time (s) (float value) */
|
||||
const LADSPA_Data delay_time = *(plugin_data->delay_time);
|
||||
|
||||
@@ -663,8 +650,7 @@ static void runAllpass_l(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
unsigned int sample_rate = plugin_data->sample_rate;
|
||||
long write_phase = plugin_data->write_phase;
|
||||
|
||||
#line 74 "allpass_1895.xml"
|
||||
int i;
|
||||
unsigned int i;
|
||||
|
||||
if (write_phase == 0) {
|
||||
plugin_data->last_delay_time = delay_time;
|
||||
@@ -743,9 +729,6 @@ static void runAddingAllpass_l(LADSPA_Handle instance, unsigned long sample_coun
|
||||
/* Output (array of floats of length sample_count) */
|
||||
LADSPA_Data * const out = plugin_data->out;
|
||||
|
||||
/* Max Delay (s) (float value) */
|
||||
const LADSPA_Data max_delay = *(plugin_data->max_delay);
|
||||
|
||||
/* Delay Time (s) (float value) */
|
||||
const LADSPA_Data delay_time = *(plugin_data->delay_time);
|
||||
|
||||
@@ -760,8 +743,7 @@ static void runAddingAllpass_l(LADSPA_Handle instance, unsigned long sample_coun
|
||||
unsigned int sample_rate = plugin_data->sample_rate;
|
||||
long write_phase = plugin_data->write_phase;
|
||||
|
||||
#line 74 "allpass_1895.xml"
|
||||
int i;
|
||||
unsigned int i;
|
||||
|
||||
if (write_phase == 0) {
|
||||
plugin_data->last_delay_time = delay_time;
|
||||
@@ -829,7 +811,6 @@ static void activateAllpass_c(LADSPA_Handle instance) {
|
||||
LADSPA_Data last_delay_time = plugin_data->last_delay_time;
|
||||
unsigned int sample_rate = plugin_data->sample_rate;
|
||||
long write_phase = plugin_data->write_phase;
|
||||
#line 48 "allpass_1895.xml"
|
||||
unsigned int minsize, size;
|
||||
|
||||
if (plugin_data->max_delay && *plugin_data->max_delay > 0)
|
||||
@@ -861,7 +842,6 @@ static void activateAllpass_c(LADSPA_Handle instance) {
|
||||
}
|
||||
|
||||
static void cleanupAllpass_c(LADSPA_Handle instance) {
|
||||
#line 70 "allpass_1895.xml"
|
||||
Allpass_c *plugin_data = (Allpass_c *)instance;
|
||||
free(plugin_data->buffer);
|
||||
free(instance);
|
||||
@@ -898,15 +878,14 @@ static LADSPA_Handle instantiateAllpass_c(
|
||||
unsigned long s_rate) {
|
||||
Allpass_c *plugin_data = (Allpass_c *)malloc(sizeof(Allpass_c));
|
||||
LADSPA_Data *buffer = NULL;
|
||||
unsigned int buffer_mask;
|
||||
LADSPA_Data delay_samples;
|
||||
LADSPA_Data feedback;
|
||||
LADSPA_Data last_decay_time;
|
||||
LADSPA_Data last_delay_time;
|
||||
unsigned int sample_rate;
|
||||
long write_phase;
|
||||
unsigned int buffer_mask = 0;
|
||||
LADSPA_Data delay_samples = 0;
|
||||
LADSPA_Data feedback = 0;
|
||||
LADSPA_Data last_decay_time = 0;
|
||||
LADSPA_Data last_delay_time = 0;
|
||||
unsigned int sample_rate = 0;
|
||||
long write_phase = 0;
|
||||
|
||||
#line 44 "allpass_1895.xml"
|
||||
sample_rate = s_rate;
|
||||
|
||||
plugin_data->buffer = buffer;
|
||||
@@ -938,9 +917,6 @@ static void runAllpass_c(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
/* Output (array of floats of length sample_count) */
|
||||
LADSPA_Data * const out = plugin_data->out;
|
||||
|
||||
/* Max Delay (s) (float value) */
|
||||
const LADSPA_Data max_delay = *(plugin_data->max_delay);
|
||||
|
||||
/* Delay Time (s) (float value) */
|
||||
const LADSPA_Data delay_time = *(plugin_data->delay_time);
|
||||
|
||||
@@ -955,8 +931,7 @@ static void runAllpass_c(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
unsigned int sample_rate = plugin_data->sample_rate;
|
||||
long write_phase = plugin_data->write_phase;
|
||||
|
||||
#line 74 "allpass_1895.xml"
|
||||
int i;
|
||||
unsigned int i;
|
||||
|
||||
if (write_phase == 0) {
|
||||
plugin_data->last_delay_time = delay_time;
|
||||
@@ -1038,9 +1013,6 @@ static void runAddingAllpass_c(LADSPA_Handle instance, unsigned long sample_coun
|
||||
/* Output (array of floats of length sample_count) */
|
||||
LADSPA_Data * const out = plugin_data->out;
|
||||
|
||||
/* Max Delay (s) (float value) */
|
||||
const LADSPA_Data max_delay = *(plugin_data->max_delay);
|
||||
|
||||
/* Delay Time (s) (float value) */
|
||||
const LADSPA_Data delay_time = *(plugin_data->delay_time);
|
||||
|
||||
@@ -1055,8 +1027,7 @@ static void runAddingAllpass_c(LADSPA_Handle instance, unsigned long sample_coun
|
||||
unsigned int sample_rate = plugin_data->sample_rate;
|
||||
long write_phase = plugin_data->write_phase;
|
||||
|
||||
#line 74 "allpass_1895.xml"
|
||||
int i;
|
||||
unsigned int i;
|
||||
|
||||
if (write_phase == 0) {
|
||||
plugin_data->last_delay_time = delay_time;
|
||||
|
||||
@@ -25,8 +25,6 @@ void _init(); // forward declaration
|
||||
#define _WINDOWS_DLL_EXPORT_
|
||||
#endif
|
||||
|
||||
#line 9 "bandpass_a_iir_1893.xml"
|
||||
|
||||
#include "config.h"
|
||||
#include "util/iir.h"
|
||||
|
||||
@@ -70,7 +68,6 @@ static void activateBandpass_a_iir(LADSPA_Handle instance) {
|
||||
iir_stage_t*gt = plugin_data->gt;
|
||||
iirf_t*iirf = plugin_data->iirf;
|
||||
long sample_rate = plugin_data->sample_rate;
|
||||
#line 30 "bandpass_a_iir_1893.xml"
|
||||
|
||||
gt = init_iir_stage(IIR_STAGE_LOWPASS,1,3,2);
|
||||
iirf = init_iirf_t(gt);
|
||||
@@ -82,7 +79,6 @@ static void activateBandpass_a_iir(LADSPA_Handle instance) {
|
||||
}
|
||||
|
||||
static void cleanupBandpass_a_iir(LADSPA_Handle instance) {
|
||||
#line 36 "bandpass_a_iir_1893.xml"
|
||||
Bandpass_a_iir *plugin_data = (Bandpass_a_iir *)instance;
|
||||
free_iirf_t(plugin_data->iirf, plugin_data->gt);
|
||||
free_iir_stage(plugin_data->gt);
|
||||
@@ -120,7 +116,6 @@ static LADSPA_Handle instantiateBandpass_a_iir(
|
||||
iirf_t*iirf = NULL;
|
||||
long sample_rate;
|
||||
|
||||
#line 22 "bandpass_a_iir_1893.xml"
|
||||
sample_rate = s_rate;
|
||||
|
||||
plugin_data->gt = gt;
|
||||
@@ -156,7 +151,6 @@ static void runBandpass_a_iir(LADSPA_Handle instance, unsigned long sample_count
|
||||
iirf_t* iirf = plugin_data->iirf;
|
||||
long sample_rate = plugin_data->sample_rate;
|
||||
|
||||
#line 25 "bandpass_a_iir_1893.xml"
|
||||
calc_2polebandpass(iirf, gt, center, width, sample_rate);
|
||||
iir_process_buffer_1s_5(iirf, gt, input, output, sample_count,0);
|
||||
}
|
||||
@@ -174,7 +168,6 @@ static void setRunAddingGainBandpass_a_iir(LADSPA_Handle instance, LADSPA_Data g
|
||||
|
||||
static void runAddingBandpass_a_iir(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
Bandpass_a_iir *plugin_data = (Bandpass_a_iir *)instance;
|
||||
LADSPA_Data run_adding_gain = plugin_data->run_adding_gain;
|
||||
|
||||
/* Center Frequency (Hz) (float value) */
|
||||
const LADSPA_Data center = *(plugin_data->center);
|
||||
@@ -191,7 +184,6 @@ static void runAddingBandpass_a_iir(LADSPA_Handle instance, unsigned long sample
|
||||
iirf_t* iirf = plugin_data->iirf;
|
||||
long sample_rate = plugin_data->sample_rate;
|
||||
|
||||
#line 25 "bandpass_a_iir_1893.xml"
|
||||
calc_2polebandpass(iirf, gt, center, width, sample_rate);
|
||||
iir_process_buffer_1s_5(iirf, gt, input, output, sample_count,0);
|
||||
}
|
||||
|
||||
@@ -25,7 +25,6 @@ void _init(); // forward declaration
|
||||
#define _WINDOWS_DLL_EXPORT_
|
||||
#endif
|
||||
|
||||
#line 9 "bandpass_iir_1892.xml"
|
||||
|
||||
#include "config.h"
|
||||
#include "util/iir.h"
|
||||
@@ -80,7 +79,6 @@ static void activateBandpass_iir(LADSPA_Handle instance) {
|
||||
long sample_rate = plugin_data->sample_rate;
|
||||
iir_stage_t*second = plugin_data->second;
|
||||
float ufc = plugin_data->ufc;
|
||||
#line 36 "bandpass_iir_1892.xml"
|
||||
|
||||
ufc = (*(plugin_data->center) + *(plugin_data->width)*0.5f)/(float)sample_rate;
|
||||
lfc = (*(plugin_data->center) - *(plugin_data->width)*0.5f)/(float)sample_rate;
|
||||
@@ -102,7 +100,6 @@ static void activateBandpass_iir(LADSPA_Handle instance) {
|
||||
}
|
||||
|
||||
static void cleanupBandpass_iir(LADSPA_Handle instance) {
|
||||
#line 48 "bandpass_iir_1892.xml"
|
||||
Bandpass_iir *plugin_data = (Bandpass_iir *)instance;
|
||||
free_iirf_t(plugin_data->iirf, plugin_data->gt);
|
||||
free_iir_stage(plugin_data->first);
|
||||
@@ -144,12 +141,11 @@ static LADSPA_Handle instantiateBandpass_iir(
|
||||
iir_stage_t*first = NULL;
|
||||
iir_stage_t*gt = NULL;
|
||||
iirf_t*iirf = NULL;
|
||||
float lfc;
|
||||
long sample_rate;
|
||||
float lfc = 0;
|
||||
long sample_rate = 0;
|
||||
iir_stage_t*second = NULL;
|
||||
float ufc;
|
||||
float ufc = 0;
|
||||
|
||||
#line 24 "bandpass_iir_1892.xml"
|
||||
sample_rate = s_rate;
|
||||
|
||||
plugin_data->first = first;
|
||||
@@ -196,7 +192,6 @@ static void runBandpass_iir(LADSPA_Handle instance, unsigned long sample_count)
|
||||
iir_stage_t* second = plugin_data->second;
|
||||
float ufc = plugin_data->ufc;
|
||||
|
||||
#line 27 "bandpass_iir_1892.xml"
|
||||
ufc = (center + width*0.5f)/(float)sample_rate;
|
||||
lfc = (center - width*0.5f)/(float)sample_rate;
|
||||
combine_iir_stages(IIR_STAGE_BANDPASS, gt, first, second,
|
||||
@@ -218,7 +213,6 @@ static void setRunAddingGainBandpass_iir(LADSPA_Handle instance, LADSPA_Data gai
|
||||
|
||||
static void runAddingBandpass_iir(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
Bandpass_iir *plugin_data = (Bandpass_iir *)instance;
|
||||
LADSPA_Data run_adding_gain = plugin_data->run_adding_gain;
|
||||
|
||||
/* Center Frequency (Hz) (float value) */
|
||||
const LADSPA_Data center = *(plugin_data->center);
|
||||
@@ -242,7 +236,6 @@ static void runAddingBandpass_iir(LADSPA_Handle instance, unsigned long sample_c
|
||||
iir_stage_t* second = plugin_data->second;
|
||||
float ufc = plugin_data->ufc;
|
||||
|
||||
#line 27 "bandpass_iir_1892.xml"
|
||||
ufc = (center + width*0.5f)/(float)sample_rate;
|
||||
lfc = (center - width*0.5f)/(float)sample_rate;
|
||||
combine_iir_stages(IIR_STAGE_BANDPASS, gt, first, second,
|
||||
|
||||
@@ -25,7 +25,6 @@ void _init(); // forward declaration
|
||||
#define _WINDOWS_DLL_EXPORT_
|
||||
#endif
|
||||
|
||||
#line 9 "butterworth_1902.xml"
|
||||
|
||||
#include "config.h"
|
||||
#include "util/iir.h"
|
||||
@@ -111,7 +110,6 @@ static void activateBwxover_iir(LADSPA_Handle instance) {
|
||||
iir_stage_t*gt = plugin_data->gt;
|
||||
iirf_t*iirf = plugin_data->iirf;
|
||||
long sample_rate = plugin_data->sample_rate;
|
||||
#line 31 "butterworth_1902.xml"
|
||||
|
||||
gt = init_iir_stage(IIR_STAGE_LOWPASS,1,3,2);
|
||||
iirf = init_iirf_t(gt);
|
||||
@@ -125,7 +123,6 @@ static void activateBwxover_iir(LADSPA_Handle instance) {
|
||||
}
|
||||
|
||||
static void cleanupBwxover_iir(LADSPA_Handle instance) {
|
||||
#line 39 "butterworth_1902.xml"
|
||||
Bwxover_iir *plugin_data = (Bwxover_iir *)instance;
|
||||
free_iirf_t(plugin_data->iirf, plugin_data->gt);
|
||||
free_iir_stage(plugin_data->gt);
|
||||
@@ -166,7 +163,6 @@ static LADSPA_Handle instantiateBwxover_iir(
|
||||
iirf_t*iirf = NULL;
|
||||
long sample_rate;
|
||||
|
||||
#line 22 "butterworth_1902.xml"
|
||||
sample_rate = s_rate;
|
||||
|
||||
plugin_data->gt = gt;
|
||||
@@ -205,7 +201,6 @@ static void runBwxover_iir(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
iirf_t* iirf = plugin_data->iirf;
|
||||
long sample_rate = plugin_data->sample_rate;
|
||||
|
||||
#line 25 "butterworth_1902.xml"
|
||||
butterworth_stage(gt, 0, cutoff, resonance, sample_rate);
|
||||
iir_process_buffer_1s_5(iirf, gt, input, lpoutput, sample_count,0);
|
||||
buffer_sub(input, lpoutput, hpoutput, sample_count);
|
||||
@@ -224,7 +219,6 @@ static void setRunAddingGainBwxover_iir(LADSPA_Handle instance, LADSPA_Data gain
|
||||
|
||||
static void runAddingBwxover_iir(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
Bwxover_iir *plugin_data = (Bwxover_iir *)instance;
|
||||
LADSPA_Data run_adding_gain = plugin_data->run_adding_gain;
|
||||
|
||||
/* Cutoff Frequency (Hz) (float value) */
|
||||
const LADSPA_Data cutoff = *(plugin_data->cutoff);
|
||||
@@ -244,7 +238,6 @@ static void runAddingBwxover_iir(LADSPA_Handle instance, unsigned long sample_co
|
||||
iirf_t* iirf = plugin_data->iirf;
|
||||
long sample_rate = plugin_data->sample_rate;
|
||||
|
||||
#line 25 "butterworth_1902.xml"
|
||||
butterworth_stage(gt, 0, cutoff, resonance, sample_rate);
|
||||
iir_process_buffer_1s_5(iirf, gt, input, lpoutput, sample_count,0);
|
||||
buffer_sub(input, lpoutput, hpoutput, sample_count);
|
||||
@@ -255,7 +248,6 @@ static void activateButtlow_iir(LADSPA_Handle instance) {
|
||||
iir_stage_t*gt = plugin_data->gt;
|
||||
iirf_t*iirf = plugin_data->iirf;
|
||||
long sample_rate = plugin_data->sample_rate;
|
||||
#line 31 "butterworth_1902.xml"
|
||||
|
||||
gt = init_iir_stage(IIR_STAGE_LOWPASS,1,3,2);
|
||||
iirf = init_iirf_t(gt);
|
||||
@@ -269,7 +261,6 @@ static void activateButtlow_iir(LADSPA_Handle instance) {
|
||||
}
|
||||
|
||||
static void cleanupButtlow_iir(LADSPA_Handle instance) {
|
||||
#line 39 "butterworth_1902.xml"
|
||||
Buttlow_iir *plugin_data = (Buttlow_iir *)instance;
|
||||
free_iirf_t(plugin_data->iirf, plugin_data->gt);
|
||||
free_iir_stage(plugin_data->gt);
|
||||
@@ -307,7 +298,6 @@ static LADSPA_Handle instantiateButtlow_iir(
|
||||
iirf_t*iirf = NULL;
|
||||
long sample_rate;
|
||||
|
||||
#line 22 "butterworth_1902.xml"
|
||||
sample_rate = s_rate;
|
||||
|
||||
plugin_data->gt = gt;
|
||||
@@ -343,7 +333,6 @@ static void runButtlow_iir(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
iirf_t* iirf = plugin_data->iirf;
|
||||
long sample_rate = plugin_data->sample_rate;
|
||||
|
||||
#line 25 "butterworth_1902.xml"
|
||||
butterworth_stage(gt, 0, cutoff, resonance, sample_rate);
|
||||
iir_process_buffer_1s_5(iirf, gt, input, output, sample_count,0);
|
||||
}
|
||||
@@ -361,7 +350,6 @@ static void setRunAddingGainButtlow_iir(LADSPA_Handle instance, LADSPA_Data gain
|
||||
|
||||
static void runAddingButtlow_iir(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
Buttlow_iir *plugin_data = (Buttlow_iir *)instance;
|
||||
LADSPA_Data run_adding_gain = plugin_data->run_adding_gain;
|
||||
|
||||
/* Cutoff Frequency (Hz) (float value) */
|
||||
const LADSPA_Data cutoff = *(plugin_data->cutoff);
|
||||
@@ -378,7 +366,6 @@ static void runAddingButtlow_iir(LADSPA_Handle instance, unsigned long sample_co
|
||||
iirf_t* iirf = plugin_data->iirf;
|
||||
long sample_rate = plugin_data->sample_rate;
|
||||
|
||||
#line 25 "butterworth_1902.xml"
|
||||
butterworth_stage(gt, 0, cutoff, resonance, sample_rate);
|
||||
iir_process_buffer_1s_5(iirf, gt, input, output, sample_count,0);
|
||||
}
|
||||
@@ -388,7 +375,6 @@ static void activateButthigh_iir(LADSPA_Handle instance) {
|
||||
iir_stage_t*gt = plugin_data->gt;
|
||||
iirf_t*iirf = plugin_data->iirf;
|
||||
long sample_rate = plugin_data->sample_rate;
|
||||
#line 31 "butterworth_1902.xml"
|
||||
|
||||
gt = init_iir_stage(IIR_STAGE_LOWPASS,1,3,2);
|
||||
iirf = init_iirf_t(gt);
|
||||
@@ -402,7 +388,6 @@ static void activateButthigh_iir(LADSPA_Handle instance) {
|
||||
}
|
||||
|
||||
static void cleanupButthigh_iir(LADSPA_Handle instance) {
|
||||
#line 39 "butterworth_1902.xml"
|
||||
Butthigh_iir *plugin_data = (Butthigh_iir *)instance;
|
||||
free_iirf_t(plugin_data->iirf, plugin_data->gt);
|
||||
free_iir_stage(plugin_data->gt);
|
||||
@@ -440,7 +425,6 @@ static LADSPA_Handle instantiateButthigh_iir(
|
||||
iirf_t*iirf = NULL;
|
||||
long sample_rate;
|
||||
|
||||
#line 22 "butterworth_1902.xml"
|
||||
sample_rate = s_rate;
|
||||
|
||||
plugin_data->gt = gt;
|
||||
@@ -476,7 +460,6 @@ static void runButthigh_iir(LADSPA_Handle instance, unsigned long sample_count)
|
||||
iirf_t* iirf = plugin_data->iirf;
|
||||
long sample_rate = plugin_data->sample_rate;
|
||||
|
||||
#line 25 "butterworth_1902.xml"
|
||||
butterworth_stage(gt, 1, cutoff, resonance, sample_rate);
|
||||
iir_process_buffer_1s_5(iirf, gt, input, output, sample_count,0);
|
||||
}
|
||||
@@ -494,7 +477,6 @@ static void setRunAddingGainButthigh_iir(LADSPA_Handle instance, LADSPA_Data gai
|
||||
|
||||
static void runAddingButthigh_iir(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
Butthigh_iir *plugin_data = (Butthigh_iir *)instance;
|
||||
LADSPA_Data run_adding_gain = plugin_data->run_adding_gain;
|
||||
|
||||
/* Cutoff Frequency (Hz) (float value) */
|
||||
const LADSPA_Data cutoff = *(plugin_data->cutoff);
|
||||
@@ -511,7 +493,6 @@ static void runAddingButthigh_iir(LADSPA_Handle instance, unsigned long sample_c
|
||||
iirf_t* iirf = plugin_data->iirf;
|
||||
long sample_rate = plugin_data->sample_rate;
|
||||
|
||||
#line 25 "butterworth_1902.xml"
|
||||
butterworth_stage(gt, 1, cutoff, resonance, sample_rate);
|
||||
iir_process_buffer_1s_5(iirf, gt, input, output, sample_count,0);
|
||||
}
|
||||
|
||||
@@ -25,7 +25,6 @@ void _init(); // forward declaration
|
||||
#define _WINDOWS_DLL_EXPORT_
|
||||
#endif
|
||||
|
||||
#line 10 "comb_1887.xml"
|
||||
|
||||
#include "ladspa-util.h"
|
||||
|
||||
@@ -152,7 +151,6 @@ static void activateComb_n(LADSPA_Handle instance) {
|
||||
LADSPA_Data last_delay_time = plugin_data->last_delay_time;
|
||||
unsigned int sample_rate = plugin_data->sample_rate;
|
||||
long write_phase = plugin_data->write_phase;
|
||||
#line 45 "comb_1887.xml"
|
||||
unsigned int minsize, size;
|
||||
|
||||
if (plugin_data->max_delay && *plugin_data->max_delay > 0)
|
||||
@@ -184,7 +182,6 @@ static void activateComb_n(LADSPA_Handle instance) {
|
||||
}
|
||||
|
||||
static void cleanupComb_n(LADSPA_Handle instance) {
|
||||
#line 67 "comb_1887.xml"
|
||||
Comb_n *plugin_data = (Comb_n *)instance;
|
||||
free(plugin_data->buffer);
|
||||
free(instance);
|
||||
@@ -221,15 +218,14 @@ static LADSPA_Handle instantiateComb_n(
|
||||
unsigned long s_rate) {
|
||||
Comb_n *plugin_data = (Comb_n *)malloc(sizeof(Comb_n));
|
||||
LADSPA_Data *buffer = NULL;
|
||||
unsigned int buffer_mask;
|
||||
LADSPA_Data delay_samples;
|
||||
LADSPA_Data feedback;
|
||||
LADSPA_Data last_decay_time;
|
||||
LADSPA_Data last_delay_time;
|
||||
unsigned int sample_rate;
|
||||
long write_phase;
|
||||
unsigned int buffer_mask = 0;
|
||||
LADSPA_Data delay_samples = 0;
|
||||
LADSPA_Data feedback = 0;
|
||||
LADSPA_Data last_decay_time = 0;
|
||||
LADSPA_Data last_delay_time = 0;
|
||||
unsigned int sample_rate = 0;
|
||||
long write_phase = 0;
|
||||
|
||||
#line 41 "comb_1887.xml"
|
||||
sample_rate = s_rate;
|
||||
|
||||
plugin_data->buffer = buffer;
|
||||
@@ -278,8 +274,7 @@ static void runComb_n(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
unsigned int sample_rate = plugin_data->sample_rate;
|
||||
long write_phase = plugin_data->write_phase;
|
||||
|
||||
#line 71 "comb_1887.xml"
|
||||
int i;
|
||||
unsigned int i;
|
||||
|
||||
i = max_delay; /* stop gcc complaining */
|
||||
|
||||
@@ -417,8 +412,7 @@ static void runAddingComb_n(LADSPA_Handle instance, unsigned long sample_count)
|
||||
unsigned int sample_rate = plugin_data->sample_rate;
|
||||
long write_phase = plugin_data->write_phase;
|
||||
|
||||
#line 71 "comb_1887.xml"
|
||||
int i;
|
||||
unsigned int i;
|
||||
|
||||
i = max_delay; /* stop gcc complaining */
|
||||
|
||||
@@ -528,7 +522,6 @@ static void activateComb_l(LADSPA_Handle instance) {
|
||||
LADSPA_Data last_delay_time = plugin_data->last_delay_time;
|
||||
unsigned int sample_rate = plugin_data->sample_rate;
|
||||
long write_phase = plugin_data->write_phase;
|
||||
#line 45 "comb_1887.xml"
|
||||
unsigned int minsize, size;
|
||||
|
||||
if (plugin_data->max_delay && *plugin_data->max_delay > 0)
|
||||
@@ -560,7 +553,6 @@ static void activateComb_l(LADSPA_Handle instance) {
|
||||
}
|
||||
|
||||
static void cleanupComb_l(LADSPA_Handle instance) {
|
||||
#line 67 "comb_1887.xml"
|
||||
Comb_l *plugin_data = (Comb_l *)instance;
|
||||
free(plugin_data->buffer);
|
||||
free(instance);
|
||||
@@ -597,15 +589,14 @@ static LADSPA_Handle instantiateComb_l(
|
||||
unsigned long s_rate) {
|
||||
Comb_l *plugin_data = (Comb_l *)malloc(sizeof(Comb_l));
|
||||
LADSPA_Data *buffer = NULL;
|
||||
unsigned int buffer_mask;
|
||||
LADSPA_Data delay_samples;
|
||||
LADSPA_Data feedback;
|
||||
LADSPA_Data last_decay_time;
|
||||
LADSPA_Data last_delay_time;
|
||||
unsigned int sample_rate;
|
||||
long write_phase;
|
||||
unsigned int buffer_mask = 0;
|
||||
LADSPA_Data delay_samples = 0;
|
||||
LADSPA_Data feedback = 0;
|
||||
LADSPA_Data last_decay_time = 0;
|
||||
LADSPA_Data last_delay_time = 0;
|
||||
unsigned int sample_rate = 0;
|
||||
long write_phase = 0;
|
||||
|
||||
#line 41 "comb_1887.xml"
|
||||
sample_rate = s_rate;
|
||||
|
||||
plugin_data->buffer = buffer;
|
||||
@@ -654,8 +645,7 @@ static void runComb_l(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
unsigned int sample_rate = plugin_data->sample_rate;
|
||||
long write_phase = plugin_data->write_phase;
|
||||
|
||||
#line 71 "comb_1887.xml"
|
||||
int i;
|
||||
unsigned int i;
|
||||
|
||||
i = max_delay;
|
||||
|
||||
@@ -751,8 +741,7 @@ static void runAddingComb_l(LADSPA_Handle instance, unsigned long sample_count)
|
||||
unsigned int sample_rate = plugin_data->sample_rate;
|
||||
long write_phase = plugin_data->write_phase;
|
||||
|
||||
#line 71 "comb_1887.xml"
|
||||
int i;
|
||||
unsigned int i;
|
||||
|
||||
i = max_delay;
|
||||
|
||||
@@ -820,7 +809,6 @@ static void activateComb_c(LADSPA_Handle instance) {
|
||||
LADSPA_Data last_delay_time = plugin_data->last_delay_time;
|
||||
unsigned int sample_rate = plugin_data->sample_rate;
|
||||
long write_phase = plugin_data->write_phase;
|
||||
#line 45 "comb_1887.xml"
|
||||
unsigned int minsize, size;
|
||||
|
||||
if (plugin_data->max_delay && *plugin_data->max_delay > 0)
|
||||
@@ -852,7 +840,6 @@ static void activateComb_c(LADSPA_Handle instance) {
|
||||
}
|
||||
|
||||
static void cleanupComb_c(LADSPA_Handle instance) {
|
||||
#line 67 "comb_1887.xml"
|
||||
Comb_c *plugin_data = (Comb_c *)instance;
|
||||
free(plugin_data->buffer);
|
||||
free(instance);
|
||||
@@ -889,15 +876,14 @@ static LADSPA_Handle instantiateComb_c(
|
||||
unsigned long s_rate) {
|
||||
Comb_c *plugin_data = (Comb_c *)malloc(sizeof(Comb_c));
|
||||
LADSPA_Data *buffer = NULL;
|
||||
unsigned int buffer_mask;
|
||||
LADSPA_Data delay_samples;
|
||||
LADSPA_Data feedback;
|
||||
LADSPA_Data last_decay_time;
|
||||
LADSPA_Data last_delay_time;
|
||||
unsigned int sample_rate;
|
||||
long write_phase;
|
||||
unsigned int buffer_mask = 0;
|
||||
LADSPA_Data delay_samples = 0;
|
||||
LADSPA_Data feedback = 0;
|
||||
LADSPA_Data last_decay_time = 0;
|
||||
LADSPA_Data last_delay_time = 0;
|
||||
unsigned int sample_rate = 0;
|
||||
long write_phase = 0;
|
||||
|
||||
#line 41 "comb_1887.xml"
|
||||
sample_rate = s_rate;
|
||||
|
||||
plugin_data->buffer = buffer;
|
||||
@@ -946,8 +932,7 @@ static void runComb_c(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
unsigned int sample_rate = plugin_data->sample_rate;
|
||||
long write_phase = plugin_data->write_phase;
|
||||
|
||||
#line 71 "comb_1887.xml"
|
||||
int i;
|
||||
unsigned int i;
|
||||
|
||||
i = max_delay;
|
||||
|
||||
@@ -1047,8 +1032,7 @@ static void runAddingComb_c(LADSPA_Handle instance, unsigned long sample_count)
|
||||
unsigned int sample_rate = plugin_data->sample_rate;
|
||||
long write_phase = plugin_data->write_phase;
|
||||
|
||||
#line 71 "comb_1887.xml"
|
||||
int i;
|
||||
unsigned int i;
|
||||
|
||||
i = max_delay;
|
||||
|
||||
|
||||
@@ -25,7 +25,6 @@ void _init(); // forward declaration
|
||||
#define _WINDOWS_DLL_EXPORT_
|
||||
#endif
|
||||
|
||||
#line 10 "decay_1886.xml"
|
||||
|
||||
#include "ladspa-util.h"
|
||||
|
||||
@@ -73,7 +72,6 @@ static void activateDecay(LADSPA_Handle instance) {
|
||||
LADSPA_Data last_decay_time = plugin_data->last_decay_time;
|
||||
LADSPA_Data sample_rate = plugin_data->sample_rate;
|
||||
LADSPA_Data y = plugin_data->y;
|
||||
#line 28 "decay_1886.xml"
|
||||
b = 0.f;
|
||||
y = 0.f;
|
||||
last_decay_time = 0.f;
|
||||
@@ -114,13 +112,12 @@ static LADSPA_Handle instantiateDecay(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
Decay *plugin_data = (Decay *)malloc(sizeof(Decay));
|
||||
LADSPA_Data b;
|
||||
char first_time;
|
||||
LADSPA_Data last_decay_time;
|
||||
LADSPA_Data sample_rate;
|
||||
LADSPA_Data y;
|
||||
LADSPA_Data b = 0;
|
||||
char first_time = 0;
|
||||
LADSPA_Data last_decay_time = 0;
|
||||
LADSPA_Data sample_rate = 0;
|
||||
LADSPA_Data y = 0;
|
||||
|
||||
#line 24 "decay_1886.xml"
|
||||
sample_rate = s_rate;
|
||||
|
||||
plugin_data->b = b;
|
||||
@@ -157,8 +154,7 @@ static void runDecay(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
LADSPA_Data sample_rate = plugin_data->sample_rate;
|
||||
LADSPA_Data y = plugin_data->y;
|
||||
|
||||
#line 35 "decay_1886.xml"
|
||||
int i;
|
||||
unsigned int i;
|
||||
|
||||
if (first_time) {
|
||||
plugin_data->last_decay_time = decay_time;
|
||||
@@ -219,8 +215,7 @@ static void runAddingDecay(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
LADSPA_Data sample_rate = plugin_data->sample_rate;
|
||||
LADSPA_Data y = plugin_data->y;
|
||||
|
||||
#line 35 "decay_1886.xml"
|
||||
int i;
|
||||
unsigned int i;
|
||||
|
||||
if (first_time) {
|
||||
plugin_data->last_decay_time = decay_time;
|
||||
|
||||
@@ -25,7 +25,6 @@ void _init(); // forward declaration
|
||||
#define _WINDOWS_DLL_EXPORT_
|
||||
#endif
|
||||
|
||||
#line 10 "delay_1898.xml"
|
||||
|
||||
#include "ladspa-util.h"
|
||||
|
||||
@@ -123,7 +122,6 @@ static void activateDelay_n(LADSPA_Handle instance) {
|
||||
LADSPA_Data last_delay_time = plugin_data->last_delay_time;
|
||||
unsigned int sample_rate = plugin_data->sample_rate;
|
||||
long write_phase = plugin_data->write_phase;
|
||||
#line 31 "delay_1898.xml"
|
||||
unsigned int minsize, size;
|
||||
|
||||
if (plugin_data->max_delay && *plugin_data->max_delay > 0)
|
||||
@@ -153,7 +151,6 @@ static void activateDelay_n(LADSPA_Handle instance) {
|
||||
}
|
||||
|
||||
static void cleanupDelay_n(LADSPA_Handle instance) {
|
||||
#line 53 "delay_1898.xml"
|
||||
Delay_n *plugin_data = (Delay_n *)instance;
|
||||
free(plugin_data->buffer);
|
||||
free(instance);
|
||||
@@ -187,13 +184,12 @@ static LADSPA_Handle instantiateDelay_n(
|
||||
unsigned long s_rate) {
|
||||
Delay_n *plugin_data = (Delay_n *)malloc(sizeof(Delay_n));
|
||||
LADSPA_Data *buffer = NULL;
|
||||
unsigned int buffer_mask;
|
||||
LADSPA_Data delay_samples;
|
||||
LADSPA_Data last_delay_time;
|
||||
unsigned int sample_rate;
|
||||
long write_phase;
|
||||
unsigned int buffer_mask = 0;
|
||||
LADSPA_Data delay_samples = 0;
|
||||
LADSPA_Data last_delay_time = 0;
|
||||
unsigned int sample_rate = 0;
|
||||
long write_phase = 0;
|
||||
|
||||
#line 27 "delay_1898.xml"
|
||||
sample_rate = s_rate;
|
||||
|
||||
plugin_data->buffer = buffer;
|
||||
@@ -223,9 +219,6 @@ static void runDelay_n(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
/* Output (array of floats of length sample_count) */
|
||||
LADSPA_Data * const out = plugin_data->out;
|
||||
|
||||
/* Max Delay (s) (float value) */
|
||||
const LADSPA_Data max_delay = *(plugin_data->max_delay);
|
||||
|
||||
/* Delay Time (s) (float value) */
|
||||
const LADSPA_Data delay_time = *(plugin_data->delay_time);
|
||||
LADSPA_Data * buffer = plugin_data->buffer;
|
||||
@@ -235,8 +228,7 @@ static void runDelay_n(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
unsigned int sample_rate = plugin_data->sample_rate;
|
||||
long write_phase = plugin_data->write_phase;
|
||||
|
||||
#line 57 "delay_1898.xml"
|
||||
int i;
|
||||
unsigned int i;
|
||||
|
||||
if (write_phase == 0) {
|
||||
plugin_data->last_delay_time = delay_time;
|
||||
@@ -317,9 +309,6 @@ static void runAddingDelay_n(LADSPA_Handle instance, unsigned long sample_count)
|
||||
/* Output (array of floats of length sample_count) */
|
||||
LADSPA_Data * const out = plugin_data->out;
|
||||
|
||||
/* Max Delay (s) (float value) */
|
||||
const LADSPA_Data max_delay = *(plugin_data->max_delay);
|
||||
|
||||
/* Delay Time (s) (float value) */
|
||||
const LADSPA_Data delay_time = *(plugin_data->delay_time);
|
||||
LADSPA_Data * buffer = plugin_data->buffer;
|
||||
@@ -329,8 +318,7 @@ static void runAddingDelay_n(LADSPA_Handle instance, unsigned long sample_count)
|
||||
unsigned int sample_rate = plugin_data->sample_rate;
|
||||
long write_phase = plugin_data->write_phase;
|
||||
|
||||
#line 57 "delay_1898.xml"
|
||||
int i;
|
||||
unsigned int i;
|
||||
|
||||
if (write_phase == 0) {
|
||||
plugin_data->last_delay_time = delay_time;
|
||||
@@ -398,7 +386,6 @@ static void activateDelay_l(LADSPA_Handle instance) {
|
||||
LADSPA_Data last_delay_time = plugin_data->last_delay_time;
|
||||
unsigned int sample_rate = plugin_data->sample_rate;
|
||||
long write_phase = plugin_data->write_phase;
|
||||
#line 31 "delay_1898.xml"
|
||||
unsigned int minsize, size;
|
||||
|
||||
if (plugin_data->max_delay && *plugin_data->max_delay > 0)
|
||||
@@ -428,7 +415,6 @@ static void activateDelay_l(LADSPA_Handle instance) {
|
||||
}
|
||||
|
||||
static void cleanupDelay_l(LADSPA_Handle instance) {
|
||||
#line 53 "delay_1898.xml"
|
||||
Delay_l *plugin_data = (Delay_l *)instance;
|
||||
free(plugin_data->buffer);
|
||||
free(instance);
|
||||
@@ -462,13 +448,12 @@ static LADSPA_Handle instantiateDelay_l(
|
||||
unsigned long s_rate) {
|
||||
Delay_l *plugin_data = (Delay_l *)malloc(sizeof(Delay_l));
|
||||
LADSPA_Data *buffer = NULL;
|
||||
unsigned int buffer_mask;
|
||||
LADSPA_Data delay_samples;
|
||||
LADSPA_Data last_delay_time;
|
||||
unsigned int sample_rate;
|
||||
long write_phase;
|
||||
unsigned int buffer_mask = 0;
|
||||
LADSPA_Data delay_samples = 0;
|
||||
LADSPA_Data last_delay_time = 0;
|
||||
unsigned int sample_rate = 0;
|
||||
long write_phase = 0;
|
||||
|
||||
#line 27 "delay_1898.xml"
|
||||
sample_rate = s_rate;
|
||||
|
||||
plugin_data->buffer = buffer;
|
||||
@@ -498,9 +483,6 @@ static void runDelay_l(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
/* Output (array of floats of length sample_count) */
|
||||
LADSPA_Data * const out = plugin_data->out;
|
||||
|
||||
/* Max Delay (s) (float value) */
|
||||
const LADSPA_Data max_delay = *(plugin_data->max_delay);
|
||||
|
||||
/* Delay Time (s) (float value) */
|
||||
const LADSPA_Data delay_time = *(plugin_data->delay_time);
|
||||
LADSPA_Data * buffer = plugin_data->buffer;
|
||||
@@ -510,8 +492,7 @@ static void runDelay_l(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
unsigned int sample_rate = plugin_data->sample_rate;
|
||||
long write_phase = plugin_data->write_phase;
|
||||
|
||||
#line 57 "delay_1898.xml"
|
||||
int i;
|
||||
unsigned int i;
|
||||
|
||||
if (write_phase == 0) {
|
||||
plugin_data->last_delay_time = delay_time;
|
||||
@@ -580,9 +561,6 @@ static void runAddingDelay_l(LADSPA_Handle instance, unsigned long sample_count)
|
||||
/* Output (array of floats of length sample_count) */
|
||||
LADSPA_Data * const out = plugin_data->out;
|
||||
|
||||
/* Max Delay (s) (float value) */
|
||||
const LADSPA_Data max_delay = *(plugin_data->max_delay);
|
||||
|
||||
/* Delay Time (s) (float value) */
|
||||
const LADSPA_Data delay_time = *(plugin_data->delay_time);
|
||||
LADSPA_Data * buffer = plugin_data->buffer;
|
||||
@@ -592,8 +570,7 @@ static void runAddingDelay_l(LADSPA_Handle instance, unsigned long sample_count)
|
||||
unsigned int sample_rate = plugin_data->sample_rate;
|
||||
long write_phase = plugin_data->write_phase;
|
||||
|
||||
#line 57 "delay_1898.xml"
|
||||
int i;
|
||||
unsigned int i;
|
||||
|
||||
if (write_phase == 0) {
|
||||
plugin_data->last_delay_time = delay_time;
|
||||
@@ -649,7 +626,6 @@ static void activateDelay_c(LADSPA_Handle instance) {
|
||||
LADSPA_Data last_delay_time = plugin_data->last_delay_time;
|
||||
unsigned int sample_rate = plugin_data->sample_rate;
|
||||
long write_phase = plugin_data->write_phase;
|
||||
#line 31 "delay_1898.xml"
|
||||
unsigned int minsize, size;
|
||||
|
||||
if (plugin_data->max_delay && *plugin_data->max_delay > 0)
|
||||
@@ -679,7 +655,6 @@ static void activateDelay_c(LADSPA_Handle instance) {
|
||||
}
|
||||
|
||||
static void cleanupDelay_c(LADSPA_Handle instance) {
|
||||
#line 53 "delay_1898.xml"
|
||||
Delay_c *plugin_data = (Delay_c *)instance;
|
||||
free(plugin_data->buffer);
|
||||
free(instance);
|
||||
@@ -713,13 +688,12 @@ static LADSPA_Handle instantiateDelay_c(
|
||||
unsigned long s_rate) {
|
||||
Delay_c *plugin_data = (Delay_c *)malloc(sizeof(Delay_c));
|
||||
LADSPA_Data *buffer = NULL;
|
||||
unsigned int buffer_mask;
|
||||
LADSPA_Data delay_samples;
|
||||
LADSPA_Data last_delay_time;
|
||||
unsigned int sample_rate;
|
||||
long write_phase;
|
||||
unsigned int buffer_mask = 0;
|
||||
LADSPA_Data delay_samples = 0;
|
||||
LADSPA_Data last_delay_time = 0;
|
||||
unsigned int sample_rate = 0;
|
||||
long write_phase = 0;
|
||||
|
||||
#line 27 "delay_1898.xml"
|
||||
sample_rate = s_rate;
|
||||
|
||||
plugin_data->buffer = buffer;
|
||||
@@ -749,9 +723,6 @@ static void runDelay_c(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
/* Output (array of floats of length sample_count) */
|
||||
LADSPA_Data * const out = plugin_data->out;
|
||||
|
||||
/* Max Delay (s) (float value) */
|
||||
const LADSPA_Data max_delay = *(plugin_data->max_delay);
|
||||
|
||||
/* Delay Time (s) (float value) */
|
||||
const LADSPA_Data delay_time = *(plugin_data->delay_time);
|
||||
LADSPA_Data * buffer = plugin_data->buffer;
|
||||
@@ -761,8 +732,7 @@ static void runDelay_c(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
unsigned int sample_rate = plugin_data->sample_rate;
|
||||
long write_phase = plugin_data->write_phase;
|
||||
|
||||
#line 57 "delay_1898.xml"
|
||||
int i;
|
||||
unsigned int i;
|
||||
|
||||
if (write_phase == 0) {
|
||||
plugin_data->last_delay_time = delay_time;
|
||||
@@ -789,7 +759,7 @@ static void runDelay_c(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
|
||||
for (i=0; i<sample_count; i++) {
|
||||
long read_phase, idelay_samples;
|
||||
LADSPA_Data written, frac, read;
|
||||
LADSPA_Data frac, read;
|
||||
|
||||
delay_samples += delay_samples_slope;
|
||||
write_phase++;
|
||||
@@ -833,9 +803,6 @@ static void runAddingDelay_c(LADSPA_Handle instance, unsigned long sample_count)
|
||||
/* Output (array of floats of length sample_count) */
|
||||
LADSPA_Data * const out = plugin_data->out;
|
||||
|
||||
/* Max Delay (s) (float value) */
|
||||
const LADSPA_Data max_delay = *(plugin_data->max_delay);
|
||||
|
||||
/* Delay Time (s) (float value) */
|
||||
const LADSPA_Data delay_time = *(plugin_data->delay_time);
|
||||
LADSPA_Data * buffer = plugin_data->buffer;
|
||||
@@ -845,8 +812,7 @@ static void runAddingDelay_c(LADSPA_Handle instance, unsigned long sample_count)
|
||||
unsigned int sample_rate = plugin_data->sample_rate;
|
||||
long write_phase = plugin_data->write_phase;
|
||||
|
||||
#line 57 "delay_1898.xml"
|
||||
int i;
|
||||
unsigned int i;
|
||||
|
||||
if (write_phase == 0) {
|
||||
plugin_data->last_delay_time = delay_time;
|
||||
@@ -873,7 +839,7 @@ static void runAddingDelay_c(LADSPA_Handle instance, unsigned long sample_count)
|
||||
|
||||
for (i=0; i<sample_count; i++) {
|
||||
long read_phase, idelay_samples;
|
||||
LADSPA_Data written, frac, read;
|
||||
LADSPA_Data frac, read;
|
||||
|
||||
delay_samples += delay_samples_slope;
|
||||
write_phase++;
|
||||
|
||||
@@ -25,7 +25,6 @@ void _init(); // forward declaration
|
||||
#define _WINDOWS_DLL_EXPORT_
|
||||
#endif
|
||||
|
||||
#line 8 "fad_delay_1192.xml"
|
||||
|
||||
#include "ladspa-util.h"
|
||||
|
||||
@@ -79,8 +78,7 @@ static void activateFadDelay(LADSPA_Handle instance) {
|
||||
int last_phase = plugin_data->last_phase;
|
||||
float phase = plugin_data->phase;
|
||||
long sample_rate = plugin_data->sample_rate;
|
||||
#line 35 "fad_delay_1192.xml"
|
||||
int i;
|
||||
unsigned int i;
|
||||
|
||||
for (i = 0; i < buffer_size; i++) {
|
||||
buffer[i] = 0;
|
||||
@@ -100,7 +98,6 @@ static void activateFadDelay(LADSPA_Handle instance) {
|
||||
}
|
||||
|
||||
static void cleanupFadDelay(LADSPA_Handle instance) {
|
||||
#line 47 "fad_delay_1192.xml"
|
||||
FadDelay *plugin_data = (FadDelay *)instance;
|
||||
free(plugin_data->buffer);
|
||||
free(instance);
|
||||
@@ -141,7 +138,6 @@ static LADSPA_Handle instantiateFadDelay(
|
||||
float phase;
|
||||
long sample_rate;
|
||||
|
||||
#line 21 "fad_delay_1192.xml"
|
||||
unsigned int min_bs;
|
||||
|
||||
sample_rate = s_rate;
|
||||
@@ -195,8 +191,7 @@ static void runFadDelay(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
float phase = plugin_data->phase;
|
||||
long sample_rate = plugin_data->sample_rate;
|
||||
|
||||
#line 51 "fad_delay_1192.xml"
|
||||
long int pos;
|
||||
unsigned long int pos;
|
||||
float increment = (float)buffer_size / ((float)sample_rate *
|
||||
f_max(fabs(delay), 0.01));
|
||||
float lin_int, lin_inc;
|
||||
@@ -267,8 +262,7 @@ static void runAddingFadDelay(LADSPA_Handle instance, unsigned long sample_count
|
||||
float phase = plugin_data->phase;
|
||||
long sample_rate = plugin_data->sample_rate;
|
||||
|
||||
#line 51 "fad_delay_1192.xml"
|
||||
long int pos;
|
||||
unsigned long int pos;
|
||||
float increment = (float)buffer_size / ((float)sample_rate *
|
||||
f_max(fabs(delay), 0.01));
|
||||
float lin_int, lin_inc;
|
||||
|
||||
@@ -25,7 +25,6 @@ void _init(); // forward declaration
|
||||
#define _WINDOWS_DLL_EXPORT_
|
||||
#endif
|
||||
|
||||
#line 9 "highpass_iir_1890.xml"
|
||||
|
||||
#include "config.h"
|
||||
#include "util/iir.h"
|
||||
@@ -70,7 +69,6 @@ static void activateHighpass_iir(LADSPA_Handle instance) {
|
||||
iir_stage_t*gt = plugin_data->gt;
|
||||
iirf_t*iirf = plugin_data->iirf;
|
||||
long sample_rate = plugin_data->sample_rate;
|
||||
#line 32 "highpass_iir_1890.xml"
|
||||
|
||||
gt = init_iir_stage(IIR_STAGE_HIGHPASS,10,3,2);
|
||||
iirf = init_iirf_t(gt);
|
||||
@@ -82,7 +80,6 @@ static void activateHighpass_iir(LADSPA_Handle instance) {
|
||||
}
|
||||
|
||||
static void cleanupHighpass_iir(LADSPA_Handle instance) {
|
||||
#line 38 "highpass_iir_1890.xml"
|
||||
Highpass_iir *plugin_data = (Highpass_iir *)instance;
|
||||
free_iirf_t(plugin_data->iirf, plugin_data->gt);
|
||||
free_iir_stage(plugin_data->gt);
|
||||
@@ -120,7 +117,6 @@ static LADSPA_Handle instantiateHighpass_iir(
|
||||
iirf_t*iirf = NULL;
|
||||
long sample_rate;
|
||||
|
||||
#line 24 "highpass_iir_1890.xml"
|
||||
sample_rate = s_rate;
|
||||
|
||||
plugin_data->gt = gt;
|
||||
@@ -156,7 +152,6 @@ static void runHighpass_iir(LADSPA_Handle instance, unsigned long sample_count)
|
||||
iirf_t* iirf = plugin_data->iirf;
|
||||
long sample_rate = plugin_data->sample_rate;
|
||||
|
||||
#line 27 "highpass_iir_1890.xml"
|
||||
chebyshev(iirf, gt, 2*CLAMP((int)stages,1,10), IIR_STAGE_HIGHPASS, cutoff/(float)sample_rate, 0.5f);
|
||||
iir_process_buffer_ns_5(iirf, gt, input, output, sample_count,RUN_ADDING);
|
||||
}
|
||||
@@ -174,7 +169,6 @@ static void setRunAddingGainHighpass_iir(LADSPA_Handle instance, LADSPA_Data gai
|
||||
|
||||
static void runAddingHighpass_iir(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
Highpass_iir *plugin_data = (Highpass_iir *)instance;
|
||||
LADSPA_Data run_adding_gain = plugin_data->run_adding_gain;
|
||||
|
||||
/* Cutoff Frequency (float value) */
|
||||
const LADSPA_Data cutoff = *(plugin_data->cutoff);
|
||||
@@ -191,7 +185,6 @@ static void runAddingHighpass_iir(LADSPA_Handle instance, unsigned long sample_c
|
||||
iirf_t* iirf = plugin_data->iirf;
|
||||
long sample_rate = plugin_data->sample_rate;
|
||||
|
||||
#line 27 "highpass_iir_1890.xml"
|
||||
chebyshev(iirf, gt, 2*CLAMP((int)stages,1,10), IIR_STAGE_HIGHPASS, cutoff/(float)sample_rate, 0.5f);
|
||||
iir_process_buffer_ns_5(iirf, gt, input, output, sample_count,RUN_ADDING);
|
||||
}
|
||||
|
||||
@@ -25,7 +25,6 @@ void _init(); // forward declaration
|
||||
#define _WINDOWS_DLL_EXPORT_
|
||||
#endif
|
||||
|
||||
#line 9 "lowpass_iir_1891.xml"
|
||||
|
||||
#include "config.h"
|
||||
#include "util/iir.h"
|
||||
@@ -71,7 +70,6 @@ static void activateLowpass_iir(LADSPA_Handle instance) {
|
||||
iir_stage_t*gt = plugin_data->gt;
|
||||
iirf_t*iirf = plugin_data->iirf;
|
||||
long sample_rate = plugin_data->sample_rate;
|
||||
#line 33 "lowpass_iir_1891.xml"
|
||||
|
||||
gt = init_iir_stage(IIR_STAGE_LOWPASS,10,3,2);
|
||||
iirf = init_iirf_t(gt);
|
||||
@@ -84,7 +82,6 @@ static void activateLowpass_iir(LADSPA_Handle instance) {
|
||||
}
|
||||
|
||||
static void cleanupLowpass_iir(LADSPA_Handle instance) {
|
||||
#line 40 "lowpass_iir_1891.xml"
|
||||
Lowpass_iir *plugin_data = (Lowpass_iir *)instance;
|
||||
free_iirf_t(plugin_data->iirf, plugin_data->gt);
|
||||
free_iir_stage(plugin_data->gt);
|
||||
@@ -122,7 +119,6 @@ static LADSPA_Handle instantiateLowpass_iir(
|
||||
iirf_t*iirf = NULL;
|
||||
long sample_rate;
|
||||
|
||||
#line 25 "lowpass_iir_1891.xml"
|
||||
sample_rate = s_rate;
|
||||
|
||||
plugin_data->gt = gt;
|
||||
@@ -158,7 +154,6 @@ static void runLowpass_iir(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
iirf_t* iirf = plugin_data->iirf;
|
||||
long sample_rate = plugin_data->sample_rate;
|
||||
|
||||
#line 28 "lowpass_iir_1891.xml"
|
||||
chebyshev(iirf, gt, 2*CLAMP((int)stages,1,10), IIR_STAGE_LOWPASS, cutoff/(float)sample_rate, 0.5f);
|
||||
iir_process_buffer_ns_5(iirf, gt, input, output, sample_count,RUN_ADDING);
|
||||
}
|
||||
@@ -176,7 +171,6 @@ static void setRunAddingGainLowpass_iir(LADSPA_Handle instance, LADSPA_Data gain
|
||||
|
||||
static void runAddingLowpass_iir(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
Lowpass_iir *plugin_data = (Lowpass_iir *)instance;
|
||||
LADSPA_Data run_adding_gain = plugin_data->run_adding_gain;
|
||||
|
||||
/* Cutoff Frequency (float value) */
|
||||
const LADSPA_Data cutoff = *(plugin_data->cutoff);
|
||||
@@ -193,7 +187,6 @@ static void runAddingLowpass_iir(LADSPA_Handle instance, unsigned long sample_co
|
||||
iirf_t* iirf = plugin_data->iirf;
|
||||
long sample_rate = plugin_data->sample_rate;
|
||||
|
||||
#line 28 "lowpass_iir_1891.xml"
|
||||
chebyshev(iirf, gt, 2*CLAMP((int)stages,1,10), IIR_STAGE_LOWPASS, cutoff/(float)sample_rate, 0.5f);
|
||||
iir_process_buffer_ns_5(iirf, gt, input, output, sample_count,RUN_ADDING);
|
||||
}
|
||||
|
||||
@@ -25,7 +25,6 @@ void _init(); // forward declaration
|
||||
#define _WINDOWS_DLL_EXPORT_
|
||||
#endif
|
||||
|
||||
#line 9 "notch_iir_1894.xml"
|
||||
|
||||
#include "config.h"
|
||||
#include "util/iir.h"
|
||||
@@ -80,7 +79,6 @@ static void activateNotch_iir(LADSPA_Handle instance) {
|
||||
long sample_rate = plugin_data->sample_rate;
|
||||
iir_stage_t*second = plugin_data->second;
|
||||
float ufc = plugin_data->ufc;
|
||||
#line 36 "notch_iir_1894.xml"
|
||||
|
||||
ufc = (*(plugin_data->center) - *(plugin_data->width)*0.5f)/(float)sample_rate;
|
||||
lfc = (*(plugin_data->center) + *(plugin_data->width)*0.5f)/(float)sample_rate;
|
||||
@@ -101,7 +99,6 @@ static void activateNotch_iir(LADSPA_Handle instance) {
|
||||
}
|
||||
|
||||
static void cleanupNotch_iir(LADSPA_Handle instance) {
|
||||
#line 47 "notch_iir_1894.xml"
|
||||
Notch_iir *plugin_data = (Notch_iir *)instance;
|
||||
free_iirf_t(plugin_data->iirf1, plugin_data->first);
|
||||
free_iirf_t(plugin_data->iirf2, plugin_data->second);
|
||||
@@ -148,7 +145,6 @@ static LADSPA_Handle instantiateNotch_iir(
|
||||
iir_stage_t*second = NULL;
|
||||
float ufc;
|
||||
|
||||
#line 23 "notch_iir_1894.xml"
|
||||
sample_rate = s_rate;
|
||||
ufc = lfc = 0.0f;
|
||||
|
||||
@@ -196,7 +192,6 @@ static void runNotch_iir(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
iir_stage_t* second = plugin_data->second;
|
||||
float ufc = plugin_data->ufc;
|
||||
|
||||
#line 27 "notch_iir_1894.xml"
|
||||
ufc = (center - width*0.5f)/(float)sample_rate;
|
||||
lfc = (center + width*0.5f)/(float)sample_rate;
|
||||
chebyshev(iirf1, first, 2*CLAMP((int)stages,1,10), IIR_STAGE_LOWPASS, ufc, 0.5f);
|
||||
@@ -218,7 +213,6 @@ static void setRunAddingGainNotch_iir(LADSPA_Handle instance, LADSPA_Data gain)
|
||||
|
||||
static void runAddingNotch_iir(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
Notch_iir *plugin_data = (Notch_iir *)instance;
|
||||
LADSPA_Data run_adding_gain = plugin_data->run_adding_gain;
|
||||
|
||||
/* Center Frequency (Hz) (float value) */
|
||||
const LADSPA_Data center = *(plugin_data->center);
|
||||
@@ -242,7 +236,6 @@ static void runAddingNotch_iir(LADSPA_Handle instance, unsigned long sample_coun
|
||||
iir_stage_t* second = plugin_data->second;
|
||||
float ufc = plugin_data->ufc;
|
||||
|
||||
#line 27 "notch_iir_1894.xml"
|
||||
ufc = (center - width*0.5f)/(float)sample_rate;
|
||||
lfc = (center + width*0.5f)/(float)sample_rate;
|
||||
chebyshev(iirf1, first, 2*CLAMP((int)stages,1,10), IIR_STAGE_LOWPASS, ufc, 0.5f);
|
||||
|
||||
@@ -25,7 +25,6 @@ void _init(); // forward declaration
|
||||
#define _WINDOWS_DLL_EXPORT_
|
||||
#endif
|
||||
|
||||
#line 10 "revdelay_1605.xml"
|
||||
|
||||
#include "ladspa-util.h"
|
||||
#include <stdio.h>
|
||||
@@ -86,7 +85,6 @@ static void activateRevdelay(LADSPA_Handle instance) {
|
||||
LADSPA_Data last_delay_time = plugin_data->last_delay_time;
|
||||
unsigned int sample_rate = plugin_data->sample_rate;
|
||||
long write_phase = plugin_data->write_phase;
|
||||
#line 38 "revdelay_1605.xml"
|
||||
unsigned int size;
|
||||
|
||||
size = sample_rate * 5 * 2; /* 5 second maximum */
|
||||
@@ -107,7 +105,6 @@ static void activateRevdelay(LADSPA_Handle instance) {
|
||||
}
|
||||
|
||||
static void cleanupRevdelay(LADSPA_Handle instance) {
|
||||
#line 51 "revdelay_1605.xml"
|
||||
Revdelay *plugin_data = (Revdelay *)instance;
|
||||
free(plugin_data->buffer);
|
||||
free(instance);
|
||||
@@ -156,7 +153,6 @@ static LADSPA_Handle instantiateRevdelay(
|
||||
unsigned int sample_rate;
|
||||
long write_phase;
|
||||
|
||||
#line 30 "revdelay_1605.xml"
|
||||
sample_rate = s_rate;
|
||||
buffer_size = 0;
|
||||
delay_samples = 0;
|
||||
@@ -211,7 +207,6 @@ static void runRevdelay(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
unsigned int sample_rate = plugin_data->sample_rate;
|
||||
long write_phase = plugin_data->write_phase;
|
||||
|
||||
#line 55 "revdelay_1605.xml"
|
||||
int i;
|
||||
unsigned long delay2;
|
||||
float dry = DB_CO(dry_level);
|
||||
@@ -263,7 +258,7 @@ static void runRevdelay(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
|
||||
for (i=0; i<sample_count; i++) {
|
||||
long read_phase, idelay_samples;
|
||||
LADSPA_Data frac, read;
|
||||
LADSPA_Data read;
|
||||
LADSPA_Data insamp;
|
||||
insamp = in[i];
|
||||
|
||||
@@ -273,7 +268,6 @@ static void runRevdelay(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
|
||||
read_phase = delay2 - write_phase;
|
||||
idelay_samples = (long)delay_samples;
|
||||
frac = delay_samples - idelay_samples;
|
||||
read = wet * buffer[read_phase] + (dry * insamp);
|
||||
|
||||
if ((write_phase % idelay_samples) < xfade_samp) {
|
||||
@@ -341,7 +335,6 @@ static void runAddingRevdelay(LADSPA_Handle instance, unsigned long sample_count
|
||||
unsigned int sample_rate = plugin_data->sample_rate;
|
||||
long write_phase = plugin_data->write_phase;
|
||||
|
||||
#line 55 "revdelay_1605.xml"
|
||||
int i;
|
||||
unsigned long delay2;
|
||||
float dry = DB_CO(dry_level);
|
||||
@@ -393,7 +386,7 @@ static void runAddingRevdelay(LADSPA_Handle instance, unsigned long sample_count
|
||||
|
||||
for (i=0; i<sample_count; i++) {
|
||||
long read_phase, idelay_samples;
|
||||
LADSPA_Data frac, read;
|
||||
LADSPA_Data read;
|
||||
LADSPA_Data insamp;
|
||||
insamp = in[i];
|
||||
|
||||
@@ -403,7 +396,6 @@ static void runAddingRevdelay(LADSPA_Handle instance, unsigned long sample_count
|
||||
|
||||
read_phase = delay2 - write_phase;
|
||||
idelay_samples = (long)delay_samples;
|
||||
frac = delay_samples - idelay_samples;
|
||||
read = wet * buffer[read_phase] + (dry * insamp);
|
||||
|
||||
if ((write_phase % idelay_samples) < xfade_samp) {
|
||||
|
||||
@@ -44,7 +44,8 @@ blo_h_tables *blo_h_tables_new(int table_size)
|
||||
float table_size_f = table_size;
|
||||
float max;
|
||||
unsigned int table_count = 0;
|
||||
unsigned int i, h;
|
||||
int i;
|
||||
unsigned int h;
|
||||
size_t all_tables_size = sizeof(float) * (table_size + BLO_TABLE_WR)
|
||||
* (BLO_N_HARMONICS - 1) * 2;
|
||||
int shm_fd;
|
||||
@@ -122,10 +123,12 @@ blo_h_tables *blo_h_tables_new(int table_size)
|
||||
return this;
|
||||
} else if ((shm_fd = shm_open(shm_path, O_CREAT | O_RDWR, 0644)) > 0) {
|
||||
/* There is no existing SHM segment, but we can make one */
|
||||
ftruncate(shm_fd, all_tables_size);
|
||||
int err = ftruncate(shm_fd, all_tables_size);
|
||||
|
||||
all_tables = mmap(0, all_tables_size, PROT_READ | PROT_WRITE,
|
||||
MAP_SHARED, shm_fd, 0);
|
||||
if (!err) {
|
||||
all_tables = mmap(0, all_tables_size, PROT_READ | PROT_WRITE,
|
||||
MAP_SHARED, shm_fd, 0);
|
||||
}
|
||||
close(shm_fd);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* this could be sped up by vector operations
|
||||
*/
|
||||
|
||||
static inline void buffer_sub(const float* a, const float *b, const float *c, int cnt) {
|
||||
static inline void buffer_sub(const float* a, const float *b, float *c, int cnt) {
|
||||
int i;
|
||||
float *h;
|
||||
h = c;
|
||||
|
||||
@@ -133,7 +133,7 @@ static inline void butterworth_stage(iir_stage_t *gt, int mode, float f, float r
|
||||
|
||||
/* process function */
|
||||
static inline void iir_process_buffer(iirf_t* iirf, iir_stage_t* gt, const float *indata, float *outdata, const long numSampsToProcess, int add) {
|
||||
unsigned long pos;
|
||||
long pos;
|
||||
int i,nb,nt,j,z,ipos,opos;
|
||||
|
||||
if(gt->nstages==0) {
|
||||
@@ -223,7 +223,7 @@ static inline void iir_process_buffer(iirf_t* iirf, iir_stage_t* gt, const float
|
||||
/* process function for 3a and 2b coeffs */
|
||||
static inline void iir_process_buffer_1s_5(iirf_t* iirf, iir_stage_t* gt, const float *indata,
|
||||
float *outdata, const long numSampsToProcess, int add) {
|
||||
unsigned long pos;
|
||||
long pos;
|
||||
|
||||
if (add==0)
|
||||
for(pos=0; pos<numSampsToProcess; pos++) {
|
||||
@@ -260,7 +260,7 @@ static inline void iir_process_buffer_1s_5(iirf_t* iirf, iir_stage_t* gt, const
|
||||
|
||||
/* process function */
|
||||
static inline void iir_process_buffer_ns_5(iirf_t* iirf, iir_stage_t* gt, const float *indata, float *outdata, const long numSampsToProcess, int add) {
|
||||
unsigned long pos;
|
||||
long pos;
|
||||
int i;
|
||||
|
||||
if (add==0)
|
||||
|
||||
@@ -54,7 +54,7 @@ void pitch_scale(sbuffers *buffers, const double pitchScale, const long
|
||||
Transform. Author: (c)1999 Stephan M. Sprenger <sms@dspdimension.com>
|
||||
*/
|
||||
double magn, phase, tmp;
|
||||
double freqPerBin, expct, fadeZoneLen;
|
||||
double freqPerBin, expct;
|
||||
long i,k, qpd, index, inFifoLatency, stepSize,
|
||||
fftFrameSize2;
|
||||
double phaseArr[MAX_FRAME_LENGTH];
|
||||
@@ -88,7 +88,6 @@ void pitch_scale(sbuffers *buffers, const double pitchScale, const long
|
||||
}
|
||||
|
||||
/* set up some handy variables */
|
||||
fadeZoneLen = fftFrameLength/2;
|
||||
fftFrameSize2 = fftFrameLength/2;
|
||||
stepSize = fftFrameLength/osamp;
|
||||
freqPerBin = sampleRate*2.0/(double)fftFrameLength;
|
||||
|
||||
@@ -186,7 +186,7 @@ get_table_gain(int mode, LADSPA_Data level) {
|
||||
LADSPA_Data y1 = -80.0f;
|
||||
LADSPA_Data x2 = 0.0f;
|
||||
LADSPA_Data y2 = 0.0f;
|
||||
int i = 0;
|
||||
unsigned int i = 0;
|
||||
|
||||
if (level <= -80.0f)
|
||||
return get_table_gain(mode, -79.9f);
|
||||
|
||||
@@ -204,7 +204,7 @@ get_table_gain(int mode, LADSPA_Data level) {
|
||||
LADSPA_Data y1 = -80.0f;
|
||||
LADSPA_Data x2 = 0.0f;
|
||||
LADSPA_Data y2 = 0.0f;
|
||||
int i = 0;
|
||||
unsigned int i = 0;
|
||||
|
||||
if (level <= -80.0f)
|
||||
return get_table_gain(mode, -79.9f);
|
||||
|
||||
@@ -133,7 +133,7 @@ void
|
||||
activate_Echo(LADSPA_Handle Instance) {
|
||||
|
||||
Echo * ptr = (Echo *)Instance;
|
||||
int i;
|
||||
unsigned int i;
|
||||
|
||||
ptr->mpx_out_L = 0;
|
||||
ptr->mpx_out_R = 0;
|
||||
|
||||
@@ -72,7 +72,7 @@ load_plugin_data(LADSPA_Handle Instance) {
|
||||
|
||||
Reverb * ptr = (Reverb *)Instance;
|
||||
unsigned long m;
|
||||
int i;
|
||||
unsigned int i;
|
||||
|
||||
|
||||
m = LIMIT(*(ptr->mode),0,NUM_MODES-1);
|
||||
@@ -193,7 +193,7 @@ void
|
||||
comp_coeffs(LADSPA_Handle Instance) {
|
||||
|
||||
Reverb * ptr = (Reverb *)Instance;
|
||||
int i;
|
||||
unsigned int i;
|
||||
|
||||
|
||||
if (*(ptr->mode) != ptr->old_mode)
|
||||
@@ -414,7 +414,7 @@ run_Reverb(LADSPA_Handle Instance,
|
||||
Reverb * ptr = (Reverb *)Instance;
|
||||
|
||||
unsigned long sample_index;
|
||||
int i;
|
||||
unsigned int i;
|
||||
|
||||
LADSPA_Data decay = LIMIT(*(ptr->decay),0.0f,10000.0f);
|
||||
LADSPA_Data drylevel = db2lin(LIMIT(*(ptr->drylevel),-70.0f,10.0f));
|
||||
@@ -533,7 +533,7 @@ run_adding_gain_Reverb(LADSPA_Handle Instance,
|
||||
Reverb * ptr = (Reverb *)Instance;
|
||||
|
||||
unsigned long sample_index;
|
||||
int i;
|
||||
unsigned int i;
|
||||
|
||||
LADSPA_Data decay = LIMIT(*(ptr->decay),0.0f,10000.0f);
|
||||
LADSPA_Data drylevel = db2lin(LIMIT(*(ptr->drylevel),-70.0f,10.0f));
|
||||
|
||||
@@ -192,7 +192,7 @@ void Alg_parameters::insert_atom(Alg_parameters **list, char *name, char *s)
|
||||
}
|
||||
|
||||
|
||||
Alg_parameters *Alg_parameters::remove_key(Alg_parameters **list, char *name)
|
||||
Alg_parameters *Alg_parameters::remove_key(Alg_parameters **list, const char *name)
|
||||
{
|
||||
while (*list) {
|
||||
if (STREQL((*list)->parm.attr_name(), name)) {
|
||||
|
||||
@@ -145,7 +145,7 @@ public:
|
||||
static void insert_integer(Alg_parameters **list, char *name, long i);
|
||||
static void insert_logical(Alg_parameters **list, char *name, bool l);
|
||||
static void insert_atom(Alg_parameters **list, char *name, char *s);
|
||||
static Alg_parameters *remove_key(Alg_parameters **list, char *name);
|
||||
static Alg_parameters *remove_key(Alg_parameters **list, const char *name);
|
||||
// find an attribute/value pair
|
||||
Alg_parameter_ptr find(Alg_attribute *attr);
|
||||
} *Alg_parameters_ptr;
|
||||
|
||||
@@ -37,7 +37,7 @@ public:
|
||||
long parse_int(string &field);
|
||||
int find_real_in(string &field, int n);
|
||||
double parse_real(string &field);
|
||||
void parse_error(string &field, long offset, char *message);
|
||||
void parse_error(string &field, long offset, const char *message);
|
||||
double parse_dur(string &field, double base);
|
||||
double parse_after_dur(double dur, string &field, int n, double base);
|
||||
double parse_loud(string &field);
|
||||
@@ -109,19 +109,19 @@ Alg_parameters_ptr Alg_reader::process_attributes(
|
||||
if (attributes) {
|
||||
Alg_parameters_ptr a;
|
||||
bool in_seconds = seq->get_units_are_seconds();
|
||||
if (a = Alg_parameters::remove_key(&attributes, "tempor")) {
|
||||
if ((a = Alg_parameters::remove_key(&attributes, "tempor"))) {
|
||||
double tempo = a->parm.r;
|
||||
seq->insert_tempo(tempo, seq->get_time_map()->time_to_beat(time));
|
||||
}
|
||||
if (a = Alg_parameters::remove_key(&attributes, "beatr")) {
|
||||
if ((a = Alg_parameters::remove_key(&attributes, "beatr"))) {
|
||||
double beat = a->parm.r;
|
||||
seq->insert_beat(time, beat);
|
||||
}
|
||||
if (a = Alg_parameters::remove_key(&attributes, "timesig_numr")) {
|
||||
if ((a = Alg_parameters::remove_key(&attributes, "timesig_numr"))) {
|
||||
tsnum = a->parm.r;
|
||||
ts_flag = true;
|
||||
}
|
||||
if (a = Alg_parameters::remove_key(&attributes, "timesig_denr")) {
|
||||
if ((a = Alg_parameters::remove_key(&attributes, "timesig_denr"))) {
|
||||
tsden = a->parm.r;
|
||||
ts_flag = true;
|
||||
}
|
||||
@@ -404,11 +404,11 @@ bool Alg_reader::parse()
|
||||
long Alg_reader::parse_chan(string &field)
|
||||
{
|
||||
const char *int_string = field.c_str() + 1;
|
||||
char *msg = "Integer or - expected";
|
||||
const char *msg = "Integer or - expected";
|
||||
const char *p = int_string;
|
||||
char c;
|
||||
// check that all chars in int_string are digits or '-':
|
||||
while (c = *p++) {
|
||||
while ((c = *p++)) {
|
||||
if (!isdigit(c) && c != '-') {
|
||||
parse_error(field, p - field.c_str() - 1, msg);
|
||||
return 0;
|
||||
@@ -431,11 +431,11 @@ long Alg_reader::parse_chan(string &field)
|
||||
long Alg_reader::parse_int(string &field)
|
||||
{
|
||||
const char *int_string = field.c_str() + 1;
|
||||
char *msg = "Integer expected";
|
||||
const char *msg = "Integer expected";
|
||||
const char *p = int_string;
|
||||
char c;
|
||||
// check that all chars in int_string are digits:
|
||||
while (c = *p++) {
|
||||
while ((c = *p++)) {
|
||||
if (!isdigit(c)) {
|
||||
parse_error(field, p - field.c_str() - 1, msg);
|
||||
return 0;
|
||||
@@ -472,7 +472,7 @@ int Alg_reader::find_real_in(string &field, int n)
|
||||
|
||||
double Alg_reader::parse_real(string &field)
|
||||
{
|
||||
char *msg = "Real expected";
|
||||
const char *msg = "Real expected";
|
||||
int last = find_real_in(field, 1);
|
||||
string real_string = field.substr(1, last - 1);
|
||||
if (last <= 1 || last < (int) field.length()) {
|
||||
@@ -483,7 +483,7 @@ double Alg_reader::parse_real(string &field)
|
||||
}
|
||||
|
||||
|
||||
void Alg_reader::parse_error(string &field, long offset, char *message)
|
||||
void Alg_reader::parse_error(string &field, long offset, const char *message)
|
||||
{
|
||||
int position = line_parser.pos - field.length() + offset;
|
||||
error_flag = true;
|
||||
@@ -501,9 +501,9 @@ double duration_lookup[] = { 0.25, 0.5, 1.0, 2.0, 4.0 };
|
||||
|
||||
double Alg_reader::parse_dur(string &field, double base)
|
||||
{
|
||||
char *msg = "Duration expected";
|
||||
char *durs = "SIQHW";
|
||||
char *p;
|
||||
const char *msg = "Duration expected";
|
||||
const char *durs = "SIQHW";
|
||||
const char *p;
|
||||
int last;
|
||||
double dur;
|
||||
if (field.length() < 2) {
|
||||
@@ -516,7 +516,7 @@ double Alg_reader::parse_dur(string &field, double base)
|
||||
// convert dur from seconds to beats
|
||||
dur = seq->get_time_map()->time_to_beat(base + dur) -
|
||||
seq->get_time_map()->time_to_beat(base);
|
||||
} else if (p = strchr(durs, toupper(field[1]))) {
|
||||
} else if ((p = strchr(durs, toupper(field[1])))) {
|
||||
dur = duration_lookup[p - durs];
|
||||
last = 2;
|
||||
} else {
|
||||
@@ -559,7 +559,7 @@ double Alg_reader::parse_after_dur(double dur, string &field,
|
||||
}
|
||||
|
||||
struct loud_lookup_struct {
|
||||
char *str;
|
||||
const char *str;
|
||||
int val;
|
||||
} loud_lookup[] = { {"FFF", 127}, {"FF", 120}, {"F", 110}, {"MF", 100},
|
||||
{"MP", 90}, {"P", 80}, {"PP", 70}, {"PPP", 60},
|
||||
@@ -568,7 +568,7 @@ struct loud_lookup_struct {
|
||||
|
||||
double Alg_reader::parse_loud(string &field)
|
||||
{
|
||||
char *msg = "Loudness expected";
|
||||
const char *msg = "Loudness expected";
|
||||
if (isdigit(field[1])) {
|
||||
return parse_int(field);
|
||||
} else {
|
||||
@@ -594,14 +594,14 @@ int key_lookup[] = {21, 23, 12, 14, 16, 17, 19};
|
||||
//
|
||||
long Alg_reader::parse_key(string &field)
|
||||
{
|
||||
char *msg = "Pitch expected";
|
||||
char *pitches = "ABCDEFG";
|
||||
char *p;
|
||||
const char *msg = "Pitch expected";
|
||||
const char *pitches = "ABCDEFG";
|
||||
const char *p;
|
||||
if (isdigit(field[1])) {
|
||||
// This routine would not have been called if field = "P<number>"
|
||||
// so it must be "K<number>" so <number> must be an integer.
|
||||
return parse_int(field);
|
||||
} else if (p = strchr(pitches, toupper(field[1]))) {
|
||||
} else if ((p = strchr(pitches, toupper(field[1])))) {
|
||||
long key = key_lookup[p - pitches];
|
||||
key = parse_after_key(key, field, 2);
|
||||
return key;
|
||||
@@ -697,9 +697,7 @@ bool Alg_reader::parse_val(Alg_parameter_ptr param, string &s, int i)
|
||||
} else if (isdigit(s[i]) || s[i] == '-' || s[i] == '.') {
|
||||
int pos = i;
|
||||
bool period = false;
|
||||
int sign = 1;
|
||||
if (s[pos] == '-') {
|
||||
sign = -1;
|
||||
pos++;
|
||||
}
|
||||
while (pos < len) {
|
||||
|
||||
@@ -74,7 +74,7 @@ protected:
|
||||
void Mf_chanprefix(int chan);
|
||||
void Mf_portprefix(int port);
|
||||
void Mf_eot();
|
||||
void Mf_error(char *);
|
||||
void Mf_error(const char *);
|
||||
void Mf_header(int,int,int);
|
||||
void Mf_on(int,int,int);
|
||||
void Mf_off(int,int,int);
|
||||
@@ -169,7 +169,7 @@ void Alg_midifile_reader::Mf_eot()
|
||||
}
|
||||
|
||||
|
||||
void Alg_midifile_reader::Mf_error(char *msg)
|
||||
void Alg_midifile_reader::Mf_error(const char *msg)
|
||||
{
|
||||
fprintf(stdout, "Midifile reader error: %s\n", msg);
|
||||
}
|
||||
@@ -345,7 +345,7 @@ void Alg_midifile_reader::Mf_seqnum(int n)
|
||||
}
|
||||
|
||||
|
||||
static char *fpsstr[4] = {"24", "25", "29.97", "30"};
|
||||
static const char *fpsstr[4] = {"24", "25", "29.97", "30"};
|
||||
|
||||
void Alg_midifile_reader::Mf_smpte(int hours, int mins, int secs,
|
||||
int frames, int subframes)
|
||||
|
||||
@@ -34,7 +34,7 @@ void Midifile_reader::midifile()
|
||||
while (ntrks-- > 0 && !midifile_error) readtrack();
|
||||
}
|
||||
|
||||
int Midifile_reader::readmt(char *s, int skip)
|
||||
int Midifile_reader::readmt(const char *s, int skip)
|
||||
/* read through the "MThd" or "MTrk" header string */
|
||||
/* if skip == 1, we attempt to skip initial garbage. */
|
||||
{
|
||||
@@ -42,7 +42,7 @@ int Midifile_reader::readmt(char *s, int skip)
|
||||
char b[4];
|
||||
char buff[32];
|
||||
int c;
|
||||
char *errmsg = "expecting ";
|
||||
const char *errmsg = "expecting ";
|
||||
|
||||
retry:
|
||||
while ( nread<4 ) {
|
||||
@@ -408,7 +408,7 @@ int Midifile_reader::read16bit()
|
||||
return to16bit(c1,c2);
|
||||
}
|
||||
|
||||
void Midifile_reader::mferror(char *s)
|
||||
void Midifile_reader::mferror(const char *s)
|
||||
{
|
||||
Mf_error(s);
|
||||
midifile_error = 1;
|
||||
|
||||
@@ -46,7 +46,7 @@ protected:
|
||||
virtual void Mf_chanprefix(int) = 0;
|
||||
virtual void Mf_portprefix(int) = 0;
|
||||
virtual void Mf_eot() = 0;
|
||||
virtual void Mf_error(char *) = 0;
|
||||
virtual void Mf_error(const char *) = 0;
|
||||
virtual void Mf_header(int,int,int) = 0;
|
||||
virtual void Mf_on(int,int,int) = 0;
|
||||
virtual void Mf_off(int,int,int) = 0;
|
||||
@@ -81,10 +81,10 @@ private:
|
||||
int egetc();
|
||||
int msgleng();
|
||||
|
||||
int readmt(char*,int);
|
||||
int readmt(const char *, int);
|
||||
long to32bit(int,int,int,int);
|
||||
int to16bit(int,int);
|
||||
void mferror(char *);
|
||||
void mferror(const char *);
|
||||
void badbyte(int);
|
||||
void metaevent(int);
|
||||
void msgadd(int);
|
||||
|
||||
@@ -51,7 +51,7 @@ void String_parse::get_nonspace_quoted(string &field)
|
||||
char *escape_chars[] = { (char *) "\\n", (char *)"\\t", (char *)"\\\\", (char *)"\\r", (char *) "\\\""};
|
||||
|
||||
|
||||
void string_escape(string &result, char *str, char *quote)
|
||||
void string_escape(string &result, char *str, const char *quote)
|
||||
{
|
||||
int length = (int) strlen(str);
|
||||
if (quote[0]) {
|
||||
|
||||
@@ -15,4 +15,4 @@ public:
|
||||
void get_remainder(std::string &field);
|
||||
};
|
||||
|
||||
void string_escape(std::string &result, char *s, char *quote);
|
||||
void string_escape(std::string &result, char *s, const char *quote);
|
||||
|
||||
@@ -144,7 +144,9 @@ void docell2 (void *c, float modulator)
|
||||
|
||||
ftol(ctc->t+modulator,&i);
|
||||
|
||||
if (*(long *)&ctc->amp <= 0x37800000)
|
||||
void *amp_void = &ctc->amp;
|
||||
long *amp_long = (long *)amp_void;
|
||||
if (*amp_long <= 0x37800000)
|
||||
{
|
||||
ctc->amp = 0;
|
||||
ctc->cellfunc = docell4;
|
||||
@@ -160,7 +162,11 @@ void docell1 (void *c, float modulator)
|
||||
|
||||
ftol(ctc->t+modulator,&i);
|
||||
|
||||
if ((*(long *)&ctc->amp) <= (*(long *)&ctc->sustain))
|
||||
void *amp_void = &ctc->amp;
|
||||
long *amp_long = (long *)amp_void;
|
||||
void *sustain_void = &ctc->sustain;
|
||||
long *sustain_long = (long *)sustain_void;
|
||||
if (*amp_long <= *sustain_long)
|
||||
{
|
||||
if (ctc->flags&32)
|
||||
{
|
||||
@@ -183,7 +189,9 @@ void docell0 (void *c, float modulator)
|
||||
ftol(ctc->t+modulator,&i);
|
||||
|
||||
ctc->amp = ((ctc->a3*ctc->amp + ctc->a2)*ctc->amp + ctc->a1)*ctc->amp + ctc->a0;
|
||||
if ((*(long *)&ctc->amp) > 0x3f800000)
|
||||
void *amp_void = &ctc->amp;
|
||||
long *amp_long = (long *)amp_void;
|
||||
if (*amp_long > 0x3f800000)
|
||||
{
|
||||
ctc->amp = 1;
|
||||
ctc->cellfunc = docell1;
|
||||
|
||||
@@ -158,17 +158,3 @@ unsigned char midi_fm_instruments[128][14] =
|
||||
{ 0x00, 0x00, 0x00, 0x09, 0xf3, 0xf6, 0xf0, 0xc9, 0x00, 0x02, 0x0e, 0, 0, 0 } /* Gunshot */
|
||||
|
||||
};
|
||||
|
||||
/* logarithmic relationship between midi and FM volumes */
|
||||
static int my_midi_fm_vol_table[128] = {
|
||||
0, 11, 16, 19, 22, 25, 27, 29, 32, 33, 35, 37, 39, 40, 42, 43,
|
||||
45, 46, 48, 49, 50, 51, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
|
||||
64, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 75, 76, 77,
|
||||
78, 79, 80, 80, 81, 82, 83, 83, 84, 85, 86, 86, 87, 88, 89, 89,
|
||||
90, 91, 91, 92, 93, 93, 94, 95, 96, 96, 97, 97, 98, 99, 99, 100,
|
||||
101, 101, 102, 103, 103, 104, 104, 105, 106, 106, 107, 107, 108,
|
||||
109, 109, 110, 110, 111, 112, 112, 113, 113, 114, 114, 115, 115,
|
||||
116, 117, 117, 118, 118, 119, 119, 120, 120, 121, 121, 122, 122,
|
||||
123, 123, 124, 124, 125, 125, 126, 126, 127
|
||||
};
|
||||
|
||||
|
||||
@@ -136,10 +136,6 @@ opl2instrument::opl2instrument( InstrumentTrack * _instrument_track ) :
|
||||
vib_depth_mdl(false, this, tr( "Vibrato Depth" ) ),
|
||||
trem_depth_mdl(false, this, tr( "Tremolo Depth" ) )
|
||||
{
|
||||
unsigned char defaultPreset[] =
|
||||
{0xa0, 0x61, 0x01, 0x00, 0x11, 0xec, 0xc5,
|
||||
0x13, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00};
|
||||
|
||||
// Connect the plugin to the mixer...
|
||||
InstrumentPlayHandle * iph = new InstrumentPlayHandle( this );
|
||||
engine::mixer()->addPlayHandle( iph );
|
||||
@@ -154,8 +150,6 @@ opl2instrument::opl2instrument( InstrumentTrack * _instrument_track ) :
|
||||
theEmulator->write(0x01,0x20);
|
||||
emulatorMutex.unlock();
|
||||
|
||||
//loadPatch(midi_fm_instruments[0]);
|
||||
// loadPatch(defaultPreset);
|
||||
updatePatch();
|
||||
|
||||
// Can the buffer size change suddenly? I bet that would break lots of stuff
|
||||
|
||||
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 6.2 KiB |
@@ -357,7 +357,7 @@ manageVSTEffectView::manageVSTEffectView( VstEffect * _eff, VstEffectControls *
|
||||
const QMap<QString, QString> & dump = m_effect->m_plugin->parameterDump();
|
||||
m_vi->paramCount = dump.size();
|
||||
|
||||
bool isVstKnobs = true, isKnobFModel = true;
|
||||
bool isVstKnobs = true;
|
||||
|
||||
|
||||
if (m_vi->vstKnobs == NULL) {
|
||||
@@ -366,7 +366,6 @@ manageVSTEffectView::manageVSTEffectView( VstEffect * _eff, VstEffectControls *
|
||||
}
|
||||
if (m_vi->knobFModel == NULL) {
|
||||
m_vi->knobFModel = new FloatModel *[ m_vi->paramCount ];
|
||||
isKnobFModel = false;
|
||||
}
|
||||
|
||||
char paramStr[35];
|
||||
|
||||
@@ -71,8 +71,6 @@ void Unison::set_bandwidth(REALTYPE bandwidth) {
|
||||
bandwidth = 1200.0;
|
||||
|
||||
printf("bandwidth %g\n", bandwidth);
|
||||
#warning \
|
||||
: todo: if bandwidth is too small the audio will be self canceled (because of the sign change of the outputs)
|
||||
unison_bandwidth_cents = bandwidth;
|
||||
update_parameters();
|
||||
}
|
||||
@@ -99,8 +97,6 @@ void Unison::update_parameters() {
|
||||
* (max_speed - 1.0) * SAMPLE_RATE / base_freq;
|
||||
printf("unison_amplitude_samples %g\n", unison_amplitude_samples);
|
||||
|
||||
#warning \
|
||||
todo: test if unison_amplitude_samples is to big and reallocate bigger memory
|
||||
if(unison_amplitude_samples >= max_delay - 1)
|
||||
unison_amplitude_samples = max_delay - 2;
|
||||
|
||||
@@ -167,10 +163,6 @@ void Unison::update_unison_data() {
|
||||
step = -step;
|
||||
}
|
||||
REALTYPE vibratto_val = (pos - 0.333333333 * pos * pos * pos) * 1.5; //make the vibratto lfo smoother
|
||||
#warning \
|
||||
I will use relative amplitude, so the delay might be bigger than the whole buffer
|
||||
#warning \
|
||||
I have to enlarge (reallocate) the buffer to make place for the whole delay
|
||||
REALTYPE newval = 1.0 + 0.5
|
||||
* (vibratto_val
|
||||
+ 1.0) * unison_amplitude_samples
|
||||
|
||||
@@ -40,7 +40,7 @@ using namespace std;
|
||||
#define ZERO_ 0.00001f // Same idea as above.
|
||||
|
||||
Phaser::Phaser(const int &insertion_, REALTYPE *efxoutl_, REALTYPE *efxoutr_)
|
||||
:Effect(insertion_, efxoutl_, efxoutr_, NULL, 0), xn1(NULL), yn1(NULL), diff(0.0), old(NULL), oldgain(0.0),
|
||||
:Effect(insertion_, efxoutl_, efxoutr_, NULL, 0), old(NULL), xn1(NULL), yn1(NULL), diff(0.0), oldgain(0.0),
|
||||
fb(0.0)
|
||||
{
|
||||
analog_setup();
|
||||
|
||||
@@ -396,7 +396,6 @@ void Reverb::settype(unsigned char Ptype)
|
||||
bandwidth = new Unison(SOUND_BUFFER_SIZE / 4 + 1, 2.0);
|
||||
bandwidth->set_size(50);
|
||||
bandwidth->set_base_frequency(1.0);
|
||||
#warning sa schimb size-ul
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -115,7 +115,7 @@ bool fileexists(const char *filename)
|
||||
|
||||
void invSignal(REALTYPE *sig, size_t len)
|
||||
{
|
||||
for(int i = 0; i < len; i++)
|
||||
for(unsigned int i = 0; i < len; i++)
|
||||
sig[i] *= -1.0f;
|
||||
}
|
||||
|
||||
|
||||
@@ -167,9 +167,12 @@ void PresetsStore::copypreset(XMLwrapper *xml, char *type, string name)
|
||||
bool PresetsStore::pastepreset(XMLwrapper *xml, int npreset)
|
||||
{
|
||||
npreset--;
|
||||
if(npreset >= presets.size())
|
||||
if(npreset < 0)
|
||||
return false;
|
||||
string filename = presets[npreset].file;
|
||||
unsigned int unsigned_npreset = npreset;
|
||||
if(unsigned_npreset >= presets.size())
|
||||
return false;
|
||||
string filename = presets[unsigned_npreset].file;
|
||||
if(filename.empty())
|
||||
return false;
|
||||
bool result = (xml->loadXMLfile(filename) >= 0);
|
||||
@@ -179,9 +182,12 @@ bool PresetsStore::pastepreset(XMLwrapper *xml, int npreset)
|
||||
void PresetsStore::deletepreset(int npreset)
|
||||
{
|
||||
npreset--;
|
||||
if(npreset >= presets.size())
|
||||
if(npreset < 0)
|
||||
return;
|
||||
string filename = presets[npreset].file;
|
||||
unsigned int unsigned_npreset = npreset;
|
||||
if(unsigned_npreset >= presets.size())
|
||||
return;
|
||||
string filename = presets[unsigned_npreset].file;
|
||||
if(filename.empty())
|
||||
return;
|
||||
remove(filename.c_str());
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
|
||||
using namespace std;
|
||||
|
||||
#warning TODO Think about renaming Sample to Frame
|
||||
/**\TODO start using pointer math here as these will be Frequency called
|
||||
* functions throughout the code*/
|
||||
Sample::Sample(const Sample &smp)
|
||||
@@ -114,7 +113,7 @@ inline float linearEstimate(float ya, float yb, float xt, int xa = 0, int xb = 1
|
||||
return (yb-ya) * (xt-xa)/(xb-xa) + ya;
|
||||
}
|
||||
|
||||
void Sample::resize(unsigned int nsize)
|
||||
void Sample::resize(int nsize)
|
||||
{
|
||||
if(bufferSize == nsize)
|
||||
return;
|
||||
|
||||
@@ -58,7 +58,7 @@ class Sample
|
||||
const REALTYPE *c_buf() const {return buffer;}
|
||||
|
||||
/**Change the size of the sample*/
|
||||
void resize(unsigned int nsize);
|
||||
void resize(int nsize);
|
||||
|
||||
/**Appends another Sample to this Sample*/
|
||||
void append(const Sample &smp);
|
||||
|
||||
@@ -50,7 +50,9 @@ int MIDIFile::loadfile(const char *filename)
|
||||
|
||||
char header[4];
|
||||
ZERO(header, 4);
|
||||
fread(header, 4, 1, file);
|
||||
if (fread(header, 4, 1, file) != 1) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
//test to see if this a midi file
|
||||
if((header[0] != 'M') || (header[1] != 'T') || (header[2] != 'h')
|
||||
@@ -66,7 +68,10 @@ int MIDIFile::loadfile(const char *filename)
|
||||
|
||||
midifile = new unsigned char[midifilesize];
|
||||
ZERO(midifile, midifilesize);
|
||||
fread(midifile, midifilesize, 1, file);
|
||||
if (fread(midifile, midifilesize, 1, file) != 1) {
|
||||
clearmidifile();
|
||||
return -1;
|
||||
}
|
||||
fclose(file);
|
||||
|
||||
// for (int i=0;i<midifilesize;i++) printf("%2x ",midifile[i]);
|
||||
|
||||
@@ -664,12 +664,6 @@ void ADnote::ADlegatonote(REALTYPE freq,
|
||||
if(partparams->VoicePar[nvoice].PextFMoscil != -1)
|
||||
vc = partparams->VoicePar[nvoice].PextFMoscil;
|
||||
|
||||
REALTYPE tmp = 1.0;
|
||||
if((partparams->VoicePar[vc].FMSmp->Padaptiveharmonics != 0)
|
||||
|| (NoteVoicePar[nvoice].FMEnabled == MORPH)
|
||||
|| (NoteVoicePar[nvoice].FMEnabled == RING_MOD))
|
||||
tmp = getFMvoicebasefreq(nvoice);
|
||||
;
|
||||
if(!partparams->GlobalPar.Hrandgrouping)
|
||||
partparams->VoicePar[vc].FMSmp->newrandseed(rand());
|
||||
|
||||
|
||||
@@ -263,7 +263,7 @@ void PresetsUI::rescan() {
|
||||
pastebrowse->clear();
|
||||
p->rescanforpresets();
|
||||
|
||||
for (int i=0;i<presetsstore.presets.size();i++){
|
||||
for (unsigned int i=0;i<presetsstore.presets.size();i++){
|
||||
std::string name=presetsstore.presets[i].name;
|
||||
if(name.empty())
|
||||
continue;
|
||||
|
||||
@@ -45,6 +45,7 @@ AutomatableModel::AutomatableModel( DataType type,
|
||||
m_maxValue( max ),
|
||||
m_step( step ),
|
||||
m_range( max - min ),
|
||||
m_centerValue( m_minValue ),
|
||||
m_journalEntryReady( false ),
|
||||
m_setValueDepth( 0 ),
|
||||
m_hasLinkedModels( false ),
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* EnvelopeAndLfoParameters.cpp - class EnvelopeAndLfoParameters
|
||||
*
|
||||
* Copyright (c) 2004-2010 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2004-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -116,6 +116,9 @@ EnvelopeAndLfoParameters::EnvelopeAndLfoParameters(
|
||||
m_lfoAmountIsZero( false ),
|
||||
m_lfoShapeData( NULL )
|
||||
{
|
||||
m_amountModel.setCenterValue( 0 );
|
||||
m_lfoAmountModel.setCenterValue( 0 );
|
||||
|
||||
if( s_lfoInstances == NULL )
|
||||
{
|
||||
s_lfoInstances = new LfoInstances();
|
||||
|
||||
@@ -65,7 +65,6 @@
|
||||
#include "mmp.h"
|
||||
#include "song.h"
|
||||
|
||||
#warning TODO: move somewhere else
|
||||
static inline QString baseName( const QString & _file )
|
||||
{
|
||||
return( QFileInfo( _file ).absolutePath() + "/" +
|
||||
@@ -388,41 +387,17 @@ int main( int argc, char * * argv )
|
||||
// init style and palette
|
||||
QApplication::setStyle( new LmmsStyle() );
|
||||
|
||||
// init splash screen - this is a bit difficult as we have a
|
||||
// semi-transparent splash-image therefore we first need to grab
|
||||
// the screen, paint the splash onto it and then set a mask
|
||||
// which covers all pixels which are not fully transparent in
|
||||
// splash-image - otherwise we get nasty edges etc.
|
||||
const QPixmap splash = embed::getIconPixmap( "splash" );
|
||||
const QPoint pt = QApplication::desktop()->
|
||||
#ifdef LMMS_BUILD_LINUX
|
||||
availableGeometry().
|
||||
#else
|
||||
screenGeometry().
|
||||
#endif
|
||||
center() - splash.rect().center();
|
||||
QPixmap pm = QPixmap::grabWindow(
|
||||
QApplication::desktop()->winId(),
|
||||
pt.x(), pt.y(),
|
||||
splash.width(), splash.height() );
|
||||
QPainter p( &pm );
|
||||
p.drawPixmap( 0, 0, splash );
|
||||
p.end();
|
||||
|
||||
QSplashScreen * ss = new QSplashScreen( pm );
|
||||
ss->setAttribute( Qt::WA_PaintOnScreen, true );
|
||||
ss->setMask( splash.alphaChannel().createMaskFromColor(
|
||||
QColor( 0, 0, 0 ) ) );
|
||||
if( !QProcess::systemEnvironment().contains( "NOSPLASH=1" ) )
|
||||
{
|
||||
ss->show();
|
||||
}
|
||||
// show splash screen
|
||||
QSplashScreen splashScreen( embed::getIconPixmap( "splash" ) );
|
||||
splashScreen.show();
|
||||
splashScreen.showMessage( MainWindow::tr( "Version %1" ).arg( LMMS_VERSION ),
|
||||
Qt::AlignRight | Qt::AlignBottom, Qt::white );
|
||||
qApp->processEvents();
|
||||
|
||||
// init central engine which handles all components of LMMS
|
||||
engine::init();
|
||||
|
||||
delete ss;
|
||||
splashScreen.hide();
|
||||
|
||||
// re-intialize RNG - shared libraries might have srand() or
|
||||
// srandom() calls in their init procedure
|
||||
|
||||
@@ -268,7 +268,7 @@ void note::createDetuning()
|
||||
{
|
||||
m_detuning = new DetuningHelper;
|
||||
(void) m_detuning->automationPattern();
|
||||
m_detuning->setRange( -MaxDetuning, MaxDetuning, 0.1f );
|
||||
m_detuning->setRange( -MaxDetuning, MaxDetuning, 0.5f );
|
||||
m_detuning->automationPattern()->setProgressionType( AutomationPattern::LinearProgression );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -195,26 +195,6 @@ void drawPath( QPainter *p, const QPainterPath &path,
|
||||
}
|
||||
|
||||
|
||||
|
||||
static QString getCacheKey( const QString & _key,
|
||||
const QStyleOption * _option, const QSize & _size )
|
||||
{
|
||||
QString tmp;
|
||||
const QStyleOptionComplex *complexOption =
|
||||
qstyleoption_cast<const QStyleOptionComplex *> ( _option );
|
||||
tmp.sprintf( "%s,%d,%d,%d,%lld,%dx%d",
|
||||
_key.toLatin1().constData(),
|
||||
uint( _option->state ),
|
||||
complexOption ? uint( complexOption->activeSubControls ) : uint( 0 ),
|
||||
_option->direction,
|
||||
_option->palette.cacheKey(),
|
||||
_size.width(),
|
||||
_size.height() );
|
||||
return tmp;
|
||||
}
|
||||
|
||||
|
||||
|
||||
LmmsStyle::LmmsStyle() :
|
||||
QPlastiqueStyle()
|
||||
{
|
||||
|
||||
@@ -116,9 +116,6 @@ bbEditor::bbEditor( bbTrackContainer* tc ) :
|
||||
tr( "Click here to stop playing of current "
|
||||
"beat/bassline." ) );
|
||||
|
||||
QLabel * l = new QLabel( m_toolBar );
|
||||
l->setPixmap( embed::getIconPixmap( "drum" ) );
|
||||
|
||||
m_bbComboBox = new comboBox( m_toolBar );
|
||||
m_bbComboBox->setFixedSize( 200, 22 );
|
||||
m_bbComboBox->setModel( &tc->m_bbComboBoxModel );
|
||||
@@ -134,7 +131,6 @@ bbEditor::bbEditor( bbTrackContainer* tc ) :
|
||||
tb_layout->addStretch();
|
||||
tb_layout->addWidget( remove_bar );
|
||||
tb_layout->addWidget( add_bar );
|
||||
tb_layout->addWidget( l );
|
||||
tb_layout->addSpacing( 15 );
|
||||
|
||||
engine::mainWindow()->workspace()->addSubWindow( this );
|
||||
|
||||
@@ -255,11 +255,7 @@ bool knob::updateAngle()
|
||||
int angle = 0;
|
||||
if( model() && model()->maxValue() != model()->minValue() )
|
||||
{
|
||||
float a = ( model()->value() - 0.5 * ( model()->minValue() +
|
||||
model()->maxValue() ) ) /
|
||||
( model()->maxValue() - model()->minValue() ) *
|
||||
m_totalAngle;
|
||||
angle = static_cast<int>( a ) % 360;
|
||||
angle = angleFromValue( model()->value(), model()->minValue(), model()->maxValue(), m_totalAngle );
|
||||
}
|
||||
if( qAbs( angle - m_angle ) > 3 )
|
||||
{
|
||||
@@ -328,6 +324,17 @@ void knob::drawKnob( QPainter * _p )
|
||||
// p.setPen( QPen( QColor( 200, 0, 0 ), 2 ) );
|
||||
p.setRenderHint( QPainter::Antialiasing );
|
||||
|
||||
const int centerAngle = angleFromValue( model()->centerValue(), model()->minValue(), model()->maxValue(), m_totalAngle );
|
||||
|
||||
const int arcLineWidth = 2;
|
||||
const int arcRectSize = m_knobPixmap->width() - arcLineWidth;
|
||||
|
||||
QColor col = QApplication::palette().color( QPalette::Active, QPalette::WindowText );
|
||||
col.setAlpha( 70 );
|
||||
|
||||
p.setPen( QPen( col, 2 ) );
|
||||
p.drawArc( mid.x() - arcRectSize/2, 1, arcRectSize, arcRectSize, 315*16, 16*m_totalAngle );
|
||||
|
||||
switch( m_knobNum )
|
||||
{
|
||||
case knobSmall_17:
|
||||
@@ -339,8 +346,7 @@ void knob::drawKnob( QPainter * _p )
|
||||
}
|
||||
case knobBright_26:
|
||||
{
|
||||
p.setPen( QPen( QApplication::palette().color( QPalette::Active,
|
||||
QPalette::WindowText ), 2 ) );
|
||||
p.setPen( QPen( QApplication::palette().color( QPalette::Active, QPalette::WindowText ), 2 ) );
|
||||
p.drawLine( calculateLine( mid, radius-5 ) );
|
||||
break;
|
||||
}
|
||||
@@ -362,7 +368,11 @@ void knob::drawKnob( QPainter * _p )
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
p.drawArc( mid.x() - arcRectSize/2, 1, arcRectSize, arcRectSize, (90-centerAngle)*16, -16*(m_angle-centerAngle) );
|
||||
|
||||
p.end();
|
||||
|
||||
_p->drawImage( 0, 0, m_cache );
|
||||
}
|
||||
|
||||
|
||||
@@ -101,10 +101,8 @@ InstrumentTrack::InstrumentTrack( TrackContainer* tc ) :
|
||||
m_sustainPedalPressed( false ),
|
||||
m_baseNoteModel( 0, 0, KeysPerOctave * NumOctaves - 1, this,
|
||||
tr( "Base note" ) ),
|
||||
m_volumeModel( DefaultVolume, MinVolume, MaxVolume, 0.1f, this,
|
||||
tr( "Volume" ) ),
|
||||
m_panningModel( DefaultPanning, PanningLeft, PanningRight, 0.1f,
|
||||
this, tr( "Panning" ) ),
|
||||
m_volumeModel( DefaultVolume, MinVolume, MaxVolume, 0.1f, this, tr( "Volume" ) ),
|
||||
m_panningModel( DefaultPanning, PanningLeft, PanningRight, 0.1f, this, tr( "Panning" ) ),
|
||||
m_pitchModel( 0, -100, 100, 1, this, tr( "Pitch" ) ),
|
||||
m_pitchRangeModel( 1, 1, 24, this, tr( "Pitch range" ) ),
|
||||
m_effectChannelModel( 0, 0, NumFxChannels, this, tr( "FX channel" ) ),
|
||||
@@ -114,6 +112,9 @@ InstrumentTrack::InstrumentTrack( TrackContainer* tc ) :
|
||||
m_chordCreator( this ),
|
||||
m_piano( this )
|
||||
{
|
||||
m_pitchModel.setCenterValue( 0 );
|
||||
m_panningModel.setCenterValue( DefaultPanning );
|
||||
|
||||
m_baseNoteModel.setInitValue( DefaultKey );
|
||||
connect( &m_baseNoteModel, SIGNAL( dataChanged() ),
|
||||
this, SLOT( updateBaseNote() ) );
|
||||
|
||||