From 9b2c84edc49b110033819415e7969d6a715c1c41 Mon Sep 17 00:00:00 2001 From: Chris Date: Wed, 11 Dec 2024 09:37:41 -0500 Subject: [PATCH] Issues #133 and #134 fixes in progress, GUI tweaks. --- NEWS | 28 +++++-- TODO | 12 +-- libseq66/include/midi/calculations.hpp | 18 ++++- libseq66/include/midi/eventlist.hpp | 16 +++- libseq66/include/play/performer.hpp | 16 ++-- libseq66/include/play/sequence.hpp | 3 +- libseq66/src/midi/eventlist.cpp | 38 +++++++-- libseq66/src/play/performer.cpp | 18 ++++- libseq66/src/play/sequence.cpp | 54 +++++++++---- seq_qt5/forms/qseditoptions.ui | 34 +++++++- seq_qt5/forms/qseqeditframe64.ui | 60 +++++++------- seq_qt5/forms/qsessionframe.ui | 106 ++++++++++++------------- seq_qt5/forms/qslivegrid.ui | 16 ++-- seq_qt5/forms/qsmainwnd.ui | 66 +++++++-------- seq_qt5/include/qseqeditframe64.hpp | 8 +- seq_qt5/src/qpatternfix.cpp | 3 +- seq_qt5/src/qseqeditframe64.cpp | 57 ++++++------- seq_qt5/src/qseqroll.cpp | 10 +-- seq_qt5/src/qsmainwnd.cpp | 1 + 19 files changed, 350 insertions(+), 214 deletions(-) diff --git a/NEWS b/NEWS index 821d15f7..ffaf0166 100644 --- a/NEWS +++ b/NEWS @@ -1,10 +1,10 @@ NEWS for Seq66 0.99.17 Chris Ahlstrom -2015-07-10 to 2024-12-04 +2015-07-10 to 2024-12-11 # Change Log -## [0.99.17] +## [0.99.17] - 2024-12-11 This release is in progress.... @@ -12,18 +12,30 @@ This release is in progress.... ### Changed +- Revamped and extended the functionality of the Pattern-Fix dialog. + As part of this, the alteration API of the event-list has been + updated. + ### Fixed +- Issue #128 follow-on. Fixed the removal of trailing notes after + truncating a pattern to a smaller number of measures. +- Issue #133. + - Pattern editor. Changed the slot connection for editable + combo-boxes to connect the lineEdit() accessor. + - Measures (pattern length) combo-box. + +- Issue #134.Added dates to the release-name line from 0.99.14 on; + were left off by an oversight. - Cleaned up and upgraded the linking of recorded notes. - Made ghost notes in selection box official. Also made it apply to select-all and other selection operations. -- Fixed the removal of trailing notes after truncating a pattern - to a smaller number of measures. Kind of a follow-on to - issue #128. +- Fixing and normalizing the functionality of the Pattern-Fix dialog. +- Some minor tweaking (field size, font) of various dialogs. ### Removed -## [0.99.16] +## [0.99.16] - 2024-12-03 This release provides fixes to user issues and a ton of related fixes found while investigating the user issues. Some minor new @@ -113,7 +125,7 @@ features added. then more lines are thinner or dotted; useful if the foreground color is bright. It mainly affects the song editor. -## [0.99.15] +## [0.99.15] - 2024-10-28 ### Added @@ -135,7 +147,7 @@ features added. - Progress made getting a build to work in MSYS2. Not yet ready. - Built on Windows 11 with a update to Qt 5.15.2 and mingw 8.10. -## [0.99.14] +## [0.99.14] - 2024-08-14 ### Added diff --git a/TODO b/TODO index ae70aefd..49a95903 100644 --- a/TODO +++ b/TODO @@ -366,7 +366,7 @@ ISSUES: In the pattern edit window, the reset pattern to 1 button no longer works properly. It either shrinks to some bar other than 1 or just does nothing - at all. + at all. PARTLY FIXED. Does not prompt for truncating notes. There is also a behaviour when you manually select or type the number of bars and it is smaller than the amount of already existing bars with notes @@ -381,11 +381,11 @@ ISSUES: These have appeared since https://github.com/ahlstromcj/seq66/issues/128 so possibly connected. - A third issue which occurred before was with manually editing the amount - of bars with double digits. The bars refresh for each digit entered. For - example So if you have 16 bars and you want to shrink to 14 bars, it will - first shrink it to 1 bar as you type over. If the bars are full then the - dialog will pop up about losing notes. If you then click ok, instead of + FIXED: A third issue which occurred before was with manually editing the + amount of bars with double digits. The bars refresh for each digit entered. + For example So if you have 16 bars and you want to shrink to 14 bars, it + will first shrink it to 1 bar as you type over. If the bars are full then + the dialog will pop up about losing notes. If you then click ok, instead of cancel, you will lose anything in the latter 15 bars. To close as pushed off to version 2: diff --git a/libseq66/include/midi/calculations.hpp b/libseq66/include/midi/calculations.hpp index 645819d0..ea428d9e 100644 --- a/libseq66/include/midi/calculations.hpp +++ b/libseq66/include/midi/calculations.hpp @@ -28,7 +28,7 @@ * \library seq66 application * \author Chris Ahlstrom * \date 2015-11-07 - * \updates 2024-12-07 + * \updates 2024-12-10 * \license GNU GPLv2 or above * * These items were moved from the globals.h module so that only the modules @@ -520,12 +520,20 @@ pulses_per_beat (int ppq, int beatspm = 4, int beatwidth = 4) * beat_width beats. So: * \verbatim - p = 4 * P * m * B / W + p = 4 * P * M * B / W p == pulse count (ticks or pulses) - m == number of measures + M == number of measures B == beats per measure (constant) P == pulses per quarter-note (constant) W == beat width in beats per measure (constant) +\endverbatim + * + * Testing the units: + * +\verbatim + 4 qn pulses beats + p pulses = --- ---- x P ------ x B ----- x M bars + W beat qn bar \endverbatim * * For our "b4uacuse" MIDI file, M can be about 100 measures, B is 4, @@ -544,7 +552,9 @@ pulses_per_beat (int ppq, int beatspm = 4, int beatwidth = 4) * \param bw * The W value in the equation, the denominator of the time signature. * If this value is 0, we'll get an arithmetic exception (crash), so we - * just return 0 in this case. + * just return 0 in this case. The quantity 4 / W is in units of + * quarter-notes/beat. So a beat-width of 8 is 1/2 qn/beat, or + * an eighth note. * * \param measures * The M value in the equation. It defaults to 1, in case one desires a diff --git a/libseq66/include/midi/eventlist.hpp b/libseq66/include/midi/eventlist.hpp index 8bee04e2..d0528f27 100644 --- a/libseq66/include/midi/eventlist.hpp +++ b/libseq66/include/midi/eventlist.hpp @@ -28,7 +28,7 @@ * \library seq66 application * \author Chris Ahlstrom * \date 2015-09-19 - * \updates 2024-12-08 + * \updates 2024-12-09 * \license GNU GPLv2 or above * * This module extracts the event-list functionality from the sequencer @@ -76,11 +76,17 @@ #undef SEQ66_LINK_NEWEST_NOTE_ON_RECORD +/** + * The jitter_events() function is currently unused, so it is macroed out. + */ + +#undef SEQ66_USE_JITTER_EVENTS + /** * This flag is used in eventlist and sequence to supposedly protect sorting * and clearing. However, we were able to delete events, clear all events, * and even delete patterns while playback was occuring. So we don't think we - * need this. Define it if problems crop up. EXPERIMENTAL. + * need this after all. Define it if problems crop up. EXPERIMENTAL. */ #undef SEQ66_USE_ACTION_IN_PROGRESS_FLAG @@ -426,7 +432,7 @@ class eventlist midibyte status, midibyte cc, int snap, int divide ); - bool quantize_all_events (int snap, int divide = 1); + bool quantize_events (int snap, int divide = 1, bool all = false); bool quantize_notes (int snap, int divide = 1, bool all = false); midipulse adjust_timestamp (event & er, midipulse deltatick); void scale_note_off (event & noteoff, double factor); @@ -442,7 +448,9 @@ class eventlist bool align_left (bool relink = false); bool randomize (midibyte status, int plus_minus, bool all = false); bool randomize_notes (int range, bool all = false); - bool jitter_all_events (int snap, int jitr); +#if defined SEQ66_USE_JITTER_EVENTS + bool jitter_events (int snap, int jitr); +#endif bool jitter_notes (int snap, int jitr, bool all = false); void link_new (bool wrap = false); bool link_notes (event::iterator eon, event::iterator eoff); diff --git a/libseq66/include/play/performer.hpp b/libseq66/include/play/performer.hpp index 09bdf7d1..3951af3e 100644 --- a/libseq66/include/play/performer.hpp +++ b/libseq66/include/play/performer.hpp @@ -2303,6 +2303,14 @@ class performer void set_left_tick (midipulse tick); void set_left_tick_seq (midipulse tick, midipulse snap); + void set_right_tick (midipulse tick); + void set_right_tick_seq (midipulse tick, midipulse snap); + + midipulse get_right_tick () const + { + return m_right_tick; + } + /** * For every pattern/sequence that is active, sets the "original tick" * value for the pattern. This is really the "last tick" value, so we @@ -2333,14 +2341,6 @@ class performer return m_start_tick; } - void set_right_tick (midipulse tick); - void set_right_tick_seq (midipulse tick, midipulse snap); - - midipulse get_right_tick () const - { - return m_right_tick; - } - /** * Convenience function for JACK support when loop in song mode. * diff --git a/libseq66/include/play/sequence.hpp b/libseq66/include/play/sequence.hpp index aae8241d..6ff33c03 100644 --- a/libseq66/include/play/sequence.hpp +++ b/libseq66/include/play/sequence.hpp @@ -28,7 +28,7 @@ * \library seq66 application * \author Chris Ahlstrom * \date 2015-07-30 - * \updates 2024-12-08 + * \updates 2024-12-09 * \license GNU GPLv2 or above * * The functions add_list_var() and add_long_list() have been replaced by @@ -154,6 +154,7 @@ struct fixparameters int & fp_beat_width; double & fp_measures; double & fp_scale_factor; + std::string fp_notemap_file; fixeffect & fp_effect; }; diff --git a/libseq66/src/midi/eventlist.cpp b/libseq66/src/midi/eventlist.cpp index 7439e867..90dfca97 100644 --- a/libseq66/src/midi/eventlist.cpp +++ b/libseq66/src/midi/eventlist.cpp @@ -25,7 +25,7 @@ * \library seq66 application * \author Chris Ahlstrom * \date 2015-09-19 - * \updates 2024-12-08 + * \updates 2024-12-09 * \license GNU GPLv2 or above * * This container now can indicate if certain Meta events (time-signaure or @@ -889,7 +889,7 @@ eventlist::quantize_events } /** - * Quantizes all events, unconditionally. No adjustment for wrapped notes + * Quantizes events, unconditionally. No adjustment for wrapped notes * is made. * * \param snap @@ -901,18 +901,35 @@ eventlist::quantize_events * An indicator of the amount of quantization. The values are either * 1 ("quantize") or 2 ("tighten"). The default value is 1, which makes * the snap parameter the quantization value. + * + * \param all + * If true (the default is false), then all events, not just selected + * ones, are quantized. + * + * \return + * Returns true if events were quantized. */ bool -eventlist::quantize_all_events (int snap, int divide) +eventlist::quantize_events (int snap, int divide, bool all) { bool result = false; - midipulse len = get_length(); bool tight = divide == 2; + bool found_note = false; + midipulse len = get_length(); for (auto & er : m_events) - result = tight ? er.tighten(snap, len) : er.quantize(snap, len) ; + { + if (all || er.is_selected()) + { + bool ok = tight ? er.tighten(snap, len) : er.quantize(snap, len) ; + if (ok) + result = true; - if (result) + if (er.is_note()) + found_note = true; + } + } + if (result && found_note) verify_and_link(); /* sorts them again!!! */ return result; @@ -931,6 +948,9 @@ eventlist::quantize_all_events (int snap, int divide) * \param all * If false (the default), then only selected notes are acted on. * Otherwise, they all are. + * + * \return + * Returns true if notes were quantized. */ bool @@ -1384,6 +1404,8 @@ eventlist::randomize_notes (int range, bool all) return result; } +#if defined SEQ66_USE_JITTER_EVENTS + /** * This function jitters the timestamps of all events. If note events were * jittered, then we verify-and-link. @@ -1403,7 +1425,7 @@ eventlist::randomize_notes (int range, bool all) */ bool -eventlist::jitter_all_events (int snap, int jitr) +eventlist::jitter_events (int snap, int jitr) { bool result = false; if (jitr > 0) @@ -1455,6 +1477,8 @@ eventlist::jitter_all_events (int snap, int jitr) return result; } +#endif // defined SEQ66_USE_JITTER_EVENTS + /** * This function jitters the timestamps of all note events. If any * were jittered, then we verify-and-link. diff --git a/libseq66/src/play/performer.cpp b/libseq66/src/play/performer.cpp index efc12f1d..b6008c9d 100644 --- a/libseq66/src/play/performer.cpp +++ b/libseq66/src/play/performer.cpp @@ -2299,6 +2299,19 @@ performer::finish_move (seq::number seqno) return result; } +/** + * Do a fix-pattern operation on a sequence. + * + * Issue: + * + * Using notify_trigger_change(), the pattern editor is redrawn + * only when focus moves from the qpatternfix to qseqeditframe64. + * + * With the following notification, no updates at all occur! + * + * notify_sequence_change(seqno, change::yes); + */ + bool performer::fix_pattern (seq::number seqno, fixparameters & params) { @@ -2308,7 +2321,7 @@ performer::fix_pattern (seq::number seqno, fixparameters & params) { result = s->fix_pattern(params); if (result) - notify_trigger_change(seqno); + notify_trigger_change(seqno, change::yes); } return result; } @@ -6226,7 +6239,8 @@ performer::delete_trigger (seq::number seqno, midipulse tick) bool performer::transpose_trigger ( - seq::number seqno, midipulse tick, int transposition) + seq::number seqno, midipulse tick, int transposition +) { bool result = false; if (transposition != 0) diff --git a/libseq66/src/play/sequence.cpp b/libseq66/src/play/sequence.cpp index d39f464f..49fd6875 100644 --- a/libseq66/src/play/sequence.cpp +++ b/libseq66/src/play/sequence.cpp @@ -25,7 +25,7 @@ * \library seq66 application * \author Chris Ahlstrom * \date 2015-07-24 - * \updates 2024-12-08 + * \updates 2024-12-10 * \license GNU GPLv2 or above * * The functionality of this class also includes handling some of the @@ -3443,7 +3443,8 @@ sequence::fix_pattern (fixparameters & params) newscalefactor, params.fp_save_note_length ); } - result = false; /* op not done */ + else + result = false; /* op not done */ } else if (fixscale) { @@ -3470,12 +3471,18 @@ sequence::fix_pattern (fixparameters & params) { case alteration::tighten: - result = m_events.quantize_all_events(params.fp_tighten_range); + result = m_events.quantize_events + ( + params.fp_tighten_range, 1, true /* all events */ + ); break; case alteration::quantize: - result = m_events.quantize_all_events(params.fp_quantize_range); + result = m_events.quantize_events + ( + params.fp_quantize_range, 1, true /* all events */ + ); break; case alteration::jitter: @@ -3490,10 +3497,11 @@ sequence::fix_pattern (fixparameters & params) case alteration::notemap: - // WRONG: - // Need to get the notemapper and call - // repitch(). - result = false; // TODO + result = ! params.fp_notemap_file.empty(); + if (result) + { + result = perf()->repitch_all(params.fp_notemap_file, *this); + } break; default: @@ -6025,10 +6033,18 @@ sequence::apply_length ) { bool result = false; + bool reset_L_R_markers = false; if (bpb == 0) + { bpb = get_beats_per_bar(); + } else + { + if (bpb != get_beats_per_bar()) /* ca 2024-12-10 */ + reset_L_R_markers = true; + set_beats_per_bar(bpb); + } if (ppq == 0) ppq = int(get_ppqn()); @@ -6036,27 +6052,37 @@ sequence::apply_length change_ppqn(ppq); /* rarely changed; rescales if */ if (bw == 0) + { bw = get_beat_width(); + } else + { + if (bw != get_beat_width()) + reset_L_R_markers = true; + set_beat_width(bw); + } if (measures == 0) /* added 2022-04-29 */ { (void) unit_measure(true); /* reset the unit-measure */ measures = get_measures(0); /* calculate the current bars */ + result = set_length(seq66::measures_to_ticks(bpb, ppq, bw, measures)); } else result = set_measures(measures, user_change); /* and set_length() */ - /* - * Given the above, the following call does not do anything. - * Leave it in for now to avoid breaking other code. - */ - - (void) set_length(seq66::measures_to_ticks(bpb, ppq, bw, measures)); if (result) (void) unit_measure(true); /* for progress and redrawing */ + if (reset_L_R_markers) + { + if (not_nullptr(perf())) + { + perf()->set_left_tick(0); /* move L marker to the start */ + perf()->set_right_tick(0); /* move R marker to measure end */ + } + } return result; } diff --git a/seq_qt5/forms/qseditoptions.ui b/seq_qt5/forms/qseditoptions.ui index 7df5b257..22aa621a 100644 --- a/seq_qt5/forms/qseditoptions.ui +++ b/seq_qt5/forms/qseditoptions.ui @@ -1241,6 +1241,12 @@ Range: 4 to 8. Default: 4. true + + + 11 + false + + usr: [user-ui-tweaks] progress-box-width, -height @@ -1287,6 +1293,12 @@ Range: 32 to 128, 0 disables. Default: 32. true + + + 11 + false + + usr: [user-ui-tweaks] fingerprint-size @@ -1303,6 +1315,12 @@ Range: 32 to 128, 0 disables. Default: 32. 0 + + + 11 + false + + usr: [user-ui-tweaks] key-height @@ -1486,6 +1504,12 @@ zoom vertically. true + + + 11 + false + + usr: [user-interface-settings] mainwnd-rows, -columns @@ -1506,6 +1530,12 @@ zoom vertically. + + + 11 + false + + usr: [user-interface-settings] window-scale, -y @@ -2172,9 +2202,9 @@ in the Song Editor. + layoutWidgetJackConnect groupBox r_group_jack_transport - layoutWidgetJackTransport r_group_jack_start layoutWidgetJack layoutWidgetJackTransport @@ -3189,7 +3219,7 @@ Seq66 exits. 8 40 191 - 301 + 317 diff --git a/seq_qt5/forms/qseqeditframe64.ui b/seq_qt5/forms/qseqeditframe64.ui index 6dfa7cc3..59fe0a96 100644 --- a/seq_qt5/forms/qseqeditframe64.ui +++ b/seq_qt5/forms/qseqeditframe64.ui @@ -27,7 +27,7 @@ - QLayout::SizeConstraint::SetMinimumSize + QLayout::SetMinimumSize 2 @@ -53,12 +53,12 @@ 5 - QLayout::SizeConstraint::SetFixedSize + QLayout::SetFixedSize - QLayout::SizeConstraint::SetMinimumSize + QLayout::SetMinimumSize @@ -81,10 +81,10 @@ - QFrame::Shape::Box + QFrame::Box - QFrame::Shadow::Raised + QFrame::Raised 2 @@ -156,16 +156,16 @@ when hovering. - QFrame::Shadow::Sunken + QFrame::Sunken - Qt::ScrollBarPolicy::ScrollBarAlwaysOn + Qt::ScrollBarAlwaysOn - Qt::ScrollBarPolicy::ScrollBarAlwaysOn + Qt::ScrollBarAlwaysOn - QAbstractScrollArea::SizeAdjustPolicy::AdjustToContents + QAbstractScrollArea::AdjustToContents true @@ -198,7 +198,7 @@ when hovering. - QLayout::SizeConstraint::SetMinimumSize + QLayout::SetMinimumSize 0 @@ -330,10 +330,10 @@ to note events. [ c for selected notes ] - QFrame::Shape::StyledPanel + QFrame::StyledPanel - QFrame::Shadow::Sunken + QFrame::Sunken true @@ -476,7 +476,7 @@ to note events. [ c for selected notes ] 0 - QLayout::SizeConstraint::SetDefaultConstraint + QLayout::SetDefaultConstraint @@ -897,7 +897,7 @@ zooms in [ z 0 Z ]. - Qt::Orientation::Horizontal + Qt::Horizontal @@ -1265,7 +1265,7 @@ or a velocity to force upon input. 0 - QLayout::SizeConstraint::SetFixedSize + QLayout::SetFixedSize @@ -1362,19 +1362,19 @@ or a velocity to force upon input. - QFrame::Shape::StyledPanel + QFrame::StyledPanel - QFrame::Shadow::Sunken + QFrame::Sunken - Qt::ScrollBarPolicy::ScrollBarAlwaysOff + Qt::ScrollBarAlwaysOff - Qt::ScrollBarPolicy::ScrollBarAlwaysOff + Qt::ScrollBarAlwaysOff - QAbstractScrollArea::SizeAdjustPolicy::AdjustToContents + QAbstractScrollArea::AdjustToContents true @@ -1434,7 +1434,7 @@ or a velocity to force upon input. 0 - QLayout::SizeConstraint::SetDefaultConstraint + QLayout::SetDefaultConstraint @@ -1465,16 +1465,16 @@ or a velocity to force upon input. Pattern/sequence number. - QFrame::Shape::StyledPanel + QFrame::StyledPanel - QFrame::Shadow::Sunken + QFrame::Sunken 1023 - Qt::AlignmentFlag::AlignRight|Qt::AlignmentFlag::AlignTrailing|Qt::AlignmentFlag::AlignVCenter + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter @@ -1592,6 +1592,9 @@ meta event at the L marker. true + + 4 + @@ -1648,6 +1651,9 @@ meta event at the L marker. true + + 4 + @@ -1853,7 +1859,7 @@ overridden by the "Expand" setting. - Qt::Orientation::Horizontal + Qt::Horizontal @@ -1921,10 +1927,10 @@ in the piano roll. [ p x ] - QFrame::Shape::StyledPanel + QFrame::StyledPanel - QFrame::Shadow::Sunken + QFrame::Sunken true diff --git a/seq_qt5/forms/qsessionframe.ui b/seq_qt5/forms/qsessionframe.ui index 896ff834..40fb264d 100644 --- a/seq_qt5/forms/qsessionframe.ui +++ b/seq_qt5/forms/qsessionframe.ui @@ -16,7 +16,7 @@ - 8 + 17 42 149 18 @@ -38,7 +38,7 @@ Session Path - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + Qt::AlignmentFlag::AlignRight|Qt::AlignmentFlag::AlignTrailing|Qt::AlignmentFlag::AlignVCenter @@ -47,7 +47,7 @@ - 180 + 189 38 480 28 @@ -71,7 +71,7 @@ - Qt::ScrollBarAlwaysOff + Qt::ScrollBarPolicy::ScrollBarAlwaysOff false @@ -86,14 +86,14 @@ p, li { white-space: pre-wrap; } hr { height: 1px; border-width: 0; } li.unchecked::marker { content: "\2610"; } li.checked::marker { content: "\2612"; } -</style></head><body style=" font-size:11pt; font-weight:400; font-style:normal;"> +</style></head><body style=" font-family:'DejaVu LGC Sans'; font-size:11pt; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'WenQuanYi Zen Hei'; font-size:10pt; font-weight:456;">None</span></p></body></html> - 20 + 29 72 137 18 @@ -115,7 +115,7 @@ li.checked::marker { content: "\2612"; } Server URL - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + Qt::AlignmentFlag::AlignRight|Qt::AlignmentFlag::AlignTrailing|Qt::AlignmentFlag::AlignVCenter @@ -124,7 +124,7 @@ li.checked::marker { content: "\2612"; } - 180 + 189 68 480 28 @@ -148,7 +148,7 @@ li.checked::marker { content: "\2612"; } - Qt::ScrollBarAlwaysOff + Qt::ScrollBarPolicy::ScrollBarAlwaysOff false @@ -163,14 +163,14 @@ p, li { white-space: pre-wrap; } hr { height: 1px; border-width: 0; } li.unchecked::marker { content: "\2610"; } li.checked::marker { content: "\2612"; } -</style></head><body style=" font-size:11pt; font-weight:400; font-style:normal;"> +</style></head><body style=" font-family:'DejaVu LGC Sans'; font-size:11pt; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'WenQuanYi Zen Hei'; font-size:10pt; font-weight:456;">None</span></p></body></html> - 12 + 21 158 145 32 @@ -192,7 +192,7 @@ li.checked::marker { content: "\2612"; } Session Log File - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + Qt::AlignmentFlag::AlignRight|Qt::AlignmentFlag::AlignTrailing|Qt::AlignmentFlag::AlignVCenter @@ -201,7 +201,7 @@ li.checked::marker { content: "\2612"; } - 550 + 559 340 100 32 @@ -237,7 +237,7 @@ li.checked::marker { content: "\2612"; } - 180 + 189 8 480 28 @@ -261,7 +261,7 @@ li.checked::marker { content: "\2612"; } - Qt::ScrollBarAlwaysOff + Qt::ScrollBarPolicy::ScrollBarAlwaysOff false @@ -276,14 +276,14 @@ p, li { white-space: pre-wrap; } hr { height: 1px; border-width: 0; } li.unchecked::marker { content: "\2610"; } li.checked::marker { content: "\2612"; } -</style></head><body style=" font-size:11pt; font-weight:400; font-style:normal;"> +</style></head><body style=" font-family:'DejaVu LGC Sans'; font-size:11pt; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'WenQuanYi Zen Hei'; font-size:10pt; font-weight:456;">Normal</span></p></body></html> - 0 + 9 10 161 18 @@ -299,13 +299,13 @@ li.checked::marker { content: "\2612"; } Session Manager - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + Qt::AlignmentFlag::AlignRight|Qt::AlignmentFlag::AlignTrailing|Qt::AlignmentFlag::AlignVCenter - 12 + 21 102 145 18 @@ -321,13 +321,13 @@ li.checked::marker { content: "\2612"; } Config File - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + Qt::AlignmentFlag::AlignRight|Qt::AlignmentFlag::AlignTrailing|Qt::AlignmentFlag::AlignVCenter - 364 + 373 102 125 18 @@ -343,7 +343,7 @@ li.checked::marker { content: "\2612"; } Client ID/UUID - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + Qt::AlignmentFlag::AlignRight|Qt::AlignmentFlag::AlignTrailing|Qt::AlignmentFlag::AlignVCenter @@ -352,7 +352,7 @@ li.checked::marker { content: "\2612"; } - 180 + 189 98 160 28 @@ -376,7 +376,7 @@ li.checked::marker { content: "\2612"; } - Qt::ScrollBarAlwaysOff + Qt::ScrollBarPolicy::ScrollBarAlwaysOff false @@ -391,7 +391,7 @@ p, li { white-space: pre-wrap; } hr { height: 1px; border-width: 0; } li.unchecked::marker { content: "\2610"; } li.checked::marker { content: "\2612"; } -</style></head><body style=" font-size:11pt; font-weight:400; font-style:normal;"> +</style></head><body style=" font-family:'DejaVu LGC Sans'; font-size:11pt; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'WenQuanYi Zen Hei'; font-size:10pt; font-weight:456;">None</span></p></body></html> @@ -401,7 +401,7 @@ li.checked::marker { content: "\2612"; } - 504 + 513 98 156 28 @@ -425,7 +425,7 @@ li.checked::marker { content: "\2612"; } - Qt::ScrollBarAlwaysOff + Qt::ScrollBarPolicy::ScrollBarAlwaysOff false @@ -450,7 +450,7 @@ li.checked::marker { content: "\2612"; } - 170 + 179 190 480 28 @@ -484,16 +484,16 @@ li.checked::marker { content: "\2612"; } true - Qt::LogicalMoveStyle + Qt::CursorMoveStyle::LogicalMoveStyle - 24 + 15 130 - 133 - 17 + 151 + 20 @@ -506,13 +506,13 @@ li.checked::marker { content: "\2612"; } Macro Execution - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + Qt::AlignmentFlag::AlignRight|Qt::AlignmentFlag::AlignTrailing|Qt::AlignmentFlag::AlignVCenter - 208 + 217 130 452 24 @@ -533,13 +533,13 @@ li.checked::marker { content: "\2612"; } - QComboBox::InsertAlphabetically + QComboBox::InsertPolicy::InsertAlphabetically - 180 + 189 130 21 22 @@ -552,7 +552,7 @@ li.checked::marker { content: "\2612"; } - 170 + 179 160 449 28 @@ -582,7 +582,7 @@ remove this filename. - 22 + 31 280 501 91 @@ -602,7 +602,7 @@ author and dates. - 32 + 41 260 125 17 @@ -621,7 +621,7 @@ author and dates. - 158 + 167 260 393 17 @@ -640,7 +640,7 @@ author and dates. - 260 + 269 380 191 22 @@ -661,13 +661,13 @@ author and dates. Characters remaining - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + Qt::AlignmentFlag::AlignRight|Qt::AlignmentFlag::AlignTrailing|Qt::AlignmentFlag::AlignVCenter - 470 + 479 380 71 22 @@ -689,13 +689,13 @@ author and dates. 1024 - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter - 550 + 559 280 100 32 @@ -725,7 +725,7 @@ author and dates. - 140 + 149 380 61 26 @@ -746,7 +746,7 @@ then the first one is shown. - 16 + 25 220 141 22 @@ -762,7 +762,7 @@ then the first one is shown. Last Directory - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + Qt::AlignmentFlag::AlignRight|Qt::AlignmentFlag::AlignTrailing|Qt::AlignmentFlag::AlignVCenter @@ -771,7 +771,7 @@ then the first one is shown. - 170 + 179 220 480 28 @@ -799,7 +799,7 @@ then the first one is shown. - 46 + 55 194 111 22 @@ -815,13 +815,13 @@ then the first one is shown. Song Path - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + Qt::AlignmentFlag::AlignRight|Qt::AlignmentFlag::AlignTrailing|Qt::AlignmentFlag::AlignVCenter - 20 + 29 380 131 22 @@ -840,7 +840,7 @@ then the first one is shown. - 631 + 640 160 28 28 diff --git a/seq_qt5/forms/qslivegrid.ui b/seq_qt5/forms/qslivegrid.ui index 6a1659a0..44ef3586 100644 --- a/seq_qt5/forms/qslivegrid.ui +++ b/seq_qt5/forms/qslivegrid.ui @@ -26,10 +26,10 @@ Frame - QFrame::NoFrame + QFrame::Shape::NoFrame - QFrame::Plain + QFrame::Shadow::Plain @@ -62,10 +62,10 @@ - QFrame::NoFrame + QFrame::Shape::NoFrame - QFrame::Plain + QFrame::Shadow::Plain 0 @@ -101,7 +101,7 @@ - 32 + 38 28 @@ -121,7 +121,7 @@ Set - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + Qt::AlignmentFlag::AlignRight|Qt::AlignmentFlag::AlignTrailing|Qt::AlignmentFlag::AlignVCenter @@ -164,10 +164,10 @@ - QFrame::StyledPanel + QFrame::Shape::StyledPanel - QFrame::Sunken + QFrame::Shadow::Sunken diff --git a/seq_qt5/forms/qsmainwnd.ui b/seq_qt5/forms/qsmainwnd.ui index 8a23b14e..aafa34c3 100644 --- a/seq_qt5/forms/qsmainwnd.ui +++ b/seq_qt5/forms/qsmainwnd.ui @@ -57,7 +57,7 @@ B:B:T and H:M:S format. - Qt::LeftToRight + Qt::LayoutDirection::LeftToRight @@ -109,7 +109,7 @@ B:B:T and H:M:S format. <font color="#383838">Seq66</font> - Qt::RichText + Qt::TextFormat::RichText @@ -252,7 +252,7 @@ PPQN. 20 - QComboBox::NoInsert + QComboBox::InsertPolicy::NoInsert @@ -303,7 +303,7 @@ the current set. Modifies the song. - Qt::NoFocus + Qt::FocusPolicy::NoFocus Global Beats Per Measure @@ -338,7 +338,7 @@ the current set. Modifies the song. / - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -363,7 +363,7 @@ the current set. Modifies the song. - Qt::NoFocus + Qt::FocusPolicy::NoFocus Global Beat Width (length of beat) @@ -428,7 +428,7 @@ the current set. Modifies the song. 0 - QLayout::SetMaximumSize + QLayout::SizeConstraint::SetMaximumSize 0 @@ -469,16 +469,16 @@ the current set. Modifies the song. - Qt::TabFocus + Qt::FocusPolicy::TabFocus - Qt::LeftToRight + Qt::LayoutDirection::LeftToRight - QTabWidget::Rounded + QTabWidget::TabShape::Rounded - 6 + 7 false @@ -506,7 +506,7 @@ the current set. Modifies the song. - QLayout::SetFixedSize + QLayout::SizeConstraint::SetFixedSize 0 @@ -535,7 +535,7 @@ the current set. Modifies the song. - QLayout::SetFixedSize + QLayout::SizeConstraint::SetFixedSize 0 @@ -570,7 +570,7 @@ the current set. Modifies the song. - QLayout::SetFixedSize + QLayout::SizeConstraint::SetFixedSize 0 @@ -600,7 +600,7 @@ the current set. Modifies the song. - QLayout::SetMaximumSize + QLayout::SizeConstraint::SetMaximumSize @@ -626,7 +626,7 @@ the current set. Modifies the song. - QLayout::SetDefaultConstraint + QLayout::SizeConstraint::SetDefaultConstraint @@ -652,7 +652,7 @@ the current set. Modifies the song. - QLayout::SetDefaultConstraint + QLayout::SizeConstraint::SetDefaultConstraint @@ -678,7 +678,7 @@ the current set. Modifies the song. - QLayout::SetDefaultConstraint + QLayout::SizeConstraint::SetDefaultConstraint @@ -704,7 +704,7 @@ the current set. Modifies the song. - QLayout::SetDefaultConstraint + QLayout::SizeConstraint::SetDefaultConstraint @@ -837,7 +837,7 @@ during playback. - - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -866,7 +866,7 @@ during playback. Active - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + Qt::AlignmentFlag::AlignRight|Qt::AlignmentFlag::AlignTrailing|Qt::AlignmentFlag::AlignVCenter @@ -984,7 +984,7 @@ no matter what sets-mode is in force. Set - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + Qt::AlignmentFlag::AlignRight|Qt::AlignmentFlag::AlignTrailing|Qt::AlignmentFlag::AlignVCenter @@ -1044,7 +1044,7 @@ no matter what sets-mode is in force. - Qt::NoFocus + Qt::FocusPolicy::NoFocus Panic! Turns off all notes. @@ -1084,7 +1084,7 @@ no matter what sets-mode is in force. - Qt::NoFocus + Qt::FocusPolicy::NoFocus Stop playback. Shift-click rewinds transport. @@ -1146,7 +1146,7 @@ no matter what sets-mode is in force. - Qt::NoFocus + Qt::FocusPolicy::NoFocus Start/continue playback. @@ -1246,7 +1246,7 @@ input-buss patterns, or all channel patterns. - Qt::NoFocus + Qt::FocusPolicy::NoFocus Record live sequence changes into the @@ -1443,7 +1443,7 @@ all tracks. - Qt::NoFocus + Qt::FocusPolicy::NoFocus Toggle playback using the Song @@ -1500,7 +1500,7 @@ Editor triggers. true - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + Qt::AlignmentFlag::AlignRight|Qt::AlignmentFlag::AlignTrailing|Qt::AlignmentFlag::AlignVCenter true @@ -1565,7 +1565,7 @@ resets to 0. BPM - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + Qt::AlignmentFlag::AlignRight|Qt::AlignmentFlag::AlignTrailing|Qt::AlignmentFlag::AlignVCenter @@ -1594,14 +1594,14 @@ resets to 0. - Qt::ClickFocus + Qt::FocusPolicy::ClickFocus Allows the setting of the beats/minute. - Qt::LeftToRight + Qt::LayoutDirection::LeftToRight 1.000000000000000 @@ -1626,7 +1626,7 @@ beats/minute. 0 0 900 - 26 + 23 @@ -1774,7 +1774,7 @@ beats/minute. Ctrl+P - Qt::ApplicationShortcut + Qt::ShortcutContext::ApplicationShortcut diff --git a/seq_qt5/include/qseqeditframe64.hpp b/seq_qt5/include/qseqeditframe64.hpp index 7ae68bec..d6e6828b 100644 --- a/seq_qt5/include/qseqeditframe64.hpp +++ b/seq_qt5/include/qseqeditframe64.hpp @@ -27,7 +27,7 @@ * \library seq66 application * \author Chris Ahlstrom * \date 2018-06-15 - * \updates 2024-11-29 + * \updates 2024-12-11 * \license GNU GPLv2 or above * */ @@ -272,11 +272,11 @@ private slots: * void update_measures (int index); */ - void text_beats_per_bar (const QString & text); - void text_beat_width (const QString & text); + void text_beats_per_bar (); + void text_beat_width (); void reset_beats_per_bar (); void reset_beat_width (); - void text_measures (const QString & text); + void text_measures_edit (); #if defined USE_COMBO_BUTTON_TO_CYLE_MEASURES // kept only for posterity void next_measures (); #endif diff --git a/seq_qt5/src/qpatternfix.cpp b/seq_qt5/src/qpatternfix.cpp index af7abd0c..d5634fab 100644 --- a/seq_qt5/src/qpatternfix.cpp +++ b/seq_qt5/src/qpatternfix.cpp @@ -684,7 +684,8 @@ qpatternfix::slot_set () m_tighten_range, m_full_range, m_random_range, m_jitter_range, m_align_left, m_reverse, m_reverse_in_place, m_save_note_length, m_use_time_sig, m_time_sig_beats, - m_time_sig_width, m_measures, m_scale_factor, efx + m_time_sig_width, m_measures, m_scale_factor, + m_notemap_file, efx }; bool success = perf().fix_pattern(track().seq_number(), fp); if (success) diff --git a/seq_qt5/src/qseqeditframe64.cpp b/seq_qt5/src/qseqeditframe64.cpp index b72e424d..e7bf8749 100644 --- a/seq_qt5/src/qseqeditframe64.cpp +++ b/seq_qt5/src/qseqeditframe64.cpp @@ -25,7 +25,7 @@ * \library seq66 application * \author Chris Ahlstrom * \date 2018-06-15 - * \updates 2024-12-08 + * \updates 2024-12-11 * \license GNU GPLv2 or above * * The data pane is the drawing-area below the seqedit's event area, and @@ -406,13 +406,14 @@ qseqeditframe64::qseqeditframe64 ui->m_label_seqnumber->setText(labeltext); /* - * Sequence Title + * Sequence Title. Related to issue #133, we connect to editingFinished() + * instead. */ ui->m_entry_name->setText(qt(seqname)); connect ( - ui->m_entry_name, SIGNAL(textChanged(const QString &)), + ui->m_entry_name, SIGNAL(editingFinished()), this, SLOT(update_seq_name()) ); @@ -442,13 +443,16 @@ qseqeditframe64::qseqeditframe64 * ui->m_combo_bpm, SIGNAL(currentIndexChanged(int)), * this, SLOT(update_beats_per_bar(int)) * ); + * + * Related to issue #133, we need to connect the editable combo-box's + * line-edit. */ qt_set_icon(down_xpm, ui->m_button_bpm); connect ( - ui->m_combo_bpm, SIGNAL(currentTextChanged(const QString &)), - this, SLOT(text_beats_per_bar(const QString &)) + ui->m_combo_bpm->lineEdit(), SIGNAL(editingFinished()), + this, SLOT(text_beats_per_bar()) ); connect ( @@ -464,8 +468,8 @@ qseqeditframe64::qseqeditframe64 qt_set_icon(down_xpm, ui->m_button_bw); connect ( - ui->m_combo_bw, SIGNAL(currentTextChanged(const QString &)), - this, SLOT(text_beat_width(const QString &)) + ui->m_combo_bw->lineEdit(), SIGNAL(editingFinished()), + this, SLOT(text_beat_width()) ); connect ( @@ -502,13 +506,17 @@ qseqeditframe64::qseqeditframe64 * ui->m_combo_length, SIGNAL(currentIndexChanged(int)), * this, SLOT(update_measures(int)) * ); + * + * For issue #133, we need to connect the editable combo-box's line-edit + * control to the editingFinished signal, so that the number(s) being + * entered will not take effect until either Tab or Enter is struck. */ qt_set_icon(length_short_xpm, ui->m_button_length); connect ( - ui->m_combo_length, SIGNAL(currentTextChanged(const QString &)), - this, SLOT(text_measures(const QString &)) + ui->m_combo_length->lineEdit(), SIGNAL(editingFinished()), + this, SLOT(text_measures_edit()) ); connect ( @@ -1353,7 +1361,7 @@ qseqeditframe64::on_sequence_change bool qseqeditframe64::on_trigger_change (seq::number /* seqno */) { - set_dirty(); /* modified for issue #90 */ + set_track_change(true); /* also calls set_dirty() */ update_midi_buttons(); /* mirror current states */ return true; } @@ -1855,8 +1863,9 @@ qseqeditframe64::slot_log_timesig () */ void -qseqeditframe64::text_beats_per_bar (const QString & text) +qseqeditframe64::text_beats_per_bar () { + QString text = ui->m_combo_bpm->currentText(); std::string temp = text.toStdString(); if (! temp.empty()) { @@ -1970,15 +1979,18 @@ qseqeditframe64::set_measures (int m, qbase::status qs) } /** - * Resets the pattern-length in its combo-box. + * Resets the pattern-length to 1 in its combo-box. */ void qseqeditframe64::reset_measures () { - int index = beatwidth_list().index(m_measures); + int index = 0; /* beatwidth_list().index(m_measures) */ + m_measures = 1; ui->m_combo_length->setCurrentIndex(index); - set_track_change(); /* to solve issue #90 */ + set_measures(m_measures); +// track().remove_orphaned_events(); +// set_track_change(); /* to solve issue #90 */ } /** @@ -1994,8 +2006,9 @@ qseqeditframe64::reset_measures () */ void -qseqeditframe64::text_beat_width (const QString & text) +qseqeditframe64::text_beat_width () { + QString text = ui->m_combo_bw->currentText(); std::string temp = text.toStdString(); if (! temp.empty()) { @@ -2128,20 +2141,10 @@ qseqeditframe64::detect_time_signature () return result; } -/** - * Handles updates to the pattern length. - * - * void - * qseqeditframe64::update_measures (int index) - * { - * int m = measures_list().ctoi(index); - * set_measures(m); - * } - */ - void -qseqeditframe64::text_measures (const QString & text) +qseqeditframe64::text_measures_edit () { + QString text = ui->m_combo_length->currentText(); std::string temp = text.toStdString(); if (! temp.empty()) { diff --git a/seq_qt5/src/qseqroll.cpp b/seq_qt5/src/qseqroll.cpp index 31c12027..a231e9ae 100644 --- a/seq_qt5/src/qseqroll.cpp +++ b/seq_qt5/src/qseqroll.cpp @@ -1787,13 +1787,13 @@ qseqroll::keyPressEvent (QKeyEvent * event) set_adding(true); break; - case Qt::Key_Q: /* quantize selected notes */ + case Qt::Key_Q: /* quantize selected notes */ - if (track().push_quantize(EVENT_NOTE_ON, 0, 1)) + if (track().push_quantize_notes(1)) done = mark_modified(); break; - case Qt::Key_R: /* default random == 8 */ + case Qt::Key_R: /* default random == 8 */ /* * No alteration setting, as the human will randomize @@ -1804,9 +1804,9 @@ qseqroll::keyPressEvent (QKeyEvent * event) done = mark_modified(); break; - case Qt::Key_T: /* tighten selected notes */ + case Qt::Key_T: /* tighten selected notes */ - if (track().push_quantize(EVENT_NOTE_ON, 0, 2)) + if (track().push_quantize_notes(2)) done = mark_modified(); break; diff --git a/seq_qt5/src/qsmainwnd.cpp b/seq_qt5/src/qsmainwnd.cpp index ecc4efdc..b2b10785 100644 --- a/seq_qt5/src/qsmainwnd.cpp +++ b/seq_qt5/src/qsmainwnd.cpp @@ -4425,6 +4425,7 @@ qsmainwnd::on_trigger_change (seq::number seqno) { m_live_frame->refresh(seqno); /* this calls on_trigger_change()! */ enable_save(cb_perf().modified()); + m_is_title_dirty = true; } return result; }