Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
5e74e3c
Removed the first record button from the Song Editor
steven-jaro May 20, 2025
6cbd25f
Removed commented lines in SongEditor
steven-jaro May 20, 2025
621e69b
Fixed regulus request about inverted bool name and removed an unneces…
steven-jaro May 22, 2025
73d5293
Modified editor buttons construction logic
steven-jaro May 22, 2025
2915379
Fixed recordAccompany as false by default
steven-jaro May 22, 2025
21fece4
Fixed szeli1 request for consisten documentation
steven-jaro May 25, 2025
b981b53
Fixed too much comments and implementation of a lambda to simplify th…
steven-jaro May 26, 2025
036f4b4
Fixed use of new function for all buttons and step_record to recordStep
steven-jaro May 29, 2025
14eb1de
Fixed 4 tab size instead of 4 spaces
steven-jaro May 30, 2025
0ccb8ff
Update Song.h
steven-jaro May 30, 2025
1bfa2a6
Update Song.h
steven-jaro May 30, 2025
c1b4178
Update Song.cpp
steven-jaro Jun 2, 2025
2f5416b
Merge branch 'feature/recording-stage-one' into feature/recording-sta…
steven-jaro Sep 3, 2025
bf0a44f
Removed the first record button from the Song Editor
steven-jaro May 20, 2025
415dd40
Removed commented lines in SongEditor
steven-jaro May 20, 2025
65dfab6
Fixed regulus request about inverted bool name and removed an unneces…
steven-jaro May 22, 2025
094d31f
Modified editor buttons construction logic
steven-jaro May 22, 2025
614be09
Fixed recordAccompany as false by default
steven-jaro May 22, 2025
0c1e2f5
Fixed szeli1 request for consisten documentation
steven-jaro May 25, 2025
6dd45e0
Fixed too much comments and implementation of a lambda to simplify th…
steven-jaro May 26, 2025
f7e787c
Fixed use of new function for all buttons and step_record to recordStep
steven-jaro May 29, 2025
b277794
Fixed 4 tab size instead of 4 spaces
steven-jaro May 30, 2025
db68986
Update Song.h
steven-jaro May 30, 2025
7f8ddb6
Update Song.h
steven-jaro May 30, 2025
e903b5a
Update Song.cpp
steven-jaro Jun 2, 2025
aafedd7
fixed spaces into tabs
steven-jaro Nov 22, 2025
62f5365
Fixed conflicts with new changes
steven-jaro Nov 22, 2025
8051313
Merge branch 'feature/recording-stage-one' of https://github.com/stev…
steven-jaro Nov 22, 2025
6e02059
Showed record accompany into patterneditor and removed whitespaces
steven-jaro Nov 23, 2025
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 include/Editor.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ private slots:
///
/// \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);
Editor(bool record = false, bool recordAccompany = false, bool recordStep = false);
~Editor() override = default;


Expand Down
5 changes: 2 additions & 3 deletions include/Song.h
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ class LMMS_EXPORT Song : public TrackContainer
m_loopRenderCount = count;
m_loopRenderRemaining = m_loopRenderCount;
}

