2021-03-21 Fred Gleason <fredg@paravelsystems.com>

* Added a 'Cut Gain' control to 'RDMarkerDialog'.
	* Added a 'No Fade on Segue Out' checkbox to 'RDMarkerDialog'.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason 2021-03-21 13:19:05 -04:00
parent a4a8c05458
commit 87e29e855e
12 changed files with 195 additions and 2 deletions

View File

@ -21312,3 +21312,6 @@
2021-03-21 Fred Gleason <fredg@paravelsystems.com>
* Added a 'Goto' section to 'RDMarkerDialog', with 'Cursor',
'Home' and 'End' buttons.
2021-03-21 Fred Gleason <fredg@paravelsystems.com>
* Added a 'Cut Gain' control to 'RDMarkerDialog'.
* Added a 'No Fade on Segue Out' checkbox to 'RDMarkerDialog'.

View File

@ -3616,6 +3616,18 @@ Out</translation>
<source>End</source>
<translation type="unfinished">Konec</translation>
</message>
<message>
<source>No Fade on Segue Out</source>
<translation type="unfinished">Žádné prolínání při přechodu ven</translation>
</message>
<message>
<source>Cut Gain</source>
<translation type="unfinished">Zesílení záběru</translation>
</message>
<message>
<source>dB</source>
<translation type="unfinished">dB</translation>
</message>
</context>
<context>
<name>RDMarkerPlayer</name>

View File

@ -3605,6 +3605,18 @@ Out</translation>
<source>End</source>
<translation type="unfinished">Ende</translation>
</message>
<message>
<source>No Fade on Segue Out</source>
<translation type="unfinished">Kein Fade bei Seque Out</translation>
</message>
<message>
<source>Cut Gain</source>
<translation type="unfinished">Cut Gain</translation>
</message>
<message>
<source>dB</source>
<translation type="unfinished">dB</translation>
</message>
</context>
<context>
<name>RDMarkerPlayer</name>

View File

@ -3592,6 +3592,19 @@ Todo</translation>
<source>End</source>
<translation type="unfinished">Final</translation>
</message>
<message>
<source>No Fade on Segue Out</source>
<translation type="unfinished">Quitar fade en Segue</translation>
</message>
<message>
<source>Cut Gain</source>
<translation type="unfinished">Ganancia
del audio</translation>
</message>
<message>
<source>dB</source>
<translation type="unfinished">dB</translation>
</message>
</context>
<context>
<name>RDMarkerPlayer</name>

View File

@ -2998,6 +2998,18 @@ Out</source>
<source>End</source>
<translation type="unfinished">Fin</translation>
</message>
<message>
<source>No Fade on Segue Out</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Cut Gain</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>dB</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>RDMarkerPlayer</name>

View File

@ -3555,6 +3555,18 @@ ut</translation>
<source>End</source>
<translation type="unfinished">Slutten</translation>
</message>
<message>
<source>No Fade on Segue Out</source>
<translation type="unfinished">Inga uttoning ved Overgang ut</translation>
</message>
<message>
<source>Cut Gain</source>
<translation type="unfinished">Dempevolum</translation>
</message>
<message>
<source>dB</source>
<translation type="unfinished">dB</translation>
</message>
</context>
<context>
<name>RDMarkerPlayer</name>

View File

@ -3555,6 +3555,18 @@ ut</translation>
<source>End</source>
<translation type="unfinished">Slutten</translation>
</message>
<message>
<source>No Fade on Segue Out</source>
<translation type="unfinished">Inga uttoning ved Overgang ut</translation>
</message>
<message>
<source>Cut Gain</source>
<translation type="unfinished">Dempevolum</translation>
</message>
<message>
<source>dB</source>
<translation type="unfinished">dB</translation>
</message>
</context>
<context>
<name>RDMarkerPlayer</name>

View File

