Skip to content

Commit

Permalink
Fixed modify flag when loading MIDI file with sequence having an inpu…
Browse files Browse the repository at this point in the history
…t buss specified.
  • Loading branch information
ahlstromcj committed Oct 27, 2024
1 parent ab73dbd commit 89040e7
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 25 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# README.md for Seq66 0.99.15 2024-10-26
# README.md for Seq66 0.99.15 2024-10-27

__Seq66__ MIDI sequencer/live-looper with a hardware-sampler grid interface;
pattern banks, triggers, and playlists for song management; scale and chord
Expand All @@ -24,6 +24,8 @@ the Clang compiler.

See NEWS for updates and RELNOTES for highlights.

Currnet development-in-prgoress branch: wip.

![Alt text](doc/latex/images/main-window/main-windows-perstfic.png?raw=true "Seq66")

# Major Features
Expand Down
4 changes: 1 addition & 3 deletions TODO
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
TO DO for Seq66 0.99.15
Chris Ahlstrom
2019-04-13 to 2024-10-21
2019-04-13 to 2024-10-27

From Testing:

- If a MIDI file sets the input buss on a pattern, it is marked modified
as soon as loaded.
- Update one-shot process documentation to indicate it is on the pattern
editor. Fix any issues found.
- Get the 16-in-busses.midi file configured and working.
Expand Down
6 changes: 3 additions & 3 deletions bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# \library Seq66
# \author Chris Ahlstrom
# \date 2018-11-09
# \update 2024-10-25
# \update 2024-10-27
# \version $Revision$
# \license $XPC_SUITE_GPL_LICENSE$
#
Expand Down Expand Up @@ -36,7 +36,7 @@ LANG=C
export LANG
CYGWIN=binmode
export CYGWIN
export SEQ66_BOOTSTRAP_EDIT_DATE="2024-10-25"
export SEQ66_BOOTSTRAP_EDIT_DATE="2024-10-27"
export SEQ66_LIBRARY_API_VERSION="0.99"
export SEQ66_LIBRARY_VERSION="$SEQ66_LIBRARY_API_VERSION.15"

Expand Down Expand Up @@ -279,7 +279,7 @@ if [ $# -ge 1 ] ; then
;;

*)
echo "? Unsupported bootstrap option; --help for more information"
echo "? Unsupported bootstrap option $1; --help for more information"
exit $EXIT_ERROR_NO_SUCH_OPTION
;;

Expand Down
4 changes: 2 additions & 2 deletions libseq66/include/play/performer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* \library seq66 application
* \author Chris Ahlstrom
* \date 2018-11-12
* \updates 2024-04-30
* \updates 2024-10-27
* \license GNU GPLv2 or above
*
* The main player! Coordinates sets, patterns, mutes, playlists, you name
Expand Down Expand Up @@ -1788,7 +1788,7 @@ class performer
return m_record_by_buss;
}

bool sequence_inbus_setup ();
bool sequence_inbus_setup (bool changed = false);
void sequence_inbus_clear ();
sequence * sequence_inbus_lookup (const event & ev);

Expand Down
31 changes: 15 additions & 16 deletions libseq66/src/play/performer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* \library seq66 application
* \author Chris Ahlstrom and others
* \date 2018-11-12
* \updates 2024-08-18
* \updates 2024-10-27
* \license GNU GPLv2 or above
*
* Also read the comments in the Seq64 version of this module, perform.
Expand Down Expand Up @@ -1728,7 +1728,7 @@ performer::add_to_play_set (sequence * s)
{
bool result = set_mapper().add_to_play_set(play_set(), s);
if (result)
record_by_buss(sequence_inbus_setup());
record_by_buss(sequence_inbus_setup()); /* not a change */

return result;
}
Expand All @@ -1738,7 +1738,7 @@ performer::fill_play_set (bool clearit)
{
bool result = set_mapper().fill_play_set(play_set(), clearit);
if (result)
record_by_buss(sequence_inbus_setup());
record_by_buss(sequence_inbus_setup()); /* not a change */

return result;
}
Expand Down Expand Up @@ -2081,7 +2081,7 @@ performer::new_sequence (sequence * seqptr, seq::number seqno)
seq::number finalseq = s->seq_number();
screenset::number setno = set_mapper().seq_set(seqno);
s->set_dirty();
record_by_buss(sequence_inbus_setup());
record_by_buss(sequence_inbus_setup(true));
announce_sequence(s, finalseq); /* issue #112 */
notify_sequence_change(finalseq, change::recreate);
notify_set_change(setno, change::yes);
Expand Down Expand Up @@ -2180,7 +2180,7 @@ performer::remove_sequence (seq::number seqno)
{
seq::number buttonno = seqno - playscreen_offset();
send_seq_event(buttonno, midicontrolout::seqaction::removed);
record_by_buss(sequence_inbus_setup());
record_by_buss(sequence_inbus_setup(true));
notify_sequence_change(seqno, change::recreate);
modify();
}
Expand Down Expand Up @@ -2953,13 +2953,6 @@ performer::set_playing_screenset (screenset::number setno)
* Nothing to do?
*/
}

/*
* Now done in fill_play_set().
*
* record_by_buss(sequence_inbus_setup());
*/

announce_playscreen(); /* inform control-out */
notify_set_change(setno, change::signal); /* change::no */
}
Expand Down Expand Up @@ -3460,14 +3453,19 @@ performer::launch (int ppqn)
* pattern is added or removed, or when its input buss is set. Might also
* need to be updated when the playset changes.
*
* \param changed
* If true (the default is false), then the setup is due to the user
* selecting the input bus. Otherwise (such as when reading a MIDI
* file), do not raise the modified flag.
*
* \return
* Returns true if record-by-buss was true and if any patterns with an
* input buss set were found. As a side-effect, performer ::
* record_by_buss() is set to the result.
*/

bool
performer::sequence_inbus_setup ()
performer::sequence_inbus_setup (bool changed)
{
bool result = false;
if (rc().sequence_lookup_support())
Expand All @@ -3489,13 +3487,14 @@ performer::sequence_inbus_setup ()
bussbyte b = seqi->true_in_bus();
if (! is_null_buss(b)) /* b < buscount */
{
change mod = changed ? change::recreate : change::no ;
int seqno = int(seqi->seq_number());
m_buss_patterns.push_back(seqi.get());
result = true;
record_by_buss(result);
notify_sequence_change(seqno, change::recreate); /* new */
notify_sequence_change(seqno, mod);

#if defined SEQ66_PLATFORM_DEBUG
#if defined SEQ66_PLATFORM_DEBUG_TMI
char temp[64];
snprintf
(
Expand Down Expand Up @@ -4144,7 +4143,7 @@ performer::set_midi_in_bus (seq::number seqno, int buss)
if (result)
{
result = s->set_midi_in_bus(buss, true); /* a user change */
record_by_buss(sequence_inbus_setup());
record_by_buss(sequence_inbus_setup(true)); /* ditto */
}
return result;
}
Expand Down

0 comments on commit 89040e7

Please sign in to comment.