Merge branch 'master' into groove

This commit is contained in:
Hyunjin Song
2022-03-03 10:29:20 +09:00
committed by GitHub
461 changed files with 2674 additions and 2359 deletions

View File

@@ -128,8 +128,6 @@ ENDIF()
SET(CMAKE_CXX_STANDARD_REQUIRED ON)
CHECK_INCLUDE_FILES(stdint.h LMMS_HAVE_STDINT_H)
CHECK_INCLUDE_FILES(stdlib.h LMMS_HAVE_STDLIB_H)
CHECK_INCLUDE_FILES(pthread.h LMMS_HAVE_PTHREAD_H)
CHECK_INCLUDE_FILES(semaphore.h LMMS_HAVE_SEMAPHORE_H)
CHECK_INCLUDE_FILES(unistd.h LMMS_HAVE_UNISTD_H)

View File

@@ -28,7 +28,7 @@ Features
---------
* Song-Editor for composing songs
* A Beat+Bassline-Editor for creating beats and basslines
* Pattern-Editor for creating beats and patterns
* An easy-to-use Piano-Roll for editing patterns and melodies
* A Mixer with unlimited mixer channels and arbitrary number of effects
* Many powerful instrument and effect-plugins out of the box

View File

@@ -20,7 +20,7 @@
<fxchain numofeffects="0" enabled="0"/>
</instrumenttrack>
</track>
<track type="1" muted="0" name="Beat/Bassline 0" solo="0">
<track type="1" muted="0" name="Pattern 0" solo="0">
<bbtrack>
<trackcontainer visible="1" width="580" height="300" type="bbtrackcontainer" x="610" y="5" maximized="0" minimized="0">
<track type="0" muted="0" name="Clap.ds" solo="0">

View File

@@ -20,7 +20,7 @@
<fxchain numofeffects="0" enabled="0"/>
</instrumenttrack>
</track>
<track type="1" muted="0" name="Beat/Bassline 0" solo="0">
<track type="1" muted="0" name="Pattern 0" solo="0">
<bbtrack>
<trackcontainer visible="1" width="580" height="300" type="bbtrackcontainer" x="610" y="5" maximized="0" minimized="0">
<track type="0" muted="0" name="Clave.ds" solo="0">

View File

@@ -25,7 +25,7 @@
<fxchain numofeffects="0" enabled="0"/>
</sampletrack>
</track>
<track muted="0" type="1" name="Beat/Bassline 0" solo="0">
<track muted="0" type="1" name="Pattern 0" solo="0">
<bbtrack>
<trackcontainer width="640" x="610" y="5" maximized="0" height="400" visible="0" type="bbtrackcontainer" minimized="0">
<track muted="0" type="0" name="Kicker" solo="0">

View File

Before

Width:  |  Height:  |  Size: 810 B

After

Width:  |  Height:  |  Size: 810 B

View File

Before

Width:  |  Height:  |  Size: 614 B

After

Width:  |  Height:  |  Size: 614 B

View File

Before

Width:  |  Height:  |  Size: 539 B

After

Width:  |  Height:  |  Size: 539 B

View File

Before

Width:  |  Height:  |  Size: 581 B

After

Width:  |  Height:  |  Size: 581 B

View File