inline int getLoopRenderCount() const
{
return m_loopRenderCount;
Expand Down Expand Up @@ -381,7 +381,6 @@ class LMMS_EXPORT Song : public TrackContainer

public slots:
void playSong();
void record();
void playAndRecord();
void playPattern();
void playMidiClip( const lmms::MidiClip * midiClipToPlay, bool loop = true );
Expand Down Expand Up @@ -505,7 +504,7 @@ private slots:
bar_t m_elapsedBars;

VstSyncController m_vstSyncController;

int m_loopRenderCount;
int m_loopRenderRemaining;
TimePos m_exportSongBegin;
Expand Down
1 change: 0 additions & 1 deletion include/SongEditor.h
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,6 @@ class SongEditorWindow : public Editor

protected slots:
void play() override;
void record() override;
void recordAccompany() override;
void stop() override;

Expand Down
13 changes: 2 additions & 11 deletions src/core/Song.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ bool Song::isExportDone() const
int Song::getExportProgress() const
{
TimePos pos = getPlayPos();

if (pos >= m_exportSongEnd)
{
return 100;
Expand Down Expand Up @@ -507,14 +507,6 @@ void Song::playSong()



void Song::record()
{
m_recording = true;
// TODO: Implement
}




void Song::playAndRecord()
{
Expand Down Expand Up @@ -741,7 +733,6 @@ void Song::startExport()
else
{
m_exportSongEnd = TimePos(m_length, 0);

// Handle potentially ridiculous loop points gracefully.
if (m_loopRenderCount > 1 && timeline.loopEnd() > m_exportSongEnd)
{
Expand All @@ -750,7 +741,7 @@ void Song::startExport()

if (!m_exportLoop)
m_exportSongEnd += TimePos(1,0);

m_exportSongBegin = TimePos(0,0);
m_exportLoopBegin = timeline.loopBegin() < m_exportSongEnd && timeline.loopEnd() <= m_exportSongEnd
? timeline.loopBegin()
Expand Down
54 changes: 25 additions & 29 deletions src/gui/editors/Editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ void Editor::toggleMaximize()
isMaximized() ? showNormal() : showMaximized();
}

Editor::Editor(bool record, bool stepRecord) :
Editor::Editor(bool record, bool recordAccompany, bool recordStep) :
m_toolBar(new DropToolBar(this)),
m_playAction(nullptr),
m_recordAction(nullptr),
Expand All @@ -99,40 +99,36 @@ Editor::Editor(bool record, bool stepRecord) :
{
m_toolBar = addDropToolBarToTop(tr("Transport controls"));

auto addButton = [this](QAction* action, QString objectName) {
m_toolBar->addAction(action);
m_toolBar->widgetForAction(action)->setObjectName(objectName);
auto createButton = [this](
QAction*& targetAction,
const char* iconName,
const QString& text,
const char* slot,
const QString& objectName,
bool condition = true
) {
if (condition) {
targetAction = new QAction(embed::getIconPixmap(iconName), text, this);
connect(targetAction, SIGNAL(triggered()), this, slot);
m_toolBar->addAction(targetAction);
m_toolBar->widgetForAction(targetAction)->setObjectName(objectName);
}
};

// Set up play and record actions
m_playAction = new QAction(embed::getIconPixmap("play"), tr("Play (Space)"), this);
m_stopAction = new QAction(embed::getIconPixmap("stop"), tr("Stop (Space)"), this);
// Play action setup
createButton(m_playAction, "play", tr("Play (Space)"), SLOT(play()), "playButton");

m_recordAction = new QAction(embed::getIconPixmap("record"), tr("Record"), this);
m_recordAccompanyAction = new QAction(embed::getIconPixmap("record_accompany"), tr("Record while playing"), this);
m_toggleStepRecordingAction = new QAction(embed::getIconPixmap("record_step_off"), tr("Toggle Step Recording"), this);
// Conditional buttons setup
createButton(m_recordAction, "record", tr("Record"), SLOT(record()), "recordButton", record);
createButton(m_recordAccompanyAction, "record_accompany", tr("Record while playing"), SLOT(recordAccompany()), "recordAccompanyButton", recordAccompany);
createButton(m_toggleStepRecordingAction, "record_step_off", tr("Toggle Step Recording"), SLOT(toggleStepRecording()), "stepRecordButton", recordStep);

// Set up connections
connect(m_playAction, SIGNAL(triggered()), this, SLOT(play()));
connect(m_recordAction, SIGNAL(triggered()), this, SLOT(record()));
connect(m_recordAccompanyAction, SIGNAL(triggered()), this, SLOT(recordAccompany()));
connect(m_toggleStepRecordingAction, SIGNAL(triggered()), this, SLOT(toggleStepRecording()));
connect(m_stopAction, SIGNAL(triggered()), this, SLOT(stop()));
// Stop action setup
createButton(m_stopAction, "stop", tr("Stop (Space)"), SLOT(stop()), "stopButton");

// Setup shortcuts for actions
new QShortcut(QKeySequence(combine(Qt::SHIFT, Qt::Key_Space)), this, SLOT(togglePause()));
new QShortcut(QKeySequence(combine(Qt::SHIFT, Qt::Key_F11)), this, SLOT(toggleMaximize()));

// Add actions to toolbar
addButton(m_playAction, "playButton");
if (record)
{
addButton(m_recordAction, "recordButton");
addButton(m_recordAccompanyAction, "recordAccompanyButton");
}
if(stepRecord)
{
addButton(m_toggleStepRecordingAction, "stepRecordButton");
}
addButton(m_stopAction, "stopButton");
}

QAction *Editor::playAction() const
Expand Down
2 changes: 1 addition & 1 deletion src/gui/editors/PatternEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ void PatternEditor::cloneClip()


PatternEditorWindow::PatternEditorWindow(PatternStore* ps) :
Editor(false),
Editor(false, true, false),
m_editor(new PatternEditor(ps))
{
setWindowIcon(embed::getIconPixmap("pattern_track_btn"));
Expand Down
2 changes: 1 addition & 1 deletion src/gui/editors/PianoRoll.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4941,7 +4941,7 @@ void PianoRoll::changeSnapMode()
}

PianoRollWindow::PianoRollWindow() :
Editor(true, true),
Editor(true, true, true),
m_editor(new PianoRoll())
{
setCentralWidget( m_editor );
Expand Down
15 changes: 2 additions & 13 deletions src/gui/editors/SongEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -914,7 +914,7 @@ ComboBoxModel *SongEditor::snappingModel() const


SongEditorWindow::SongEditorWindow(Song* song) :
Editor(true, false),
Editor(false, true, false),
m_editor(new SongEditor(song)),
m_crtlAction( nullptr ),
m_snapSizeLabel( new QLabel( m_toolBar ) )
Expand All @@ -930,7 +930,6 @@ SongEditorWindow::SongEditorWindow(Song* song) :

// Set up buttons
m_playAction->setToolTip(tr("Play song (Space)"));
m_recordAction->setToolTip(tr("Record samples from Audio-device"));
m_recordAccompanyAction->setToolTip(tr("Record samples from Audio-device while playing song or pattern track"));
m_stopAction->setToolTip(tr( "Stop song (Space)" ));

Expand Down Expand Up @@ -1036,11 +1035,7 @@ SongEditorWindow::SongEditorWindow(Song* song) :
// disable the record buttons.
if (!Engine::audioEngine()->captureDeviceAvailable())
{
for (auto &recordAction : {m_recordAccompanyAction, m_recordAction})
{
recordAction->setEnabled(false);
recordAction->setToolTip(tr("Recording is unavailable: try connecting an input device or switching backend"));
}
m_recordAccompanyAction->setToolTip(tr("Recording is unavailable: try connecting an input device or switching backend"));
}
}

Expand Down Expand Up @@ -1102,12 +1097,6 @@ void SongEditorWindow::play()
}


void SongEditorWindow::record()
{
m_editor->m_song->record();
}




void SongEditorWindow::recordAccompany()
Expand Down
Loading