Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/progwolff/performer
Browse files Browse the repository at this point in the history
  • Loading branch information
Julian Wolff authored and Julian Wolff committed Jan 8, 2017
2 parents 9b7d142 + 55b34c9 commit 41bc344
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 8 deletions.
Binary file modified .screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ Live performance audio session manager using [Carla](https://github.com/falktx/C
Performer lets you manage all the songs in your setlist as individual carla patches and loads each of them when you need it.
Additionally Performer uses [Okular](https://github.com/KDE/okular) or QWebEngine to display notes and chords of your songs.

## Features
* Loads carla patches for songs and connects them when they are active
* Displays notes or chords for songs
* Detects crashed instances of Carla or the Jack server and restarts them
* MIDI controllable
* Qt style selectable

## Dependencies
* Carla
* python
Expand Down
1 change: 1 addition & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ if(WITH_TESTS)
option(BUILD_TESTING "Build the testing tree." ON)
add_subdirectory(tests)
if (EXISTS ${CATCH_INCLUDE_DIR}/catch.hpp)
add_definitions( -Wall -O2 -fexceptions )
include_directories(${CATCH_INCLUDE_DIR} ${COMMON_INCLUDES})
enable_testing()
add_executable(test_performer tests.cpp ${PERFORMER_SRCS} ${PERFORMER_UI})
Expand Down
9 changes: 6 additions & 3 deletions src/carlapatchbackend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -465,10 +465,13 @@ void CarlaPatchBackend::preload()
}


QStringList env = QProcess::systemEnvironment();
env << "CARLA_DONT_MANAGE_CONNECTIONS=1";
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
env.insert("CARLA_DONT_MANAGE_CONNECTIONS","1");
QFileInfo fileinfo(patchfile);
qDebug() << "baseName" << fileinfo.baseName();
env.insert("CARLA_CLIENT_NAME","Carla-"+fileinfo.baseName());
execLock.lockForWrite();
exec->setEnvironment(env);
exec->setProcessEnvironment(env);
execLock.unlock();

std::function<void()> exithandler = [this]()
Expand Down
15 changes: 10 additions & 5 deletions src/performer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ Performer::Performer(QWidget *parent) :

connect(model, SIGNAL(error(const QString&)), this, SLOT(error(const QString&)));
connect(model, SIGNAL(info(const QString&)), this, SLOT(info(const QString&)));

connect(model, &SetlistModel::rowsAboutToBeInserted, this, [this](){oldindex = QModelIndex();});

loadConfig();

Expand Down Expand Up @@ -220,7 +220,8 @@ void Performer::prefer()
m_setlist->setListView->model()->dropMimeData(NULL, Qt::DropAction(), index.row()-1, index.column(), index.parent());
m_setlist->setListView->model()->removeRows(index.row(), 1, index.parent());
index = m_setlist->setListView->model()->index(index.row()-1, index.column());
m_setlist->setListView->setCurrentIndex(index);
oldindex = QModelIndex();
songSelected(index);
}

void Performer::defer()
Expand All @@ -231,7 +232,8 @@ void Performer::defer()
m_setlist->setListView->model()->dropMimeData(NULL, Qt::DropAction(), index.row()+2, index.column(), index.parent());
m_setlist->setListView->model()->removeRows(index.row(), 1, index.parent());
index = m_setlist->setListView->model()->index(index.row()+1, index.column());
m_setlist->setListView->setCurrentIndex(index);
oldindex = QModelIndex();
songSelected(index);
}

void Performer::remove()
Expand All @@ -241,7 +243,11 @@ void Performer::remove()
return;
m_setlist->setListView->model()->removeRow(index.row());
m_setlist->setListView->clearSelection();
m_setlist->setListView->setCurrentIndex(QModelIndex());
oldindex = QModelIndex();
if(model->index(index.row(),0).isValid())
songSelected(model->index(0,index.row()));
else if(model->index(0,0).isValid())
songSelected(model->index(0,0));
//emit saveconfig();
}

Expand Down Expand Up @@ -353,7 +359,6 @@ void Performer::songSelected(const QModelIndex& index)
if(!ind.isValid())
return;

static QModelIndex oldindex;
m_setlist->setListView->setCurrentIndex(oldindex);
updateSelected();
m_setlist->setListView->setCurrentIndex(index);
Expand Down
2 changes: 2 additions & 0 deletions src/performer.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@ private slots:
bool hideBackend;
bool showMIDI;

QModelIndex oldindex;

#ifndef WITH_KF5
QToolBar* toolBar();
#endif
Expand Down

0 comments on commit 41bc344

Please sign in to comment.