29#include <QUndoCommand>
57 setText( QObject::tr(
"Toggle Pattern ( %1, %2 )" ).arg( nColumn ).arg( nRow ) );
77 setText( QObject::tr(
"Move pattern list item ( %1, %2 )" ).arg( nSourcePattern ).arg( nTargetPattern ) );
104 setText( QObject::tr(
"Delete complete pattern-sequence" ) );
129 QString sSequenceFilename,
130 int nPatternPosition ){
131 setText( QObject::tr(
"Delete pattern from list" ) );
156 SE_modifyPatternPropertiesAction( QString oldPatternName ,QString oldPatternInfo, QString oldPatternCategory, QString newPatternName , QString newPatternInfo, QString newPatternCategory,
int patternNr ){
157 setText( QObject::tr(
"Modify pattern properties" ) );
196 setText( QObject::tr(
"Duplicate pattern" ) );
218 setText( QObject::tr(
"Add pattern" ) );
244 QString sSequenceFilename,
int nPatternPosition,
246 setText( QObject::tr(
"Load/drag pattern" ) );
286 setText( QObject::tr(
"Fill/remove range of pattern" ) );
333 std::vector< QPoint > & mergeCells, QString sText ) {
346 std::vector< QPoint > selectCells;
365 setText( QObject::tr(
"Edit tempo marker" ) );
378 pCoreActionController->deleteTempoMarker(
m_nNewColumn );
380 pSongEditorPositionRuler->createBackground();
388 pSongEditorPositionRuler->createBackground();
403 setText( QObject::tr(
"Delete tempo marker" ) );
411 pSongEditorPositionRuler->createBackground();
418 pSongEditorPositionRuler->createBackground();
430 setText( QObject::tr(
"Edit timeline tag" ) );
469 int selectedPatternNumber,
480 bool isInstrumentMode,
484 setText( QObject::tr(
"Delete note ( %1, %2)" ).arg( nColumn ).arg( nRow ) );
486 setText( QObject::tr(
"Add note ( %1, %2)" ).arg( nColumn ).arg( nRow ) );
569 double fNewDenominator,
double fOldDenominator,
570 int nSelectedPatternNumber ) {
571 setText( QObject::tr(
"Altering the length of the current pattern" ) );
605 setText( QObject::tr(
"Overwrite %1 notes" ).arg( overwritten.size() ) );
606 for (
auto pNote : selected ) {
609 for (
auto pNote : overwritten ) {
642 SE_moveNoteAction(
int nOldPosition,
int nOldInstrument,
int nPattern,
int nNewPosition,
int nNewInstrument,
686 int nOldLength,
int nSelectedPatternNumber,
687 int nSelectedInstrumentNumber,
689 setText( QObject::tr(
"Change note length" ) );
738 int nSelectedPatternNumber,
739 int nSelectedInstrumentNumber,
749 float fOldProbability ){
750 setText( QObject::tr(
"Change note properties piano roll" )
751 .append( QString(
": [%1" )
829 setText( QObject::tr(
"Clear notes" ) );
831 std::list < H2Core::Note *>::iterator pos;
832 for ( pos = noteList.begin(); pos != noteList.end(); ++pos){
877 setText( QObject::tr(
"Paste instrument notes" ) );
879 std::list < H2Core::Pattern *>::const_iterator pos;
880 for ( pos = patternList.begin(); pos != patternList.end(); ++pos)
928 setText( QObject::tr(
"Fill notes" ) );
957 setText( QObject::tr(
"Random velocity" ) );
989 setText( QObject::tr(
"Move instrument" ) );
1015 setText( QObject::tr(
"Drop instrument" ) );
1054 setText( QObject::tr(
"Delete instrument " ) );
1056 std::list < H2Core::Note *>::iterator pos;
1057 for ( pos = noteList.begin(); pos != noteList.end(); ++pos){
1104 setText( QObject::tr(
"Drop instrument" ) );
1132 int selectedPatternNumber,
1133 int nSelectedInstrumentnumber,
1139 int oldOctaveKeyVal,
1142 setText( QObject::tr(
"Add piano roll note ( %1, %2 )" ).arg( nColumn ).arg( pressedLine ) );
1213 setText( QObject::tr(
"Add piano roll NOTE_OFF note ( %1, %2 )" ).arg( nColumn ).arg( pressedLine ) );
1223 h2app->
getPatternEditorPanel()->
getPianoRollEditor()->
addOrDeleteNoteAction(
__nColumn,
__pressedLine,
__selectedPatternNumber,
__nSelectedInstrumentnumber, -1, 0.8f, 0.f, 0.0, 0, 0 , 1.0f,
true,
true );
1229 h2app->
getPatternEditorPanel()->
getPianoRollEditor()->
addOrDeleteNoteAction(
__nColumn,
__pressedLine,
__selectedPatternNumber,
__nSelectedInstrumentnumber, -1, 0.8f, 0.f, 0.0, 0, 0, 1.0f,
true,
false );
1299 int nSelectedPatternNumber,
1300 int nSelectedInstrument,
1308 float oldProbability,
1312 int oldOctaveKeyVal)
1314 setText( QObject::tr(
"Edit note property %1" )
1397 setText( QObject::tr(
"Add point" ) );
1431 setText( QObject::tr(
"Remove point" ) );
1465 setText( QObject::tr(
"Move point" ) );
void functionClearNotesUndoAction(std::list< H2Core::Note * > noteList, int nSelectedInstrument, int patternNumber)
void functionRandomVelocityAction(QStringList noteVeloValue, int nSelectedInstrument, int selectedPatternNumber)
void functionDropInstrumentUndoAction(int nTargetInstrument, std::vector< int > *AddedComponents)
void functionAddEmptyInstrumentUndo()
void functionMoveInstrumentAction(int nSourceInstrument, int nTargetInstrument)
void functionAddEmptyInstrumentRedo()
void moveNoteAction(int nColumn, int nRow, int nPattern, int nNewColumn, int nNewRow, H2Core::Note *note)
void functionFillNotesRedoAction(QStringList noteList, int nSelectedInstrument, int patternNumber)
void addOrDeleteNoteAction(int nColumn, int row, int selectedPatternNumber, int oldLength, float oldVelocity, float fOldPan, float oldLeadLag, int oldNoteKeyVal, int oldOctaveKeyVal, float probability, bool listen, bool isMidi, bool isInstrumentMode, bool isNoteOff, bool isDelete)
void functionFillNotesUndoAction(QStringList noteList, int nSelectedInstrument, int patternNumber)
void undoRedoAction(int column, NotePropertiesRuler::Mode mode, int nSelectedPatternNumber, int nSelectedInstrument, float velocity, float pan, float leadLag, float probability, int noteKeyVal, int octaveKeyVal)
NotePropertiesRuler undo redo action.
void functionPasteNotesUndoAction(std::list< H2Core::Pattern * > &appliedList)
void functionClearNotesRedoAction(int nSelectedInstrument, int selectedPatternNumber)
========================================================== undo / redo actions from pattern editor in...
void functionDeleteInstrumentUndoAction(std::list< H2Core::Note * > noteList, int nSelectedInstrument, QString instrumentName, QString drumkitName)
void functionPasteNotesRedoAction(std::list< H2Core::Pattern * > &changeList, std::list< H2Core::Pattern * > &appliedList)
void functionDropInstrumentRedoAction(QString sDrumkitPath, QString sInstrumentName, int nTargetInstrument, std::vector< int > *pAddedComponents)
void remove_point(float x)
Remove point from path.
void add_point(float x, float y)
Add a point to path.
bool setPattern(Pattern *pPattern, int nPatternNumber)
Opens a pattern to the current pattern list.
bool addTag(int nPosition, const QString &sText)
Adds a tag to the Timeline.
bool deleteTempoMarker(int nPosition)
Delete a tempo marker from the Timeline.
bool toggleGridCell(int nColumn, int nRow)
Fills or clears a specific grid cell in the SongEditor.
bool removePattern(int nPatternNumber)
Removes a pattern from the pattern list.
bool addTempoMarker(int nPosition, float fBpm)
Adds a tempo marker to the Timeline.
bool openPattern(const QString &sPath, int nPatternNumber=-1)
Opens a pattern from disk and adds it to the pattern list.
static Hydrogen * get_instance()
Returns the current Hydrogen instance __instance.
CoreActionController * getCoreActionController() const
A note plays an associated instrument with a velocity left and right pan.
Pattern class is a Note container.
static HydrogenApp * get_instance()
Returns the instance of HydrogenApp class.
PatternEditorPanel * getPatternEditorPanel()
SongEditorPanel * getSongEditorPanel()
PianoRollEditor * getPianoRollEditor()
DrumPatternEditor * getDrumPatternEditor()
void patternSizeChangedAction(int nLength, double fDenominator, int nSelectedPatternNumber)
static QString modeToQString(Mode mode)
void editNoteLengthAction(int nColumn, int nRealColumn, int nRow, int nLength, int nSelectedPatternNumber, int nSelectedInstrumentnumber, Editor editor)
void deselectAndOverwriteNotes(std::vector< H2Core::Note * > &selected, std::vector< H2Core::Note * > &overwritten)
Deselect some notes, and "overwrite" some others.
void undoDeselectAndOverwriteNotes(std::vector< H2Core::Note * > &selected, std::vector< H2Core::Note * > &overwritten)
void moveNoteAction(int nColumn, H2Core::Note::Octave octave, H2Core::Note::Key key, int nPattern, int nNewColumn, H2Core::Note::Octave newOctave, H2Core::Note::Key newKey, H2Core::Note *pNote)
void addOrDeleteNoteAction(int nColumn, int pressedLine, int selectedPatternNumber, int selectedinstrument, int oldLength, float oldVelocity, float fOldPan, float oldLeadLag, int oldNoteKeyVal, int oldOctaveKeyVal, float fProbability, bool noteOff, bool isDelete)
int __selectedPatternNumber
SE_addOrDeleteNoteAction(int nColumn, int nRow, int selectedPatternNumber, int oldLength, float oldVelocity, float fOldPan, float oldLeadLag, int oldNoteKeyVal, int oldOctaveKeyVal, float probability, bool isDelete, bool listen, bool isMidi, bool isInstrumentMode, bool isNoteOff)
int __nSelectedInstrumentnumber
SE_addOrDeleteNotePianoRollAction(int nColumn, int pressedLine, int selectedPatternNumber, int nSelectedInstrumentnumber, int oldLength, float oldVelocity, float fOldPan, float oldLeadLag, int oldNoteKeyVal, int oldOctaveKeyVal, float fProbability, bool isDelete)
int __selectedPatternNumber
int __nSelectedInstrumentnumber
SE_addPianoRollNoteOffAction(int nColumn, int pressedLine, int selectedPatternNumber, int nSelectedInstrumentnumber)
int __selectedPatternNumber
H2Core::AutomationPath * __path
SE_automationPathAddPointAction(H2Core::AutomationPath *path, float x, float y)
SE_automationPathMovePointAction(H2Core::AutomationPath *path, float ox, float oy, float tx, float ty)
H2Core::AutomationPath * __path
H2Core::AutomationPath * __path
SE_automationPathRemovePointAction(H2Core::AutomationPath *path, float x, float y)
int __nSelectedInstrument
std::list< H2Core::Note * > __noteList
~SE_clearNotesPatternEditorAction()
SE_clearNotesPatternEditorAction(std::list< H2Core::Note * > noteList, int nSelectedInstrument, int selectedPatternNumber)
int __selectedPatternNumber
~SE_deleteInstrumentAction()
int __nSelectedInstrument
std::list< H2Core::Note * > __noteList
SE_deleteInstrumentAction(std::list< H2Core::Note * > noteList, QString sDrumkitPath, QString sInstrumentName, int nSelectedInstrument)
QString m_sSequenceFilename
SE_deletePatternFromListAction(QString sPatternFilename, QString sSequenceFilename, int nPatternPosition)
QString m_sPatternFilename
SE_deletePatternSequenceAction(QString pFilename)
SE_deleteTimelineAction(int nColumn, float fBpm)
std::vector< H2Core::Note * > m_selected
~SE_deselectAndOverwriteNotesAction()
SE_deselectAndOverwriteNotesAction(std::vector< H2Core::Note * > &selected, std::vector< H2Core::Note * > &overwritten)
std::vector< H2Core::Note * > m_overwritten
std::vector< int > * __addedComponents
~SE_dragInstrumentAction()
QString __sInstrumentName
SE_dragInstrumentAction(QString sDrumkitPath, QString sInstrumentName, int nTargetInstrument)
SE_duplicatePatternAction(QString patternFilename, int patternPosition)
QString m_sPatternFilename
PatternEditor::Editor m_editor
int m_nSelectedPatternNumber
SE_editNoteLengthAction(int nColumn, int nRealColumn, int nRow, int nLength, int nOldLength, int nSelectedPatternNumber, int nSelectedInstrumentNumber, PatternEditor::Editor editor)
int m_nSelectedInstrumentNumber
PatternEditor::Editor m_editor
int m_nSelectedPatternNumber
int m_nSelectedInstrumentNumber
SE_editNotePropertiesAction(int nColumn, int nRealColumn, int nRow, int nSelectedPatternNumber, int nSelectedInstrumentNumber, PatternEditor::Mode mode, PatternEditor::Editor editor, float fVelocity, float fOldVelocity, float fPan, float fOldPan, float fLeadLag, float fOldLeadLag, float fProbability, float fOldProbability)
PatternEditor::Mode m_mode
int __nSelectedPatternNumber
int __nSelectedInstrument
SE_editNotePropertiesVolumeAction(int undoColumn, NotePropertiesRuler::Mode mode, int nSelectedPatternNumber, int nSelectedInstrument, float velocity, float oldVelocity, float pan, float oldPan, float leadLag, float oldLeadLag, float probability, float oldProbability, int noteKeyVal, int oldNoteKeyVal, int octaveKeyVal, int oldOctaveKeyVal)
NotePropertiesRuler::Mode __mode
SE_editTagAction(const QString &sText, const QString &sOldText, int nPosition)
bool m_bTempoMarkerPresent
SE_editTimelineAction(int nOldColumn, int nNewColumn, float fOldBpm, float fNewBpm, bool bTempoMarkerPresent)
int __nSelectedInstrument
SE_fillNotesRightClickAction(QStringList notePositions, int nSelectedInstrument, int selectedPatternNumber)
QStringList __notePositions
int __selectedPatternNumber
SE_fillRangePatternAction(FillRange *pRange, int nPattern)
~SE_insertPatternAction()
H2Core::Pattern * m_pNewPattern
SE_insertPatternAction(int patternPosition, H2Core::Pattern *pPattern)
QString m_sOldPatternName
SE_loadPatternAction(QString sPatternName, QString sOldPatternName, QString sSequenceFilename, int nPatternPosition, bool bDragFromList)
QString m_sSequenceFilename
SE_mainMenuAddInstrumentAction()
std::vector< QPoint > m_mergeCells
SE_modifyPatternCellsAction(std::vector< QPoint > &addCells, std::vector< QPoint > &deleteCells, std::vector< QPoint > &mergeCells, QString sText)
std::vector< QPoint > m_deleteCells
std::vector< QPoint > m_addCells
QString __newPatternCategory
QString __oldPatternCategory
SE_modifyPatternPropertiesAction(QString oldPatternName, QString oldPatternInfo, QString oldPatternCategory, QString newPatternName, QString newPatternInfo, QString newPatternCategory, int patternNr)
SE_moveInstrumentAction(int nSourceInstrument, int nTargetInstrument)
SE_moveNoteAction(int nOldPosition, int nOldInstrument, int nPattern, int nNewPosition, int nNewInstrument, H2Core::Note *pNote)
H2Core::Note::Key m_newKey
SE_moveNotePianoRollAction(int nOldPosition, H2Core::Note::Octave oldOctave, H2Core::Note::Key oldKey, int nPattern, int nNewPosition, H2Core::Note::Octave newOctave, H2Core::Note::Key newKey, H2Core::Note *pNote)
H2Core::Note::Octave m_oldOctave
H2Core::Note::Key m_oldKey
H2Core::Note::Octave m_newOctave
~SE_moveNotePianoRollAction()
SE_movePatternListItemAction(int nSourcePattern, int nTargetPattern)
~SE_pasteNotesPatternEditorAction()
std::list< H2Core::Pattern * > __patternList
SE_pasteNotesPatternEditorAction(const std::list< H2Core::Pattern * > &patternList)
std::list< H2Core::Pattern * > __appliedList
int m_nSelectedPatternNumber
SE_patternSizeChangedAction(int nNewLength, int nOldLength, double fNewDenominator, double fOldDenominator, int nSelectedPatternNumber)
QStringList __noteVeloValue
int __nSelectedInstrument
SE_randomVelocityRightClickAction(QStringList noteVeloValue, QStringList oldNoteVeloValue, int nSelectedInstrument, int selectedPatternNumber)
int __selectedPatternNumber
QStringList __oldNoteVeloValue
SE_togglePatternAction(int nColumn, int nRow)
SongEditorPositionRuler * getSongEditorPositionRuler() const
void restoreGroupVector(QString filename)
SongEditor * getSongEditor() const
SongEditorPatternList * getSongEditorPatternList() const
AutomationPathView * getAutomationPathView() const
void fillRangeWithPattern(FillRange *r, int nPattern)
void movePatternLine(int, int)
void acceptPatternPropertiesDialogSettings(QString newPatternName, QString newPatternInfo, QString newPatternCategory, int patternNr)
void revertPatternPropertiesDialogSettings(QString oldPatternName, QString oldPatternInfo, QString oldPatternCategory, int patternNr)
void modifyPatternCellsAction(std::vector< QPoint > &addCells, std::vector< QPoint > &deleteCells, std::vector< QPoint > &selectCells)
Modify many pattern cells at once, for use in a single efficient undo/redo action.
void clearThePatternSequenceVector(QString filename)