diff options
Diffstat (limited to 'muse2/muse/widgets/function_dialogs')
-rw-r--r-- | muse2/muse/widgets/function_dialogs/quantbase.ui | 24 | ||||
-rw-r--r-- | muse2/muse/widgets/function_dialogs/quantize.cpp | 22 | ||||
-rw-r--r-- | muse2/muse/widgets/function_dialogs/quantize.h | 5 |
3 files changed, 43 insertions, 8 deletions
diff --git a/muse2/muse/widgets/function_dialogs/quantbase.ui b/muse2/muse/widgets/function_dialogs/quantbase.ui index 973be7b8..31173e46 100644 --- a/muse2/muse/widgets/function_dialogs/quantbase.ui +++ b/muse2/muse/widgets/function_dialogs/quantbase.ui @@ -157,7 +157,7 @@ <bool>false</bool> </property> <property name="currentIndex"> - <number>3</number> + <number>0</number> </property> <property name="frame"> <bool>true</bool> @@ -174,7 +174,12 @@ </item> <item> <property name="text"> - <string>Quarter</string> + <string>4th</string> + </property> + </item> + <item> + <property name="text"> + <string>4th Triplet</string> </property> </item> <item> @@ -184,14 +189,29 @@ </item> <item> <property name="text"> + <string>8th Triplet</string> + </property> + </item> + <item> + <property name="text"> <string>16th</string> </property> </item> <item> <property name="text"> + <string>16th Triplet</string> + </property> + </item> + <item> + <property name="text"> <string>32th</string> </property> </item> + <item> + <property name="text"> + <string>32th Triplet</string> + </property> + </item> </widget> </item> <item row="3" column="0"> diff --git a/muse2/muse/widgets/function_dialogs/quantize.cpp b/muse2/muse/widgets/function_dialogs/quantize.cpp index df7c0298..7233c2b8 100644 --- a/muse2/muse/widgets/function_dialogs/quantize.cpp +++ b/muse2/muse/widgets/function_dialogs/quantize.cpp @@ -26,6 +26,20 @@ namespace MusEGui { +int rasterVals[] = { + 1, // Whole note divisor + 2, // Half note divisor + 4, // 4th note divisor + 6, // 4thT divisor + 8, // 8th divisor + 12,//8thT divisor + 16,// ... + 24, + 32, + 48, + 64 +}; + Quantize::Quantize(QWidget* parent) : QDialog(parent) { @@ -44,7 +58,7 @@ void Quantize::pull_values() range = range_group->checkedId(); strength = strength_spinbox->value(); threshold = threshold_spinbox->value(); - raster_power2 = raster_combobox->currentIndex(); + raster_index = raster_combobox->currentIndex(); quant_len = len_checkbox->isChecked(); swing = swing_spinbox->value(); } @@ -62,7 +76,7 @@ int Quantize::exec() range_group->button(range)->setChecked(true); strength_spinbox->setValue(strength); threshold_spinbox->setValue(threshold); - raster_combobox->setCurrentIndex(raster_power2); + raster_combobox->setCurrentIndex(raster_index); len_checkbox->setChecked(quant_len); swing_spinbox->setValue(swing); @@ -88,7 +102,7 @@ void Quantize::read_configuration(MusECore::Xml& xml) else if (tag == "threshold") threshold=xml.parseInt(); else if (tag == "raster") - raster_power2=xml.parseInt(); + raster_index=xml.parseInt(); else if (tag == "swing") swing=xml.parseInt(); else if (tag == "quant_len") @@ -113,7 +127,7 @@ void Quantize::write_configuration(int level, MusECore::Xml& xml) xml.intTag(level, "range", range); xml.intTag(level, "strength", strength); xml.intTag(level, "threshold", threshold); - xml.intTag(level, "raster", raster_power2); + xml.intTag(level, "raster", raster_index); xml.intTag(level, "swing", swing); xml.intTag(level, "quant_len", quant_len); xml.tag(level, "/quantize"); diff --git a/muse2/muse/widgets/function_dialogs/quantize.h b/muse2/muse/widgets/function_dialogs/quantize.h index 6ce74215..b5229f9e 100644 --- a/muse2/muse/widgets/function_dialogs/quantize.h +++ b/muse2/muse/widgets/function_dialogs/quantize.h @@ -33,6 +33,7 @@ class Xml; namespace MusEGui { + class Quantize : public QDialog, public Ui::QuantBase { Q_OBJECT @@ -50,18 +51,18 @@ class Quantize : public QDialog, public Ui::QuantBase int range; int strength; int threshold; - int raster_power2; + int raster_index; int swing; bool quant_len; void read_configuration(MusECore::Xml& xml); void write_configuration(int level, MusECore::Xml& xml); - public slots: int exec(); }; +extern int rasterVals[]; } // namespace MusEGui #endif |