Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhanced arpeggio - working snapshot #3117

Closed
wants to merge 143 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
143 commits
Select commit Hold shift + click to select a range
7efc8a7
prvi commit
Rikislav Nov 1, 2016
b191aa1
Drugi commit
Rikislav Nov 1, 2016
1d8141c
tretji commit
Rikislav Nov 1, 2016
b9c13c3
nrdjeno
Rikislav Nov 7, 2016
8bb2292
doma
Rikislav Nov 7, 2016
f98e6bc
ta zadnji
Rikislav Nov 8, 2016
d534124
modified arpeggio
Rikislav Nov 9, 2016
a8d1912
build fix and coding conventions
Rikislav Nov 9, 2016
bd61fad
fixed things
Rikislav Nov 10, 2016
7d8ac97
resolving conflict
Rikislav Nov 10, 2016
273de2c
working commit 11/11
Rikislav Nov 11, 2016
9170195
fixed non-static data member initializers
Rikislav Nov 11, 2016
c33fa02
original CMakeLists, fixing format, bugs
Rikislav Nov 12, 2016
1b56809
Merge branch 'master' of https://github.com/LMMS/lmms
Rikislav Nov 13, 2016
8fed3aa
Merge branch 'master' of https://github.com/LMMS/lmms
Rikislav Nov 13, 2016
94a58d2
reversing master to lmms/master
Rikislav Nov 13, 2016
067cee9
Merge branch 'master' of https://github.com/LMMS/lmms
Rikislav Nov 14, 2016
060bdbe
enhanced arpeggio merged to lmms master
Rikislav Nov 14, 2016
8fda5e1
conforming format to lmms standard
Rikislav Nov 15, 2016
a994d80
Braces formatted
Rikislav Nov 16, 2016
fec40f9
Last bracefound and formatted
Rikislav Nov 20, 2016
0460e15
starters
Rikislav Nov 20, 2016
4a70dfb
Merge branch 'master' of https://github.com/Rikislav/lmms into contro…
Rikislav Nov 21, 2016
0b60a5f
tentativi
Rikislav Nov 21, 2016
b03782b
work in progress
Rikislav Nov 22, 2016
1bfb771
Merge remote-tracking branch 'upstream/master'
Rikislav Nov 23, 2016
ef1ed80
Merge branch 'master' into controller-arpeggio
Rikislav Nov 23, 2016
3673cf2
using meld
Rikislav Nov 23, 2016
eb0ba64
conforming CMakeLists through meld
Rikislav Nov 23, 2016
343209a
not working domelement xml
Rikislav Nov 26, 2016
7e44022
first working xml
Rikislav Nov 27, 2016
db4c37c
before dawn
Rikislav Dec 1, 2016
1efc6df
Merge remote-tracking branch 'upstream/master'
Rikislav Dec 1, 2016
75ea81e
Merge remote-tracking branch 'upstream/master' into controller-arpeggio
Rikislav Dec 1, 2016
5bc42aa
plugin beginning
Rikislav Dec 4, 2016
d1ea689
arpeggioplugin2
Rikislav Dec 5, 2016
772c8db
plugin arpeggio
Rikislav Dec 7, 2016
11d2728
menjal stvari zdaj dela
Rikislav Dec 9, 2016
b654749
Merge remote-tracking branch 'upstream/master' into new-arpeggio
Rikislav Dec 9, 2016
70703c1
load xml ok with signals slots
Rikislav Dec 10, 2016
cac441c
fixed warning unused variable deleted arpeggiator plugin
Rikislav Dec 10, 2016
79fea5e
chordtable editor plugin work in progress
Rikislav Dec 12, 2016
590ae14
working on chord_editor.cpp
Rikislav Dec 17, 2016
8ecfe32
just before changing to model in chord
Rikislav Dec 20, 2016
10e90d6
before changing ChordsemiTone data to models
Rikislav Dec 24, 2016
30c016d
saving things before changing all chord data to classes
Rikislav Dec 27, 2016
064fba7
started shifting to chord class
Rikislav Dec 27, 2016
5a61494
Chordtable moved to engine, working experiment
Rikislav Dec 29, 2016
04556f7
completed first attempt, working copy
Rikislav Dec 31, 2016
80dc870
arpeggio widget partially fixed
Rikislav Jan 1, 2017
35f2a3d
end of day
Rikislav Jan 1, 2017
a824137
trying to fix compiler errors
Rikislav Jan 1, 2017
c78b21a
Merge branch 'master' into new-arpeggio
Rikislav Jan 1, 2017
196d375
trying to fix compiler errors 2
Rikislav Jan 1, 2017
eb47be1
before changing chord to vector and removing chordsemitones
Rikislav Jan 5, 2017
0038b73
succesful chord change and rename signals
Rikislav Jan 6, 2017
54a92ce
Merge remote-tracking branch 'upstream/master' into new-arpeggio
Rikislav Jan 6, 2017
07869e5
done for travis 0
Rikislav Jan 6, 2017
dce6723
done for travis 1
Rikislav Jan 6, 2017
f56b255
done for travis 2
Rikislav Jan 6, 2017
b4cf614
done for travis 3
Rikislav Jan 7, 2017
d3137fc
done for travis 4
Rikislav Jan 7, 2017
884a832
done for travis 5
Rikislav Jan 7, 2017
a60b2cd
done for travis 6
Rikislav Jan 9, 2017
bf5d732
done for travis 7
Rikislav Jan 9, 2017
30ee7dd
done for travis 8
Rikislav Jan 9, 2017
808d92e
done for travis 9
Rikislav Jan 9, 2017
90e4a46
done for travis 10
Rikislav Jan 9, 2017
e3dfeba
done for travis 11
Rikislav Jan 10, 2017
4248f35
done for travis 12
Rikislav Jan 10, 2017
9e11fcf
done for travis 13
Rikislav Jan 10, 2017
e85811f
done for travis 14
Rikislav Jan 10, 2017
aa99187
done for travis 15
Rikislav Jan 10, 2017
07fdaff
done for travis 16
Rikislav Jan 10, 2017
c5ca22e
created chordtable files
Rikislav Jan 11, 2017
7a73de6
new done for travis 1
Rikislav Jan 11, 2017
0e6e927
new done for travis 2
Rikislav Jan 13, 2017
82402bf
Update ChordTable.h
Rikislav Jan 14, 2017
804e10d
Update ChordTable.h
Rikislav Jan 14, 2017
56784f7
Update AutomatableSlider.h
Rikislav Jan 14, 2017
99f6691
Merge remote-tracking branch 'upstream/master' into temp
Rikislav Jan 14, 2017
441904c
Travis OK cleaning code
Rikislav Jan 14, 2017
f2b512a
Removed .debris folder
Rikislav Jan 14, 2017
b7f7035
some cleaning
Rikislav Jan 14, 2017
7682e69
deleted some old files
Rikislav Jan 14, 2017
5adee1c
set up buttons in instrumentfunctionviews
Rikislav Jan 14, 2017
d546c5f
win compile problems 1
Rikislav Jan 14, 2017
988f153
win compile problems 2
Rikislav Jan 14, 2017
e69acdf
win compile problems 3
Rikislav Jan 14, 2017
1058c6e
chordteble editor adjustsize
Rikislav Jan 15, 2017
296d99a
Merge remote-tracking branch 'upstream/master' into temp
Rikislav Jan 15, 2017
d34267b
ready 1
Rikislav Jan 15, 2017
088b378
ready 2
Rikislav Jan 15, 2017
da6a947
Merge remote-trackings branch 'upstream/master' into temp
Rikislav Jan 20, 2017
cac6a2c
Merge remote-tracking branch 'upstream/master' into temp
Rikislav Jan 21, 2017
1abee46
Merge remote-tracking branch 'upstream/master' into temp
Rikislav Jan 24, 2017
4c0af45
Merge remote-tracking branch 'upstream/master' into temp
Rikislav Jan 27, 2017
e6974b5
Added random key and panning function to ChordTable and CT Editor
Rikislav Jan 28, 2017
fc586ff
Merge remote-tracking branch 'upstream/master' into temp
Rikislav Jan 29, 2017
b7bc342
fixed loadchord in editor
Rikislav Jan 29, 2017
584ffbc
Merge remote-tracking branch 'upstream/master' into temp SERVER
Rikislav Jan 30, 2017
2b23179
gui info
Rikislav Feb 3, 2017
d55cb8d
Merge remote-tracking branch 'upstream/master' into temp
Rikislav Feb 5, 2017
9682c85
Merge remote-tracking branch 'upstream/master' into temp new merging
Rikislav Feb 7, 2017
f3fc56f
debug data deleted
Rikislav Feb 7, 2017
7248a2b
Merge remote-tracking branch 'upstream/master' into temp DESKTOP
Rikislav Feb 9, 2017
c947cb0
Merge remote-tracking branch 'upstream/master' into temp STATION
Rikislav Feb 11, 2017
3e590c7
Merge remote-tracking branch 'upstream/master' into temp SERVER
Rikislav Feb 21, 2017
b84973c
Adapted and merged to upstream master 18_3_2017
Rikislav Mar 18, 2017
953b906
03/04/2017 Merge remote-tracking branch 'upstream/master' into temp
Rikislav Apr 3, 2017
85173de
07_04_2017 Merge remote-tracking branch 'upstream/master' into temp
Rikislav Apr 7, 2017
1b79458
Merge remote-tracking branch 'upstream/master' into HEAD
Rikislav Apr 15, 2017
c1e41e6
Merge remote-tracking branch 'upstream/master' into HEAD
Rikislav Apr 19, 2017
5bfbdfb
Fix includes in chordtable editors
Rikislav Apr 23, 2017
88fe144
Merge remote-tracking branch 'upstream/master' into first
Rikislav Apr 30, 2017
c113be6
Merge remote-tracking branch 'upstream/master' into first
Rikislav May 1, 2017
fb983c0
Merge remote-tracking branch 'upstream/master' into first
Rikislav May 5, 2017
3d68707
Merge remote-tracking branch 'upstream/master' into first
Rikislav May 8, 2017
a7bf8a3
Merge remote-tracking branch 'upstream/master' into first
Rikislav May 11, 2017
6b68b23
Merge remote-tracking branch 'upstream/master' into first
Rikislav May 14, 2017
5668f1d
Merge remote-tracking branch 'upstream/master' into first
Rikislav May 18, 2017
c243faf
Merge remote-tracking branch 'upstream/master' into first
Rikislav Jun 5, 2017
da24af9
Merge remote-tracking branch 'upstream/master' into rikis-one
Rikislav Oct 1, 2017
7c8b6d3
Merge remote-tracking branch 'upstream/master' into rikis-one
Rikislav Oct 2, 2017
f59fb6b
Merge remote-tracking branch 'upstream/master' into rikis-one
Rikislav Oct 3, 2017
21383b0
Added RMidiController - working but autodetect controllerdialog failure
Rikislav Oct 7, 2017
454f422
Modified midicontroller and connectiondialog before deriving midicont…
Rikislav Oct 9, 2017
1da825f
Merge remote-tracking branch 'upstream/master' into rikis-one
Rikislav Oct 12, 2017
588f29a
Added CustomController - reversed previous changes. Working Midi
Rikislav Oct 12, 2017
2db12ca
Merge remote-tracking branch 'upstream/master' into rikis-one
Rikislav Oct 15, 2017
0b0f8e5
Merge remote-tracking branch 'upstream/master' into rikis-one
Rikislav Oct 19, 2017
cb9d838
Merge remote-tracking branch 'upstream/master' into rikis-one
Rikislav Oct 20, 2017
72c996a
Merge remote-tracking branch 'upstream/master' into rikis-one
Rikislav Oct 22, 2017
e3459d7
Merge remote-tracking branch 'upstream/master' into rikis-one
Rikislav Nov 1, 2017
a523290
Merge remote-tracking branch 'upstream/master' into rikis-one
Rikislav Nov 2, 2017
edc0f0e
Merge remote-tracking branch 'upstream/master' into rikis-one
Rikislav Nov 6, 2017
b980f84
Resolved merge conflicts
Rikislav Nov 29, 2017
e1f0107
Merge remote-tracking branch 'upstream/master' into rikis-one
Rikislav Dec 7, 2017
e3b0dae
Merge remote-tracking branch 'upstream/master' into rikis-one
Rikislav Dec 15, 2017
3b58b2d
rikis - melded mainwindow.cpp
Rikislav Dec 26, 2017
31b717f
sh path added to vstbase
Rikislav Dec 28, 2017
f9f3b02
fixed mainWindow - chordtableview problem in mainwindow.finalize
Rikislav Dec 31, 2017
934ab04
Merged Ustream/Master
Rikislav Jan 2, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion data/presets/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ INCLUDE(InstallHelpers)

