diff options
author | ronso0 <medontknow@web.de> | 2017-01-03 13:41:01 +0100 |
---|---|---|
committer | ronso0 <medontknow@web.de> | 2017-01-03 13:41:01 +0100 |
commit | 6ede5d1cee329350457835ffeb0e78b9c30df616 (patch) | |
tree | b1844d7961034b92aa034b826dcb1d12436275c6 /src/library | |
parent | 3bb3d6da933643f28796768227e4214d2bb869d3 (diff) |
Add BPM conversions 4/3 and 3/2
Diffstat (limited to 'src/library')
-rw-r--r-- | src/library/dlgtrackinfo.cpp | 18 | ||||
-rw-r--r-- | src/library/dlgtrackinfo.h | 2 | ||||
-rw-r--r-- | src/library/dlgtrackinfo.ui | 34 |
3 files changed, 53 insertions, 1 deletions
diff --git a/src/library/dlgtrackinfo.cpp b/src/library/dlgtrackinfo.cpp index 55912882d2..4eca26de33 100644 --- a/src/library/dlgtrackinfo.cpp +++ b/src/library/dlgtrackinfo.cpp @@ -63,6 +63,10 @@ void DlgTrackInfo::init() { this, SLOT(slotBpmTwoThirds())); connect(bpmThreeFourth, SIGNAL(clicked()), this, SLOT(slotBpmThreeFourth())); + connect(bpmFourThirds, SIGNAL(clicked()), + this, SLOT(slotBpmFourThirds())); + connect(bpmThreeHalves, SIGNAL(clicked()), + this, SLOT(slotBpmThreeHalves())); connect(bpmClear, SIGNAL(clicked()), this, SLOT(slotBpmClear())); @@ -503,6 +507,20 @@ void DlgTrackInfo::slotBpmThreeFourth() { spinBpm->setValue(newValue); } +void DlgTrackInfo::slotBpmFourThirds() { + m_pBeatsClone->scale(Beats::FOURTHIRDS); + // read back the actual value + double newValue = m_pBeatsClone->getBpm(); + spinBpm->setValue(newValue); +} + +void DlgTrackInfo::slotBpmThreeHalves() { + m_pBeatsClone->scale(Beats::THREEHALVES); + // read back the actual value + double newValue = m_pBeatsClone->getBpm(); + spinBpm->setValue(newValue); +} + void DlgTrackInfo::slotBpmClear() { spinBpm->setValue(0); m_pBeatsClone.clear(); diff --git a/src/library/dlgtrackinfo.h b/src/library/dlgtrackinfo.h index 51dd1a851f..92513218c0 100644 --- a/src/library/dlgtrackinfo.h +++ b/src/library/dlgtrackinfo.h @@ -47,6 +47,8 @@ class DlgTrackInfo : public QDialog, public Ui::DlgTrackInfo { void slotBpmHalve(); void slotBpmTwoThirds(); void slotBpmThreeFourth(); + void slotBpmFourThirds(); + void slotBpmThreeHalves(); void slotBpmClear(); void slotBpmConstChanged(int state); void slotBpmTap(double averageLength, int numSamples); diff --git a/src/library/dlgtrackinfo.ui b/src/library/dlgtrackinfo.ui index ddab8a45ae..5c039236fc 100644 --- a/src/library/dlgtrackinfo.ui +++ b/src/library/dlgtrackinfo.ui @@ -794,6 +794,38 @@ </property> </widget> </item> + <item row="3" column="0"> + <widget class="QPushButton" name="bpmThreeHalves"> + <property name="minimumSize"> + <size> + <width>125</width> + <height>0</height> + </size> + </property> + <property name="toolTip"> + <string>Sets the BPM to 150% of the current value.</string> + </property> + <property name="text"> + <string>3/2 BPM</string> + </property> + </widget> + </item> + <item row="3" column="1"> + <widget class="QPushButton" name="bpmFourThirds"> + <property name="minimumSize"> + <size> + <width>125</width> + <height>0</height> + </size> + </property> + <property name="toolTip"> + <string>Sets the BPM to 133% of the current value.</string> + </property> + <property name="text"> + <string>4/3 BPM</string> + </property> + </widget> + </item> <item row="1" column="2"> <widget class="QPushButton" name="bpmClear"> <property name="text"> @@ -814,7 +846,7 @@ <property name="maximumSize"> <size> <width>123</width> - <height>91</height> + <height>128</height> </size> </property> <property name="toolTip"> |