Merge branch 'master' into groove
This commit is contained in:
@@ -30,6 +30,8 @@
|
||||
|
||||
#include "ui_about_dialog.h"
|
||||
|
||||
namespace lmms::gui
|
||||
{
|
||||
|
||||
class AboutDialog : public QDialog, public Ui::AboutDialog
|
||||
{
|
||||
@@ -38,6 +40,7 @@ public:
|
||||
|
||||
} ;
|
||||
|
||||
} // namespace lmms::gui
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -28,6 +28,9 @@
|
||||
|
||||
#include <QActionGroup>
|
||||
|
||||
namespace lmms::gui
|
||||
{
|
||||
|
||||
/// \brief Convenience subclass of QActionGroup
|
||||
///
|
||||
/// This class provides the same functionality as QActionGroup, but in addition
|
||||
@@ -54,4 +57,6 @@ private:
|
||||
QList<QAction*> m_actions;
|
||||
};
|
||||
|
||||
} // namespace lmms::gui
|
||||
|
||||
#endif
|
||||
|
||||
@@ -37,6 +37,8 @@
|
||||
|
||||
#include "AudioDevice.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class AudioAlsa : public QThread, public AudioDevice
|
||||
{
|
||||
@@ -52,7 +54,7 @@ public:
|
||||
m_deviceName(deviceName),
|
||||
m_deviceDescription(deviceDescription)
|
||||
{}
|
||||
~DeviceInfo() {}
|
||||
~DeviceInfo() = default;
|
||||
|
||||
QString const & getDeviceName() const { return m_deviceName; }
|
||||
QString const & getDeviceDescription() const { return m_deviceDescription; }
|
||||
@@ -63,11 +65,11 @@ public:
|
||||
|
||||
};
|
||||
|
||||
typedef std::vector<DeviceInfo> DeviceInfoCollection;
|
||||
using DeviceInfoCollection = std::vector<DeviceInfo>;
|
||||
|
||||
public:
|
||||
AudioAlsa( bool & _success_ful, AudioEngine* audioEngine );
|
||||
virtual ~AudioAlsa();
|
||||
~AudioAlsa() override;
|
||||
|
||||
inline static QString name()
|
||||
{
|
||||
@@ -102,6 +104,8 @@ private:
|
||||
|
||||
} ;
|
||||
|
||||
#endif
|
||||
} // namespace lmms
|
||||
|
||||
#endif // LMMS_HAVE_ALSA
|
||||
|
||||
#endif
|
||||
|
||||
@@ -35,8 +35,11 @@
|
||||
|
||||
|
||||
class QComboBox;
|
||||
class LcdSpinBox;
|
||||
|
||||
namespace lmms::gui
|
||||
{
|
||||
|
||||
class LcdSpinBox;
|
||||
|
||||
class AudioAlsaSetupWidget : public AudioDeviceSetupWidget
|
||||
{
|
||||
@@ -44,7 +47,7 @@ class AudioAlsaSetupWidget : public AudioDeviceSetupWidget
|
||||
|
||||
public:
|
||||
AudioAlsaSetupWidget( QWidget * _parent );
|
||||
virtual ~AudioAlsaSetupWidget();
|
||||
~AudioAlsaSetupWidget() override;
|
||||
|
||||
void saveSettings() override;
|
||||
|
||||
@@ -59,6 +62,8 @@ private:
|
||||
AudioAlsa::DeviceInfoCollection m_deviceInfos;
|
||||
};
|
||||
|
||||
#endif
|
||||
} // namespace lmms::gui
|
||||
|
||||
#endif // LMMS_HAVE_ALSA
|
||||
|
||||
#endif
|
||||
|
||||
@@ -30,10 +30,13 @@
|
||||
|
||||
#include "lmms_basics.h"
|
||||
|
||||
class QThread;
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class AudioEngine;
|
||||
class AudioPort;
|
||||
class QThread;
|
||||
|
||||
|
||||
class AudioDevice
|
||||
@@ -153,7 +156,8 @@ private:
|
||||
|
||||
surroundSampleFrame * m_buffer;
|
||||
|
||||
} ;
|
||||
};
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -27,6 +27,8 @@
|
||||
|
||||
#include "TabWidget.h"
|
||||
|
||||
namespace lmms::gui
|
||||
{
|
||||
|
||||
class AudioDeviceSetupWidget : public TabWidget
|
||||
{
|
||||
@@ -34,12 +36,13 @@ class AudioDeviceSetupWidget : public TabWidget
|
||||
public:
|
||||
AudioDeviceSetupWidget( const QString & _caption, QWidget * _parent );
|
||||
|
||||
virtual ~AudioDeviceSetupWidget();
|
||||
~AudioDeviceSetupWidget() override = default;
|
||||
|
||||
virtual void saveSettings() = 0;
|
||||
|
||||
virtual void show();
|
||||
};
|
||||
|
||||
} // namespace lmms::gui
|
||||
|
||||
#endif
|
||||
|
||||
@@ -30,6 +30,8 @@
|
||||
#include "AudioEngine.h"
|
||||
#include "MicroTimer.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class AudioDummy : public QThread, public AudioDevice
|
||||
{
|
||||
@@ -41,7 +43,7 @@ public:
|
||||
_success_ful = true;
|
||||
}
|
||||
|
||||
virtual ~AudioDummy()
|
||||
~AudioDummy() override
|
||||
{
|
||||
stopProcessing();
|
||||
}
|
||||
@@ -52,17 +54,15 @@ public:
|
||||
}
|
||||
|
||||
|
||||
class setupWidget : public AudioDeviceSetupWidget
|
||||
class setupWidget : public gui::AudioDeviceSetupWidget
|
||||
{
|
||||
public:
|
||||
setupWidget( QWidget * _parent ) :
|
||||
AudioDeviceSetupWidget( AudioDummy::name(), _parent )
|
||||
gui::AudioDeviceSetupWidget( AudioDummy::name(), _parent )
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~setupWidget()
|
||||
{
|
||||
}
|
||||
~setupWidget() override = default;
|
||||
|
||||
void saveSettings() override
|
||||
{
|
||||
@@ -114,5 +114,6 @@ private:
|
||||
|
||||
} ;
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -26,6 +26,11 @@
|
||||
#define AUDIO_ENGINE_H
|
||||
|
||||
#include <QMutex>
|
||||
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5,14,0))
|
||||
#include <QRecursiveMutex>
|
||||
#endif
|
||||
|
||||
#include <QThread>
|
||||
#include <QVector>
|
||||
#include <QWaitCondition>
|
||||
@@ -39,9 +44,13 @@
|
||||
#include "PlayHandle.h"
|
||||
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class AudioDevice;
|
||||
class MidiClient;
|
||||
class AudioPort;
|
||||
class AudioEngineWorkerThread;
|
||||
|
||||
|
||||
const fpp_t MINIMUM_BUFFER_SIZE = 32;
|
||||
@@ -54,10 +63,6 @@ const int BYTES_PER_SURROUND_FRAME = sizeof( surroundSampleFrame );
|
||||
|
||||
const float OUTPUT_SAMPLE_MULTIPLIER = 32767.0f;
|
||||
|
||||
|
||||
class AudioEngineWorkerThread;
|
||||
|
||||
|
||||
class LMMS_EXPORT AudioEngine : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -361,11 +366,11 @@ public:
|
||||
signals:
|
||||
void qualitySettingsChanged();
|
||||
void sampleRateChanged();
|
||||
void nextAudioBuffer( const surroundSampleFrame * buffer );
|
||||
void nextAudioBuffer( const lmms::surroundSampleFrame * buffer );
|
||||
|
||||
|
||||
private:
|
||||
typedef FifoBuffer<surroundSampleFrame *> Fifo;
|
||||
using Fifo = FifoBuffer<surroundSampleFrame*>;
|
||||
|
||||
class fifoWriter : public QThread
|
||||
{
|
||||
@@ -387,7 +392,7 @@ private:
|
||||
|
||||
|
||||
AudioEngine( bool renderOnly );
|
||||
virtual ~AudioEngine();
|
||||
~AudioEngine() override;
|
||||
|
||||
void startProcessing(bool needsFifo = true);
|
||||
void stopProcessing();
|
||||
@@ -464,16 +469,22 @@ private:
|
||||
bool m_changesSignal;
|
||||
unsigned int m_changes;
|
||||
QMutex m_changesMutex;
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5,14,0))
|
||||
QRecursiveMutex m_doChangesMutex;
|
||||
#else
|
||||
QMutex m_doChangesMutex;
|
||||
#endif
|
||||
QMutex m_waitChangesMutex;
|
||||
QWaitCondition m_changesAudioEngineCondition;
|
||||
QWaitCondition m_changesRequestCondition;
|
||||
|
||||
bool m_waitingForWrite;
|
||||
|
||||
friend class LmmsCore;
|
||||
friend class Engine;
|
||||
friend class AudioEngineWorkerThread;
|
||||
friend class ProjectRenderer;
|
||||
} ;
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -30,11 +30,14 @@
|
||||
#include "lmms_basics.h"
|
||||
#include "MicroTimer.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class AudioEngineProfiler
|
||||
{
|
||||
public:
|
||||
AudioEngineProfiler();
|
||||
~AudioEngineProfiler();
|
||||
~AudioEngineProfiler() = default;
|
||||
|
||||
void startPeriod()
|
||||
{
|
||||
@@ -57,4 +60,6 @@ private:
|
||||
QFile m_outputFile;
|
||||
};
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -29,8 +29,12 @@
|
||||
|
||||
#include <atomic>
|
||||
|
||||
class AudioEngine;
|
||||
class QWaitCondition;
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class AudioEngine;
|
||||
class ThreadableJob;
|
||||
|
||||
class AudioEngineWorkerThread : public QThread
|
||||
@@ -74,7 +78,7 @@ public:
|
||||
|
||||
|
||||
AudioEngineWorkerThread( AudioEngine* audioEngine );
|
||||
virtual ~AudioEngineWorkerThread();
|
||||
~AudioEngineWorkerThread() override;
|
||||
|
||||
virtual void quit();
|
||||
|
||||
@@ -115,5 +119,6 @@ private:
|
||||
volatile bool m_quit;
|
||||
} ;
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -31,6 +31,8 @@
|
||||
#include "AudioDevice.h"
|
||||
#include "OutputSettings.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class AudioFileDevice : public AudioDevice
|
||||
{
|
||||
@@ -38,7 +40,7 @@ public:
|
||||
AudioFileDevice(OutputSettings const & outputSettings,
|
||||
const ch_cnt_t _channels, const QString & _file,
|
||||
AudioEngine* audioEngine );
|
||||
virtual ~AudioFileDevice();
|
||||
~AudioFileDevice() override;
|
||||
|
||||
QString outputFile() const
|
||||
{
|
||||
@@ -66,13 +68,9 @@ private:
|
||||
OutputSettings m_outputSettings;
|
||||
} ;
|
||||
|
||||
using AudioFileDeviceInstantiaton
|
||||
= AudioFileDevice* (*)(const QString&, const OutputSettings&, const ch_cnt_t, AudioEngine*, bool&);
|
||||
|
||||
typedef AudioFileDevice * ( * AudioFileDeviceInstantiaton )
|
||||
( const QString & outputFilename,
|
||||
OutputSettings const & outputSettings,
|
||||
const ch_cnt_t channels,
|
||||
AudioEngine* audioEngine,
|
||||
bool & successful );
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -30,6 +30,9 @@
|
||||
#include "AudioFileDevice.h"
|
||||
#include <sndfile.h>
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class AudioFileFlac: public AudioFileDevice
|
||||
{
|
||||
public:
|
||||
@@ -40,7 +43,7 @@ public:
|
||||
AudioEngine* audioEngine
|
||||
);
|
||||
|
||||
virtual ~AudioFileFlac();
|
||||
~AudioFileFlac() override;
|
||||
|
||||
static AudioFileDevice* getInst(QString const& outputFilename,
|
||||
OutputSettings const& outputSettings,
|
||||
@@ -62,7 +65,7 @@ private:
|
||||
SF_INFO m_sfinfo;
|
||||
SNDFILE* m_sf;
|
||||
|
||||
virtual void writeBuffer(surroundSampleFrame const* _ab,
|
||||
void writeBuffer(surroundSampleFrame const* _ab,
|
||||
fpp_t const frames,
|
||||
float master_gain) override;
|
||||
|
||||
@@ -71,4 +74,7 @@ private:
|
||||
|
||||
};
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif //AUDIO_FILE_FLAC_H
|
||||
|
||||
@@ -34,6 +34,8 @@
|
||||
|
||||
#include "lame/lame.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class AudioFileMP3 : public AudioFileDevice
|
||||
{
|
||||
@@ -43,7 +45,7 @@ public:
|
||||
bool & successful,
|
||||
const QString & _file,
|
||||
AudioEngine* audioEngine );
|
||||
virtual ~AudioFileMP3();
|
||||
~AudioFileMP3() override;
|
||||
|
||||
static AudioFileDevice * getInst( const QString & outputFilename,
|
||||
OutputSettings const & outputSettings,
|
||||
@@ -56,7 +58,7 @@ public:
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual void writeBuffer( const surroundSampleFrame * /* _buf*/,
|
||||
void writeBuffer( const surroundSampleFrame * /* _buf*/,
|
||||
const fpp_t /*_frames*/,
|
||||
const float /*_master_gain*/ ) override;
|
||||
|
||||
@@ -69,6 +71,8 @@ private:
|
||||
lame_t m_lame;
|
||||
};
|
||||
|
||||
#endif
|
||||
} // namespace lmms
|
||||
|
||||
#endif // LMMS_HAVE_MP3LAME
|
||||
|
||||
#endif
|
||||
|
||||
@@ -34,6 +34,8 @@
|
||||
|
||||
#include "AudioFileDevice.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class AudioFileOgg : public AudioFileDevice
|
||||
{
|
||||
@@ -43,7 +45,7 @@ public:
|
||||
bool & _success_ful,
|
||||
const QString & _file,
|
||||
AudioEngine* audioEngine );
|
||||
virtual ~AudioFileOgg();
|
||||
~AudioFileOgg() override;
|
||||
|
||||
static AudioFileDevice * getInst( const QString & outputFilename,
|
||||
OutputSettings const & outputSettings,
|
||||
@@ -56,7 +58,7 @@ public:
|
||||
|
||||
|
||||
private:
|
||||
virtual void writeBuffer( const surroundSampleFrame * _ab,
|
||||
void writeBuffer( const surroundSampleFrame * _ab,
|
||||
const fpp_t _frames,
|
||||
const float _master_gain ) override;
|
||||
|
||||
@@ -107,6 +109,8 @@ private:
|
||||
} ;
|
||||
|
||||
|
||||
#endif
|
||||
} // namespace lmms
|
||||
|
||||
#endif // LMMS_HAVE_OGGVORBIS
|
||||
|
||||
#endif
|
||||
|
||||
@@ -31,6 +31,8 @@
|
||||
|
||||
#include <sndfile.h>
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class AudioFileWave : public AudioFileDevice
|
||||
{
|
||||
@@ -40,7 +42,7 @@ public:
|
||||
bool & successful,
|
||||
const QString & file,
|
||||
AudioEngine* audioEngine );
|
||||
virtual ~AudioFileWave();
|
||||
~AudioFileWave() override;
|
||||
|
||||
static AudioFileDevice * getInst( const QString & outputFilename,
|
||||
OutputSettings const & outputSettings,
|
||||
@@ -54,7 +56,7 @@ public:
|
||||
|
||||
|
||||
private:
|
||||
virtual void writeBuffer( const surroundSampleFrame * _ab,
|
||||
void writeBuffer( const surroundSampleFrame * _ab,
|
||||
const fpp_t _frames,
|
||||
float _master_gain ) override;
|
||||
|
||||
@@ -66,4 +68,7 @@ private:
|
||||
SNDFILE * m_sf;
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -41,22 +41,30 @@
|
||||
#include "AudioDeviceSetupWidget.h"
|
||||
|
||||
class QLineEdit;
|
||||
class LcdSpinBox;
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class MidiJack;
|
||||
|
||||
namespace gui
|
||||
{
|
||||
class LcdSpinBox;
|
||||
}
|
||||
|
||||
|
||||
class AudioJack : public QObject, public AudioDevice
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
AudioJack( bool & _success_ful, AudioEngine* audioEngine );
|
||||
virtual ~AudioJack();
|
||||
~AudioJack() override;
|
||||
|
||||
// this is to allow the jack midi connection to use the same jack client connection
|
||||
// the jack callback is handled here, we call the midi client so that it can read
|
||||
// it's midi data during the callback
|
||||
AudioJack * addMidiClient(MidiJack *midiClient);
|
||||
void removeMidiClient(void) { m_midiClient = nullptr; }
|
||||
void removeMidiClient() { m_midiClient = nullptr; }
|
||||
jack_client_t * jackClient() {return m_client;};
|
||||
|
||||
inline static QString name()
|
||||
@@ -66,17 +74,17 @@ public:
|
||||
}
|
||||
|
||||
|
||||
class setupWidget : public AudioDeviceSetupWidget
|
||||
class setupWidget : public gui::AudioDeviceSetupWidget
|
||||
{
|
||||
public:
|
||||
setupWidget( QWidget * _parent );
|
||||
virtual ~setupWidget();
|
||||
~setupWidget() override;
|
||||
|
||||
virtual void saveSettings();
|
||||
void saveSettings() override;
|
||||
|
||||
private:
|
||||
QLineEdit * m_clientName;
|
||||
LcdSpinBox * m_channels;
|
||||
gui::LcdSpinBox * m_channels;
|
||||
|
||||
} ;
|
||||
|
||||
@@ -88,13 +96,13 @@ private slots:
|
||||
private:
|
||||
bool initJackClient();
|
||||
|
||||
virtual void startProcessing();
|
||||
virtual void stopProcessing();
|
||||
virtual void applyQualitySettings();
|
||||
void startProcessing() override;
|
||||
void stopProcessing() override;
|
||||
void applyQualitySettings() override;
|
||||
|
||||
virtual void registerPort( AudioPort * _port );
|
||||
virtual void unregisterPort( AudioPort * _port );
|
||||
virtual void renamePort( AudioPort * _port );
|
||||
void registerPort( AudioPort * _port ) override;
|
||||
void unregisterPort( AudioPort * _port ) override;
|
||||
void renamePort( AudioPort * _port ) override;
|
||||
|
||||
int processCallback( jack_nframes_t _nframes, void * _udata );
|
||||
|
||||
@@ -123,7 +131,7 @@ private:
|
||||
jack_port_t * ports[2];
|
||||
} ;
|
||||
|
||||
typedef QMap<AudioPort *, StereoPort> JackPortMap;
|
||||
using JackPortMap = QMap<AudioPort *, StereoPort>;
|
||||
JackPortMap m_portMap;
|
||||
#endif
|
||||
|
||||
@@ -132,6 +140,8 @@ signals:
|
||||
|
||||
} ;
|
||||
|
||||
#endif
|
||||
} // namespace lmms
|
||||
|
||||
#endif // LMMS_HAVE_JACK
|
||||
|
||||
#endif
|
||||
|
||||
@@ -34,17 +34,24 @@
|
||||
#include "AudioDevice.h"
|
||||
#include "AudioDeviceSetupWidget.h"
|
||||
|
||||
|
||||
class LcdSpinBox;
|
||||
class QLineEdit;
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
namespace gui
|
||||
{
|
||||
class LcdSpinBox;
|
||||
}
|
||||
|
||||
|
||||
|
||||
class AudioOss : public QThread, public AudioDevice
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
AudioOss( bool & _success_ful, AudioEngine* audioEngine );
|
||||
virtual ~AudioOss();
|
||||
~AudioOss() override;
|
||||
|
||||
inline static QString name()
|
||||
{
|
||||
@@ -54,17 +61,17 @@ public:
|
||||
static QString probeDevice();
|
||||
|
||||
|
||||
class setupWidget : public AudioDeviceSetupWidget
|
||||
class setupWidget : public gui::AudioDeviceSetupWidget
|
||||
{
|
||||
public:
|
||||
setupWidget( QWidget * _parent );
|
||||
virtual ~setupWidget();
|
||||
~setupWidget() override;
|
||||
|
||||
void saveSettings() override;
|
||||
|
||||
private:
|
||||
QLineEdit * m_device;
|
||||
LcdSpinBox * m_channels;
|
||||
gui::LcdSpinBox * m_channels;
|
||||
|
||||
} ;
|
||||
|
||||
@@ -81,7 +88,8 @@ private:
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
#endif
|
||||
} // namespace lmms
|
||||
|
||||
#endif // LMMS_HAVE_OSS
|
||||
|
||||
#endif
|
||||
|
||||
@@ -32,6 +32,9 @@
|
||||
#include "MemoryManager.h"
|
||||
#include "PlayHandle.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class EffectChain;
|
||||
class FloatModel;
|
||||
class BoolModel;
|
||||
@@ -133,5 +136,6 @@ private:
|
||||
|
||||
} ;
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -30,9 +30,28 @@
|
||||
#include "lmmsconfig.h"
|
||||
#include "ComboBoxModel.h"
|
||||
|
||||
#ifdef LMMS_HAVE_PORTAUDIO
|
||||
|
||||
# include <portaudio.h>
|
||||
|
||||
# include "AudioDevice.h"
|
||||
# include "AudioDeviceSetupWidget.h"
|
||||
|
||||
# if defined paNeverDropInput || defined paNonInterleaved
|
||||
# define PORTAUDIO_V19
|
||||
# else
|
||||
# define PORTAUDIO_V18
|
||||
# endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class AudioPortAudioSetupUtil : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_OBJECT
|
||||
public slots:
|
||||
void updateBackends();
|
||||
void updateDevices();
|
||||
@@ -41,33 +60,24 @@ public slots:
|
||||
public:
|
||||
ComboBoxModel m_backendModel;
|
||||
ComboBoxModel m_deviceModel;
|
||||
} ;
|
||||
};
|
||||
|
||||
|
||||
#ifdef LMMS_HAVE_PORTAUDIO
|
||||
|
||||
#include <portaudio.h>
|
||||
|
||||
|
||||
#include "AudioDevice.h"
|
||||
#include "AudioDeviceSetupWidget.h"
|
||||
|
||||
#if defined paNeverDropInput || defined paNonInterleaved
|
||||
# define PORTAUDIO_V19
|
||||
#else
|
||||
# define PORTAUDIO_V18
|
||||
#endif
|
||||
|
||||
|
||||
namespace gui
|
||||
{
|
||||
class ComboBox;
|
||||
class LcdSpinBox;
|
||||
}
|
||||
|
||||
|
||||
class AudioPortAudio : public AudioDevice
|
||||
{
|
||||
public:
|
||||
AudioPortAudio( bool & _success_ful, AudioEngine* audioEngine );
|
||||
virtual ~AudioPortAudio();
|
||||
~AudioPortAudio() override;
|
||||
|
||||
inline static QString name()
|
||||
{
|
||||
@@ -80,26 +90,26 @@ public:
|
||||
unsigned long _framesPerBuffer );
|
||||
|
||||
|
||||
class setupWidget : public AudioDeviceSetupWidget
|
||||
class setupWidget : public gui::AudioDeviceSetupWidget
|
||||
{
|
||||
public:
|
||||
setupWidget( QWidget * _parent );
|
||||
virtual ~setupWidget();
|
||||
~setupWidget() override;
|
||||
|
||||
virtual void saveSettings();
|
||||
virtual void show();
|
||||
void saveSettings() override;
|
||||
void show() override;
|
||||
|
||||
private:
|
||||
ComboBox * m_backend;
|
||||
ComboBox * m_device;
|
||||
gui::ComboBox * m_backend;
|
||||
gui::ComboBox * m_device;
|
||||
AudioPortAudioSetupUtil m_setupUtil;
|
||||
|
||||
} ;
|
||||
|
||||
private:
|
||||
virtual void startProcessing();
|
||||
virtual void stopProcessing();
|
||||
virtual void applyQualitySettings();
|
||||
void startProcessing() override;
|
||||
void stopProcessing() override;
|
||||
void applyQualitySettings() override;
|
||||
|
||||
#ifdef PORTAUDIO_V19
|
||||
static int _process_callback( const void *_inputBuffer, void * _outputBuffer,
|
||||
@@ -121,10 +131,10 @@ private:
|
||||
unsigned long _framesPerBuffer, PaTimestamp _outTime, void * _arg );
|
||||
|
||||
|
||||
typedef double PaTime;
|
||||
typedef PaDeviceID PaDeviceIndex;
|
||||
using PaTime = double;
|
||||
using PaDeviceIndex = PaDeviceID;
|
||||
|
||||
typedef struct PaStreamParameters
|
||||
using PaStreamParameters = struct
|
||||
{
|
||||
PaDeviceIndex device;
|
||||
int channelCount;
|
||||
@@ -133,7 +143,7 @@ private:
|
||||
void *hostApiSpecificStreamInfo;
|
||||
|
||||
} PaStreamParameters;
|
||||
#endif
|
||||
#endif // PORTAUDIO_V19
|
||||
|
||||
PaStream * m_paStream;
|
||||
PaStreamParameters m_outputParameters;
|
||||
@@ -149,6 +159,8 @@ private:
|
||||
|
||||
} ;
|
||||
|
||||
#endif
|
||||
#endif // LMMS_HAVE_PORTAUDIO
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -36,17 +36,23 @@
|
||||
#include "AudioDevice.h"
|
||||
#include "AudioDeviceSetupWidget.h"
|
||||
|
||||
|
||||
class LcdSpinBox;
|
||||
class QLineEdit;
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
namespace gui
|
||||
{
|
||||
class LcdSpinBox;
|
||||
}
|
||||
|
||||
|
||||
class AudioPulseAudio : public QThread, public AudioDevice
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
AudioPulseAudio( bool & _success_ful, AudioEngine* audioEngine );
|
||||
virtual ~AudioPulseAudio();
|
||||
~AudioPulseAudio() override;
|
||||
|
||||
inline static QString name()
|
||||
{
|
||||
@@ -56,17 +62,17 @@ public:
|
||||
static QString probeDevice();
|
||||
|
||||
|
||||
class setupWidget : public AudioDeviceSetupWidget
|
||||
class setupWidget : public gui::AudioDeviceSetupWidget
|
||||
{
|
||||
public:
|
||||
setupWidget( QWidget * _parent );
|
||||
virtual ~setupWidget();
|
||||
~setupWidget() override;
|
||||
|
||||
void saveSettings() override;
|
||||
|
||||
private:
|
||||
QLineEdit * m_device;
|
||||
LcdSpinBox * m_channels;
|
||||
gui::LcdSpinBox * m_channels;
|
||||
|
||||
} ;
|
||||
|
||||
@@ -94,6 +100,8 @@ private:
|
||||
|
||||
} ;
|
||||
|
||||
#endif
|
||||
} // namespace lmms
|
||||
|
||||
#endif // LMMS_HAVE_PULSEAUDIO
|
||||
|
||||
#endif
|
||||
|
||||
@@ -31,6 +31,9 @@
|
||||
|
||||
#include "AudioDevice.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class SampleBuffer;
|
||||
|
||||
|
||||
@@ -38,21 +41,22 @@ class AudioSampleRecorder : public AudioDevice
|
||||
{
|
||||
public:
|
||||
AudioSampleRecorder( const ch_cnt_t _channels, bool & _success_ful, AudioEngine* audioEngine );
|
||||
virtual ~AudioSampleRecorder();
|
||||
~AudioSampleRecorder() override;
|
||||
|
||||
f_cnt_t framesRecorded() const;
|
||||
void createSampleBuffer( SampleBuffer** sampleBuffer );
|
||||
|
||||
|
||||
private:
|
||||
virtual void writeBuffer( const surroundSampleFrame * _ab,
|
||||
void writeBuffer( const surroundSampleFrame * _ab,
|
||||
const fpp_t _frames,
|
||||
const float _master_gain ) override;
|
||||
|
||||
typedef QList<QPair<sampleFrame *, fpp_t> > BufferList;
|
||||
using BufferList = QList<QPair<sampleFrame*, fpp_t>>;
|
||||
BufferList m_buffers;
|
||||
|
||||
} ;
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -41,12 +41,14 @@
|
||||
|
||||
class QLineEdit;
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class AudioSdl : public AudioDevice
|
||||
{
|
||||
public:
|
||||
AudioSdl( bool & _success_ful, AudioEngine* audioEngine );
|
||||
virtual ~AudioSdl();
|
||||
~AudioSdl() override;
|
||||
|
||||
inline static QString name()
|
||||
{
|
||||
@@ -55,11 +57,11 @@ public:
|
||||
}
|
||||
|
||||
|
||||
class setupWidget : public AudioDeviceSetupWidget
|
||||
class setupWidget : public gui::AudioDeviceSetupWidget
|
||||
{
|
||||
public:
|
||||
setupWidget( QWidget * _parent );
|
||||
~setupWidget() override;
|
||||
~setupWidget() override = default;
|
||||
|
||||
void saveSettings() override;
|
||||
|
||||
@@ -108,6 +110,9 @@ private:
|
||||
|
||||
} ;
|
||||
|
||||
#endif
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif // LMMS_HAVE_SDL
|
||||
|
||||
#endif
|
||||
|
||||
@@ -36,40 +36,47 @@
|
||||
#include "AudioDevice.h"
|
||||
#include "AudioDeviceSetupWidget.h"
|
||||
|
||||
class LcdSpinBox;
|
||||
class QLineEdit;
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
namespace gui
|
||||
{
|
||||
class LcdSpinBox;
|
||||
}
|
||||
|
||||
|
||||
class AudioSndio : public QThread, public AudioDevice
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
AudioSndio( bool & _success_ful, AudioEngine * _audioEngine );
|
||||
virtual ~AudioSndio();
|
||||
~AudioSndio() override;
|
||||
|
||||
inline static QString name( void )
|
||||
inline static QString name()
|
||||
{
|
||||
return QT_TRANSLATE_NOOP( "AudioDeviceSetupWidget", "sndio" );
|
||||
}
|
||||
|
||||
class setupWidget : public AudioDeviceSetupWidget
|
||||
class setupWidget : public gui::AudioDeviceSetupWidget
|
||||
{
|
||||
public:
|
||||
setupWidget( QWidget * _parent );
|
||||
virtual ~setupWidget();
|
||||
~setupWidget() override = default;
|
||||
|
||||
void saveSettings( void ) override;
|
||||
void saveSettings() override;
|
||||
|
||||
private:
|
||||
QLineEdit * m_device;
|
||||
LcdSpinBox * m_channels;
|
||||
gui::LcdSpinBox * m_channels;
|
||||
} ;
|
||||
|
||||
private:
|
||||
void startProcessing( void ) override;
|
||||
void stopProcessing( void ) override;
|
||||
void applyQualitySettings( void ) override;
|
||||
void run( void ) override;
|
||||
void startProcessing() override;
|
||||
void stopProcessing() override;
|
||||
void applyQualitySettings() override;
|
||||
void run() override;
|
||||
|
||||
struct sio_hdl *m_hdl;
|
||||
struct sio_par m_par;
|
||||
@@ -78,6 +85,8 @@ private:
|
||||
} ;
|
||||
|
||||
|
||||
#endif /* LMMS_HAVE_SNDIO */
|
||||
} // namespace lmms
|
||||
|
||||
#endif /* _AUDIO_SNDIO_H */
|
||||
#endif // LMMS_HAVE_SNDIO
|
||||
|
||||
#endif // _AUDIO_SNDIO_H
|
||||
|
||||
@@ -37,15 +37,21 @@
|
||||
#include "AudioDevice.h"
|
||||
#include "AudioDeviceSetupWidget.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
namespace gui
|
||||
{
|
||||
class ComboBox;
|
||||
class LcdSpinBox;
|
||||
}
|
||||
|
||||
// Exists only to work around "Error: Meta object features not supported for nested classes"
|
||||
class AudioSoundIoSetupUtil : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
virtual ~AudioSoundIoSetupUtil();
|
||||
virtual ~AudioSoundIoSetupUtil() = default;
|
||||
|
||||
void *m_setupWidget;
|
||||
public slots:
|
||||
@@ -64,7 +70,7 @@ public:
|
||||
return QT_TRANSLATE_NOOP( "AudioDeviceSetupWidget", "soundio" );
|
||||
}
|
||||
|
||||
class setupWidget : public AudioDeviceSetupWidget
|
||||
class setupWidget : public gui::AudioDeviceSetupWidget
|
||||
{
|
||||
public:
|
||||
setupWidget( QWidget * _parent );
|
||||
@@ -78,8 +84,8 @@ public:
|
||||
private:
|
||||
|
||||
AudioSoundIoSetupUtil m_setupUtil;
|
||||
ComboBox * m_backend;
|
||||
ComboBox * m_device;
|
||||
gui::ComboBox * m_backend;
|
||||
gui::ComboBox * m_device;
|
||||
|
||||
ComboBoxModel m_backendModel;
|
||||
ComboBoxModel m_deviceModel;
|
||||
@@ -134,6 +140,9 @@ private:
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif // LMMS_HAVE_SOUNDIO
|
||||
|
||||
#endif
|
||||
|
||||
@@ -30,6 +30,8 @@
|
||||
|
||||
#include "AutomatableModelView.h"
|
||||
|
||||
namespace lmms::gui
|
||||
{
|
||||
|
||||
class automatableButtonGroup;
|
||||
|
||||
@@ -40,7 +42,7 @@ class LMMS_EXPORT AutomatableButton : public QPushButton, public BoolModelView
|
||||
public:
|
||||
AutomatableButton( QWidget * _parent, const QString & _name
|
||||
= QString() );
|
||||
virtual ~AutomatableButton();
|
||||
~AutomatableButton() override;
|
||||
|
||||
inline void setCheckable( bool _on )
|
||||
{
|
||||
@@ -85,7 +87,7 @@ class LMMS_EXPORT automatableButtonGroup : public QWidget, public IntModelView
|
||||
public:
|
||||
automatableButtonGroup( QWidget * _parent, const QString & _name
|
||||
= QString() );
|
||||
virtual ~automatableButtonGroup();
|
||||
~automatableButtonGroup() override;
|
||||
|
||||
void addButton( AutomatableButton * _btn );
|
||||
void removeButton( AutomatableButton * _btn );
|
||||
@@ -105,5 +107,6 @@ private:
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace lmms::gui
|
||||
|
||||
#endif
|
||||
|
||||
@@ -35,6 +35,10 @@
|
||||
#include "MemoryManager.h"
|
||||
#include "ModelVisitor.h"
|
||||
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
// simple way to map a property of a view to a model
|
||||
#define mapPropertyFromModelPtr(type,getfunc,setfunc,modelname) \
|
||||
public: \
|
||||
@@ -74,8 +78,7 @@ class LMMS_EXPORT AutomatableModel : public Model, public JournallingObject
|
||||
Q_OBJECT
|
||||
MM_OPERATORS
|
||||
public:
|
||||
|
||||
typedef QVector<AutomatableModel *> AutoModelVector;
|
||||
using AutoModelVector = QVector<AutomatableModel*>;
|
||||
|
||||
enum ScaleType
|
||||
{
|
||||
@@ -85,7 +88,7 @@ public:
|
||||
};
|
||||
|
||||
|
||||
virtual ~AutomatableModel();
|
||||
~AutomatableModel() override;
|
||||
|
||||
// Implement those by using the MODEL_IS_VISITABLE macro
|
||||
virtual void accept(ModelVisitor& v) = 0;
|
||||
@@ -416,7 +419,7 @@ private:
|
||||
|
||||
signals:
|
||||
void initValueChanged( float val );
|
||||
void destroyed( jo_id_t id );
|
||||
void destroyed( lmms::jo_id_t id );
|
||||
|
||||
} ;
|
||||
|
||||
@@ -500,7 +503,9 @@ public:
|
||||
QString displayValue( const float val ) const override;
|
||||
} ;
|
||||
|
||||
typedef QMap<AutomatableModel*, float> AutomatedValueMap;
|
||||
using AutomatedValueMap = QMap<AutomatableModel*, float>;
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -32,11 +32,14 @@
|
||||
class QMenu;
|
||||
class QMouseEvent;
|
||||
|
||||
namespace lmms::gui
|
||||
{
|
||||
|
||||
class LMMS_EXPORT AutomatableModelView : public ModelView
|
||||
{
|
||||
public:
|
||||
AutomatableModelView( Model* model, QWidget* _this );
|
||||
virtual ~AutomatableModelView() = default;
|
||||
~AutomatableModelView() override = default;
|
||||
|
||||
// some basic functions for convenience
|
||||
AutomatableModel* modelUntyped()
|
||||
@@ -132,5 +135,7 @@ using FloatModelView = TypedModelView<FloatModel>;
|
||||
using IntModelView = TypedModelView<IntModel>;
|
||||
using BoolModelView = TypedModelView<BoolModel>;
|
||||
|
||||
} // namespace lmms::gui
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -31,13 +31,15 @@
|
||||
#include "AutomatableModelView.h"
|
||||
|
||||
|
||||
namespace lmms::gui
|
||||
{
|
||||
|
||||
class AutomatableSlider : public QSlider, public IntModelView
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
AutomatableSlider( QWidget * _parent, const QString & _name = QString() );
|
||||
virtual ~AutomatableSlider();
|
||||
~AutomatableSlider() override = default;
|
||||
|
||||
bool showStatus()
|
||||
{
|
||||
@@ -71,7 +73,8 @@ private slots:
|
||||
} ;
|
||||
|
||||
|
||||
typedef IntModel sliderModel;
|
||||
using sliderModel = IntModel;
|
||||
|
||||
} // namespace lmms::gui
|
||||
|
||||
#endif
|
||||
|
||||
@@ -29,14 +29,25 @@
|
||||
|
||||
#include <QMap>
|
||||
#include <QPointer>
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5,14,0))
|
||||
#include <QRecursiveMutex>
|
||||
#endif
|
||||
|
||||
#include "AutomationNode.h"
|
||||
#include "Clip.h"
|
||||
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class AutomationTrack;
|
||||
class TimePos;
|
||||
|
||||
namespace gui
|
||||
{
|
||||
class AutomationClipView;
|
||||
} // namespace gui
|
||||
|
||||
|
||||
|
||||
class LMMS_EXPORT AutomationClip : public Clip
|
||||
@@ -50,14 +61,14 @@ public:
|
||||
CubicHermiteProgression
|
||||
} ;
|
||||
|
||||
typedef QMap<int, AutomationNode> timeMap;
|
||||
typedef QVector<QPointer<AutomatableModel>> objectVector;
|
||||
using timeMap = QMap<int, AutomationNode>;
|
||||
using objectVector = QVector<QPointer<AutomatableModel>>;
|
||||
|
||||
using TimemapIterator = timeMap::const_iterator;
|
||||
|
||||
AutomationClip( AutomationTrack * _auto_track );
|
||||
AutomationClip( const AutomationClip & _clip_to_copy );
|
||||
virtual ~AutomationClip() = default;
|
||||
~AutomationClip() override = default;
|
||||
|
||||
bool addObject( AutomatableModel * _obj, bool _search_dup = true );
|
||||
|
||||
@@ -152,7 +163,7 @@ public:
|
||||
static const QString classNodeName() { return "automationclip"; }
|
||||
QString nodeName() const override { return classNodeName(); }
|
||||
|
||||
ClipView * createView( TrackView * _tv ) override;
|
||||
gui::ClipView * createView( gui::TrackView * _tv ) override;
|
||||
|
||||
|
||||
static bool isAutomated( const AutomatableModel * _m );
|
||||
@@ -168,7 +179,7 @@ public:
|
||||
|
||||
public slots:
|
||||
void clear();
|
||||
void objectDestroyed( jo_id_t );
|
||||
void objectDestroyed( lmms::jo_id_t );
|
||||
void flipY( int min, int max );
|
||||
void flipY();
|
||||
void flipX( int length = -1 );
|
||||
@@ -181,7 +192,11 @@ private:
|
||||
|
||||
// Mutex to make methods involving automation clips thread safe
|
||||
// Mutable so we can lock it from const objects
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5,14,0))
|
||||
mutable QRecursiveMutex m_clipMutex;
|
||||
#else
|
||||
mutable QMutex m_clipMutex;
|
||||
#endif
|
||||
|
||||
AutomationTrack * m_autoTrack;
|
||||
QVector<jo_id_t> m_idsToResolve;
|
||||
@@ -204,7 +219,7 @@ private:
|
||||
static const float DEFAULT_MIN_VALUE;
|
||||
static const float DEFAULT_MAX_VALUE;
|
||||
|
||||
friend class AutomationClipView;
|
||||
friend class gui::AutomationClipView;
|
||||
friend class AutomationNode;
|
||||
|
||||
} ;
|
||||
@@ -242,4 +257,7 @@ inline int POS(AutomationClip::TimemapIterator it)
|
||||
return it.key();
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -29,8 +29,14 @@
|
||||
|
||||
#include "ClipView.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class AutomationClip;
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
|
||||
class AutomationClipView : public ClipView
|
||||
{
|
||||
@@ -39,7 +45,7 @@ class AutomationClipView : public ClipView
|
||||
|
||||
public:
|
||||
AutomationClipView( AutomationClip * _clip, TrackView * _parent );
|
||||
virtual ~AutomationClipView();
|
||||
~AutomationClipView() override = default;
|
||||
|
||||
public slots:
|
||||
/// Opens this view's clip in the global automation editor
|
||||
@@ -75,4 +81,8 @@ private:
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace gui
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -40,9 +40,16 @@ class QPainter;
|
||||
class QPixmap;
|
||||
class QScrollBar;
|
||||
|
||||
class ComboBox;
|
||||
class Knob;
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class NotePlayHandle;
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
class Knob;
|
||||
class ComboBox;
|
||||
class TimeLineWidget;
|
||||
|
||||
|
||||
@@ -92,7 +99,7 @@ public slots:
|
||||
|
||||
|
||||
protected:
|
||||
typedef AutomationClip::timeMap timeMap;
|
||||
using timeMap = AutomationClip::timeMap;
|
||||
|
||||
void keyPressEvent(QKeyEvent * ke) override;
|
||||
void leaveEvent(QEvent * e) override;
|
||||
@@ -128,7 +135,7 @@ protected slots:
|
||||
void setProgressionType(int type);
|
||||
void setTension();
|
||||
|
||||
void updatePosition( const TimePos & t );
|
||||
void updatePosition( const lmms::TimePos & t );
|
||||
|
||||
void zoomingXChanged();
|
||||
void zoomingYChanged();
|
||||
@@ -160,7 +167,7 @@ private:
|
||||
|
||||
AutomationEditor();
|
||||
AutomationEditor( const AutomationEditor & );
|
||||
virtual ~AutomationEditor();
|
||||
~AutomationEditor() override;
|
||||
|
||||
static QPixmap * s_toolDraw;
|
||||
static QPixmap * s_toolErase;
|
||||
@@ -234,7 +241,7 @@ private:
|
||||
|
||||
signals:
|
||||
void currentClipChanged();
|
||||
void positionChanged( const TimePos & );
|
||||
void positionChanged( const lmms::TimePos & );
|
||||
} ;
|
||||
|
||||
|
||||
@@ -248,7 +255,7 @@ class AutomationEditorWindow : public Editor
|
||||
static const int INITIAL_HEIGHT = 480;
|
||||
public:
|
||||
AutomationEditorWindow();
|
||||
~AutomationEditorWindow();
|
||||
~AutomationEditorWindow() override = default;
|
||||
|
||||
void setCurrentClip(AutomationClip* clip);
|
||||
const AutomationClip* currentClip();
|
||||
@@ -293,5 +300,8 @@ private:
|
||||
ComboBox * m_quantizeComboBox;
|
||||
};
|
||||
|
||||
} // namespace gui
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -26,6 +26,9 @@
|
||||
#ifndef AUTOMATION_NODE_H
|
||||
#define AUTOMATION_NODE_H
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class AutomationClip;
|
||||
|
||||
|
||||
@@ -151,5 +154,6 @@ private:
|
||||
float m_outTangent;
|
||||
};
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -29,15 +29,17 @@
|
||||
|
||||
#include "Track.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class AutomationTrack : public Track
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
AutomationTrack( TrackContainer* tc, bool _hidden = false );
|
||||
virtual ~AutomationTrack() = default;
|
||||
~AutomationTrack() override = default;
|
||||
|
||||
virtual bool play( const TimePos & _start, const fpp_t _frames,
|
||||
bool play( const TimePos & _start, const fpp_t _frames,
|
||||
const f_cnt_t _frame_base, int _clip_num = -1 ) override;
|
||||
|
||||
QString nodeName() const override
|
||||
@@ -45,10 +47,10 @@ public:
|
||||
return "automationtrack";
|
||||
}
|
||||
|
||||
TrackView * createView( TrackContainerView* ) override;
|
||||
gui::TrackView * createView( gui::TrackContainerView* ) override;
|
||||
Clip* createClip(const TimePos & pos) override;
|
||||
|
||||
virtual void saveTrackSpecificSettings( QDomDocument & _doc,
|
||||
void saveTrackSpecificSettings( QDomDocument & _doc,
|
||||
QDomElement & _parent ) override;
|
||||
void loadTrackSpecificSettings( const QDomElement & _this ) override;
|
||||
|
||||
@@ -58,4 +60,6 @@ private:
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -28,18 +28,28 @@
|
||||
|
||||
#include "TrackView.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class AutomationTrack;
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
|
||||
class AutomationTrackView : public TrackView
|
||||
{
|
||||
public:
|
||||
AutomationTrackView( AutomationTrack* at, TrackContainerView* tcv );
|
||||
virtual ~AutomationTrackView() = default;
|
||||
~AutomationTrackView() override = default;
|
||||
|
||||
void dragEnterEvent( QDragEnterEvent * _dee ) override;
|
||||
void dropEvent( QDropEvent * _de ) override;
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace gui
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -36,6 +36,9 @@ class QString;
|
||||
#include "Engine.h"
|
||||
#include "AudioEngine.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
constexpr int MAXLEN = 11;
|
||||
constexpr int MIPMAPSIZE = 2 << ( MAXLEN + 1 );
|
||||
constexpr int MIPMAPSIZE3 = 3 << ( MAXLEN + 1 );
|
||||
@@ -51,29 +54,30 @@ const int TLENS[MAXTBL+1] = { 2 << 0, 3 << 0, 2 << 1, 3 << 1,
|
||||
2 << 8, 3 << 8, 2 << 9, 3 << 9,
|
||||
2 << 10, 3 << 10, 2 << 11, 3 << 11 };
|
||||
|
||||
typedef struct
|
||||
struct WaveMipMap
|
||||
{
|
||||
public:
|
||||
inline sample_t sampleAt( int table, int ph )
|
||||
inline sample_t sampleAt(int table, int ph)
|
||||
{
|
||||
if( table % 2 == 0 )
|
||||
{ return m_data[ TLENS[ table ] + ph ]; }
|
||||
if (table % 2 == 0) { return m_data[TLENS[table] + ph]; }
|
||||
else
|
||||
{ return m_data3[ TLENS[ table ] + ph ]; }
|
||||
{
|
||||
return m_data3[TLENS[table] + ph];
|
||||
}
|
||||
}
|
||||
inline void setSampleAt( int table, int ph, sample_t sample )
|
||||
inline void setSampleAt(int table, int ph, sample_t sample)
|
||||
{
|
||||
if( table % 2 == 0 )
|
||||
{ m_data[ TLENS[ table ] + ph ] = sample; }
|
||||
if (table % 2 == 0) { m_data[TLENS[table] + ph] = sample; }
|
||||
else
|
||||
{ m_data3[ TLENS[ table ] + ph ] = sample; }
|
||||
{
|
||||
m_data3[TLENS[table] + ph] = sample;
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
sample_t m_data [ MIPMAPSIZE ];
|
||||
sample_t m_data3 [ MIPMAPSIZE3 ];
|
||||
|
||||
} WaveMipMap;
|
||||
|
||||
sample_t m_data[MIPMAPSIZE];
|
||||
sample_t m_data3[MIPMAPSIZE3];
|
||||
};
|
||||
|
||||
QDataStream& operator<< ( QDataStream &out, WaveMipMap &waveMipMap );
|
||||
|
||||
@@ -94,8 +98,8 @@ public:
|
||||
NumBLWaveforms
|
||||
};
|
||||
|
||||
BandLimitedWave() {};
|
||||
virtual ~BandLimitedWave() {};
|
||||
BandLimitedWave() = default;
|
||||
virtual ~BandLimitedWave() = default;
|
||||
|
||||
/*! \brief This method converts frequency to wavelength. The oscillate function takes wavelength as argument so
|
||||
* use this to convert your note frequency to wavelength before using it.
|
||||
@@ -163,10 +167,11 @@ public:
|
||||
|
||||
static bool s_wavesGenerated;
|
||||
|
||||
static WaveMipMap s_waveforms [NumBLWaveforms];
|
||||
static std::array<WaveMipMap, NumBLWaveforms> s_waveforms;
|
||||
|
||||
static QString s_wavetableDir;
|
||||
};
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -43,6 +43,9 @@
|
||||
#include "interpolation.h"
|
||||
#include "MemoryManager.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
template<ch_cnt_t CHANNELS=DEFAULT_CHANNELS> class BasicFilters;
|
||||
|
||||
template<ch_cnt_t CHANNELS>
|
||||
@@ -55,7 +58,7 @@ public:
|
||||
m_sampleRate = sampleRate;
|
||||
clearHistory();
|
||||
}
|
||||
virtual ~LinkwitzRiley() {}
|
||||
virtual ~LinkwitzRiley() = default;
|
||||
|
||||
inline void clearHistory()
|
||||
{
|
||||
@@ -135,10 +138,10 @@ private:
|
||||
double m_a, m_a0, m_a1, m_a2;
|
||||
double m_b1, m_b2, m_b3, m_b4;
|
||||
|
||||
typedef double frame[CHANNELS];
|
||||
using frame = std::array<double, CHANNELS>;
|
||||
frame m_z1, m_z2, m_z3, m_z4;
|
||||
};
|
||||
typedef LinkwitzRiley<2> StereoLinkwitzRiley;
|
||||
using StereoLinkwitzRiley = LinkwitzRiley<2>;
|
||||
|
||||
template<ch_cnt_t CHANNELS>
|
||||
class BiQuad
|
||||
@@ -149,7 +152,7 @@ public:
|
||||
{
|
||||
clearHistory();
|
||||
}
|
||||
virtual ~BiQuad() {}
|
||||
virtual ~BiQuad() = default;
|
||||
|
||||
inline void setCoeffs( float a1, float a2, float b0, float b1, float b2 )
|
||||
{
|
||||
@@ -181,7 +184,7 @@ private:
|
||||
|
||||
friend class BasicFilters<CHANNELS>; // needed for subfilter stuff in BasicFilters
|
||||
};
|
||||
typedef BiQuad<2> StereoBiQuad;
|
||||
using StereoBiQuad = BiQuad<2>;
|
||||
|
||||
template<ch_cnt_t CHANNELS>
|
||||
class OnePole
|
||||
@@ -197,7 +200,7 @@ public:
|
||||
m_z1[i] = 0.0;
|
||||
}
|
||||
}
|
||||
virtual ~OnePole() {}
|
||||
virtual ~OnePole() = default;
|
||||
|
||||
inline void setCoeffs( float a0, float b1 )
|
||||
{
|
||||
@@ -215,7 +218,7 @@ private:
|
||||
float m_a0, m_b1;
|
||||
float m_z1 [CHANNELS];
|
||||
};
|
||||
typedef OnePole<2> StereoOnePole;
|
||||
using StereoOnePole = OnePole<2>;
|
||||
|
||||
template<ch_cnt_t CHANNELS>
|
||||
class BasicFilters
|
||||
@@ -886,7 +889,7 @@ private:
|
||||
// coeffs for Lowpass_SV (state-variant lowpass)
|
||||
float m_svf1, m_svf2, m_svq;
|
||||
|
||||
typedef sample_t frame[CHANNELS];
|
||||
using frame = std::array<sample_t, CHANNELS>;
|
||||
|
||||
// in/out history for moog-filter
|
||||
frame m_y1, m_y2, m_y3, m_y4, m_oldx, m_oldy1, m_oldy2, m_oldy3;
|
||||
@@ -913,4 +916,6 @@ private:
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -29,10 +29,14 @@
|
||||
#include "lmms_export.h"
|
||||
#include "lmms_basics.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
class LMMS_EXPORT BufferManager
|
||||
{
|
||||
public:
|
||||
static void init( fpp_t framesPerPeriod );
|
||||
static void init( fpp_t fpp );
|
||||
static sampleFrame * acquire();
|
||||
// audio-buffer-mgm
|
||||
static void clear( sampleFrame * ab, const f_cnt_t frames,
|
||||
@@ -42,6 +46,12 @@ public:
|
||||
const f_cnt_t offset = 0 );
|
||||
#endif
|
||||
static void release( sampleFrame * buf );
|
||||
|
||||
private:
|
||||
static fpp_t s_framesPerPeriod;
|
||||
};
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -34,12 +34,16 @@
|
||||
#include "lmms_basics.h"
|
||||
|
||||
|
||||
namespace lmms::gui
|
||||
{
|
||||
|
||||
|
||||
class CPULoadWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
CPULoadWidget( QWidget * _parent );
|
||||
virtual ~CPULoadWidget();
|
||||
~CPULoadWidget() override = default;
|
||||
|
||||
|
||||
protected:
|
||||
@@ -64,4 +68,6 @@ private:
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace lmms::gui
|
||||
|
||||
#endif
|
||||
|
||||
@@ -30,6 +30,9 @@
|
||||
|
||||
#include "lmms_export.h"
|
||||
|
||||
namespace lmms::gui
|
||||
{
|
||||
|
||||
///
|
||||
/// \brief A context menu with a caption
|
||||
///
|
||||
@@ -38,10 +41,10 @@ class LMMS_EXPORT CaptionMenu : public QMenu
|
||||
Q_OBJECT
|
||||
public:
|
||||
CaptionMenu( const QString & _title, QWidget * _parent = 0 );
|
||||
virtual ~CaptionMenu();
|
||||
~CaptionMenu() override = default;
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
} // namespace lmms::gui
|
||||
|
||||
#endif
|
||||
|
||||
@@ -30,11 +30,20 @@
|
||||
#include "AutomatableModel.h"
|
||||
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class Track;
|
||||
class ClipView;
|
||||
class TrackContainer;
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
class ClipView;
|
||||
class TrackView;
|
||||
|
||||
} // namespace gui
|
||||
|
||||
|
||||
class LMMS_EXPORT Clip : public Model, public JournallingObject
|
||||
{
|
||||
@@ -44,7 +53,7 @@ class LMMS_EXPORT Clip : public Model, public JournallingObject
|
||||
mapPropertyFromModel(bool,isSolo,setSolo,m_soloModel);
|
||||
public:
|
||||
Clip( Track * track );
|
||||
virtual ~Clip();
|
||||
~Clip() override;
|
||||
|
||||
inline Track * getTrack() const
|
||||
{
|
||||
@@ -84,6 +93,12 @@ public:
|
||||
return m_length;
|
||||
}
|
||||
|
||||
/*! \brief Specify whether or not a TCO automatically resizes.
|
||||
*
|
||||
* If a TCO does automatically resize, it cannot be manually
|
||||
* resized by clicking and dragging its edge.
|
||||
*
|
||||
*/
|
||||
inline void setAutoResize( const bool r )
|
||||
{
|
||||
m_autoResize = r;
|
||||
@@ -116,7 +131,7 @@ public:
|
||||
virtual void movePosition( const TimePos & pos );
|
||||
virtual void changeLength( const TimePos & length );
|
||||
|
||||
virtual ClipView * createView( TrackView * tv ) = 0;
|
||||
virtual gui::ClipView * createView( gui::TrackView * tv ) = 0;
|
||||
|
||||
inline void selectViewOnCreate( bool select )
|
||||
{
|
||||
@@ -177,4 +192,6 @@ private:
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -36,9 +36,16 @@
|
||||
class QMenu;
|
||||
class QContextMenuEvent;
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class DataFile;
|
||||
class TextFloat;
|
||||
class Clip;
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
class TextFloat;
|
||||
class TrackView;
|
||||
|
||||
|
||||
@@ -64,7 +71,7 @@ public:
|
||||
const static int BORDER_WIDTH = 2;
|
||||
|
||||
ClipView( Clip * clip, TrackView * tv );
|
||||
virtual ~ClipView();
|
||||
~ClipView() override;
|
||||
|
||||
bool fixedClips();
|
||||
|
||||
@@ -241,4 +248,8 @@ private:
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace gui
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -30,8 +30,9 @@
|
||||
|
||||
class QMimeData;
|
||||
|
||||
namespace Clipboard
|
||||
namespace lmms::Clipboard
|
||||
{
|
||||
|
||||
enum class MimeType
|
||||
{
|
||||
StringPair,
|
||||
@@ -64,6 +65,7 @@ namespace Clipboard
|
||||
break;
|
||||
}
|
||||
}
|
||||
} ;
|
||||
|
||||
} // namespace lmms::Clipboard
|
||||
|
||||
#endif
|
||||
|
||||
@@ -21,19 +21,26 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef COLOR_CHOOSER_H
|
||||
#define COLOR_CHOOSER_H
|
||||
|
||||
#include <QApplication>
|
||||
#include <QColor>
|
||||
#include <QColorDialog>
|
||||
#include <QKeyEvent>
|
||||
#include <QVector>
|
||||
|
||||
namespace lmms::gui
|
||||
{
|
||||
|
||||
|
||||
class ColorChooser: public QColorDialog
|
||||
{
|
||||
public:
|
||||
ColorChooser(const QColor &initial, QWidget *parent): QColorDialog(initial, parent) {};
|
||||
ColorChooser(QWidget *parent): QColorDialog(parent) {};
|
||||
//! For getting a color without having to initialise a color dialog
|
||||
ColorChooser() {};
|
||||
ColorChooser() = default;
|
||||
enum class Palette {Default, Track, Mixer};
|
||||
//! Set global palette via array, checking bounds
|
||||
void setPalette (QVector<QColor>);
|
||||
@@ -57,3 +64,9 @@ private:
|
||||
//! Generate a nice palette, with adjustable value
|
||||
static QVector<QColor> nicePalette (int);
|
||||
};
|
||||
|
||||
|
||||
} // namespace lmms::gui
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -32,12 +32,15 @@
|
||||
#include "ComboBoxModel.h"
|
||||
#include "AutomatableModelView.h"
|
||||
|
||||
namespace lmms::gui
|
||||
{
|
||||
|
||||
class LMMS_EXPORT ComboBox : public QWidget, public IntModelView
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ComboBox( QWidget* parent = nullptr, const QString& name = QString() );
|
||||
virtual ~ComboBox();
|
||||
~ComboBox() override = default;
|
||||
|
||||
ComboBoxModel* model()
|
||||
{
|
||||
@@ -78,4 +81,6 @@ private slots:
|
||||
|
||||
} ;
|
||||
|
||||
} // namespace lmms::gui
|
||||
|
||||
#endif
|
||||
|
||||
@@ -32,6 +32,8 @@
|
||||
#include "AutomatableModel.h"
|
||||
#include "embed.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class LMMS_EXPORT ComboBoxModel : public IntModel
|
||||
{
|
||||
@@ -45,7 +47,7 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~ComboBoxModel()
|
||||
~ComboBoxModel() override
|
||||
{
|
||||
clear();
|
||||
}
|
||||
@@ -85,11 +87,12 @@ public:
|
||||
|
||||
|
||||
private:
|
||||
typedef std::pair<QString, std::unique_ptr<PixmapLoader> > Item;
|
||||
using Item = std::pair<QString, std::unique_ptr<PixmapLoader>>;
|
||||
|
||||
std::vector<Item> m_items;
|
||||
|
||||
} ;
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -37,7 +37,11 @@
|
||||
#include "lmms_export.h"
|
||||
|
||||
|
||||
class LmmsCore;
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
class Engine;
|
||||
|
||||
const QString PROJECTS_PATH = "projects/";
|
||||
const QString TEMPLATE_PATH = "templates/";
|
||||
@@ -270,7 +274,7 @@ private:
|
||||
|
||||
ConfigManager();
|
||||
ConfigManager(const ConfigManager & _c);
|
||||
~ConfigManager();
|
||||
~ConfigManager() override;
|
||||
|
||||
void upgrade_1_1_90();
|
||||
void upgrade_1_1_91();
|
||||
@@ -299,11 +303,15 @@ private:
|
||||
unsigned int m_configVersion;
|
||||
QStringList m_recentlyOpenedProjects;
|
||||
|
||||
typedef QVector<QPair<QString, QString> > stringPairVector;
|
||||
typedef QMap<QString, stringPairVector> settingsMap;
|
||||
using stringPairVector = QVector<QPair<QString, QString>>;
|
||||
using settingsMap = QMap<QString, stringPairVector>;
|
||||
settingsMap m_settings;
|
||||
|
||||
|
||||
friend class LmmsCore;
|
||||
friend class Engine;
|
||||
};
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -76,9 +76,15 @@
|
||||
#include <QLayout>
|
||||
#include <QMultiMap>
|
||||
#include <QStyle>
|
||||
|
||||
class QLayoutItem;
|
||||
class QRect;
|
||||
class QString;
|
||||
class QLineEdit;
|
||||
|
||||
|
||||
namespace lmms::gui
|
||||
{
|
||||
|
||||
/**
|
||||
Layout for controls (models)
|
||||
@@ -128,9 +134,11 @@ private:
|
||||
// relevant dimension is width, as later, heightForWidth() will be called
|
||||
// 400 looks good and is ~4 knobs in a row
|
||||
constexpr const static int m_minWidth = 400;
|
||||
class QLineEdit* m_searchBar;
|
||||
QLineEdit* m_searchBar;
|
||||
//! name of search bar, must be ASCII sorted before any alpha numerics
|
||||
static constexpr const char* s_searchBarName = "!!searchBar!!";
|
||||
};
|
||||
|
||||
} // namespace lmms::gui
|
||||
|
||||
#endif // CONTROLLAYOUT_H
|
||||
|
||||
@@ -33,12 +33,20 @@
|
||||
#include "JournallingObject.h"
|
||||
#include "ValueBuffer.h"
|
||||
|
||||
class ControllerDialog;
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class Controller;
|
||||
class ControllerConnection;
|
||||
|
||||
typedef QVector<Controller *> ControllerVector;
|
||||
namespace gui
|
||||
{
|
||||
|
||||
class ControllerDialog;
|
||||
|
||||
} // namespace gui
|
||||
|
||||
using ControllerVector = QVector<Controller*>;
|
||||
|
||||
class LMMS_EXPORT Controller : public Model, public JournallingObject
|
||||
{
|
||||
@@ -60,7 +68,7 @@ public:
|
||||
Controller( ControllerTypes _type, Model * _parent,
|
||||
const QString & _display_name );
|
||||
|
||||
virtual ~Controller();
|
||||
~Controller() override;
|
||||
|
||||
virtual float currentValue( int _offset );
|
||||
// The per-controller get-value-in-buffers function
|
||||
@@ -132,7 +140,7 @@ public:
|
||||
bool hasModel( const Model * m ) const;
|
||||
|
||||
public slots:
|
||||
virtual ControllerDialog * createDialog( QWidget * _parent );
|
||||
virtual gui::ControllerDialog * createDialog( QWidget * _parent );
|
||||
|
||||
virtual void setName( const QString & _new_name )
|
||||
{
|
||||
@@ -169,9 +177,12 @@ signals:
|
||||
// The value changed while the audio engine isn't running (i.e: MIDI CC)
|
||||
void valueChanged();
|
||||
|
||||
friend class ControllerDialog;
|
||||
friend class gui::ControllerDialog;
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -37,10 +37,17 @@
|
||||
#include "JournallingObject.h"
|
||||
#include "ValueBuffer.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class ControllerConnection;
|
||||
|
||||
typedef QVector<ControllerConnection *> ControllerConnectionVector;
|
||||
namespace gui
|
||||
{
|
||||
class ControllerConnectionDialog;
|
||||
}
|
||||
|
||||
using ControllerConnectionVector = QVector<ControllerConnection*>;
|
||||
|
||||
class LMMS_EXPORT ControllerConnection : public QObject, public JournallingObject
|
||||
{
|
||||
@@ -50,7 +57,7 @@ public:
|
||||
ControllerConnection(Controller * _controller);
|
||||
ControllerConnection( int _controllerId );
|
||||
|
||||
virtual ~ControllerConnection();
|
||||
~ControllerConnection() override;
|
||||
|
||||
inline Controller * getController()
|
||||
{
|
||||
@@ -115,8 +122,11 @@ signals:
|
||||
// The value changed while the audio engine isn't running (i.e: MIDI CC)
|
||||
void valueChanged();
|
||||
|
||||
friend class ControllerConnectionDialog;
|
||||
friend class gui::ControllerConnectionDialog;
|
||||
};
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -38,7 +38,15 @@
|
||||
class QLineEdit;
|
||||
class QListView;
|
||||
class QScrollArea;
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class AutoDetectMidiController;
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
class ComboBox;
|
||||
class GroupBox;
|
||||
class TabWidget;
|
||||
@@ -47,14 +55,13 @@ class LedCheckBox;
|
||||
class MidiPortMenu;
|
||||
|
||||
|
||||
|
||||
class ControllerConnectionDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ControllerConnectionDialog( QWidget * _parent,
|
||||
const AutomatableModel * _target_model );
|
||||
virtual ~ControllerConnectionDialog();
|
||||
~ControllerConnectionDialog() override;
|
||||
|
||||
Controller * chosenController()
|
||||
{
|
||||
@@ -99,4 +106,9 @@ private:
|
||||
AutoDetectMidiController * m_midiController;
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace gui
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -30,8 +30,13 @@
|
||||
|
||||
#include "ModelView.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class Controller;
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
class ControllerDialog : public QWidget, public ModelView
|
||||
{
|
||||
@@ -39,7 +44,7 @@ class ControllerDialog : public QWidget, public ModelView
|
||||
public:
|
||||
ControllerDialog( Controller * _controller, QWidget * _parent );
|
||||
|
||||
virtual ~ControllerDialog();
|
||||
~ControllerDialog() override = default;
|
||||
|
||||
|
||||
signals:
|
||||
@@ -51,4 +56,9 @@ protected:
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace gui
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -36,16 +36,24 @@ class QPushButton;
|
||||
class QScrollArea;
|
||||
class QVBoxLayout;
|
||||
|
||||
class ControllerView;
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class Controller;
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
class ControllerView;
|
||||
|
||||
|
||||
class ControllerRackView : public QWidget, public SerializingObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ControllerRackView();
|
||||
virtual ~ControllerRackView();
|
||||
~ControllerRackView() override = default;
|
||||
|
||||
void saveSettings( QDomDocument & _doc, QDomElement & _parent ) override;
|
||||
void loadSettings( const QDomElement & _this ) override;
|
||||
@@ -57,9 +65,9 @@ public:
|
||||
|
||||
|
||||
public slots:
|
||||
void deleteController( ControllerView * _view );
|
||||
void onControllerAdded( Controller * );
|
||||
void onControllerRemoved( Controller * );
|
||||
void deleteController( lmms::gui::ControllerView * _view );
|
||||
void onControllerAdded( lmms::Controller * );
|
||||
void onControllerRemoved( lmms::Controller * );
|
||||
|
||||
protected:
|
||||
void closeEvent( QCloseEvent * _ce ) override;
|
||||
@@ -80,4 +88,8 @@ private:
|
||||
int m_nextIndex;
|
||||
} ;
|
||||
|
||||
} // namespace gui
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -36,6 +36,10 @@ class QLabel;
|
||||
class QPushButton;
|
||||
class QMdiSubWindow;
|
||||
|
||||
namespace lmms::gui
|
||||
{
|
||||
|
||||
|
||||
class LedCheckBox;
|
||||
|
||||
|
||||
@@ -44,7 +48,7 @@ class ControllerView : public QFrame, public ModelView
|
||||
Q_OBJECT
|
||||
public:
|
||||
ControllerView( Controller * _controller, QWidget * _parent );
|
||||
virtual ~ControllerView();
|
||||
~ControllerView() override;
|
||||
|
||||
inline Controller * getController()
|
||||
{
|
||||
@@ -64,7 +68,7 @@ public slots:
|
||||
void renameController();
|
||||
|
||||
signals:
|
||||
void deleteController( ControllerView * _view );
|
||||
void deleteController( lmms::gui::ControllerView * _view );
|
||||
|
||||
|
||||
protected:
|
||||
@@ -81,4 +85,7 @@ private:
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace lmms::gui
|
||||
|
||||
#endif
|
||||
|
||||
@@ -34,8 +34,20 @@
|
||||
|
||||
class QString;
|
||||
class QWidget;
|
||||
class QLabel;
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class AutomatableModel;
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
class AutomatableModelView;
|
||||
class Knob;
|
||||
class ComboBox;
|
||||
class LedCheckBox;
|
||||
|
||||
/**
|
||||
These classes provide
|
||||
@@ -52,15 +64,15 @@ public:
|
||||
|
||||
virtual void setModel(AutomatableModel* model) = 0;
|
||||
virtual AutomatableModel* model() = 0;
|
||||
virtual class AutomatableModelView* modelView() = 0;
|
||||
virtual AutomatableModelView* modelView() = 0;
|
||||
|
||||
virtual ~Control();
|
||||
virtual ~Control() = default;
|
||||
};
|
||||
|
||||
|
||||
class KnobControl : public Control
|
||||
{
|
||||
class Knob* m_knob;
|
||||
Knob* m_knob;
|
||||
|
||||
public:
|
||||
void setText(const QString& text) override;
|
||||
@@ -68,18 +80,18 @@ public:
|
||||
|
||||
void setModel(AutomatableModel* model) override;
|
||||
FloatModel* model() override;
|
||||
class AutomatableModelView* modelView() override;
|
||||
AutomatableModelView* modelView() override;
|
||||
|
||||
KnobControl(QWidget* parent = nullptr);
|
||||
~KnobControl() override;
|
||||
~KnobControl() override = default;
|
||||
};
|
||||
|
||||
|
||||
class ComboControl : public Control
|
||||
{
|
||||
QWidget* m_widget;
|
||||
class ComboBox* m_combo;
|
||||
class QLabel* m_label;
|
||||
ComboBox* m_combo;
|
||||
QLabel* m_label;
|
||||
|
||||
public:
|
||||
void setText(const QString& text) override;
|
||||
@@ -87,10 +99,10 @@ public:
|
||||
|
||||
void setModel(AutomatableModel* model) override;
|
||||
ComboBoxModel* model() override;
|
||||
class AutomatableModelView* modelView() override;
|
||||
AutomatableModelView* modelView() override;
|
||||
|
||||
ComboControl(QWidget* parent = nullptr);
|
||||
~ComboControl() override;
|
||||
~ComboControl() override = default;
|
||||
};
|
||||
|
||||
|
||||
@@ -104,17 +116,17 @@ public:
|
||||
|
||||
void setModel(AutomatableModel* model) override;
|
||||
IntModel* model() override;
|
||||
class AutomatableModelView* modelView() override;
|
||||
AutomatableModelView* modelView() override;
|
||||
|
||||
LcdControl(int numDigits, QWidget* parent = nullptr);
|
||||
~LcdControl() override;
|
||||
~LcdControl() override = default;
|
||||
};
|
||||
|
||||
|
||||
class CheckControl : public Control
|
||||
{
|
||||
QWidget* m_widget;
|
||||
class LedCheckBox* m_checkBox;
|
||||
LedCheckBox* m_checkBox;
|
||||
QLabel* m_label;
|
||||
|
||||
public:
|
||||
@@ -122,12 +134,16 @@ public:
|
||||
QWidget* topWidget() override;
|
||||
|
||||
void setModel(AutomatableModel* model) override;
|
||||
BoolModel *model() override;
|
||||
class AutomatableModelView* modelView() override;
|
||||
BoolModel* model() override;
|
||||
AutomatableModelView* modelView() override;
|
||||
|
||||
CheckControl(QWidget* parent = nullptr);
|
||||
~CheckControl() override;
|
||||
~CheckControl() override = default;
|
||||
};
|
||||
|
||||
|
||||
} // namespace gui
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif // CONTROLS_H
|
||||
|
||||
@@ -4,6 +4,10 @@
|
||||
|
||||
#include "Knob.h"
|
||||
|
||||
namespace lmms::gui
|
||||
{
|
||||
|
||||
|
||||
class LMMS_EXPORT CustomTextKnob : public Knob
|
||||
{
|
||||
protected:
|
||||
@@ -21,10 +25,13 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
virtual QString displayValue() const;
|
||||
QString displayValue() const override;
|
||||
|
||||
protected:
|
||||
QString m_value_text;
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace lmms::gui
|
||||
|
||||
#endif
|
||||
|
||||
@@ -33,9 +33,14 @@
|
||||
#include "lmms_export.h"
|
||||
#include "MemoryManager.h"
|
||||
|
||||
class ProjectVersion;
|
||||
class QTextStream;
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class ProjectVersion;
|
||||
|
||||
|
||||
class LMMS_EXPORT DataFile : public QDomDocument
|
||||
{
|
||||
MM_OPERATORS
|
||||
@@ -56,13 +61,13 @@ public:
|
||||
MidiClip,
|
||||
TypeCount
|
||||
} ;
|
||||
typedef Types Type;
|
||||
using Type = Types;
|
||||
|
||||
DataFile( const QString& fileName );
|
||||
DataFile( const QByteArray& data );
|
||||
DataFile( Type type );
|
||||
|
||||
virtual ~DataFile();
|
||||
virtual ~DataFile() = default;
|
||||
|
||||
///
|
||||
/// \brief validate
|
||||
@@ -131,21 +136,13 @@ private:
|
||||
static const std::vector<ProjectVersion> UPGRADE_VERSIONS;
|
||||
|
||||
// Map with DOM elements that access resources (for making bundles)
|
||||
typedef std::map<QString, std::vector<QString>> ResourcesMap;
|
||||
using ResourcesMap = std::map<QString, std::vector<QString>>;
|
||||
static const ResourcesMap ELEMENTS_WITH_RESOURCES;
|
||||
|
||||
void upgrade();
|
||||
|
||||
void loadData( const QByteArray & _data, const QString & _sourceFile );
|
||||
|
||||
|
||||
struct LMMS_EXPORT typeDescStruct
|
||||
{
|
||||
Type m_type;
|
||||
QString m_name;
|
||||
} ;
|
||||
static typeDescStruct s_types[TypeCount];
|
||||
|
||||
QString m_fileName; //!< The origin file name or "" if this DataFile didn't originate from a file
|
||||
QDomElement m_content;
|
||||
QDomElement m_head;
|
||||
@@ -155,4 +152,6 @@ private:
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -32,6 +32,9 @@
|
||||
#include "interpolation.h"
|
||||
#include "MemoryManager.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
// brief usage
|
||||
|
||||
// Classes:
|
||||
@@ -63,7 +66,7 @@ template<ch_cnt_t CHANNELS>
|
||||
class CombFeedback
|
||||
{
|
||||
public:
|
||||
typedef double frame[CHANNELS];
|
||||
using frame = std::array<double, CHANNELS>;
|
||||
|
||||
CombFeedback( int maxDelay ) :
|
||||
m_size( maxDelay ),
|
||||
@@ -134,7 +137,7 @@ private:
|
||||
template<ch_cnt_t CHANNELS>
|
||||
class CombFeedfwd
|
||||
{
|
||||
typedef double frame[CHANNELS];
|
||||
using frame = std::array<double, CHANNELS>;
|
||||
|
||||
CombFeedfwd( int maxDelay ) :
|
||||
m_size( maxDelay ),
|
||||
@@ -205,7 +208,7 @@ private:
|
||||
template<ch_cnt_t CHANNELS>
|
||||
class CombFeedbackDualtap
|
||||
{
|
||||
typedef double frame[CHANNELS];
|
||||
using frame = std::array<double, CHANNELS>;
|
||||
|
||||
CombFeedbackDualtap( int maxDelay ) :
|
||||
m_size( maxDelay ),
|
||||
@@ -286,7 +289,7 @@ template<ch_cnt_t CHANNELS>
|
||||
class AllpassDelay
|
||||
{
|
||||
public:
|
||||
typedef double frame[CHANNELS];
|
||||
using frame = std::array<double, CHANNELS>;
|
||||
|
||||
AllpassDelay( int maxDelay ) :
|
||||
m_size( maxDelay ),
|
||||
@@ -355,9 +358,11 @@ private:
|
||||
};
|
||||
|
||||
// convenience typedefs for stereo effects
|
||||
typedef CombFeedback<2> StereoCombFeedback;
|
||||
typedef CombFeedfwd<2> StereoCombFeedfwd;
|
||||
typedef CombFeedbackDualtap<2> StereoCombFeedbackDualtap;
|
||||
typedef AllpassDelay<2> StereoAllpassDelay;
|
||||
using StereoCombFeedback = CombFeedback<2>;
|
||||
using StereoCombFeedfwd = CombFeedfwd<2>;
|
||||
using StereoCombFeedbackDualtap = CombFeedbackDualtap<2>;
|
||||
using StereoAllpassDelay = AllpassDelay<2>;
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -30,6 +30,9 @@
|
||||
#include <QFontMetrics>
|
||||
#include <QWheelEvent>
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
/**
|
||||
* @brief horizontalAdvance is a backwards-compatible adapter for
|
||||
* QFontMetrics::horizontalAdvance and width functions.
|
||||
@@ -60,4 +63,7 @@ inline QPoint position(QWheelEvent *wheelEvent)
|
||||
return wheelEvent->pos();
|
||||
#endif
|
||||
}
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif // DEPRECATIONHELPER_H
|
||||
|
||||
@@ -29,6 +29,9 @@
|
||||
#include "InlineAutomation.h"
|
||||
#include "MemoryManager.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class DetuningHelper : public InlineAutomation
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -39,9 +42,7 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~DetuningHelper()
|
||||
{
|
||||
}
|
||||
~DetuningHelper() override = default;
|
||||
|
||||
float defaultValue() const override
|
||||
{
|
||||
@@ -61,4 +62,6 @@ public:
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -24,22 +24,25 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _DRUMSYNTH_H__
|
||||
#define _DRUMSYNTH_H__
|
||||
#ifndef DRUMSYNTH_H
|
||||
#define DRUMSYNTH_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include "lmms_basics.h"
|
||||
|
||||
class QString;
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class DrumSynth {
|
||||
public:
|
||||
DrumSynth() {};
|
||||
DrumSynth() = default;
|
||||
int GetDSFileSamples(QString dsfile, int16_t *&wave, int channels, sample_rate_t Fs);
|
||||
|
||||
private:
|
||||
float LoudestEnv(void);
|
||||
int LongestEnv(void);
|
||||
float LoudestEnv();
|
||||
int LongestEnv();
|
||||
void UpdateEnv(int e, long t);
|
||||
void GetEnv(int env, const char *sec, const char *key, QString ini);
|
||||
|
||||
@@ -51,4 +54,7 @@ class DrumSynth {
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif // DRUMSYNTH_H
|
||||
|
||||
@@ -31,14 +31,14 @@
|
||||
#include "lmms_basics.h"
|
||||
|
||||
|
||||
namespace DspEffectLibrary
|
||||
namespace lmms::DspEffectLibrary
|
||||
{
|
||||
|
||||
template<typename T>
|
||||
class MonoBase
|
||||
{
|
||||
public:
|
||||
typedef class MonoBypass bypassType;
|
||||
using bypassType = class MonoBypass;
|
||||
|
||||
static void process( sample_t * * _buf, const f_cnt_t _frames )
|
||||
{
|
||||
@@ -53,7 +53,7 @@ namespace DspEffectLibrary
|
||||
class StereoBase
|
||||
{
|
||||
public:
|
||||
typedef class StereoBypass bypassType;
|
||||
using bypassType = class StereoBypass;
|
||||
|
||||
static void process( sample_t * * _buf, const f_cnt_t _frames )
|
||||
{
|
||||
@@ -164,7 +164,7 @@ namespace DspEffectLibrary
|
||||
class Chain : public FX0::bypassType
|
||||
{
|
||||
public:
|
||||
typedef typename FX0::sample_t sample_t;
|
||||
using sample_t = typename FX0::sample_t;
|
||||
Chain( const FX0& fx0, const FX1& fx1 = FX1() ) :
|
||||
m_FX0( fx0 ),
|
||||
m_FX1( fx1 )
|
||||
@@ -329,7 +329,7 @@ namespace DspEffectLibrary
|
||||
|
||||
} ;
|
||||
|
||||
} ;
|
||||
} // namespace lmms::DspEffectLibrary
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -31,6 +31,12 @@
|
||||
#include "EffectControls.h"
|
||||
#include "EffectControlDialog.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
class Knob;
|
||||
|
||||
|
||||
@@ -44,6 +50,7 @@ public:
|
||||
|
||||
} ;
|
||||
|
||||
} // namespace gui
|
||||
|
||||
class DummyEffectControls : public EffectControls
|
||||
{
|
||||
@@ -53,9 +60,7 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~DummyEffectControls()
|
||||
{
|
||||
}
|
||||
~DummyEffectControls() override = default;
|
||||
|
||||
int controlCount() override
|
||||
{
|
||||
@@ -75,9 +80,9 @@ public:
|
||||
return "DummyControls";
|
||||
}
|
||||
|
||||
EffectControlDialog * createView() override
|
||||
gui::EffectControlDialog * createView() override
|
||||
{
|
||||
return new DummyEffectControlDialog( this );
|
||||
return new gui::DummyEffectControlDialog( this );
|
||||
}
|
||||
} ;
|
||||
|
||||
@@ -95,9 +100,7 @@ public:
|
||||
setName();
|
||||
}
|
||||
|
||||
virtual ~DummyEffect()
|
||||
{
|
||||
}
|
||||
~DummyEffect() override = default;
|
||||
|
||||
EffectControls * controls() override
|
||||
{
|
||||
@@ -144,4 +147,6 @@ private:
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -35,6 +35,10 @@
|
||||
#include "AudioEngine.h"
|
||||
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
class DummyInstrument : public Instrument
|
||||
{
|
||||
public:
|
||||
@@ -43,9 +47,7 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~DummyInstrument()
|
||||
{
|
||||
}
|
||||
~DummyInstrument() override = default;
|
||||
|
||||
void playNote( NotePlayHandle *, sampleFrame * buffer ) override
|
||||
{
|
||||
@@ -66,11 +68,13 @@ public:
|
||||
return "dummyinstrument";
|
||||
}
|
||||
|
||||
PluginView * instantiateView( QWidget * _parent ) override
|
||||
gui::PluginView * instantiateView( QWidget * _parent ) override
|
||||
{
|
||||
return new InstrumentViewFixedSize( this, _parent );
|
||||
return new gui::InstrumentViewFixedSize( this, _parent );
|
||||
}
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -30,6 +30,9 @@
|
||||
#include "PluginView.h"
|
||||
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class DummyPlugin : public Plugin
|
||||
{
|
||||
public:
|
||||
@@ -38,9 +41,7 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~DummyPlugin()
|
||||
{
|
||||
}
|
||||
~DummyPlugin() override = default;
|
||||
|
||||
void saveSettings( QDomDocument &, QDomElement & ) override
|
||||
{
|
||||
@@ -57,12 +58,14 @@ public:
|
||||
|
||||
|
||||
protected:
|
||||
PluginView * instantiateView( QWidget * _parent ) override
|
||||
gui::PluginView * instantiateView( QWidget * _parent ) override
|
||||
{
|
||||
return new PluginView( this, _parent );
|
||||
return new gui::PluginView( this, _parent );
|
||||
}
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -28,14 +28,17 @@
|
||||
#include <QMainWindow>
|
||||
#include <QToolBar>
|
||||
|
||||
class QAction;
|
||||
|
||||
namespace lmms::gui
|
||||
{
|
||||
|
||||
static const int Quantizations[] = {
|
||||
1, 2, 4, 8, 16, 32, 64,
|
||||
3, 6, 12, 24, 48, 96, 192
|
||||
};
|
||||
|
||||
|
||||
class QAction;
|
||||
|
||||
class DropToolBar;
|
||||
|
||||
/// \brief Superclass for editors with a toolbar.
|
||||
@@ -78,7 +81,7 @@ protected:
|
||||
/// \param record If set true, the editor's toolbar will contain record
|
||||
/// buttons in addition to the play and stop buttons.
|
||||
Editor(bool record = false, bool record_step = false);
|
||||
virtual ~Editor();
|
||||
~Editor() override = default;
|
||||
|
||||
|
||||
DropToolBar* m_toolBar;
|
||||
@@ -108,4 +111,6 @@ protected:
|
||||
};
|
||||
|
||||
|
||||
} // namespace lmms::gui
|
||||
|
||||
#endif
|
||||
|
||||
@@ -33,9 +33,19 @@
|
||||
#include "TempoSyncKnobModel.h"
|
||||
#include "MemoryManager.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class EffectChain;
|
||||
class EffectControls;
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
class EffectView;
|
||||
|
||||
} // namespace gui
|
||||
|
||||
|
||||
class LMMS_EXPORT Effect : public Plugin
|
||||
{
|
||||
@@ -45,7 +55,7 @@ public:
|
||||
Effect( const Plugin::Descriptor * _desc,
|
||||
Model * _parent,
|
||||
const Descriptor::SubPluginFeatures::Key * _key );
|
||||
virtual ~Effect();
|
||||
~Effect() override;
|
||||
|
||||
void saveSettings( QDomDocument & _doc, QDomElement & _parent ) override;
|
||||
void loadSettings( const QDomElement & _this ) override;
|
||||
@@ -170,7 +180,7 @@ protected:
|
||||
*/
|
||||
void checkGate( double _out_sum );
|
||||
|
||||
PluginView * instantiateView( QWidget * ) override;
|
||||
gui::PluginView* instantiateView( QWidget * ) override;
|
||||
|
||||
// some effects might not be capable of higher sample-rates so they can
|
||||
// sample it down before processing and back after processing
|
||||
@@ -221,14 +231,14 @@ private:
|
||||
SRC_STATE * m_srcState[2];
|
||||
|
||||
|
||||
friend class EffectView;
|
||||
friend class gui::EffectView;
|
||||
friend class EffectChain;
|
||||
|
||||
} ;
|
||||
|
||||
using EffectKey = Effect::Descriptor::SubPluginFeatures::Key;
|
||||
using EffectKeyList = Effect::Descriptor::SubPluginFeatures::KeyList;
|
||||
|
||||
typedef Effect::Descriptor::SubPluginFeatures::Key EffectKey;
|
||||
typedef Effect::Descriptor::SubPluginFeatures::KeyList EffectKeyList;
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -30,15 +30,25 @@
|
||||
#include "SerializingObject.h"
|
||||
#include "AutomatableModel.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class Effect;
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
class EffectRackView;
|
||||
|
||||
} // namespace gui
|
||||
|
||||
|
||||
class LMMS_EXPORT EffectChain : public Model, public SerializingObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
EffectChain( Model * _parent );
|
||||
virtual ~EffectChain();
|
||||
~EffectChain() override;
|
||||
|
||||
void saveSettings( QDomDocument & _doc, QDomElement & _parent ) override;
|
||||
void loadSettings( const QDomElement & _this ) override;
|
||||
@@ -59,13 +69,13 @@ public:
|
||||
|
||||
|
||||
private:
|
||||
typedef QVector<Effect *> EffectList;
|
||||
using EffectList = QVector<Effect*>;
|
||||
EffectList m_effects;
|
||||
|
||||
BoolModel m_enabledModel;
|
||||
|
||||
|
||||
friend class EffectRackView;
|
||||
friend class gui::EffectRackView;
|
||||
|
||||
|
||||
signals:
|
||||
@@ -73,5 +83,7 @@ signals:
|
||||
|
||||
} ;
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -30,15 +30,21 @@
|
||||
|
||||
#include "ModelView.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class EffectControls;
|
||||
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
class LMMS_EXPORT EffectControlDialog : public QWidget, public ModelView
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
EffectControlDialog( EffectControls * _controls );
|
||||
virtual ~EffectControlDialog();
|
||||
~EffectControlDialog() override = default;
|
||||
|
||||
virtual bool isResizable() const {return false;}
|
||||
|
||||
@@ -54,4 +60,8 @@ protected:
|
||||
|
||||
} ;
|
||||
|
||||
} // namespace gui
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -29,8 +29,16 @@
|
||||
#include "JournallingObject.h"
|
||||
#include "Effect.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
class EffectControlDialog;
|
||||
|
||||
} // namespace gui
|
||||
|
||||
class EffectControls : public JournallingObject, public Model
|
||||
{
|
||||
@@ -43,12 +51,10 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~EffectControls()
|
||||
{
|
||||
}
|
||||
~EffectControls() override = default;
|
||||
|
||||
virtual int controlCount() = 0;
|
||||
virtual EffectControlDialog * createView() = 0;
|
||||
virtual gui::EffectControlDialog * createView() = 0;
|
||||
|
||||
|
||||
void setViewVisible( bool _visible )
|
||||
@@ -73,4 +79,7 @@ private:
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -35,6 +35,9 @@
|
||||
class QScrollArea;
|
||||
class QVBoxLayout;
|
||||
|
||||
namespace lmms::gui
|
||||
{
|
||||
|
||||
class EffectView;
|
||||
class GroupBox;
|
||||
|
||||
@@ -44,15 +47,15 @@ class EffectRackView : public QWidget, public ModelView
|
||||
Q_OBJECT
|
||||
public:
|
||||
EffectRackView( EffectChain* model, QWidget* parent = nullptr );
|
||||
virtual ~EffectRackView();
|
||||
~EffectRackView() override;
|
||||
|
||||
static constexpr int DEFAULT_WIDTH = 245;
|
||||
|
||||
public slots:
|
||||
void clearViews();
|
||||
void moveUp( EffectView* view );
|
||||
void moveDown( EffectView* view );
|
||||
void deletePlugin( EffectView* view );
|
||||
void moveUp( lmms::gui::EffectView* view );
|
||||
void moveDown( lmms::gui::EffectView* view );
|
||||
void deletePlugin( lmms::gui::EffectView* view );
|
||||
|
||||
|
||||
private slots:
|
||||
@@ -83,4 +86,6 @@ private:
|
||||
|
||||
} ;
|
||||
|
||||
} // namespace lmms::gui
|
||||
|
||||
#endif
|
||||
|
||||
@@ -34,13 +34,16 @@
|
||||
|
||||
namespace Ui { class EffectSelectDialog; }
|
||||
|
||||
namespace lmms::gui
|
||||
{
|
||||
|
||||
|
||||
class EffectSelectDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
EffectSelectDialog( QWidget * _parent );
|
||||
virtual ~EffectSelectDialog();
|
||||
~EffectSelectDialog() override;
|
||||
|
||||
Effect * instantiateSelectedPlugin( EffectChain * _parent );
|
||||
|
||||
@@ -65,5 +68,7 @@ private:
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace lmms::gui
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -35,6 +35,9 @@ class QLabel;
|
||||
class QPushButton;
|
||||
class QMdiSubWindow;
|
||||
|
||||
namespace lmms::gui
|
||||
{
|
||||
|
||||
class EffectControlDialog;
|
||||
class Knob;
|
||||
class LedCheckBox;
|
||||
@@ -46,7 +49,7 @@ class EffectView : public PluginView
|
||||
Q_OBJECT
|
||||
public:
|
||||
EffectView( Effect * _model, QWidget * _parent );
|
||||
virtual ~EffectView();
|
||||
~EffectView() override;
|
||||
|
||||
inline Effect * effect()
|
||||
{
|
||||
@@ -68,9 +71,9 @@ public slots:
|
||||
|
||||
|
||||
signals:
|
||||
void moveUp( EffectView * _plugin );
|
||||
void moveDown( EffectView * _plugin );
|
||||
void deletePlugin( EffectView * _plugin );
|
||||
void moveUp( lmms::gui::EffectView * _plugin );
|
||||
void moveDown( lmms::gui::EffectView * _plugin );
|
||||
void deletePlugin( lmms::gui::EffectView * _plugin );
|
||||
|
||||
|
||||
protected:
|
||||
@@ -90,4 +93,7 @@ private:
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace lmms::gui
|
||||
|
||||
#endif
|
||||
|
||||
@@ -34,6 +34,9 @@
|
||||
#include "lmms_export.h"
|
||||
#include "lmms_basics.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class AudioEngine;
|
||||
class Mixer;
|
||||
class PatternStore;
|
||||
@@ -41,20 +44,13 @@ class ProjectJournal;
|
||||
class Song;
|
||||
class Ladspa2LMMS;
|
||||
|
||||
namespace gui
|
||||
{
|
||||
class GuiApplication;
|
||||
}
|
||||
|
||||
// Note: This class is called 'LmmsCore' instead of 'Engine' because of naming
|
||||
// conflicts caused by ZynAddSubFX. See https://github.com/LMMS/lmms/issues/2269
|
||||
// and https://github.com/LMMS/lmms/pull/2118 for more details.
|
||||
//
|
||||
// The workaround was to rename Lmms' Engine so that it has a different symbol
|
||||
// name in the object files, but typedef it back to 'Engine' and keep it inside
|
||||
// of Engine.h so that the rest of the codebase can be oblivious to this issue
|
||||
// (and it could be fixed without changing every single file).
|
||||
|
||||
class LmmsCore;
|
||||
typedef LmmsCore Engine;
|
||||
|
||||
class LMMS_EXPORT LmmsCore : public QObject
|
||||
class LMMS_EXPORT Engine : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
@@ -110,11 +106,11 @@ public:
|
||||
|
||||
static void updateFramesPerTick();
|
||||
|
||||
static inline LmmsCore * inst()
|
||||
static inline Engine * inst()
|
||||
{
|
||||
if( s_instanceOfMe == nullptr )
|
||||
{
|
||||
s_instanceOfMe = new LmmsCore();
|
||||
s_instanceOfMe = new Engine();
|
||||
}
|
||||
return s_instanceOfMe;
|
||||
}
|
||||
@@ -130,9 +126,9 @@ private:
|
||||
// small helper function which sets the pointer to NULL before actually deleting
|
||||
// the object it refers to
|
||||
template<class T>
|
||||
static inline void deleteHelper( T * * ptr )
|
||||
static inline void deleteHelper(T** ptr)
|
||||
{
|
||||
T * tmp = *ptr;
|
||||
T* tmp = *ptr;
|
||||
*ptr = nullptr;
|
||||
delete tmp;
|
||||
}
|
||||
@@ -149,15 +145,17 @@ private:
|
||||
#ifdef LMMS_HAVE_LV2
|
||||
static class Lv2Manager* s_lv2Manager;
|
||||
#endif
|
||||
static Ladspa2LMMS * s_ladspaManager;
|
||||
static Ladspa2LMMS* s_ladspaManager;
|
||||
static void* s_dndPluginKey;
|
||||
|
||||
// even though most methods are static, an instance is needed for Qt slots/signals
|
||||
static LmmsCore * s_instanceOfMe;
|
||||
static Engine* s_instanceOfMe;
|
||||
|
||||
friend class GuiApplication;
|
||||
friend class gui::GuiApplication;
|
||||
};
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -33,6 +33,15 @@
|
||||
#include "TempoSyncKnobModel.h"
|
||||
#include "lmms_basics.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
class EnvelopeAndLfoView;
|
||||
|
||||
}
|
||||
|
||||
class LMMS_EXPORT EnvelopeAndLfoParameters : public Model, public JournallingObject
|
||||
{
|
||||
@@ -41,13 +50,9 @@ public:
|
||||
class LfoInstances
|
||||
{
|
||||
public:
|
||||
LfoInstances()
|
||||
{
|
||||
}
|
||||
LfoInstances() = default;
|
||||
|
||||
~LfoInstances()
|
||||
{
|
||||
}
|
||||
~LfoInstances() = default;
|
||||
|
||||
inline bool isEmpty() const
|
||||
{
|
||||
@@ -62,14 +67,14 @@ public:
|
||||
|
||||
private:
|
||||
QMutex m_lfoListMutex;
|
||||
typedef QList<EnvelopeAndLfoParameters *> LfoList;
|
||||
using LfoList = QList<EnvelopeAndLfoParameters*>;
|
||||
LfoList m_lfos;
|
||||
|
||||
} ;
|
||||
|
||||
EnvelopeAndLfoParameters( float _value_for_zero_amount,
|
||||
Model * _parent );
|
||||
virtual ~EnvelopeAndLfoParameters();
|
||||
~EnvelopeAndLfoParameters() override;
|
||||
|
||||
static inline float expKnobVal( float _val )
|
||||
{
|
||||
@@ -179,8 +184,10 @@ private:
|
||||
void updateLfoShapeData();
|
||||
|
||||
|
||||
friend class EnvelopeAndLfoView;
|
||||
friend class gui::EnvelopeAndLfoView;
|
||||
|
||||
} ;
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -33,8 +33,14 @@
|
||||
class QPaintEvent;
|
||||
class QPixmap;
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class EnvelopeAndLfoParameters;
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
class automatableButtonGroup;
|
||||
class Knob;
|
||||
class LedCheckBox;
|
||||
@@ -48,7 +54,7 @@ class EnvelopeAndLfoView : public QWidget, public ModelView
|
||||
Q_OBJECT
|
||||
public:
|
||||
EnvelopeAndLfoView( QWidget * _parent );
|
||||
virtual ~EnvelopeAndLfoView();
|
||||
~EnvelopeAndLfoView() override;
|
||||
|
||||
|
||||
protected:
|
||||
@@ -94,4 +100,8 @@ private:
|
||||
float m_randomGraph;
|
||||
} ;
|
||||
|
||||
} // namespace gui
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -32,11 +32,15 @@
|
||||
#include "Plugin.h"
|
||||
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
class LMMS_EXPORT ExportFilter : public Plugin
|
||||
{
|
||||
public:
|
||||
ExportFilter( const Descriptor * _descriptor ) : Plugin( _descriptor, nullptr ) {}
|
||||
virtual ~ExportFilter() {}
|
||||
~ExportFilter() override = default;
|
||||
|
||||
|
||||
virtual bool tryExport(const TrackContainer::TrackList &tracks,
|
||||
@@ -63,4 +67,6 @@ private:
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -34,6 +34,10 @@
|
||||
#include "ProjectRenderer.h"
|
||||
#include "RenderManager.h"
|
||||
|
||||
namespace lmms::gui
|
||||
{
|
||||
|
||||
|
||||
class ExportProjectDialog : public QDialog, public Ui::ExportProjectDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -41,12 +45,12 @@ public:
|
||||
ExportProjectDialog( const QString & _file_name, QWidget * _parent, bool multi_export );
|
||||
|
||||
protected:
|
||||
void reject( void ) override;
|
||||
void reject() override;
|
||||
void closeEvent( QCloseEvent * _ce ) override;
|
||||
|
||||
|
||||
private slots:
|
||||
void startBtnClicked( void );
|
||||
void startBtnClicked();
|
||||
void updateTitleBar( int );
|
||||
void accept() override;
|
||||
void startExport();
|
||||
@@ -63,4 +67,8 @@ private:
|
||||
std::unique_ptr<RenderManager> m_renderManager;
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace lmms::gui
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -31,6 +31,10 @@
|
||||
#include <QElapsedTimer>
|
||||
|
||||
|
||||
namespace lmms::gui
|
||||
{
|
||||
|
||||
|
||||
class FadeButton : public QAbstractButton
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -40,7 +44,7 @@ public:
|
||||
const QColor & _hold_color,
|
||||
QWidget * _parent );
|
||||
|
||||
virtual ~FadeButton();
|
||||
~FadeButton() override = default;
|
||||
void setActiveColor( const QColor & activated_color );
|
||||
|
||||
|
||||
@@ -71,4 +75,6 @@ private:
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace lmms::gui
|
||||
|
||||
#endif
|
||||
|
||||
@@ -55,6 +55,9 @@
|
||||
|
||||
#include "AutomatableModelView.h"
|
||||
|
||||
namespace lmms::gui
|
||||
{
|
||||
|
||||
class TextFloat;
|
||||
|
||||
|
||||
@@ -69,7 +72,7 @@ public:
|
||||
|
||||
Fader( FloatModel * _model, const QString & _name, QWidget * _parent );
|
||||
Fader( FloatModel * _model, const QString & _name, QWidget * _parent, QPixmap * back, QPixmap * leds, QPixmap * knob );
|
||||
virtual ~Fader() = default;
|
||||
~Fader() override = default;
|
||||
|
||||
void init(FloatModel * model, QString const & name);
|
||||
|
||||
@@ -169,4 +172,7 @@ private:
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace lmms::gui
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -28,6 +28,10 @@
|
||||
#include <QSemaphore>
|
||||
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
template<typename T>
|
||||
class FifoBuffer
|
||||
{
|
||||
@@ -88,4 +92,6 @@ private:
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -29,6 +29,9 @@
|
||||
#include <QCheckBox>
|
||||
#include <QDir>
|
||||
#include <QMutex>
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5,14,0))
|
||||
#include <QRecursiveMutex>
|
||||
#endif
|
||||
#include <QTreeWidget>
|
||||
|
||||
|
||||
@@ -37,13 +40,18 @@
|
||||
|
||||
class QLineEdit;
|
||||
|
||||
class FileItem;
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class InstrumentTrack;
|
||||
class FileBrowserTreeWidget;
|
||||
class PlayHandle;
|
||||
class TrackContainer;
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
class FileItem;
|
||||
class FileBrowserTreeWidget;
|
||||
|
||||
class FileBrowser : public SideBarWidget
|
||||
{
|
||||
@@ -63,10 +71,10 @@ public:
|
||||
const QString& userDir = "",
|
||||
const QString& factoryDir = "");
|
||||
|
||||
virtual ~FileBrowser() = default;
|
||||
~FileBrowser() override = default;
|
||||
|
||||
private slots:
|
||||
void reloadTree( void );
|
||||
void reloadTree();
|
||||
void expandItems( QTreeWidgetItem * item=nullptr, QList<QString> expandedDirs = QList<QString>() );
|
||||
// call with item=NULL to filter the entire tree
|
||||
bool filterItems( const QString & filter, QTreeWidgetItem * item=nullptr );
|
||||
@@ -102,7 +110,7 @@ class FileBrowserTreeWidget : public QTreeWidget
|
||||
Q_OBJECT
|
||||
public:
|
||||
FileBrowserTreeWidget( QWidget * parent );
|
||||
virtual ~FileBrowserTreeWidget() = default;
|
||||
~FileBrowserTreeWidget() override = default;
|
||||
|
||||
//! This method returns a QList with paths (QString's) of all directories
|
||||
//! that are expanded in the tree.
|
||||
@@ -135,18 +143,23 @@ private:
|
||||
|
||||
//! This should only be accessed or modified when m_pphMutex is held
|
||||
PlayHandle* m_previewPlayHandle;
|
||||
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5,14,0))
|
||||
QRecursiveMutex m_pphMutex;
|
||||
#else
|
||||
QMutex m_pphMutex;
|
||||
#endif
|
||||
|
||||
QList<QAction*> getContextActions(FileItem* item, bool songEditor);
|
||||
|
||||
|
||||
private slots:
|
||||
void activateListItem( QTreeWidgetItem * item, int column );
|
||||
void openInNewInstrumentTrack( FileItem* item, bool songEditor );
|
||||
bool openInNewSampleTrack( FileItem* item );
|
||||
void sendToActiveInstrumentTrack( FileItem* item );
|
||||
void openInNewInstrumentTrack( lmms::gui::FileItem* item, bool songEditor );
|
||||
bool openInNewSampleTrack( lmms::gui::FileItem* item );
|
||||
void sendToActiveInstrumentTrack( lmms::gui::FileItem* item );
|
||||
void updateDirectory( QTreeWidgetItem * item );
|
||||
void openContainingFolder( FileItem* item );
|
||||
void openContainingFolder( lmms::gui::FileItem* item );
|
||||
|
||||
} ;
|
||||
|
||||
@@ -159,7 +172,7 @@ public:
|
||||
Directory( const QString & filename, const QString & path,
|
||||
const QString & filter );
|
||||
|
||||
void update( void );
|
||||
void update();
|
||||
|
||||
inline QString fullName( QString path = QString() )
|
||||
{
|
||||
@@ -182,7 +195,7 @@ public:
|
||||
|
||||
|
||||
private:
|
||||
void initPixmaps( void );
|
||||
void initPixmaps();
|
||||
|
||||
bool addItems( const QString & path );
|
||||
|
||||
@@ -243,28 +256,28 @@ public:
|
||||
return QFileInfo(m_path, text(0)).absoluteFilePath();
|
||||
}
|
||||
|
||||
inline FileTypes type( void ) const
|
||||
inline FileTypes type() const
|
||||
{
|
||||
return( m_type );
|
||||
}
|
||||
|
||||
inline FileHandling handling( void ) const
|
||||
inline FileHandling handling() const
|
||||
{
|
||||
return( m_handling );
|
||||
}
|
||||
|
||||
inline bool isTrack( void ) const
|
||||
inline bool isTrack() const
|
||||
{
|
||||
return m_handling == LoadAsPreset || m_handling == LoadByPlugin;
|
||||
}
|
||||
|
||||
QString extension( void );
|
||||
QString extension();
|
||||
static QString extension( const QString & file );
|
||||
|
||||
|
||||
private:
|
||||
void initPixmaps( void );
|
||||
void determineFileType( void );
|
||||
void initPixmaps();
|
||||
void determineFileType();
|
||||
|
||||
static QPixmap * s_projectFilePixmap;
|
||||
static QPixmap * s_presetFilePixmap;
|
||||
@@ -281,4 +294,8 @@ private:
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace gui
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -30,6 +30,10 @@
|
||||
|
||||
#include "lmms_export.h"
|
||||
|
||||
namespace lmms::gui
|
||||
{
|
||||
|
||||
|
||||
class LMMS_EXPORT FileDialog : public QFileDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -50,4 +54,7 @@ public:
|
||||
void clearSelection();
|
||||
};
|
||||
|
||||
#endif // FILEDIALOG_HPP
|
||||
|
||||
} // namespace lmms::gui
|
||||
|
||||
#endif // FILEDIALOG_H
|
||||
|
||||
@@ -35,8 +35,15 @@
|
||||
#include "ModelView.h"
|
||||
#include "lmms_basics.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
class graphModel;
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
|
||||
class LMMS_EXPORT Graph : public QWidget, public ModelView
|
||||
{
|
||||
@@ -60,7 +67,7 @@ public:
|
||||
int _width = 132,
|
||||
int _height = 104
|
||||
);
|
||||
virtual ~Graph() = default;
|
||||
~Graph() override = default;
|
||||
|
||||
void setForeground( const QPixmap & _pixmap );
|
||||
|
||||
@@ -116,6 +123,9 @@ private:
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace gui
|
||||
|
||||
|
||||
/**
|
||||
@brief 2 dimensional function plot
|
||||
|
||||
@@ -137,11 +147,11 @@ public:
|
||||
graphModel( float _min,
|
||||
float _max,
|
||||
int _size,
|
||||
:: Model * _parent,
|
||||
Model * _parent,
|
||||
bool _default_constructed = false,
|
||||
float _step = 0.0 );
|
||||
|
||||
virtual ~graphModel() = default;
|
||||
~graphModel() override = default;
|
||||
|
||||
// TODO: saveSettings, loadSettings?
|
||||
|
||||
@@ -187,7 +197,7 @@ public slots:
|
||||
void setWaveToSaw();
|
||||
void setWaveToSquare();
|
||||
void setWaveToNoise();
|
||||
QString setWaveToUser( );
|
||||
QString setWaveToUser();
|
||||
|
||||
void smooth();
|
||||
void smoothNonCyclic();
|
||||
@@ -211,8 +221,11 @@ private:
|
||||
float m_maxValue;
|
||||
float m_step;
|
||||
|
||||
friend class Graph;
|
||||
friend class gui::Graph;
|
||||
|
||||
};
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -35,6 +35,9 @@
|
||||
#include "MidiClip.h"
|
||||
#include "SerializingObject.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class Groove : public QObject, public SerializingObject
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -80,4 +83,6 @@ protected:
|
||||
float m_swingFactor; // = (m_amount / 127)
|
||||
};
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif // GROOVE_H
|
||||
|
||||
@@ -10,6 +10,9 @@
|
||||
#include "Note.h"
|
||||
#include "MidiClip.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
/**
|
||||
* A groove thats new
|
||||
*/
|
||||
@@ -42,6 +45,10 @@ private:
|
||||
int m_framesPerTick;
|
||||
} ;
|
||||
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
class GrooveExperimentsView : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -60,4 +67,8 @@ private:
|
||||
|
||||
} ;
|
||||
|
||||
} // namespace gui
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif // GROOVEEXPERIMENTS_H
|
||||
|
||||
@@ -28,6 +28,9 @@
|
||||
|
||||
#include "Groove.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class GrooveFactory
|
||||
{
|
||||
|
||||
@@ -38,4 +41,6 @@ private:
|
||||
GrooveFactory();
|
||||
};
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif // GROOVEFACTORY_H
|
||||
|
||||
@@ -10,6 +10,9 @@
|
||||
#include "Groove.h"
|
||||
#include "SerializingObject.h"
|
||||
|
||||
namespace lmms::gui
|
||||
{
|
||||
|
||||
class GrooveView : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -32,4 +35,6 @@ private:
|
||||
QComboBox * m_comboBox;
|
||||
};
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif // GROOVEVIEW_H
|
||||
|
||||
@@ -34,13 +34,15 @@
|
||||
|
||||
class QPixmap;
|
||||
|
||||
namespace lmms::gui
|
||||
{
|
||||
|
||||
class GroupBox : public QWidget, public BoolModelView
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
GroupBox( const QString & _caption, QWidget * _parent = nullptr );
|
||||
virtual ~GroupBox();
|
||||
~GroupBox() override;
|
||||
|
||||
void modelChanged() override;
|
||||
|
||||
@@ -70,6 +72,7 @@ private:
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace lmms::gui
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -32,6 +32,9 @@
|
||||
|
||||
class QLabel;
|
||||
|
||||
namespace lmms::gui
|
||||
{
|
||||
|
||||
class AutomationEditorWindow;
|
||||
class ControllerRackView;
|
||||
class GrooveView;
|
||||
@@ -48,7 +51,7 @@ class LMMS_EXPORT GuiApplication : public QObject
|
||||
Q_OBJECT;
|
||||
public:
|
||||
explicit GuiApplication();
|
||||
~GuiApplication();
|
||||
~GuiApplication() override;
|
||||
|
||||
static GuiApplication* instance();
|
||||
#ifdef LMMS_BUILD_WIN32
|
||||
@@ -91,4 +94,6 @@ private:
|
||||
// Short-hand function
|
||||
LMMS_EXPORT GuiApplication* getGUI();
|
||||
|
||||
} // namespace lmms::gui
|
||||
|
||||
#endif // GUIAPPLICATION_H
|
||||
|
||||
@@ -10,6 +10,9 @@
|
||||
#include "Note.h"
|
||||
#include "MidiClip.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
/**
|
||||
* A groove thatjust latter half of the HydrogenSwing algo.
|
||||
*/
|
||||
@@ -40,6 +43,10 @@ private:
|
||||
int m_framesPerTick;
|
||||
} ;
|
||||
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
class HalfSwingView : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -58,4 +65,8 @@ private:
|
||||
|
||||
} ;
|
||||
|
||||
} // namespace gui
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif // HALFSWING_H
|
||||
|
||||
@@ -10,6 +10,9 @@
|
||||
#include "Note.h"
|
||||
#include "MidiClip.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
/**
|
||||
* A groove that mimics Hydrogen drum machine's swing feature
|
||||
*/
|
||||
@@ -42,6 +45,10 @@ private:
|
||||
int m_framesPerTick;
|
||||
} ;
|
||||
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
class HydrogenSwingView : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -60,4 +67,8 @@ private:
|
||||
|
||||
} ;
|
||||
|
||||
} // namespace gui
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif // HYDROGENSWING_H
|
||||
|
||||
@@ -30,6 +30,9 @@
|
||||
|
||||
#include "Plugin.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
class TrackContainer;
|
||||
|
||||
@@ -39,7 +42,7 @@ class LMMS_EXPORT ImportFilter : public Plugin
|
||||
public:
|
||||
ImportFilter( const QString & _file_name,
|
||||
const Descriptor * _descriptor );
|
||||
virtual ~ImportFilter();
|
||||
~ImportFilter() override = default;
|
||||
|
||||
|
||||
// tries to import given file to given track-container by having all
|
||||
@@ -109,4 +112,6 @@ private:
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
#include "AutomationClip.h"
|
||||
#include "shared_object.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class InlineAutomation : public FloatModel, public sharedObject
|
||||
{
|
||||
@@ -40,7 +42,7 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~InlineAutomation()
|
||||
~InlineAutomation() override
|
||||
{
|
||||
if( m_autoClip )
|
||||
{
|
||||
@@ -95,4 +97,6 @@ private:
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -33,6 +33,8 @@
|
||||
#include "Plugin.h"
|
||||
#include "TimePos.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
// forward-declarations
|
||||
class InstrumentTrack;
|
||||
@@ -58,7 +60,7 @@ public:
|
||||
Instrument(InstrumentTrack * _instrument_track,
|
||||
const Descriptor * _descriptor,
|
||||
const Descriptor::SubPluginFeatures::Key * key = nullptr);
|
||||
virtual ~Instrument() = default;
|
||||
~Instrument() override = default;
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
// functions that can/should be re-implemented:
|
||||
@@ -146,6 +148,10 @@ private:
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
Q_DECLARE_OPERATORS_FOR_FLAGS(Instrument::Flags)
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -30,22 +30,27 @@
|
||||
#include <QWidget>
|
||||
|
||||
class QLabel;
|
||||
class ComboBox;
|
||||
class GroupBox;
|
||||
class Knob;
|
||||
class TempoSyncKnob;
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class InstrumentFunctionArpeggio;
|
||||
class InstrumentFunctionNoteStacking;
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
class ComboBox;
|
||||
class GroupBox;
|
||||
class Knob;
|
||||
class TempoSyncKnob;
|
||||
|
||||
class InstrumentFunctionNoteStackingView : public QWidget, public ModelView
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
InstrumentFunctionNoteStackingView( InstrumentFunctionNoteStacking* cc, QWidget* parent = nullptr );
|
||||
virtual ~InstrumentFunctionNoteStackingView();
|
||||
~InstrumentFunctionNoteStackingView() override;
|
||||
|
||||
|
||||
private:
|
||||
@@ -68,7 +73,7 @@ class InstrumentFunctionArpeggioView : public QWidget, public ModelView
|
||||
Q_OBJECT
|
||||
public:
|
||||
InstrumentFunctionArpeggioView( InstrumentFunctionArpeggio* arp, QWidget* parent = nullptr );
|
||||
virtual ~InstrumentFunctionArpeggioView();
|
||||
~InstrumentFunctionArpeggioView() override;
|
||||
|
||||
|
||||
private:
|
||||
@@ -90,5 +95,8 @@ private:
|
||||
|
||||
} ;
|
||||
|
||||
} // namespace gui
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -31,10 +31,19 @@
|
||||
#include "TempoSyncKnobModel.h"
|
||||
#include "ComboBoxModel.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class InstrumentTrack;
|
||||
class NotePlayHandle;
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
class InstrumentFunctionNoteStackingView;
|
||||
class InstrumentFunctionArpeggioView;
|
||||
|
||||
}
|
||||
|
||||
|
||||
class InstrumentFunctionNoteStacking : public Model, public JournallingObject
|
||||
@@ -43,13 +52,14 @@ class InstrumentFunctionNoteStacking : public Model, public JournallingObject
|
||||
|
||||
public:
|
||||
static const int MAX_CHORD_POLYPHONY = 13;
|
||||
static const int NUM_CHORD_TABLES = 95;
|
||||
|
||||
private:
|
||||
typedef int8_t ChordSemiTones [MAX_CHORD_POLYPHONY];
|
||||
using ChordSemiTones = std::array<int8_t, MAX_CHORD_POLYPHONY>;
|
||||
|
||||
public:
|
||||
InstrumentFunctionNoteStacking( Model * _parent );
|
||||
virtual ~InstrumentFunctionNoteStacking();
|
||||
~InstrumentFunctionNoteStacking() override = default;
|
||||
|
||||
void processNote( NotePlayHandle* n );
|
||||
|
||||
@@ -120,7 +130,7 @@ public:
|
||||
ChordSemiTones m_semiTones;
|
||||
};
|
||||
|
||||
static Init s_initTable[];
|
||||
static std::array<Init, NUM_CHORD_TABLES> s_initTable;
|
||||
|
||||
public:
|
||||
static const ChordTable & getInstance()
|
||||
@@ -149,7 +159,7 @@ private:
|
||||
FloatModel m_chordRangeModel;
|
||||
|
||||
|
||||
friend class InstrumentFunctionNoteStackingView;
|
||||
friend class gui::InstrumentFunctionNoteStackingView;
|
||||
|
||||
} ;
|
||||
|
||||
@@ -171,7 +181,7 @@ public:
|
||||
} ;
|
||||
|
||||
InstrumentFunctionArpeggio( Model * _parent );
|
||||
virtual ~InstrumentFunctionArpeggio();
|
||||
~InstrumentFunctionArpeggio() override = default;
|
||||
|
||||
void processNote( NotePlayHandle* n );
|
||||
|
||||
@@ -207,9 +217,11 @@ private:
|
||||
|
||||
|
||||
friend class InstrumentTrack;
|
||||
friend class InstrumentFunctionArpeggioView;
|
||||
friend class gui::InstrumentFunctionArpeggioView;
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -30,12 +30,19 @@
|
||||
|
||||
#include "ModelView.h"
|
||||
|
||||
class QToolButton;
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class InstrumentTrack;
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
class GroupBox;
|
||||
class LcdSpinBox;
|
||||
class QToolButton;
|
||||
class LedCheckBox;
|
||||
class InstrumentTrack;
|
||||
|
||||
|
||||
class InstrumentMidiIOView : public QWidget, public ModelView
|
||||
@@ -43,7 +50,7 @@ class InstrumentMidiIOView : public QWidget, public ModelView
|
||||
Q_OBJECT
|
||||
public:
|
||||
InstrumentMidiIOView( QWidget* parent );
|
||||
virtual ~InstrumentMidiIOView();
|
||||
~InstrumentMidiIOView() override = default;
|
||||
|
||||
|
||||
private:
|
||||
@@ -64,4 +71,9 @@ private:
|
||||
LcdSpinBox* m_baseVelocitySpinBox;
|
||||
};
|
||||
|
||||
|
||||
} // namespace gui
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -29,9 +29,16 @@
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class InstrumentTrack;
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
class ComboBox;
|
||||
class GroupBox;
|
||||
class InstrumentTrack;
|
||||
class LedCheckBox;
|
||||
|
||||
|
||||
@@ -64,4 +71,9 @@ private:
|
||||
GroupBox * m_grooveGroupBox;
|
||||
};
|
||||
|
||||
|
||||
} // namespace gui
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -30,14 +30,15 @@
|
||||
#include "NotePlayHandle.h"
|
||||
#include "lmms_export.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class LMMS_EXPORT InstrumentPlayHandle : public PlayHandle
|
||||
{
|
||||
public:
|
||||
InstrumentPlayHandle( Instrument * instrument, InstrumentTrack* instrumentTrack );
|
||||
|
||||
virtual ~InstrumentPlayHandle()
|
||||
{
|
||||
}
|
||||
~InstrumentPlayHandle() override = default;
|
||||
|
||||
|
||||
void play( sampleFrame * _working_buffer ) override
|
||||
@@ -81,4 +82,7 @@ private:
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -27,18 +27,26 @@
|
||||
|
||||
#include "ComboBoxModel.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
class InstrumentTrack;
|
||||
class EnvelopeAndLfoParameters;
|
||||
class NotePlayHandle;
|
||||
|
||||
namespace gui
|
||||
{
|
||||
class InstrumentSoundShapingView;
|
||||
}
|
||||
|
||||
|
||||
class InstrumentSoundShaping : public Model, public JournallingObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
InstrumentSoundShaping( InstrumentTrack * _instrument_track );
|
||||
virtual ~InstrumentSoundShaping();
|
||||
~InstrumentSoundShaping() override = default;
|
||||
|
||||
void processAudioBuffer( sampleFrame * _ab, const fpp_t _frames,
|
||||
NotePlayHandle * _n );
|
||||
@@ -77,9 +85,11 @@ private:
|
||||
static const char *const targetNames[InstrumentSoundShaping::NumTargets][3];
|
||||
|
||||
|
||||
friend class InstrumentSoundShapingView;
|
||||
friend class gui::InstrumentSoundShapingView;
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user