@@ -333,7 +333,7 @@ QScrollBar::right-arrow:horizontal:disabled { background-image: url(resources:sb
QScrollBar::up-arrow:vertical:disabled { background-image: url(resources:sbarrow_up_d.png);}
QScrollBar::down-arrow:vertical:disabled { background-image: url(resources:sbarrow_down_d.png);}
/* background for song editor and bb-editor */
/* background for song editor and pattern editor */
TrackContainerView QFrame{
background-color: #49515b;
@@ -670,7 +670,7 @@ ClipView {
qproperty-mutedColor: rgb( 128, 128, 128 );
qproperty-mutedBackgroundColor: rgb( 80, 80, 80 );
qproperty-selectedColor: rgb( 0, 125, 255 );
qproperty-BBClipBackground: rgb( 80, 80, 80 );
qproperty-patternClipBackground: rgb( 80, 80, 80 );
qproperty-textColor: rgb( 255, 255, 255 );
qproperty-textBackgroundColor: rgba(0, 0, 0, 75);
qproperty-textShadowColor: rgb( 0, 0, 0 );
@@ -705,9 +705,9 @@ AutomationClipView {
color: rgb( 204, 215, 255 );
}
/* bb-clip */
BBClipView {
background-color: rgb( 128, 182, 175 ); /* default colour for bb-tracks */
/* pattern clip */
PatternClipView {
background-color: rgb( 128, 182, 175 ); /* default colour for pattern tracks */
}
/* Subwindows in MDI-Area */

View File

Before

Width:  |  Height:  |  Size: 216 B

After

Width:  |  Height:  |  Size: 216 B

View File

Before

Width:  |  Height:  |  Size: 208 B

After

Width:  |  Height:  |  Size: 208 B

View File

Before

Width:  |  Height:  |  Size: 195 B

After

Width:  |  Height:  |  Size: 195 B

View File

Before

Width:  |  Height:  |  Size: 185 B

After

Width:  |  Height:  |  Size: 185 B

View File

@@ -369,7 +369,7 @@ QScrollBar::down-arrow:vertical:disabled { background-image: url(resources:sbarr
EffectRackView QScrollBar::up-arrow:vertical:disabled { background-image: url(resources:sbarrow_up.png);}
EffectRackView QScrollBar::down-arrow:vertical:disabled { background-image: url(resources:sbarrow_down.png);}
/* background for song editor and bb-editor */
/* background for song editor and pattern editor */
TrackContainerView QFrame {
background-color: #262b30;
@@ -716,7 +716,7 @@ ClipView {
qproperty-mutedColor: rgba(255,255,255,100);
qproperty-mutedBackgroundColor: #373d48;
qproperty-selectedColor: #006B65;
qproperty-BBClipBackground: #373d48;
qproperty-patternClipBackground: #373d48;
qproperty-textColor: #fff;
qproperty-textBackgroundColor: rgba(0, 0, 0, 75);
qproperty-textShadowColor: rgba(0,0,0,200);
@@ -751,9 +751,9 @@ AutomationClipView {
color: rgba(255,255,255,90);
}
/* bb-clip */
BBClipView {
background-color: #20BDB2; /* default colour for bb-tracks */
/* pattern clip */
PatternClipView {
background-color: #20BDB2; /* default colour for pattern tracks */
}
/* Subwindows in MDI-Area */

View File

@@ -25,7 +25,7 @@
#ifndef AUDIO_DEVICE_H
#define AUDIO_DEVICE_H
#include <QtCore/QMutex>
#include <QMutex>
#include <samplerate.h>
#include "lmms_basics.h"

View File

@@ -25,16 +25,15 @@
#ifndef AUDIO_ENGINE_H
#define AUDIO_ENGINE_H
#include <QtCore/QMutex>
#include <QtCore/QThread>
#include <QtCore/QVector>
#include <QtCore/QWaitCondition>
#include <QMutex>
#include <QThread>
#include <QVector>
#include <QWaitCondition>
#include <samplerate.h>
#include "lmms_basics.h"
#include "LocklessList.h"
#include "Note.h"
#include "FifoBuffer.h"
#include "AudioEngineProfiler.h"
#include "PlayHandle.h"

View File

@@ -25,7 +25,7 @@
#ifndef AUDIO_ENGINE_WORKER_THREAD_H
#define AUDIO_ENGINE_WORKER_THREAD_H
#include <QtCore/QThread>
#include <QThread>
#include <atomic>

View File

@@ -26,7 +26,7 @@
#ifndef AUDIO_FILE_DEVICE_H
#define AUDIO_FILE_DEVICE_H
#include <QtCore/QFile>
#include <QFile>
#include "AudioDevice.h"
#include "OutputSettings.h"

View File

@@ -35,9 +35,7 @@
#endif
#include <atomic>
#include <QtCore/QVector>
#include <QtCore/QList>
#include <QtCore/QMap>
#include <QVector>
#include "AudioDevice.h"
#include "AudioDeviceSetupWidget.h"

View File

@@ -26,9 +26,8 @@
#define AUDIO_PORT_H
#include <memory>
#include <QtCore/QString>
#include <QtCore/QMutex>
#include <QtCore/QMutexLocker>
#include <QString>
#include <QMutex>
#include "MemoryManager.h"
#include "PlayHandle.h"

View File

@@ -25,7 +25,7 @@
#ifndef AUDIO_PORTAUDIO_H
#define AUDIO_PORTAUDIO_H
#include <QtCore/QObject>
#include <QObject>
#include "lmmsconfig.h"
#include "ComboBoxModel.h"
@@ -48,7 +48,6 @@ public:
#include <portaudio.h>
#include <QtCore/QSemaphore>
#include "AudioDevice.h"
#include "AudioDeviceSetupWidget.h"

View File

@@ -26,8 +26,8 @@
#ifndef AUDIO_SAMPLE_RECORDER_H
#define AUDIO_SAMPLE_RECORDER_H
#include <QtCore/QList>
#include <QtCore/QPair>
#include <QList>
#include <QPair>
#include "AudioDevice.h"

View File

@@ -30,7 +30,6 @@
#ifdef LMMS_HAVE_SDL
#ifdef LMMS_HAVE_SDL2
#include <SDL2/SDL.h>
#include <SDL2/SDL_audio.h>
#else
#include <SDL/SDL.h>

View File

@@ -25,10 +25,8 @@
#ifndef AUDIO_SOUNDIO_H
#define AUDIO_SOUNDIO_H
#include <QtCore/QObject>
#include "lmmsconfig.h"
#include "ComboBoxModel.h"
#ifdef LMMS_HAVE_SOUNDIO

View File

@@ -25,8 +25,8 @@
#ifndef AUTOMATABLE_MODEL_H
#define AUTOMATABLE_MODEL_H
#include <QtCore/QMap>
#include <QtCore/QMutex>
#include <QMap>
#include <QMutex>
#include "JournallingObject.h"
#include "Model.h"

View File

@@ -27,8 +27,8 @@
#ifndef AUTOMATION_CLIP_H
#define AUTOMATION_CLIP_H
#include <QtCore/QMap>
#include <QtCore/QPointer>
#include <QMap>
#include <QPointer>
#include "AutomationNode.h"
#include "Clip.h"
@@ -149,7 +149,7 @@ public:
void saveSettings( QDomDocument & _doc, QDomElement & _parent ) override;
void loadSettings( const QDomElement & _this ) override;
static const QString classNodeName() { return "automationpattern"; }
static const QString classNodeName() { return "automationclip"; }
QString nodeName() const override { return classNodeName(); }
ClipView * createView( TrackView * _tv ) override;

View File

@@ -27,11 +27,10 @@
#include <QStaticText>
#include "AutomationClip.h"
#include "Song.h"
#include "SongEditor.h"
#include "ClipView.h"
class AutomationClip;
class AutomationClipView : public ClipView
{

View File

@@ -26,7 +26,6 @@
#ifndef AUTOMATION_EDITOR_H
#define AUTOMATION_EDITOR_H
#include <QVector>
#include <QWidget>
#include "Editor.h"
@@ -36,13 +35,13 @@
#include "TimePos.h"
#include "AutomationClip.h"
#include "ComboBoxModel.h"
#include "Knob.h"
class QPainter;
class QPixmap;
class QScrollBar;
class ComboBox;
class Knob;
class NotePlayHandle;
class TimeLineWidget;
@@ -218,7 +217,7 @@ private:
void drawCross(QPainter & p );
void drawAutomationPoint( QPainter & p, timeMap::iterator it );
bool inBBEditor();
bool inPatternEditor();
QColor m_barLineColor;
QColor m_beatLineColor;

View File

@@ -26,9 +26,10 @@
#ifndef AUTOMATION_TRACK_VIEW_H
#define AUTOMATION_TRACK_VIEW_H
#include "AutomationTrack.h"
#include "TrackView.h"
class AutomationTrack;
class AutomationTrackView : public TrackView
{

View File

@@ -1,82 +0,0 @@
/*
* BBTrackContainer.h - model-component of BB-Editor
*
* Copyright (c) 2004-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of LMMS - https://lmms.io
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program (see COPYING); if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA.
*
*/
#ifndef BB_TRACK_CONTAINER_H
#define BB_TRACK_CONTAINER_H
#include "TrackContainer.h"
#include "ComboBoxModel.h"
class LMMS_EXPORT BBTrackContainer : public TrackContainer
{
Q_OBJECT
mapPropertyFromModel(int,currentBB,setCurrentBB,m_bbComboBoxModel);
public:
BBTrackContainer();
virtual ~BBTrackContainer();
virtual bool play(TimePos start, const fpp_t frames, const f_cnt_t frameBase, int clipNum = -1);
void updateAfterTrackAdd() override;
inline QString nodeName() const override
{
return "bbtrackcontainer";
}
bar_t lengthOfBB(int bb) const;
inline bar_t lengthOfCurrentBB()
{
return lengthOfBB(currentBB());
}
int numOfBBs() const;
void removeBB(int bb);
void swapBB(int bb1, int bb2);
void updateBBTrack(Clip * clip);
void fixIncorrectPositions();
void createClipsForBB(int bb);
AutomatedValueMap automatedValuesAt(TimePos time, int clipNum) const override;
public slots:
void play();
void stop();
void updateComboBox();
void currentBBChanged();
private:
ComboBoxModel m_bbComboBoxModel;
friend class BBEditor;
} ;
#endif

View File

@@ -36,7 +36,7 @@
#define __USE_XOPEN
#endif
#include <math.h>
#include <cmath>
#include "lmms_basics.h"
#include "lmms_constants.h"

View File

@@ -27,7 +27,7 @@
#ifndef CPULOAD_WIDGET_H
#define CPULOAD_WIDGET_H
#include <QtCore/QTimer>
#include <QTimer>
#include <QPixmap>
#include <QWidget>

View File

@@ -28,7 +28,6 @@
#include <QColor>
#include "AutomatableModel.h"
#include "lmms_basics.h"
class Track;

View File

@@ -26,7 +26,7 @@
#define TRACK_CONTENT_OBJECT_VIEW_H
#include <QtCore/QVector>
#include <QVector>
#include "ModelView.h"
#include "Rubberband.h"
@@ -53,7 +53,7 @@ class ClipView : public selectableObject, public ModelView
Q_PROPERTY( QColor textColor READ textColor WRITE setTextColor )
Q_PROPERTY( QColor textBackgroundColor READ textBackgroundColor WRITE setTextBackgroundColor )
Q_PROPERTY( QColor textShadowColor READ textShadowColor WRITE setTextShadowColor )
Q_PROPERTY( QColor BBClipBackground READ BBClipBackground WRITE setBBClipBackground )
Q_PROPERTY( QColor patternClipBackground READ patternClipBackground WRITE setPatternClipBackground )
Q_PROPERTY( bool gradient READ gradient WRITE setGradient )
// We have to use a QSize here because using QPoint isn't supported.
// width -> x, height -> y
@@ -61,6 +61,8 @@ class ClipView : public selectableObject, public ModelView
Q_PROPERTY( QSize mouseHotspotKnife MEMBER m_mouseHotspotKnife )
public:
const static int BORDER_WIDTH = 2;
ClipView( Clip * clip, TrackView * tv );
virtual ~ClipView();
@@ -83,7 +85,7 @@ public:
QColor textColor() const;
QColor textBackgroundColor() const;
QColor textShadowColor() const;
QColor BBClipBackground() const;
QColor patternClipBackground() const;
bool gradient() const;
void setMutedColor( const QColor & c );
void setMutedBackgroundColor( const QColor & c );
@@ -91,7 +93,7 @@ public:
void setTextColor( const QColor & c );
void setTextBackgroundColor( const QColor & c );
void setTextShadowColor( const QColor & c );
void setBBClipBackground( const QColor & c );
void setPatternClipBackground(const QColor& c);
void setGradient( const bool & b );
// access needsUpdate member variable
@@ -211,7 +213,7 @@ private:
QColor m_textColor;
QColor m_textBackgroundColor;
QColor m_textShadowColor;
QColor m_BBClipBackground;
QColor m_patternClipBackground;
bool m_gradient;
QSize m_mouseHotspotHand; // QSize must be used because QPoint
QSize m_mouseHotspotKnife; // isn't supported by property system

View File

@@ -25,7 +25,7 @@
#ifndef CLIPBOARD_H
#define CLIPBOARD_H
#include <QtCore/QMap>
#include <QMap>
#include <QDomElement>
class QMimeData;

View File

@@ -25,7 +25,6 @@
#ifndef COMBOBOX_MODEL_H
#define COMBOBOX_MODEL_H
#include <cassert>
#include <memory>
#include <utility>
#include <vector>

View File

@@ -28,11 +28,11 @@
#include "lmmsconfig.h"
#include <QtCore/QMap>
#include <QtCore/QPair>
#include <QtCore/QStringList>
#include <QtCore/QVector>
#include <QtCore/QObject>
#include <QMap>
#include <QPair>
#include <QStringList>
#include <QVector>
#include <QObject>
#include "lmms_export.h"

View File

@@ -30,8 +30,8 @@
#ifndef CONTROLLER_CONNECTION_H
#define CONTROLLER_CONNECTION_H
#include <QtCore/QObject>
#include <QtCore/QVector>
#include <QObject>
#include <QVector>
#include "Controller.h"
#include "JournallingObject.h"

View File

@@ -26,7 +26,6 @@
#define CONTROLS_H
#include "Model.h"
// headers only required for covariance
#include "AutomatableModel.h"

View File

@@ -32,8 +32,8 @@
#include "lmms_export.h"
#include "MemoryManager.h"
#include "ProjectVersion.h"
class ProjectVersion;
class QTextStream;
class LMMS_EXPORT DataFile : public QDomDocument
@@ -123,6 +123,7 @@ private:
void upgrade_extendedNoteRange();
void upgrade_defaultTripleOscillatorHQ();
void upgrade_mixerRename();
void upgrade_bbTcoRename();
// List of all upgrade methods
static const std::vector<UpgradeMethod> UPGRADE_METHODS;

View File

@@ -25,10 +25,14 @@
#ifndef DUMMY_EFFECT_H
#define DUMMY_EFFECT_H
#include <QDomElement>
#include "Effect.h"
#include "EffectControls.h"
#include "EffectControlDialog.h"
class Knob;
class DummyEffectControlDialog : public EffectControlDialog
{

View File

@@ -30,7 +30,7 @@
#include "InstrumentView.h"
#include "Engine.h"
#include <string.h>
#include <cstring>
#include "AudioEngine.h"

View File

@@ -29,7 +29,6 @@
#include <QSortFilterProxyModel>
#include <QStandardItemModel>
#include "EffectChain.h"
#include "Effect.h"

View File

@@ -26,8 +26,8 @@
#ifndef ENGINE_H
#define ENGINE_H
#include <QtCore/QString>
#include <QtCore/QObject>
#include <QString>
#include <QObject>
#include "lmmsconfig.h"
@@ -35,8 +35,8 @@
#include "lmms_basics.h"
class AudioEngine;
class BBTrackContainer;
class Mixer;
class PatternStore;
class ProjectJournal;
class Song;
class Ladspa2LMMS;
@@ -77,9 +77,9 @@ public:
return s_song;
}
static BBTrackContainer * getBBTrackContainer()
static PatternStore * patternStore()
{
return s_bbTrackContainer;
return s_patternStore;
}
static ProjectJournal * projectJournal()
@@ -143,7 +143,7 @@ private:
static AudioEngine *s_audioEngine;
static Mixer * s_mixer;
static Song * s_song;
static BBTrackContainer * s_bbTrackContainer;
static PatternStore * s_patternStore;
static ProjectJournal * s_projectJournal;
#ifdef LMMS_HAVE_LV2

View File

@@ -25,7 +25,7 @@
#ifndef ENVELOPE_AND_LFO_PARAMETERS_H
#define ENVELOPE_AND_LFO_PARAMETERS_H
#include <QtCore/QVector>
#include <QVector>
#include "JournallingObject.h"
#include "AutomatableModel.h"

View File

@@ -26,7 +26,7 @@
#ifndef EXPORT_FILTER_H
#define EXPORT_FILTER_H
#include <QtCore/QFile>
#include <QFile>
#include "TrackContainer.h"
#include "Plugin.h"
@@ -40,7 +40,7 @@ public:
virtual bool tryExport(const TrackContainer::TrackList &tracks,
const TrackContainer::TrackList &tracksBB,
const TrackContainer::TrackList &patternTracks,
int tempo, int masterPitch, const QString &filename ) = 0;
protected:

View File

@@ -25,7 +25,7 @@
#ifndef FIFO_BUFFER_H
#define FIFO_BUFFER_H
#include <QtCore/QSemaphore>
#include <QSemaphore>
template<typename T>

View File

@@ -27,8 +27,8 @@
#define FILE_BROWSER_H
#include <QCheckBox>
#include <QtCore/QDir>
#include <QtCore/QMutex>
#include <QDir>
#include <QMutex>
#include <QTreeWidget>

View File

@@ -25,7 +25,7 @@
#ifndef GUIAPPLICATION_H
#define GUIAPPLICATION_H
#include <QtCore/QObject>
#include <QObject>
#include "lmms_export.h"
#include "lmmsconfig.h"
@@ -33,12 +33,12 @@
class QLabel;
class AutomationEditorWindow;
class BBEditor;
class ControllerRackView;
class GrooveView;
class MixerView;
class MainWindow;
class MicrotunerConfig;
class PatternEditorWindow;
class PianoRollWindow;
class ProjectNotes;
class SongEditorWindow;
@@ -59,7 +59,7 @@ public:
GrooveView* grooveView() { return m_grooveView; }
MixerView* mixerView() { return m_mixerView; }
SongEditorWindow* songEditor() { return m_songEditor; }
BBEditor* getBBEditor() { return m_bbEditor; }
PatternEditorWindow* patternEditor() { return m_patternEditor; }
PianoRollWindow* pianoRoll() { return m_pianoRoll; }
ProjectNotes* getProjectNotes() { return m_projectNotes; }
MicrotunerConfig* getMicrotunerConfig() { return m_microtunerConfig; }
@@ -80,7 +80,7 @@ private:
MixerView* m_mixerView;
SongEditorWindow* m_songEditor;
AutomationEditorWindow* m_automationEditor;
BBEditor* m_bbEditor;
PatternEditorWindow* m_patternEditor;
PianoRollWindow* m_pianoRoll;
ProjectNotes* m_projectNotes;
MicrotunerConfig* m_microtunerConfig;

View File

@@ -26,7 +26,7 @@
#ifndef IMPORT_FILTER_H
#define IMPORT_FILTER_H
#include <QtCore/QFile>
#include <QFile>
#include "Plugin.h"

View File

@@ -36,10 +36,8 @@
#include "MidiPort.h"
#include "NotePlayHandle.h"
#include "Piano.h"
#include "Pitch.h"
#include "Plugin.h"
#include "Track.h"
#include "TrackView.h"
class Instrument;

View File

@@ -28,11 +28,11 @@
#include "TrackView.h"
#include "InstrumentTrack.h"
#include "MidiCCRackView.h"
class InstrumentTrackWindow;
class Knob;
class MidiCCRackView;
class TrackContainerView;
class TrackLabelButton;

View File

@@ -25,7 +25,7 @@
#ifndef JOURNALLING_OBJECT_H
#define JOURNALLING_OBJECT_H
#include <QtCore/QStack>
#include <QStack>
#include "lmms_basics.h"
#include "SerializingObject.h"

View File

@@ -29,7 +29,6 @@
#include <QObject>
#include <QString>
#include "Note.h"
#include "SerializingObject.h"
class Keymap : public QObject, public SerializingObject

View File

@@ -29,7 +29,7 @@
#include <memory>
#include <QPixmap>
#include <QWidget>
#include <QtCore/QPoint>
#include <QPoint>
#include <QTextDocument>
#include "AutomatableModelView.h"

View File

@@ -30,10 +30,10 @@
#include <ladspa.h>
#include <QtCore/QMap>
#include <QtCore/QPair>
#include <QtCore/QString>
#include <QtCore/QStringList>
#include <QMap>
#include <QPair>
#include <QString>
#include <QStringList>
#include "lmms_export.h"

View File

@@ -26,7 +26,7 @@
#ifndef LCD_WIDGET_H
#define LCD_WIDGET_H
#include <QtCore/QMap>
#include <QMap>
#include <QWidget>
#include "lmms_export.h"

View File

@@ -27,7 +27,6 @@
#include "PixmapButton.h"
#include <QLayout>
class LeftRightNav : public QWidget
{

View File

@@ -28,7 +28,6 @@
#include <cstddef>
#include <memory>
#include <vector>
#include <QWidget>

View File

@@ -27,8 +27,6 @@
#include <cstddef>
#include <memory>
#include <vector>
#include "Model.h"

View File

@@ -26,7 +26,7 @@
#define LOCKLESS_ALLOCATOR_H
#include <atomic>
#include <stddef.h>
#include <cstddef>
class LocklessAllocator
{

View File

@@ -30,6 +30,7 @@
#ifdef LMMS_HAVE_LV2
#include <lilv/lilv.h>
#include <memory>
#include "DataFile.h"
#include "LinkedModelGroups.h"

View File

@@ -29,7 +29,6 @@
#ifdef LMMS_HAVE_LV2
#include <lv2.h>
#include <map>
#include <vector>
#include "Lv2Manager.h"

View File

@@ -31,18 +31,17 @@
#include <lilv/lilv.h>
#include <memory>
#include <QObject>
#include "Lv2Basics.h"
#include "Lv2Features.h"
#include "Lv2Options.h"
#include "LinkedModelGroups.h"
#include "MidiEvent.h"
#include "Plugin.h"
#include "PluginIssue.h"
#include "../src/3rdparty/ringbuffer/include/ringbuffer/ringbuffer.h"
#include "TimePos.h"
class PluginIssue;
// forward declare port structs/enums
namespace Lv2Ports
{

View File

@@ -29,7 +29,6 @@
#ifdef LMMS_HAVE_LV2
#include <QtGlobal>
#include <cstdint>
//! Cached URIDs for fast access (for use in real-time code)

View File

@@ -30,8 +30,6 @@
#ifdef LMMS_HAVE_LV2
#include <QString>
#include <QVector>
#include "LinkedModelGroupViews.h"
#include "lmms_export.h"

View File

@@ -25,13 +25,12 @@
#ifndef MAIN_WINDOW_H
#define MAIN_WINDOW_H
#include <QtCore/QBasicTimer>
#include <QtCore/QTimer>
#include <QtCore/QList>
#include <QBasicTimer>
#include <QTimer>
#include <QList>
#include <QMainWindow>
#include "ConfigManager.h"
#include "SubWindow.h"
class QAction;
class QDomElement;
@@ -40,6 +39,7 @@ class QMdiArea;
class ConfigManager;
class PluginView;
class SubWindow;
class ToolButton;
@@ -149,7 +149,7 @@ public slots:
void aboutLMMS();
void help();
void toggleAutomationEditorWin();
void toggleBBEditorWin( bool forceShow = false );
void togglePatternEditorWin(bool forceShow = false);
void toggleSongEditorWin();
void toggleProjectNotesWin();
void toggleMicrotunerWin();

View File

@@ -28,8 +28,6 @@
#include "AutomatableModel.h"
#include "ComboBoxModel.h"
#include "JournallingObject.h"
#include "lmms_constants.h"
#include "Note.h"
class LMMS_EXPORT Microtuner : public Model, public JournallingObject
{

View File

@@ -25,17 +25,16 @@
#ifndef MICROTUNER_CONFIG_H
#define MICROTUNER_CONFIG_H
#include <QCloseEvent>
#include <QLineEdit>
#include <QMainWindow>
#include <QPlainTextEdit>
#include <QWidget>
#include "AutomatableModel.h"
#include "ComboBoxModel.h"
#include "LcdFloatSpinBox.h"
#include "LcdSpinBox.h"
#include "SerializingObject.h"
class QLineEdit;
class QPlainTextEdit;
class LMMS_EXPORT MicrotunerConfig : public QWidget, public SerializingObject
{
Q_OBJECT

View File

@@ -31,7 +31,8 @@
#include <alsa/asoundlib.h>
#include <QtCore/QThread>
#include <QMap>
#include <QThread>
#include "MidiClient.h"

View File

@@ -30,9 +30,10 @@
#ifdef LMMS_HAVE_ALSA
#include <alsa/asoundlib.h>
#include <QtCore/QMutex>
#include <QtCore/QThread>
#include <QtCore/QTimer>
#include <QMap>
#include <QMutex>
#include <QThread>
#include <QTimer>
#include "MidiClient.h"

View File

@@ -3,12 +3,12 @@
#include <QWidget>
#include "GroupBox.h"
#include "Knob.h"
#include "Midi.h"
#include "SerializingObject.h"
class GroupBox;
class InstrumentTrack;
class Knob;
class MidiCCRackView : public QWidget, public SerializingObject
{

View File

@@ -25,16 +25,16 @@
#ifndef MIDI_CLIENT_H
#define MIDI_CLIENT_H
#include <QtCore/QStringList>
#include <QtCore/QVector>
#include <QStringList>
#include <QVector>
#include "MidiEvent.h"
#include "MidiEventProcessor.h"
#include "TabWidget.h"
class MidiPort;
class QObject;
class TimePos;
// base-class for all MIDI-clients

View File

@@ -26,11 +26,9 @@
#ifndef MIDI_CLIP_H
#define MIDI_CLIP_H
#include <QStaticText>
#include "Clip.h"
#include "Note.h"
#include "MidiClipView.h"
#include "ClipView.h"
class InstrumentTrack;
@@ -91,8 +89,7 @@ public:
void loadSettings( const QDomElement & _this ) override;
inline QString nodeName() const override
{
//TODO: rename to "midiClip"
return "pattern";
return "midiclip";
}
inline InstrumentTrack * instrumentTrack() const
@@ -108,16 +105,16 @@ public:
using Model::dataChanged;
protected:
void updateBBTrack();
protected slots:
public slots:
void addSteps();
void cloneSteps();
void removeSteps();
void clear();
protected:
void updatePatternTrack();
protected slots:
void changeTimeSignature();
@@ -140,7 +137,6 @@ private:
MidiClip * adjacentMidiClipByOffset(int offset) const;
friend class MidiClipView;
friend class BBTrackContainerView;
signals:

View File

@@ -25,7 +25,8 @@
#ifndef MIDI_CLIP_VIEW_H
#define MIDI_CLIP_VIEW_H
#include "MidiClip.h"
#include <QStaticText>
#include "ClipView.h"
class MidiClip;
@@ -93,7 +94,7 @@ private:
QStaticText m_staticTextName;
bool m_legacySEBB;
bool m_legacySEPattern;
} ;

View File

@@ -35,15 +35,13 @@
#include "weak_libjack.h"
#endif
#include <QtCore/QThread>
#include <QMutex>
#include <QtCore/QFile>
#include <QThread>
#include "MidiClient.h"
#include "AudioJack.h"
constexpr size_t JACK_MIDI_BUFFER_MAX = 64; /* events */
class AudioJack;
class QLineEdit;
class MidiJack : public QThread, public MidiClientRaw

View File

@@ -29,8 +29,8 @@
#ifdef LMMS_HAVE_OSS
#include <QtCore/QThread>
#include <QtCore/QFile>
#include <QThread>
#include <QFile>
#include "MidiClient.h"

View File

@@ -26,9 +26,9 @@
#ifndef MIDI_PORT_H
#define MIDI_PORT_H
#include <QtCore/QString>
#include <QtCore/QList>
#include <QtCore/QMap>
#include <QString>
#include <QList>
#include <QMap>
#include "Midi.h"
#include "TimePos.h"

View File

@@ -25,7 +25,6 @@
#ifndef MIDISETUPWIDGET_H
#define MIDISETUPWIDGET_H
#include <QLabel>
#include "TabWidget.h"

View File

@@ -30,10 +30,8 @@
#ifdef LMMS_HAVE_SNDIO
#include <QtCore/QThread>
#include <QtCore/QFile>
#include <QThread>
#include <sndio.h>
#include "MidiClient.h"

View File

@@ -26,18 +26,15 @@
#ifndef MIXER_LINE_H
#define MIXER_LINE_H
#include <QColorDialog>
#include <QGraphicsView>
#include <QLineEdit>
#include <QWidget>
#include "ColorChooser.h"
#include "Knob.h"
#include "LcdWidget.h"
#include "SendButtonIndicator.h"
class QGraphicsView;
class QLineEdit;
class Knob;
class LcdWidget;
class MixerView;
class SendButtonIndicator;

View File

@@ -25,8 +25,8 @@
#ifndef MODEL_H
#define MODEL_H
#include <QtCore/QString>
#include <QtCore/QObject>
#include <QString>
#include <QObject>
#include "lmms_export.h"

View File

@@ -25,7 +25,7 @@
#ifndef MODEL_VIEW_H
#define MODEL_VIEW_H
#include <QtCore/QPointer>
#include <QPointer>
#include "Model.h"

View File

@@ -27,8 +27,8 @@
#define NSTATE_BUTTON_H
#include <QPixmap>
#include <QtCore/QVector>
#include <QtCore/QPair>
#include <QVector>
#include <QPair>
#include "ToolButton.h"

View File

@@ -26,7 +26,7 @@
#ifndef NOTE_H
#define NOTE_H
#include <QtCore/QVector>
#include <QVector>
#include "volume.h"
#include "panning.h"

View File

@@ -231,16 +231,16 @@ public:
/*! Returns whether given NotePlayHandle instance is equal to *this */
bool operator==( const NotePlayHandle & _nph ) const;
/*! Returns whether NotePlayHandle belongs to BB track and BB track is muted */
bool isBbTrackMuted()
/*! Returns whether NotePlayHandle belongs to pattern track and pattern track is muted */
bool isPatternTrackMuted()
{
return m_bbTrack && m_bbTrack->isMuted();
return m_patternTrack && m_patternTrack->isMuted();
}
/*! Sets attached BB track */
void setBBTrack( Track* t )
/*! Sets attached pattern track */
void setPatternTrack(Track* t)
{
m_bbTrack = t;
m_patternTrack = t;
}
/*! Process note detuning automation */
@@ -311,7 +311,7 @@ private:
NotePlayHandle * m_parent; // parent note
bool m_hadChildren;
bool m_muted; // indicates whether note is muted
Track* m_bbTrack; // related BB track
Track* m_patternTrack; // related pattern track
// tempo reaction
bpm_t m_origTempo; // original tempo

View File

@@ -28,11 +28,7 @@
#include <cassert>
#include <fftw3.h>
#include <math.h>
#ifdef LMMS_HAVE_STDLIB_H
#include <stdlib.h>
#endif
#include <cstdlib>
#include "Engine.h"
#include "lmms_constants.h"

View File

@@ -1,5 +1,5 @@
/*
* BBClip.h
* PatternClip.h
*
* Copyright (c) 2004-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
@@ -23,33 +23,36 @@
*/
#ifndef BB_CLIP_H
#define BB_CLIP_H
#ifndef PATTERN_CLIP_H
#define PATTERN_CLIP_H
#include "ClipView.h"
#include "Clip.h"
class BBClip : public Clip
/*! \brief Dummy clip for PatternTracks
*
* Only used in the Song (Editor). See PatternStore.h for more info.
*/
class PatternClip : public Clip
{
public:
BBClip( Track * _track );
virtual ~BBClip() = default;
PatternClip(Track* track);
virtual ~PatternClip() = default;
void saveSettings( QDomDocument & _doc, QDomElement & _parent ) override;
void loadSettings( const QDomElement & _this ) override;
inline QString nodeName() const override
{
return( "bbtco" );
return "patternclip";
}
int bbTrackIndex();
int patternIndex();
ClipView * createView( TrackView * _tv ) override;
private:
friend class BBClipView;
friend class PatternClipView;
} ;
#endif
#endif

View File

@@ -1,5 +1,5 @@
/*
* BBClipView.h
* PatternClipView.h
*
* Copyright (c) 2004-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
@@ -23,27 +23,30 @@
*/
#ifndef BB_CLIP_VIEW_H
#define BB_CLIP_VIEW_H
#ifndef PATTERN_CLIP_VIEW_H
#define PATTERN_CLIP_VIEW_H
#include "BBClip.h"
#include <QStaticText>
#include "ClipView.h"
class BBClipView : public ClipView
class PatternClip;
class PatternClipView : public ClipView
{
Q_OBJECT
public:
BBClipView( Clip * _clip, TrackView * _tv );
virtual ~BBClipView() = default;
PatternClipView(Clip* clip, TrackView* tv);
virtual ~PatternClipView() = default;
public slots:
void update() override;
protected slots:
void openInBBEditor();
void openInPatternEditor();
void resetName();
void changeName();
@@ -55,7 +58,7 @@ protected:
private:
BBClip * m_bbClip;
PatternClip* m_patternClip;
QPixmap m_paintPixmap;
QStaticText m_staticTextName;
@@ -63,4 +66,4 @@ private:
#endif
#endif

View File

@@ -1,5 +1,5 @@
/*
* BBEditor.h - view-component of BB-Editor
* PatternEditor.h - basic main-window for editing patterns
*
* Copyright (c) 2004-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
@@ -23,60 +23,30 @@
*/
#ifndef BB_EDITOR_H
#define BB_EDITOR_H
#ifndef PATTERN_EDITOR_H
#define PATTERN_EDITOR_H
#include "Editor.h"
#include "TrackContainerView.h"
class BBTrackContainer;
class PatternStore;
class ComboBox;
class BBTrackContainerView;
class BBEditor : public Editor
class PatternEditor : public TrackContainerView
{
Q_OBJECT
public:
BBEditor( BBTrackContainer * _tc );
~BBEditor();
QSize sizeHint() const override;
const BBTrackContainerView* trackContainerView() const {
return m_trackContainerView;
}
BBTrackContainerView* trackContainerView() {
return m_trackContainerView;
}
void removeBBView( int bb );
public slots:
void play() override;
void stop() override;
private:
BBTrackContainerView* m_trackContainerView;
ComboBox * m_bbComboBox;
} ;
class BBTrackContainerView : public TrackContainerView
{
Q_OBJECT
public:
BBTrackContainerView(BBTrackContainer* tc);
PatternEditor(PatternStore* ps);
bool fixedClips() const override
{
return true;
}
void removeBBView(int bb);
void removeViewsForPattern(int pattern);
void saveSettings(QDomDocument& doc, QDomElement& element) override;
void loadSettings(const QDomElement& element) override;
@@ -94,9 +64,30 @@ protected slots:
void updatePosition();
private:
BBTrackContainer * m_bbtc;
PatternStore* m_ps;
void makeSteps( bool clone );
};
class PatternEditorWindow : public Editor
{
Q_OBJECT
public:
PatternEditorWindow(PatternStore* ps);
~PatternEditorWindow();
QSize sizeHint() const override;
PatternEditor* m_editor;
public slots:
void play() override;
void stop() override;
private:
ComboBox* m_patternComboBox;
};
#endif

108
include/PatternStore.h Normal file
View File

@@ -0,0 +1,108 @@
/*
* PatternStore.h - model-component of Pattern Editor
*
* Copyright (c) 2004-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of LMMS - https://lmms.io
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program (see COPYING); if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA.
*
*/
#ifndef PATTERN_STORE_H
#define PATTERN_STORE_H
#include "TrackContainer.h"
#include "ComboBoxModel.h"
/*
* PatternStore is the backend of Pattern Editor:
*
* +----------------------------------+
* | PatternStore (TrackContainer) |
* | |
* | +------------------------------+ |
* | | Track 1 [Clip A] [Clip B] | |
* | +------------------------------+ |
* | |
* | +------------------------------+ |
* | | Track 2 [Clip C] [Clip D] | |
* | +------------------------------+ |
* +----------------------------------+
*
* There is only one PatternStore which holds all patterns, and it's very similar to the Song Editor.
* Think of it as a table - tracks are rows, bars are columns and clips are cells.
* With this logic a "pattern" is a column, i.e. all clips on the same bar.
* In the Pattern Editor you can select which pattern (column) you want to see, using the combo box at the top.
* In the illustration above, Clip A and Clip C start on bar 1, thus they are "Pattern 1".
*
* Do not confuse tracks and clips in the PatternStore with PatternTracks and PatternClips.
* - PatternTracks are used in the Song Editor. Each one reference a "pattern" in the PatternStore.
* - PatternClips are stored inside PatternTracks. They are just empty placeholders.
*/
class LMMS_EXPORT PatternStore : public TrackContainer
{
Q_OBJECT
mapPropertyFromModel(int, currentPattern, setCurrentPattern, m_patternComboBoxModel);
public:
PatternStore();
virtual ~PatternStore();
virtual bool play(TimePos start, const fpp_t frames, const f_cnt_t frameBase, int clipNum = -1);
void updateAfterTrackAdd() override;
inline QString nodeName() const override
{
return "patternstore";
}
bar_t lengthOfPattern(int pattern) const;
inline bar_t lengthOfCurrentPattern()
{
return lengthOfPattern(currentPattern());
}
int numOfPatterns() const;
void removePattern(int pattern);
void swapPattern(int p1, int p2);
void updatePatternTrack(Clip* clip);
void fixIncorrectPositions();
void createClipsForPattern(int pattern);
AutomatedValueMap automatedValuesAt(TimePos time, int clipNum) const override;
public slots:
void play();
void stop();
void updateComboBox();
void currentPatternChanged();
private:
ComboBoxModel m_patternComboBoxModel;
// Where the pattern selection combo box is
friend class PatternEditorWindow;
} ;
#endif

View File

@@ -1,6 +1,5 @@
/*
* BBTrack.h - class BBTrack, a wrapper for using bbEditor
* (which is a singleton-class) as track
* PatternTrack.h - a track representing a pattern in the PatternStore
*
* Copyright (c) 2004-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
@@ -24,25 +23,25 @@
*/
#ifndef BB_TRACK_H
#define BB_TRACK_H
#ifndef PATTERN_TRACK_H
#define PATTERN_TRACK_H
#include <QtCore/QMap>
#include <QMap>
#include "BBClipView.h"
#include "Track.h"
class TrackLabelButton;
class TrackContainer;
class LMMS_EXPORT BBTrack : public Track
/*! Track type used in the Song (Editor) to reference a pattern in the PatternStore */
class LMMS_EXPORT PatternTrack : public Track
{
Q_OBJECT
public:
BBTrack( TrackContainer* tc );
virtual ~BBTrack();
PatternTrack(TrackContainer* tc);
virtual ~PatternTrack();
virtual bool play( const TimePos & _start, const fpp_t _frames,
const f_cnt_t _frame_base, int _clip_num = -1 ) override;
@@ -53,10 +52,10 @@ public:
QDomElement & _parent ) override;
void loadTrackSpecificSettings( const QDomElement & _this ) override;
static BBTrack * findBBTrack( int _bb_num );
static void swapBBTracks( Track * _track1, Track * _track2 );
static PatternTrack* findPatternTrack(int pattern_num);
static void swapPatternTracks(Track* track1, Track* track2);
int index()
int patternIndex()
{
return s_infoMap[this];
}
@@ -77,17 +76,17 @@ public:
protected:
inline QString nodeName() const override
{
return( "bbtrack" );
return "patterntrack";
}
private:
QList<Track *> m_disabledTracks;
typedef QMap<BBTrack *, int> infoMap;
typedef QMap<PatternTrack*, int> infoMap;
static infoMap s_infoMap;
friend class BBTrackView;
friend class PatternTrackView;
} ;

View File

@@ -1,5 +1,5 @@
/*
* BBTrackView.h
* PatternTrackView.h
*
* Copyright (c) 2004-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
@@ -23,27 +23,28 @@
*/
#ifndef BB_TRACK_VIEW_H
#define BB_TRACK_VIEW_H
#ifndef PATTERN_TRACK_VIEW_H
#define PATTERN_TRACK_VIEW_H
#include <QtCore/QObject>
#include "BBTrack.h"
#include "TrackView.h"
class PatternTrack;
class TrackLabelButton;
class BBTrackView : public TrackView
class PatternTrackView : public TrackView
{
Q_OBJECT
public:
BBTrackView( BBTrack* bbt, TrackContainerView* tcv );
virtual ~BBTrackView();
PatternTrackView(PatternTrack* pt, TrackContainerView* tcv);
virtual ~PatternTrackView();
bool close() override;
const BBTrack * getBBTrack() const
const PatternTrack* getPatternTrack() const
{
return( m_bbTrack );
return (m_patternTrack);
}
@@ -52,10 +53,10 @@ public slots:
private:
BBTrack * m_bbTrack;
PatternTrack* m_patternTrack;
TrackLabelButton * m_trackLabel;
} ;
#endif
#endif

View File

@@ -25,7 +25,6 @@
#ifndef PEAK_CONTROLLER_H
#define PEAK_CONTROLLER_H
#include "Model.h"
#include "Controller.h"
#include "ControllerDialog.h"

View File

@@ -26,7 +26,7 @@
#define PERFLOG_H
#include <ctime>
#include <QtCore/QString>
#include <QString>
/// \brief CPU time point
///

View File

@@ -29,7 +29,6 @@
#include <QVector>
#include <QWidget>
#include <QInputDialog>
#include "Editor.h"
#include "ComboBoxModel.h"
@@ -37,13 +36,12 @@
#include "Note.h"
#include "lmms_basics.h"
#include "Song.h"
#include "ToolTip.h"
#include "StepRecorder.h"
#include "StepRecorderWidget.h"
#include "PositionLine.h"
class QPainter;
class QPixmap;
class QPushButton;
class QScrollBar;
class QString;
class QMenu;
@@ -52,6 +50,8 @@ class QToolButton;
class ComboBox;
class NotePlayHandle;
class MidiClip;
class PositionLine;
class TextFloat;
class TimeLineWidget;
class PianoRoll : public QWidget

View File

@@ -25,12 +25,11 @@
#ifndef PLAY_HANDLE_H
#define PLAY_HANDLE_H
#include <QtCore/QList>
#include <QtCore/QMutex>
#include <QList>
#include <QMutex>
#include "lmms_export.h"
#include "MemoryManager.h"
#include "ThreadableJob.h"
#include "lmms_basics.h"

View File

@@ -25,9 +25,8 @@
#ifndef PLUGIN_H
#define PLUGIN_H
#include <QtCore/QStringList>
#include <QtCore/QMap>
#include <QtXml/QDomDocument>
#include <QStringList>
#include <QMap>
#include "JournallingObject.h"
#include "Model.h"

View File

@@ -25,7 +25,6 @@
#ifndef PLUGIN_BROWSER_H
#define PLUGIN_BROWSER_H
#include <QtCore/QTimer>
#include <QPixmap>
#include "SideBarWidget.h"

Some files were not shown because too many files have changed in this diff Show More