Merge branch 'stable-0.4' into stable-0.4-new-fx-mixer
This commit is contained in:
@@ -378,7 +378,7 @@ bool HydrogenImport::readSong()
|
||||
}
|
||||
return true;
|
||||
}
|
||||
bool HydrogenImport::tryImport( trackContainer * _tc )
|
||||
bool HydrogenImport::tryImport( TrackContainer* tc )
|
||||
{
|
||||
if( openFile() == false )
|
||||
{
|
||||
|
||||
@@ -21,7 +21,7 @@ public:
|
||||
return( NULL );
|
||||
}
|
||||
private:
|
||||
virtual bool tryImport( trackContainer * _tc );
|
||||
virtual bool tryImport( TrackContainer* tc );
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* audio_file_processor.cpp - instrument for using audio-files
|
||||
*
|
||||
* Copyright (c) 2004-2009 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
|
||||
*
|
||||
@@ -510,9 +510,9 @@ void AudioFileProcessorView::modelChanged( void )
|
||||
|
||||
|
||||
|
||||
AudioFileProcessorWaveView::AudioFileProcessorWaveView( QWidget * _parent, int _w, int _h, sampleBuffer & _buf ) :
|
||||
AudioFileProcessorWaveView::AudioFileProcessorWaveView( QWidget * _parent, int _w, int _h, SampleBuffer& buf ) :
|
||||
QWidget( _parent ),
|
||||
m_sampleBuffer( _buf ),
|
||||
m_sampleBuffer( buf ),
|
||||
m_graph( QPixmap( _w - 2 * s_padding, _h - 2 * s_padding ) ),
|
||||
m_from( 0 ),
|
||||
m_to( m_sampleBuffer.frames() ),
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* audio_file_processor.h - declaration of class audioFileProcessor
|
||||
* (instrument-plugin for using audio-files)
|
||||
*
|
||||
* Copyright (c) 2004-2008 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
|
||||
*
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
#include "Instrument.h"
|
||||
#include "InstrumentView.h"
|
||||
#include "sample_buffer.h"
|
||||
#include "SampleBuffer.h"
|
||||
#include "knob.h"
|
||||
#include "pixmap_button.h"
|
||||
|
||||
@@ -81,9 +81,9 @@ signals:
|
||||
|
||||
|
||||
private:
|
||||
typedef sampleBuffer::handleState handleState;
|
||||
typedef SampleBuffer::handleState handleState;
|
||||
|
||||
sampleBuffer m_sampleBuffer;
|
||||
SampleBuffer m_sampleBuffer;
|
||||
|
||||
FloatModel m_ampModel;
|
||||
FloatModel m_startPointModel;
|
||||
@@ -219,7 +219,7 @@ private:
|
||||
sample_end,
|
||||
} ;
|
||||
|
||||
sampleBuffer & m_sampleBuffer;
|
||||
SampleBuffer& m_sampleBuffer;
|
||||
QPixmap m_graph;
|
||||
f_cnt_t m_from;
|
||||
f_cnt_t m_to;
|
||||
@@ -237,7 +237,7 @@ private:
|
||||
bool m_animation;
|
||||
|
||||
public:
|
||||
AudioFileProcessorWaveView( QWidget * _parent, int _w, int _h, sampleBuffer & _buf );
|
||||
AudioFileProcessorWaveView( QWidget * _parent, int _w, int _h, SampleBuffer& buf );
|
||||
void setKnobs( knob * _start, knob * _end );
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* flp_import.cpp - support for importing FLP-files
|
||||
*
|
||||
* Copyright (c) 2006-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2006-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -53,7 +53,7 @@
|
||||
#include "ProjectJournal.h"
|
||||
#include "project_notes.h"
|
||||
#include "song.h"
|
||||
#include "track_container.h"
|
||||
#include "TrackContainer.h"
|
||||
#include "embed.h"
|
||||
#include "lmmsconfig.h"
|
||||
|
||||
@@ -588,7 +588,7 @@ FlpImport::~FlpImport()
|
||||
|
||||
|
||||
|
||||
bool FlpImport::tryImport( trackContainer * _tc )
|
||||
bool FlpImport::tryImport( TrackContainer* tc )
|
||||
{
|
||||
const int mappedFilter[] =
|
||||
{
|
||||
@@ -713,9 +713,9 @@ bool FlpImport::tryImport( trackContainer * _tc )
|
||||
}
|
||||
|
||||
QProgressDialog progressDialog(
|
||||
trackContainer::tr( "Importing FLP-file..." ),
|
||||
trackContainer::tr( "Cancel" ), 0, p.numChannels );
|
||||
progressDialog.setWindowTitle( trackContainer::tr( "Please wait..." ) );
|
||||
TrackContainer::tr( "Importing FLP-file..." ),
|
||||
TrackContainer::tr( "Cancel" ), 0, p.numChannels );
|
||||
progressDialog.setWindowTitle( TrackContainer::tr( "Please wait..." ) );
|
||||
progressDialog.show();
|
||||
|
||||
bool valid = false;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* FlpImport.h - support for importing FLP-files
|
||||
*
|
||||
* Copyright (c) 2006-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2006-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -50,7 +50,7 @@ public:
|
||||
|
||||
|
||||
private:
|
||||
virtual bool tryImport( trackContainer * _tc );
|
||||
virtual bool tryImport( TrackContainer* tc );
|
||||
|
||||
void processPluginParams( FL_Channel * _ch );
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* MidiImport.cpp - support for importing MIDI files
|
||||
*
|
||||
* Copyright (c) 2005-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2005-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -30,7 +30,7 @@
|
||||
#include <QtGui/QProgressDialog>
|
||||
|
||||
#include "MidiImport.h"
|
||||
#include "track_container.h"
|
||||
#include "TrackContainer.h"
|
||||
#include "InstrumentTrack.h"
|
||||
#include "AutomationTrack.h"
|
||||
#include "AutomationPattern.h"
|
||||
@@ -87,7 +87,7 @@ MidiImport::~MidiImport()
|
||||
|
||||
|
||||
|
||||
bool MidiImport::tryImport( trackContainer * _tc )
|
||||
bool MidiImport::tryImport( TrackContainer* tc )
|
||||
{
|
||||
if( openFile() == false )
|
||||
{
|
||||
@@ -124,11 +124,11 @@ bool MidiImport::tryImport( trackContainer * _tc )
|
||||
{
|
||||
case makeID( 'M', 'T', 'h', 'd' ):
|
||||
printf( "MidiImport::tryImport(): found MThd\n");
|
||||
return readSMF( _tc );
|
||||
return readSMF( tc );
|
||||
|
||||
case makeID( 'R', 'I', 'F', 'F' ):
|
||||
printf( "MidiImport::tryImport(): found RIFF\n");
|
||||
return readRIFF( _tc );
|
||||
return readRIFF( tc );
|
||||
|
||||
default:
|
||||
printf( "MidiImport::tryImport(): not a Standard MIDI "
|
||||
@@ -154,12 +154,11 @@ public:
|
||||
AutomationPattern * ap;
|
||||
midiTime lastPos;
|
||||
|
||||
smfMidiCC & create( trackContainer * _tc )
|
||||
smfMidiCC & create( TrackContainer* tc )
|
||||
{
|
||||
if( !at )
|
||||
{
|
||||
at = dynamic_cast<AutomationTrack *>(
|
||||
track::create( track::AutomationTrack, _tc ) );
|
||||
at = dynamic_cast<AutomationTrack *>( track::create( track::AutomationTrack, tc ) );
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
@@ -215,11 +214,10 @@ public:
|
||||
bool hasNotes;
|
||||
midiTime lastEnd;
|
||||
|
||||
smfMidiChannel * create( trackContainer * _tc )
|
||||
smfMidiChannel * create( TrackContainer* tc )
|
||||
{
|
||||
if( !it ) {
|
||||
it = dynamic_cast<InstrumentTrack *>(
|
||||
track::create( track::InstrumentTrack, _tc ) );
|
||||
it = dynamic_cast<InstrumentTrack *>( track::create( track::InstrumentTrack, tc ) );
|
||||
|
||||
#ifdef LMMS_HAVE_FLUIDSYNTH
|
||||
it_inst = it->loadInstrument( "sf2player" );
|
||||
@@ -262,15 +260,15 @@ public:
|
||||
};
|
||||
|
||||
|
||||
bool MidiImport::readSMF( trackContainer * _tc )
|
||||
bool MidiImport::readSMF( TrackContainer* tc )
|
||||
{
|
||||
QString filename = file().fileName();
|
||||
closeFile();
|
||||
|
||||
const int preTrackSteps = 2;
|
||||
QProgressDialog pd( trackContainer::tr( "Importing MIDI-file..." ),
|
||||
trackContainer::tr( "Cancel" ), 0, preTrackSteps, engine::mainWindow() );
|
||||
pd.setWindowTitle( trackContainer::tr( "Please wait..." ) );
|
||||
QProgressDialog pd( TrackContainer::tr( "Importing MIDI-file..." ),
|
||||
TrackContainer::tr( "Cancel" ), 0, preTrackSteps, engine::mainWindow() );
|
||||
pd.setWindowTitle( TrackContainer::tr( "Please wait..." ) );
|
||||
pd.setWindowModality(Qt::WindowModal);
|
||||
pd.setMinimumDuration( 0 );
|
||||
|
||||
@@ -318,7 +316,7 @@ bool MidiImport::readSMF( trackContainer * _tc )
|
||||
pd.setValue( 2 );
|
||||
|
||||
// Tempo stuff
|
||||
AutomationPattern * tap = _tc->tempoAutomationPattern();
|
||||
AutomationPattern * tap = tc->tempoAutomationPattern();
|
||||
if( tap )
|
||||
{
|
||||
tap->clear();
|
||||
@@ -376,7 +374,7 @@ bool MidiImport::readSMF( trackContainer * _tc )
|
||||
}
|
||||
else if( evt->is_note() && evt->chan < 256 )
|
||||
{
|
||||
smfMidiChannel * ch = chs[evt->chan].create( _tc );
|
||||
smfMidiChannel * ch = chs[evt->chan].create( tc );
|
||||
Alg_note_ptr noteEvt = dynamic_cast<Alg_note_ptr>( evt );
|
||||
|
||||
note n( noteEvt->get_duration() * ticksPerBeat,
|
||||
@@ -389,7 +387,7 @@ bool MidiImport::readSMF( trackContainer * _tc )
|
||||
|
||||
else if( evt->is_update() )
|
||||
{
|
||||
smfMidiChannel * ch = chs[evt->chan].create( _tc );
|
||||
smfMidiChannel * ch = chs[evt->chan].create( tc );
|
||||
|
||||
double time = evt->time*ticksPerBeat;
|
||||
QString update( evt->get_attribute() );
|
||||
@@ -469,7 +467,7 @@ bool MidiImport::readSMF( trackContainer * _tc )
|
||||
}
|
||||
else
|
||||
{
|
||||
ccs[ccid].create( _tc );
|
||||
ccs[ccid].create( tc );
|
||||
ccs[ccid].putValue( time, objModel, cc );
|
||||
}
|
||||
}
|
||||
@@ -492,7 +490,7 @@ bool MidiImport::readSMF( trackContainer * _tc )
|
||||
{
|
||||
printf(" Should remove empty track\n");
|
||||
// must delete trackView first - but where is it?
|
||||
//_tc->removeTrack( chs[c].it );
|
||||
//tc->removeTrack( chs[c].it );
|
||||
//it->deleteLater();
|
||||
}
|
||||
}
|
||||
@@ -503,7 +501,7 @@ bool MidiImport::readSMF( trackContainer * _tc )
|
||||
|
||||
|
||||
|
||||
bool MidiImport::readRIFF( trackContainer * _tc )
|
||||
bool MidiImport::readRIFF( TrackContainer* tc )
|
||||
{
|
||||
// skip file length
|
||||
skip( 4 );
|
||||
@@ -543,7 +541,7 @@ data_not_found:
|
||||
{
|
||||
goto invalid_format;
|
||||
}
|
||||
return readSMF( _tc );
|
||||
return readSMF( tc );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* MidiImport.h - support for importing MIDI-files
|
||||
*
|
||||
* Copyright (c) 2005-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2005-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -46,10 +46,10 @@ public:
|
||||
|
||||
|
||||
private:
|
||||
virtual bool tryImport( trackContainer * _tc );
|
||||
virtual bool tryImport( TrackContainer* tc );
|
||||
|
||||
bool readSMF( trackContainer * _tc );
|
||||
bool readRIFF( trackContainer * _tc );
|
||||
bool readSMF( TrackContainer* tc );
|
||||
bool readRIFF( TrackContainer* tc );
|
||||
bool readTrack( int _track_end, QString & _track_name );
|
||||
|
||||
void error( void );
|
||||
|
||||
@@ -192,9 +192,8 @@ void patmanInstrument::setFile( const QString & _patch_file, bool _rename )
|
||||
// else we don't touch the instrument-track-name, because the user
|
||||
// named it self
|
||||
|
||||
m_patchFile = sampleBuffer::tryToMakeRelative( _patch_file );
|
||||
LoadErrors error = loadPatch( sampleBuffer::tryToMakeAbsolute(
|
||||
_patch_file ) );
|
||||
m_patchFile = SampleBuffer::tryToMakeRelative( _patch_file );
|
||||
LoadErrors error = loadPatch( SampleBuffer::tryToMakeAbsolute( _patch_file ) );
|
||||
if( error )
|
||||
{
|
||||
printf("Load error\n");
|
||||
@@ -351,7 +350,7 @@ patmanInstrument::LoadErrors patmanInstrument::loadPatch(
|
||||
}
|
||||
}
|
||||
|
||||
sampleBuffer * psample = new sampleBuffer( data, frames );
|
||||
SampleBuffer* psample = new SampleBuffer( data, frames );
|
||||
psample->setFrequency( root_freq / 1000.0f );
|
||||
psample->setSampleRate( sample_rate );
|
||||
|
||||
@@ -390,10 +389,9 @@ void patmanInstrument::selectSample( notePlayHandle * _n )
|
||||
const float freq = _n->frequency();
|
||||
|
||||
float min_dist = HUGE_VALF;
|
||||
sampleBuffer * sample = NULL;
|
||||
SampleBuffer* sample = NULL;
|
||||
|
||||
for( QVector<sampleBuffer *>::iterator it = m_patchSamples.begin();
|
||||
it != m_patchSamples.end(); ++it )
|
||||
for( QVector<SampleBuffer *>::iterator it = m_patchSamples.begin(); it != m_patchSamples.end(); ++it )
|
||||
{
|
||||
float patch_freq = ( *it )->frequency();
|
||||
float dist = freq >= patch_freq ? freq / patch_freq :
|
||||
@@ -414,9 +412,9 @@ void patmanInstrument::selectSample( notePlayHandle * _n )
|
||||
}
|
||||
else
|
||||
{
|
||||
hdata->sample = new sampleBuffer( NULL, 0 );
|
||||
hdata->sample = new SampleBuffer( NULL, 0 );
|
||||
}
|
||||
hdata->state = new sampleBuffer::handleState( _n->hasDetuningInfo() );
|
||||
hdata->state = new SampleBuffer::handleState( _n->hasDetuningInfo() );
|
||||
|
||||
_n->m_pluginData = hdata;
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
#include "Instrument.h"
|
||||
#include "InstrumentView.h"
|
||||
#include "sample_buffer.h"
|
||||
#include "SampleBuffer.h"
|
||||
#include "AutomatableModel.h"
|
||||
|
||||
|
||||
@@ -79,13 +79,13 @@ public slots:
|
||||
private:
|
||||
typedef struct
|
||||
{
|
||||
sampleBuffer::handleState * state;
|
||||
SampleBuffer::handleState* state;
|
||||
bool tuned;
|
||||
sampleBuffer * sample;
|
||||
SampleBuffer* sample;
|
||||
} handle_data;
|
||||
|
||||
QString m_patchFile;
|
||||
QVector<sampleBuffer *> m_patchSamples;
|
||||
QVector<SampleBuffer *> m_patchSamples;
|
||||
BoolModel m_loopedModel;
|
||||
BoolModel m_tunedModel;
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* sf2_player.cpp - a soundfont2 player using fluidSynth
|
||||
*
|
||||
* Copyright (c) 2008 Paul Giblock <drfaygo/at/gmail/dot/com>
|
||||
* Copyright (c) 2009-2013 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2009-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -334,9 +334,8 @@ void sf2Instrument::openFile( const QString & _sf2File, bool updateTrackName )
|
||||
emit fileLoading();
|
||||
|
||||
// Used for loading file
|
||||
char * sf2Ascii = qstrdup( qPrintable(
|
||||
sampleBuffer::tryToMakeAbsolute( _sf2File ) ) );
|
||||
QString relativePath = sampleBuffer::tryToMakeRelative( _sf2File );
|
||||
char * sf2Ascii = qstrdup( qPrintable( SampleBuffer::tryToMakeAbsolute( _sf2File ) ) );
|
||||
QString relativePath = SampleBuffer::tryToMakeRelative( _sf2File );
|
||||
|
||||
// free reference to soundfont if one is selected
|
||||
freeFont();
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
#include "lcd_spinbox.h"
|
||||
#include "led_checkbox.h"
|
||||
#include "fluidsynth.h"
|
||||
#include "sample_buffer.h"
|
||||
#include "SampleBuffer.h"
|
||||
|
||||
class sf2InstrumentView;
|
||||
class sf2Font;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* TripleOscillator.cpp - powerful instrument with three oscillators
|
||||
*
|
||||
* Copyright (c) 2004-2009 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
|
||||
*
|
||||
@@ -35,7 +35,7 @@
|
||||
#include "knob.h"
|
||||
#include "note_play_handle.h"
|
||||
#include "pixmap_button.h"
|
||||
#include "sample_buffer.h"
|
||||
#include "SampleBuffer.h"
|
||||
#include "song_editor.h"
|
||||
#include "tooltip.h"
|
||||
|
||||
@@ -88,7 +88,7 @@ OscillatorObject::OscillatorObject( Model * _parent, int _idx ) :
|
||||
Oscillator::NumModulationAlgos-1, this,
|
||||
tr( "Modulation type %1" ).arg( _idx+1 ) ),
|
||||
|
||||
m_sampleBuffer( new sampleBuffer ),
|
||||
m_sampleBuffer( new SampleBuffer ),
|
||||
m_volumeLeft( 0.0f ),
|
||||
m_volumeRight( 0.0f ),
|
||||
m_detuningLeft( 0.0f ),
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* TripleOscillator.h - declaration of class TripleOscillator a powerful
|
||||
* instrument-plugin with 3 oscillators
|
||||
*
|
||||
* Copyright (c) 2004-2009 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
|
||||
*
|
||||
@@ -36,7 +36,7 @@ class automatableButtonGroup;
|
||||
class knob;
|
||||
class notePlayHandle;
|
||||
class pixmapButton;
|
||||
class sampleBuffer;
|
||||
class SampleBuffer;
|
||||
|
||||
const int NUM_OF_OSCILLATORS = 3;
|
||||
|
||||
@@ -59,7 +59,7 @@ private:
|
||||
FloatModel m_stereoPhaseDetuningModel;
|
||||
IntModel m_waveShapeModel;
|
||||
IntModel m_modulationAlgoModel;
|
||||
sampleBuffer * m_sampleBuffer;
|
||||
SampleBuffer* m_sampleBuffer;
|
||||
|
||||
float m_volumeLeft;
|
||||
float m_volumeRight;
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
|
||||
#include "Instrument.h"
|
||||
#include "InstrumentView.h"
|
||||
#include "sample_buffer.h"
|
||||
#include "graph.h"
|
||||
#include "knob.h"
|
||||
#include "pixmap_button.h"
|
||||
|
||||
Reference in New Issue
Block a user