INSTALL_DATA_SUBDIRS("presets" "*.xpf")
INSTALL_DATA_SUBDIRS("presets" "*.xiz")

INSTALL_DATA_SUBDIRS("presets" "*.ctd")
986 changes: 986 additions & 0 deletions data/presets/ChordTable/ChordTable.ctd

Large diffs are not rendered by default.

139 changes: 139 additions & 0 deletions data/presets/ChordTable/arpeggio.xpf

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion include/AutomatableSlider.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@



class AutomatableSlider : public QSlider, public IntModelView
class EXPORT AutomatableSlider : public QSlider, public IntModelView
{
Q_OBJECT
public:
Expand Down
238 changes: 238 additions & 0 deletions include/ChordTable.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,238 @@
/*
* ChordTable.h - The notestacking/arpeggio chord classes
*
* Copyright (c) 2004-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2016-2017 Riki Sluga <rikislav/at/gmail.com>
*
* This file is part of LMMS - http://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 CHORD_TABLE_H
#define CHORD_TABLE_H

#include <QStringList>

#include "ConfigManager.h"
#include "JournallingObject.h"
#include "AutomatableModel.h"

class Model;
class Chord;
class ChordTable;

//new constants for key notes in arpeggios, used by the Int Automated model
const int KeyMax = ( 0 + 30 );
const int KeyMin = -KeyMax;
const int KeyDefault = 0;


class EXPORT ChordSemiTone : public Model , public JournallingObject
{
Q_OBJECT
public:

// the semitone
IntModel * key;
FloatModel * vol;
FloatModel * pan;
// the note is played -> true: yes, false: skipped
//TO DO: has to be implemented yet
BoolModel * active;
// the note is processed but silenced -> true: normally played, false: muted
BoolModel * silenced;
// random: the note will be a random value within the abs(key) range
BoolModel * rand;
// The note only has the key value. True: bare, we will discard al the rest, taking data from the base note
BoolModel * bare;

//The semitone will always belong to a chord
ChordSemiTone( Chord * _parent );

//Creates a new semitone which gets data from the argument
ChordSemiTone( ChordSemiTone * _copy );

//constructs the object from a given string by calling the parseString function
ChordSemiTone( Chord * _parent, QString _string );

virtual ~ChordSemiTone();

//return the parent chord
Chord * getChord()
{
return qobject_cast< Chord * >( parent() );
}

//parses a string into data
void parseString( QString _string );

virtual void saveSettings( QDomDocument & _doc, QDomElement & _parent );
virtual void loadSettings( const QDomElement & _this );

inline virtual QString nodeName() const
{
return "chordSemiTone";
}
};

class EXPORT Chord : public Model, public JournallingObject, public QVector<ChordSemiTone * >
{
Q_OBJECT
public:
QString m_name;

//creates an empty chord
Chord( Model * _parent );

//creates a chord by parsing the semitone string
Chord( Model * _parent, QString _name, QString _string );

//creates a new Chord without semitones
Chord( Model * _parent, QString _name );

//Creates a copy of the chord, changing name too;
Chord( Chord * _copy, QString _name );

virtual ~Chord();

virtual void saveSettings( QDomDocument & _doc, QDomElement & _parent );
virtual void loadSettings( const QDomElement & _this );

inline virtual QString nodeName() const
{
return "Chord";
}

//TO DO : check for duplicate keys
bool isScale() const
{
return size() > 6;
}

bool isEmpty() const
{
return size() == 0;
}

bool hasSemiTone( int8_t semiTone ) const;

//returns the key of the last chordsemitone
int8_t last() const
{
if ( size() > 0 )
{
return at( size() - 1 )->key->value();
} else {
return 0;
}
}

const QString & getName() const
{
return m_name;
}

// returning the key
int8_t operator[]( int n ) const
{
return at( n )->key->value();
}

//Adds at the end a standard semitone
void addSemiTone();

//inserts the semitone in the stated position
void insertSemiTone( ChordSemiTone * csm, int position );

//deletes the semitone
void removeSemiTone( int i );

//parses the string into data by adding the Semitones to the vector after clearing it
void parseString( QString _string );
};



class EXPORT ChordTable : public Model, public JournallingObject, public QVector<Chord * >
{
Q_OBJECT
public:
ChordTable( Model * _parent );
virtual ~ChordTable() {}

virtual void saveSettings( QDomDocument & _doc, QDomElement & _parent );
virtual void loadSettings( const QDomElement & _this );

inline virtual QString nodeName() const
{
return "ChordTable";
}

//old function, not used in the new version which makes use of the available data functions.
bool readXML();

//loads the factory preset
void loadFactoryPreset();

//adds or clones a chord to the chord table. If -1 adds a chord else clones the given
void cloneChord( int i = -1 );

//removes the chord and emits the datachanged signal;
void removeChord( int i );


const Chord & getByName( const QString & name, bool is_scale = false ) const;

const Chord & getScaleByName( const QString & name ) const
{
return getByName( name, true );
}

const Chord & getChordByName( const QString & name ) const
{
return getByName( name, false );
}


//tricking compiler
//the compiler before qt5 treats signals as private
void emitChordTableChangedSignal()
{
emit chordTableChanged();
}

void emitChordNameChanged()
{
emit chordNameChanged();
}

public slots:

//reloads the chordtable from the file
void reset();

signals:

//emitted only when chord names are changed to reflect in other classes
void chordNameChanged();
//emitted when the chord table data has changed
void chordTableChanged();

};

#endif
15 changes: 15 additions & 0 deletions include/ControllerConnectionDialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#define CONTROLLER_CONNECTION_DIALOG_H

#include <QDialog>
#include <QLabel>
#include <QSortFilterProxyModel>
#include <QStandardItemModel>

Expand Down Expand Up @@ -69,6 +70,11 @@ public slots:
void autoDetectToggled();
void enableAutoDetect( QAction * _a );

//RIKIS
//Sets the label text in the midi dialog
void setLabelText();
//RIKIS


protected slots:
void midiValueChanged();
Expand All @@ -83,6 +89,15 @@ protected slots:
MidiPortMenu * m_readablePorts;
BoolModel m_midiAutoDetect;

//RIKIS
QLabel * m_ValueLabel;
QLabel * m_ControllerTypeLabel;
QLabel * m_KeyLabel;
QLabel * m_VelocityLabel;
QLabel * m_PitchLabel;
//RIKIS


// User
GroupBox * m_userGroupBox;
ComboBox * m_userController;
Expand Down
1 change: 1 addition & 0 deletions include/DataFile.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ class EXPORT DataFile : public QDomDocument
enum Types
{
UnknownType,
ChordTable,
SongProject,
SongProjectTemplate,
InstrumentTrackSettings,
Expand Down
9 changes: 9 additions & 0 deletions include/Engine.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class ProjectJournal;
class Mixer;
class Song;
class Ladspa2LMMS;
class ChordTable;


// Note: This class is called 'LmmsCore' instead of 'Engine' because of naming
Expand Down Expand Up @@ -111,6 +112,12 @@ class EXPORT LmmsCore : public QObject
return s_instanceOfMe;
}

static ChordTable * chordTable()
{
return s_chordTable;
}


signals:
void initProgress(const QString &msg);

Expand Down Expand Up @@ -138,6 +145,8 @@ class EXPORT LmmsCore : public QObject

static Ladspa2LMMS * s_ladspaManager;

static ChordTable * s_chordTable;

// even though most methods are static, an instance is needed for Qt slots/signals
static LmmsCore * s_instanceOfMe;

Expand Down
21 changes: 21 additions & 0 deletions include/GuiApplication.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include <QtCore/QObject>

#include "export.h"
#include "PluginView.h"

class QLabel;

Expand Down Expand Up @@ -58,6 +59,23 @@ class EXPORT GuiApplication : public QObject
AutomationEditorWindow* automationEditor() { return m_automationEditor; }
ControllerRackView* getControllerRackView() { return m_controllerRackView; }

//As at present the editor is a toolPlugin we initiate it
//while loading in gui/MainWindow.cpp:368
void setChordTableEditorView( PluginView * _view );

PluginView* getChordTableEditorView() { return m_chordTableEditorView; }

//the convenience method which emits the signal below
void emitGenericSignal_1(int i)
{
emit genericSignal_1( i );
}

signals:
//lazy workaround for easy communication
void genericSignal_1( int i );


public slots:
void displayInitProgress(const QString &msg);

Expand All @@ -67,6 +85,9 @@ private slots:
private:
static GuiApplication* s_instance;

//will be initialized by MainWindow.finalize - tools menu section
PluginView* m_chordTableEditorView;

MainWindow* m_mainWindow;
FxMixerView* m_fxMixerView;
SongEditorWindow* m_songEditor;
Expand Down
6 changes: 6 additions & 0 deletions include/InstrumentFunctionViews.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ class InstrumentFunctionNoteStackingView : public QWidget, public ModelView
InstrumentFunctionNoteStackingView( InstrumentFunctionNoteStacking* cc, QWidget* parent = NULL );
virtual ~InstrumentFunctionNoteStackingView();

public slots:
//To display the chordTableEditorPlugin
void showChordTableEditor();

private:
virtual void modelChanged();
Expand All @@ -70,6 +73,9 @@ class InstrumentFunctionArpeggioView : public QWidget, public ModelView
InstrumentFunctionArpeggioView( InstrumentFunctionArpeggio* arp, QWidget* parent = NULL );
virtual ~InstrumentFunctionArpeggioView();

public slots:
//To display the chordTableEditorPlugin
void showChordTableEditor();

private:
virtual void modelChanged();
Expand Down
Loading