@ -3595,6 +3595,18 @@ Mínimo</translation>
<source>End</source>
<translation type="unfinished">Fim</translation>
</message>
<message>
<source>No Fade on Segue Out</source>
<translation type="unfinished">Sem Fade na Saída</translation>
</message>
<message>
<source>Cut Gain</source>
<translation type="unfinished">Ganho</translation>
</message>
<message>
<source>dB</source>
<translation type="unfinished">dB</translation>
</message>
</context>
<context>
<name>RDMarkerPlayer</name>

View File

@ -93,6 +93,28 @@ RDMarkerDialog::RDMarkerDialog(const QString &caption,int card,int port,
connect(d_goto_end_button,SIGNAL(clicked()),
d_marker_view,SLOT(gotoEnd()));
//
// Fade on Segue Out
//
d_no_segue_fade_check=new QCheckBox(this);
d_no_segue_fade_label=new QLabel(tr("No Fade on Segue Out"),this);
d_no_segue_fade_label->setFont(labelFont());
connect(d_no_segue_fade_check,SIGNAL(toggled(bool)),
d_marker_view,SLOT(setNoSegueFade(bool)));
//
// Cut Gain
//
d_play_gain_spin=new QSpinBox(this);
d_play_gain_spin->setRange(-10,10);
connect(d_play_gain_spin,SIGNAL(valueChanged(int)),
d_marker_view,SLOT(setPlayGain(int)));
d_play_gain_label=new QLabel(tr("Cut Gain")+":",this);
d_play_gain_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
d_play_gain_label->setFont(labelFont());
d_play_gain_unit_label=new QLabel(tr("dB"),this);
d_play_gain_unit_label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter);
d_play_gain_unit_label->setFont(labelFont());
/**************************************************************************
* Transport Section
@ -240,6 +262,8 @@ int RDMarkerDialog::exec(unsigned cartnum,int cutnum)
setSelectedMarkers(RDMarkerHandle::LastRole,RDMarkerHandle::LastRole);
}
d_marker_view->setSelectedMarker(RDMarkerHandle::CutStart);
d_no_segue_fade_check->setChecked(d_marker_view->noSegueFade());
d_play_gain_spin->setValue(d_marker_view->playGain());
return QDialog::exec();
}
@ -392,6 +416,33 @@ void RDMarkerDialog::resizeEvent(QResizeEvent *e)
d_goto_home_button->setGeometry(95,25,80,50);
d_goto_end_button->setGeometry(185,25,80,50);
d_no_segue_fade_check->setGeometry(200+90*3,
4+d_marker_view->sizeHint().height()+
d_player->sizeHint().height()+5,
15,
15);
d_no_segue_fade_label->setGeometry(220+90*3,
2+d_marker_view->sizeHint().height()+
d_player->sizeHint().height()+5,
200,
20);
d_play_gain_label->setGeometry(220+90*3,
2+d_marker_view->sizeHint().height()+
d_player->sizeHint().height()+5+22,
100,
20);
d_play_gain_spin->setGeometry(220+90*3+105,
2+d_marker_view->sizeHint().height()+
d_player->sizeHint().height()+5+22,
40,
20);
d_play_gain_unit_label->setGeometry(220+90*3+105+45,
2+d_marker_view->sizeHint().height()+
d_player->sizeHint().height()+5+22,
60,
20);
d_ok_button->setGeometry(w-180,h-60,80,50);
d_cancel_button->setGeometry(w-90,h-60,80,50);
}

View File

@ -21,10 +21,12 @@
#ifndef RDMARKERDIALOG_H
#define RDMARKERDIALOG_H
#include <QCheckBox>
#include <QGroupBox>
#include <QLabel>
#include <QLineEdit>
#include <QPushButton>
#include <QSpinBox>
#include <QTimer>
#include <rddialog.h>
@ -109,6 +111,13 @@ class RDMarkerDialog : public RDDialog
QPushButton *d_goto_home_button;
QPushButton *d_goto_end_button;
QCheckBox *d_no_segue_fade_check;
QLabel *d_no_segue_fade_label;
QLabel *d_play_gain_label;
QSpinBox *d_play_gain_spin;
QLabel *d_play_gain_unit_label;
QPushButton *d_ok_button;
QPushButton *d_cancel_button;
unsigned d_cart_number;

View File

@ -442,6 +442,18 @@ int RDMarkerView::pointerValue(RDMarkerHandle::PointerRole role)
}
bool RDMarkerView::noSegueFade() const
{
return d_no_segue_fade;
}
int RDMarkerView::playGain() const
{
return d_play_gain;
}
RDMarkerHandle::PointerRole
RDMarkerView::selectedMarker(RDMarkerHandle::PointerType type) const
{
@ -548,6 +560,20 @@ void RDMarkerView::updatePosition(RDMarkerHandle::PointerRole role, int ptr)
}
void RDMarkerView::setNoSegueFade(bool state)
{
d_has_unsaved_changes=state==d_no_segue_fade;
d_no_segue_fade=state;
}
void RDMarkerView::setPlayGain(int db)
{
d_has_unsaved_changes=db==d_play_gain;
d_play_gain=db;
}
void RDMarkerView::setAudioGain(int lvl)
{
if(d_audio_gain!=lvl) {
@ -638,7 +664,14 @@ void RDMarkerView::save()
for(int i=0;i<RDMarkerHandle::PointerRole::LastRole;i++) {
sql+=d_pointer_fields.at(i)+QString().sprintf("=%d,",d_pointers[i]);
}
sql=sql.left(sql.length()-1)+" where "+
if(d_no_segue_fade) {
sql+="SEGUE_GAIN=0,";
}
else {
sql+=QString().sprintf("SEGUE_GAIN=%d,",RD_FADE_DEPTH);
}
sql+=QString().sprintf("PLAY_GAIN=%d ",100*d_play_gain);
sql+=QString(" where ")+
"CUT_NAME=\""+RDEscapeString(RDCut::cutName(d_cart_number,d_cut_number))+
"\"";
RDSqlQuery::apply(sql);
@ -659,6 +692,8 @@ void RDMarkerView::clear()
d_handles[i][j]=NULL;
}
}
d_no_segue_fade=false;
d_play_gain=0;
d_cursor=NULL;
d_shrink_factor=1;
d_max_shrink_factor=1;
@ -1025,7 +1060,9 @@ bool RDMarkerView::LoadCutData()
sql=QString("select ")+
d_pointer_fields.join(",")+","+ // 00 - 09
"CHANNELS "+ // 10
"CHANNELS,"+ // 10
"SEGUE_GAIN,"+ // 11
"PLAY_GAIN "+ // 12
"from CUTS where "+
"CUT_NAME=\""+
RDEscapeString(RDCut::cutName(d_cart_number,d_cut_number))+"\"";
@ -1036,6 +1073,8 @@ bool RDMarkerView::LoadCutData()
d_pointers[i]=q->value(i).toInt();
}
d_channels=q->value(10).toInt();
d_no_segue_fade=q->value(11).toInt()==0;
d_play_gain=q->value(12).toInt()/100;
}
delete q;

View File

@ -91,6 +91,8 @@ class RDMarkerView : public QWidget
int pointerValue(RDMarkerHandle::PointerRole role);
RDMarkerHandle::PointerRole selectedMarker(RDMarkerHandle::PointerType type)
const;
bool noSegueFade() const;
int playGain() const;
bool hasUnsavedChanges() const;
void setSelectedMarker(RDMarkerHandle::PointerRole role);
@ -105,6 +107,8 @@ class RDMarkerView : public QWidget
RDMarkerHandle::PointerRole end_role);
public slots:
void setNoSegueFade(bool state);
void setPlayGain(int db);
void setAudioGain(int lvl);
void setShrinkFactor(int sf);
void setMaximumShrinkFactor();
@ -160,6 +164,8 @@ class RDMarkerView : public QWidget
RDWaveFactory *d_wave_factory;
bool d_has_unsaved_changes;
int d_pointers[RDMarkerHandle::LastRole];
bool d_no_segue_fade;
int d_play_gain;
RDMarkerHandle *d_handles[RDMarkerHandle::LastRole][2];
QGraphicsLineItem *d_cursor;
int d_audio_end;