Add "Assign to FX Channel" context button to track
This commit is contained in:
1 parent
db2e7febf7
commit
2eb420cb92
22 files changed
+202
-6
No files matched your search
@@ -7930,6 +7930,14 @@ Latència: %2 ms</translation>
|
||||
<source>Clear this track</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Assign to new FX Channel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>FX %1: %2</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Turn all recording on</source>
|
||||
<translation type="unfinished"></translation>
|
||||
|
||||
@@ -7932,6 +7932,14 @@ Zpoždění %2 ms</translation>
|
||||
<source>Clear this track</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Assign to new FX Channel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>FX %1: %2</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Turn all recording on</source>
|
||||
<translation type="unfinished"></translation>
|
||||
|
||||
@@ -8177,6 +8177,14 @@ Latenz: %2 ms</translation>
|
||||
<source>Clear this track</source>
|
||||
<translation>Diese Spur leeren</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Assign to new FX Channel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>FX %1: %2</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>vestigeInstrument</name>
|
||||
|
||||
@@ -7969,6 +7969,14 @@ Latency: %2 ms</source>
|
||||
<source>Clear this track</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Assign to new FX Channel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>FX %1: %2</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Turn all recording on</source>
|
||||
<translation type="unfinished"></translation>
|
||||
|
||||
@@ -7912,6 +7912,14 @@ Latency: %2 ms</source>
|
||||
<source>Clear this track</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Assign to new FX Channel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>FX %1: %2</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Turn all recording on</source>
|
||||
<translation type="unfinished"></translation>
|
||||
|
||||
@@ -7911,6 +7911,14 @@ Latency: %2 ms</source>
|
||||
<source>Clear this track</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Assign to new FX Channel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>FX %1: %2</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Turn all recording on</source>
|
||||
<translation type="unfinished"></translation>
|
||||
|
||||
@@ -7946,6 +7946,14 @@ Latence : %2 ms</translation>
|
||||
<source>Clear this track</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Assign to new FX Channel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>FX %1: %2</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Turn all recording on</source>
|
||||
<translation type="unfinished"></translation>
|
||||
|
||||
@@ -7945,6 +7945,14 @@ Latencia: %2 ms</translation>
|
||||
<source>Clear this track</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Assign to new FX Channel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>FX %1: %2</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Turn all recording on</source>
|
||||
<translation type="unfinished"></translation>
|
||||
|
||||
@@ -7970,6 +7970,14 @@ Latenza: %2 ms</translation>
|
||||
<source>Clear this track</source>
|
||||
<translation>Pulisci questa traccia</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Assign to new FX Channel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>FX %1: %2</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Turn all recording on</source>
|
||||
<translation>Accendi tutti i processi di registrazione</translation>
|
||||
|
||||
@@ -7947,6 +7947,14 @@ Latency: %2 ms</source>
|
||||
<source>Clear this track</source>
|
||||
<translation type="unfinished">このトラックをクリア</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Assign to new FX Channel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>FX %1: %2</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Turn all recording on</source>
|
||||
<translation type="unfinished"></translation>
|
||||
|
||||
@@ -7916,6 +7916,14 @@ Latency: %2 ms</source>
|
||||
<source>Clear this track</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Assign to new FX Channel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>FX %1: %2</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Turn all recording on</source>
|
||||
<translation type="unfinished"></translation>
|
||||
|
||||
@@ -7915,6 +7915,14 @@ Vertraging: %2 ms</translation>
|
||||
<source>Clear this track</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Assign to new FX Channel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>FX %1: %2</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Turn all recording on</source>
|
||||
<translation type="unfinished"></translation>
|
||||
|
||||
@@ -7951,6 +7951,14 @@ Latencja: %2 ms</translation>
|
||||
<source>Clear this track</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Assign to new FX Channel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>FX %1: %2</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Turn all recording on</source>
|
||||
<translation type="unfinished"></translation>
|
||||
|
||||
@@ -7949,6 +7949,14 @@ Latência: %2 ms</translation>
|
||||
<source>Clear this track</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Assign to new FX Channel</source>
|
||||
<translation>Associar a um novo Mixer de Efeitos</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>FX %1: %2</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Turn all recording on</source>
|
||||
<translation type="unfinished"></translation>
|
||||
|
||||
@@ -7984,6 +7984,14 @@ Latency: %2 ms</source>
|
||||
<source>Clear this track</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Assign to new FX Channel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>FX %1: %2</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Turn all recording on</source>
|
||||
<translation type="unfinished"></translation>
|
||||
|
||||
@@ -7914,6 +7914,14 @@ Latency: %2 ms</source>
|
||||
<source>Clear this track</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Assign to new FX Channel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>FX %1: %2</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Turn all recording on</source>
|
||||
<translation type="unfinished"></translation>
|
||||
|
||||
@@ -7924,6 +7924,14 @@ Latency: %2 ms</source>
|
||||
<source>Clear this track</source>
|
||||
<translation>清除此轨道</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Assign to new FX Channel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>FX %1: %2</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Turn all recording on</source>
|
||||
<translation>打开所有录制</translation>
|
||||
|
||||
@@ -194,6 +194,11 @@ public:
|
||||
return m_fxChannels.size();
|
||||
}
|
||||
|
||||
inline QVector<FxChannel *> fxChannels() const
|
||||
{
|
||||
return m_fxChannels;
|
||||
}
|
||||
|
||||
FxRouteVector m_fxRoutes;
|
||||
|
||||
private:
|
||||
|
||||
@@ -103,12 +103,14 @@ public:
|
||||
// useful for loading projects
|
||||
void refreshDisplay();
|
||||
|
||||
public slots:
|
||||
int addNewChannel();
|
||||
|
||||
protected:
|
||||
virtual void closeEvent( QCloseEvent * _ce );
|
||||
|
||||
private slots:
|
||||
void updateFaders();
|
||||
void addNewChannel();
|
||||
void toggledSolo();
|
||||
|
||||
private:
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include <QtCore/QVector>
|
||||
#include <QtCore/QList>
|
||||
#include <QWidget>
|
||||
#include <QSignalMapper>
|
||||
#include <QColor>
|
||||
#include <QMimeData>
|
||||
|
||||
@@ -390,6 +391,8 @@ private slots:
|
||||
void recordingOn();
|
||||
void recordingOff();
|
||||
void clearTrack();
|
||||
void assignFxLine( int channelIndex );
|
||||
void createFxLine();
|
||||
|
||||
private:
|
||||
static QPixmap * s_grip;
|
||||
|
||||
+52
-4
@@ -57,6 +57,7 @@
|
||||
#include "embed.h"
|
||||
#include "Engine.h"
|
||||
#include "GuiApplication.h"
|
||||
#include "FxMixerView.h"
|
||||
#include "gui_templates.h"
|
||||
#include "InstrumentTrack.h"
|
||||
#include "MainWindow.h"
|
||||
@@ -1706,6 +1707,29 @@ void TrackOperationsWidget::clearTrack()
|
||||
|
||||
|
||||
|
||||
/*! \brief Create and assign a new FX Channel for this track */
|
||||
void TrackOperationsWidget::createFxLine()
|
||||
{
|
||||
int channelIndex = gui->fxMixerView()->addNewChannel();
|
||||
|
||||
Engine::fxMixer()->effectChannel( channelIndex )->m_name = m_trackView->getTrack()->name();
|
||||
|
||||
assignFxLine(channelIndex);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*! \brief Assign a specific FX Channel for this track */
|
||||
void TrackOperationsWidget::assignFxLine(int channelIndex)
|
||||
{
|
||||
Track * track = m_trackView->getTrack();
|
||||
dynamic_cast<InstrumentTrack *>( track )->effectChannelModel()->setValue( channelIndex );
|
||||
|
||||
gui->fxMixerView()->setCurrentFxLine( channelIndex );
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*! \brief Remove this track from the track list
|
||||
*
|
||||
*/
|
||||
@@ -1740,12 +1764,36 @@ void TrackOperationsWidget::updateMenu()
|
||||
{
|
||||
to_menu->addAction( tr( "Clear this track" ), this, SLOT( clearTrack() ) );
|
||||
}
|
||||
|
||||
if( dynamic_cast<InstrumentTrackView *>( m_trackView ) )
|
||||
if( InstrumentTrackView * trackView = dynamic_cast<InstrumentTrackView *>( m_trackView ) )
|
||||
{
|
||||
int channelIndex = trackView->model()->effectChannelModel()->value();
|
||||
|
||||
FxChannel * fxChannel = Engine::fxMixer()->effectChannel( channelIndex );
|
||||
|
||||
QMenu * fxMenu = new QMenu( tr( "FX %1: %2" ).arg( channelIndex ).arg( fxChannel->m_name ), to_menu );
|
||||
QSignalMapper * fxMenuSignalMapper = new QSignalMapper(this);
|
||||
|
||||
fxMenu->addAction("Assign to new FX Channel" , this, SLOT( createFxLine() ) );
|
||||
fxMenu->addSeparator();
|
||||
|
||||
|
||||
for (int i = 0; i < Engine::fxMixer()->fxChannels().size(); ++i)
|
||||
{
|
||||
FxChannel * currentChannel = Engine::fxMixer()->fxChannels()[i];
|
||||
|
||||
if ( currentChannel != fxChannel )
|
||||
{
|
||||
QString label = tr( "FX %1: %2" ).arg( currentChannel->m_channelIndex ).arg( currentChannel->m_name );
|
||||
QAction * action = fxMenu->addAction( label, fxMenuSignalMapper, SLOT( map() ) );
|
||||
fxMenuSignalMapper->setMapping(action, currentChannel->m_channelIndex);
|
||||
}
|
||||
}
|
||||
|
||||
to_menu->addMenu(fxMenu);
|
||||
connect(fxMenuSignalMapper, SIGNAL(mapped(int)), this, SLOT(assignFxLine(int)));
|
||||
|
||||
to_menu->addSeparator();
|
||||
to_menu->addMenu( dynamic_cast<InstrumentTrackView *>(
|
||||
m_trackView )->midiMenu() );
|
||||
to_menu->addMenu( trackView->midiMenu() );
|
||||
}
|
||||
if( dynamic_cast<AutomationTrackView *>( m_trackView ) )
|
||||
{
|
||||
|
||||
@@ -172,7 +172,7 @@ FxMixerView::~FxMixerView()
|
||||
|
||||
|
||||
|
||||
void FxMixerView::addNewChannel()
|
||||
int FxMixerView::addNewChannel()
|
||||
{
|
||||
// add new fx mixer channel and redraw the form.
|
||||
FxMixer * mix = Engine::fxMixer();
|
||||
@@ -186,6 +186,8 @@ void FxMixerView::addNewChannel()
|
||||
updateFxLine(newChannelIndex);
|
||||
|
||||
updateMaxChannelSelector();
|
||||
|
||||
return newChannelIndex;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user