Skip to content

Commit

Permalink
Wrestling with oddities in Dixie04.mid.
Browse files Browse the repository at this point in the history
  • Loading branch information
ahlstromcj committed Dec 14, 2023
1 parent c7f172c commit 3ba3096
Show file tree
Hide file tree
Showing 15 changed files with 134 additions and 51 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# README for Seq66 0.99.12 2023-12-06
# README for Seq66 0.99.12 2023-12-12

__Seq66__ MIDI sequencer/live-looper with a hardware-sampler grid interface;
pattern banks, triggers, and playlists for song management; scale and chord
Expand All @@ -20,7 +20,7 @@ Support sites (still in progress):

The release now includes an installer for the 64-bit Windows version of Seq66.

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

# Major Features

Expand Down
9 changes: 6 additions & 3 deletions Seq66cli/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# \library seq66cli application
# \author Chris Ahlstrom
# \date 2017-04-07
# \update 2023-12-11
# \update 2023-12-13
# \version $Revision$
# \license $XPC_SUITE_GPL_LICENSE$
#
Expand Down Expand Up @@ -167,16 +167,19 @@ bin_PROGRAMS = $(MIDIAPP)

#******************************************************************************
# seq66cli
#
# seq66cli_LDFLAGS = -Wl,--copy-dt-needed-entries
#
#----------------------------------------------------------------------------

seq66cli_SOURCES = seq66rtcli.cpp
seq66cli_DEPENDENCIES = $(NSM_DEPS) $(dependencies)
seq66cli_LDFLAGS = -Wl,--copy-dt-needed-entries
seq66cli_LDFLAGS = $(LINKER_FLAGS_ADD)
seq66cli_LDADD = $(NSM_LIBS) $(libraries) $(LIBLO_LIBS) $(ALSA_LIBS) $(JACK_LIBS) $(AM_LDFLAGS)

seq66clip_SOURCES = seq66rtcli.cpp
seq66clip_DEPENDENCIES = $(NSM_DEPS) $(dependencies)
seq66clip_LDFLAGS = -Wl,--copy-dt-needed-entries
seq66clip_LDFLAGS = $(LINKER_FLAGS_ADD)
seq66clip_LDADD = $(NSM_LIBS) $(libraries) $(LIBLO_LIBS) $(ALSA_LIBS) $(JACK_LIBS) $(AM_LDFLAGS)

#******************************************************************************
Expand Down
9 changes: 6 additions & 3 deletions Seq66cli/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# \library seq66cli application
# \author Chris Ahlstrom
# \date 2017-04-07
# \update 2023-12-11
# \update 2023-12-13
# \version $Revision$
# \license $XPC_SUITE_GPL_LICENSE$
#
Expand Down Expand Up @@ -517,14 +517,17 @@ dependencies = \

#******************************************************************************
# seq66cli
#
# seq66cli_LDFLAGS = -Wl,--copy-dt-needed-entries
#
#----------------------------------------------------------------------------
seq66cli_SOURCES = seq66rtcli.cpp
seq66cli_DEPENDENCIES = $(NSM_DEPS) $(dependencies)
seq66cli_LDFLAGS = -Wl,--copy-dt-needed-entries
seq66cli_LDFLAGS = $(LINKER_FLAGS_ADD)
seq66cli_LDADD = $(NSM_LIBS) $(libraries) $(LIBLO_LIBS) $(ALSA_LIBS) $(JACK_LIBS) $(AM_LDFLAGS)
seq66clip_SOURCES = seq66rtcli.cpp
seq66clip_DEPENDENCIES = $(NSM_DEPS) $(dependencies)
seq66clip_LDFLAGS = -Wl,--copy-dt-needed-entries
seq66clip_LDFLAGS = $(LINKER_FLAGS_ADD)
seq66clip_LDADD = $(NSM_LIBS) $(libraries) $(LIBLO_LIBS) $(ALSA_LIBS) $(JACK_LIBS) $(AM_LDFLAGS)
all: all-am

Expand Down
6 changes: 3 additions & 3 deletions Seq66qt5/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# \library seq66qt5 application
# \author Chris Ahlstrom
# \date 2017-09-05
# \update 2023-12-08
# \update 2023-12-13
# \version $Revision$
# \license $XPC_SUITE_GPL_LICENSE$
#
Expand Down Expand Up @@ -206,12 +206,12 @@ bin_PROGRAMS = $(MIDIAPP)

qseq66_SOURCES = seq66qt5.cpp
qseq66_DEPENDENCIES = $(NSM_DEPS) $(dependencies)
qseq66_LDFLAGS = -Wl,--copy-dt-needed-entries
qseq66_LDFLAGS = $(LINKER_FLAGS_ADD)
qseq66_LDADD = $(NSM_LIBS) $(libraries) $(LIBLO_LIBS) $(QT_LIBS) $(ALSA_LIBS) $(JACK_LIBS) $(AM_LDFLAGS)

qpseq66_SOURCES = seq66qt5.cpp
qpseq66_DEPENDENCIES = $(NSM_DEPS) $(dependencies)
qpseq66_LDFLAGS = -Wl,--copy-dt-needed-entries
qpseq66_LDFLAGS = $(LINKER_FLAGS_ADD)
qpseq66_LDADD = $(NSM_LIBS) $(libraries) $(LIBLO_LIBS) $(QT_LIBS) $(ALSA_LIBS) $(JACK_LIBS) $(AM_LDFLAGS)

#******************************************************************************
Expand Down
6 changes: 3 additions & 3 deletions Seq66qt5/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# \library seq66qt5 application
# \author Chris Ahlstrom
# \date 2017-09-05
# \update 2023-12-08
# \update 2023-12-13
# \version $Revision$
# \license $XPC_SUITE_GPL_LICENSE$
#
Expand Down Expand Up @@ -555,11 +555,11 @@ dependencies = \
#----------------------------------------------------------------------------
qseq66_SOURCES = seq66qt5.cpp
qseq66_DEPENDENCIES = $(NSM_DEPS) $(dependencies)
qseq66_LDFLAGS = -Wl,--copy-dt-needed-entries
qseq66_LDFLAGS = $(LINKER_FLAGS_ADD)
qseq66_LDADD = $(NSM_LIBS) $(libraries) $(LIBLO_LIBS) $(QT_LIBS) $(ALSA_LIBS) $(JACK_LIBS) $(AM_LDFLAGS)
qpseq66_SOURCES = seq66qt5.cpp
qpseq66_DEPENDENCIES = $(NSM_DEPS) $(dependencies)
qpseq66_LDFLAGS = -Wl,--copy-dt-needed-entries
qpseq66_LDFLAGS = $(LINKER_FLAGS_ADD)
qpseq66_LDADD = $(NSM_LIBS) $(libraries) $(LIBLO_LIBS) $(QT_LIBS) $(ALSA_LIBS) $(JACK_LIBS) $(AM_LDFLAGS)
all: all-am

Expand Down
1 change: 1 addition & 0 deletions TODO
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Chris Ahlstrom

Misc:

- Do not parse files twice if no options given on command line.
- Clang-16:
- CLANG and LO_TT_IMMEDIATE: warning: compound literals are a
C99-specific feature [-Wc99-extensions]. See
Expand Down
12 changes: 9 additions & 3 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -4705,10 +4705,12 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu



LINKER_FLAGS_ADD = "-Wl,--copy-dt-needed-entries"

if test "$CXX" = "clang++" ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether clang works" >&5
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether clang works" >&5
$as_echo_n "checking whether clang works... " >&6; }
ac_ext=cpp
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
Expand All @@ -4735,9 +4737,13 @@ main ()
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }

$as_echo "#define CLANG_SUPPORT 1" >>confdefs.h

LINKER_FLAGS_ADD = ""

else

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Expand Down
25 changes: 12 additions & 13 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,6 @@ AX_PREFIX_CONFIG_H([include/seq66-config.h], [seq66])

dnl gcc/g++ configuration.

dnl AC_PROG_CC([gcc])
dnl AC_PROG_CXX([g++])
dnl AC_PROG_CXXCPP([cpp])
dnl
dnl AC_PROG_CC
dnl AC_PROG_CXX
dnl AC_PROG_CXXCPP
dnl AC_PROG_INSTALL
dnl AC_PROG_LN_S
dnl AC_PROG_MKDIR_P
Expand All @@ -62,12 +55,15 @@ dnl
dnl If CXX is Clang, check that it can find and parse C++ standard library
dnl headers. Note that space between 'include' and '(' is required.
dnl There's a broken regex in aclocal that otherwise will think that we call
dnl m4's include dnl builtin.
dnl m4's include builtin. The linker flags are used with gcc, but not
dnl clang.

LINKER_FLAGS_ADD = "-Wl,--copy-dt-needed-entries"

if test "$CXX" = "clang++" ; then
AC_MSG_CHECKING([whether clang works])
AC_LANG_PUSH([C++])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <limits>
AC_MSG_CHECKING([whether clang works])
AC_LANG_PUSH([C++])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <limits>
#if __has_include (<cxxabi.h>)
#include <cxxabi.h>
#endif
Expand All @@ -76,7 +72,9 @@ if test "$CXX" = "clang++" ; then
#endif
]])],
[
AC_MSG_RESULT([yes])
AC_MSG_RESULT([yes])
AC_DEFINE(CLANG_SUPPORT, 1, [Define if CLANG is active])
LINKER_FLAGS_ADD = ""
],
[
AC_MSG_RESULT([no])
Expand Down Expand Up @@ -289,7 +287,8 @@ AC_ARG_ENABLE(jack,
[jack=yes])

dnl JACK session support is now deprecated (circa 2020-10-26), but still the
dnl default for this option is 'no'. JACK recommends using NSM instead!
dnl default for this option is 'yes'. JACK recommends using NSM instead! But
dnl Seq66 will support it for awhile yet.

AC_ARG_ENABLE(jack-session,
[AS_HELP_STRING(--disable-jack-session, [Disable JACK session support])],
Expand Down
11 changes: 9 additions & 2 deletions contrib/midi/README
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIDI Sample and Test Files
Chris Ahlstrom
2015-09-11 to 2023-12-11
2015-09-11 to 2023-12-14

This directory contains contributed MIDI files for examples and testing.
Also see the test files from the midicvt as described in
Expand Down Expand Up @@ -55,7 +55,14 @@ the "example1" file.
events. SysEx messages start with F0 and end with F7. Universal
Real Time SysEx messages start with F0, followed by 7F, then include
other fields before the terminating F7. More importantly, it appears
to have an unterminated SysEx event starting at 0x53DF.
to have an unterminated SysEx event starting at 0x53DF. Also, the
MThd header specifies 14 tracks, but there are only 4 MTrk chunks
according to midicvt. This is wrong; a binary edit shows 14 MTrks.
Seq66 (and QTractor) loads only 12 tracks. Another peculiarity of this
file is that the sequence 9D 7D (F0 7F 00) x 5 occurs 10 times, and
there are many other F0 F7 nn sequences followed immediately by an
F0! We can ignore these without storing them, but is that the best
way to handle them? What do they mean?

mutes-long.midi:

Expand Down
44 changes: 36 additions & 8 deletions doc/latex/tex/midi_formats.tex
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
% \library Documents
% \author Chris Ahlstrom
% \date 2015-09-03
% \update 2023-12-12
% \update 2023-12-14
% \version $Revision$
% \license $XPC_GPL_LICENSE$
%
Expand Down Expand Up @@ -1115,9 +1115,9 @@ \subsubsection{SysEx Event (0xF0)}
\item \textbf{0x7F}.
Represents a non-realtime system exclusive message.
All MIDI devices can respond to it, immediately.
\textsl{Seq66} uses the SysEx real-time message to support
SeqSpecs.
See \sectionref{paragraph:midi_format_seq66_seqspecs}.
% WRONZg \textsl{Seq66} uses the SysEx real-time message to support
% SeqSpecs.
% See \sectionref{paragraph:midi_format_seq66_seqspecs}.
\end{itemize}

For more information on these events, see
Expand Down Expand Up @@ -1196,7 +1196,7 @@ \subsubsection{SysEx Event (0xF0)}
\label{paragraph:patterns_escape_sequence}

An escape sequence is not SysEx, but it does use the F7 byte.
It is used for encoding arbitrary bytes for message such as Song Select.
It is used for encoding arbitrary bytes for messages such as Song Select.
The first line shows such a message, and the second how it would be encoded.

\begin{verbatim}
Expand Down Expand Up @@ -1229,17 +1229,42 @@ \subsubsection{Universal SysEx Events (0xF0 0x7E and 0xF0 0x7F)}
wild-card for "all devices").

\begin{verbatim}
F7 7E channel subid data bytes F7
F7 7F channel subid data bytes F7
F7 7E channel subid data bytes F7 (non-realtime)
F7 7F channel subid data bytes F7 (realtime)
\end{verbatim}

If \texttt{channel} is F7, this is a global broadcast that all devices
should heed.
The \texttt{subid} could be something like "01 00" for a long-form
(full frame) time-code message.

% F0 7E id 01 Channel Pressure (Aftertouch)
% F0 7E id 01 or Sample Dump Header???
% F0 7E id 02 Polyphonic Key Pressure (Aftertouch)
% F0 7E id 02 or Sample Data Packet???
% F0 7E id 03 Controller (Control Change)
% F0 7E id 03 or Sample Dump Request???
% F0 7E id 09 nn F7 GM System Enable / Disable (01 / 00)
% F0 7F 00 ???
% F0 7F id 01 01 hh mm ss ff F7 MIDI Full Frame
% F0 7F id 04 01 mm nn F7 MIDI Master Volume (vs Controller Volume)

A detailed description is beyond the scope of this document.
Some messages supported by these messages are the
\textsl{MIDI Master Volume},
\textsl{MIDI Full Frame},
and the \textsl{General MIDI System Enable/Disable}
messages.

An interesting subset of these messages is \textsl{MIDI Show Control}
(MSC):

\begin{verbatim}
F7 7F deviceid 02 commandformat command data F7 (MSC)
\end{verbatim}

See \cite{msc}.
Some simple controls can be included in the 'ctrl' file's set of macros.

\paragraph{Seq66 SysEx Handling}
\label{paragraph:midi_format_seq66_sysex_handling}
Expand All @@ -1260,7 +1285,10 @@ \subsubsection{Universal SysEx Events (0xF0 0x7E and 0xF0 0x7F)}
\end{verbatim}

The "manid" is a manufacturer's identifier. 0x41 is Roland, 0x24 is
Hohner. The "devid" is the device identifier (e.g. 0x10 for Roland devices).
Hohner. 0x00 is used for adding two more codes to greatly expand the ID
list. 0x7E is used to denote a non-realtime message, and 0x7F denotes
a realtime message.
The "devid" is the device identifier (e.g. 0x10 for Roland devices).
The "devid" indicates which devices will accept the SysEx message.
The "modelid" is the model identifier (0x42 for most GS synths).
The "direction" is 0x12 for sending information or 0x11 for requesting
Expand Down
7 changes: 6 additions & 1 deletion doc/latex/tex/references.tex
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
% \library Documents
% \author Chris Ahlstrom
% \date 2015-08-31
% \update 2023-09-20
% \update 2023-12-14
% \version $Revision$
% \license $XPC_GPL_LICENSE$
%
Expand Down Expand Up @@ -155,6 +155,11 @@ \section{References}
\url{https://github.com/ahlstromcj/midicvt}.
2015-2016.

\bibitem{msc}
\emph{Digital Sound and Music: MIDI Show Control.}
\url{https://digitalsoundandmusic.com/6-2-5-non-musical-applications-for-midi/}.
2023.

\bibitem{nanobasket}
Roy Vegard.
\emph{Configurator software for the Korg nanoSERIES of MIDI controllers.}
Expand Down
3 changes: 3 additions & 0 deletions include/config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
/* Name of the UI of the application */
#undef APP_TYPE

/* Define if CLANG is active */
#undef CLANG_SUPPORT

/* "Name to display as client/port" */
#undef CLIENT_NAME

Expand Down
4 changes: 2 additions & 2 deletions libseq66/include/midi/event.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* \library seq66 application
* \author Chris Ahlstrom
* \date 2015-07-24
* \updates 2023-12-11
* \updates 2023-12-12
* \license GNU GPLv2 or above
*
* This module also declares/defines the various constants, status-byte
Expand Down Expand Up @@ -773,7 +773,7 @@ class event
static bool is_sysex_msg (midibyte m)
{
return m == EVENT_MIDI_SYSEX ||
EVENT_MIDI_SYSEX_CONTINUE; /* 0xF7 as SysEx Continue */
m == EVENT_MIDI_SYSEX_CONTINUE; /* 0xF7 as SysEx Continue */
}

/**
Expand Down
4 changes: 2 additions & 2 deletions libseq66/include/midi/midifile.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
* \library seq66 application
* \author Chris Ahlstrom
* \date 2015-07-24
* \updates 2023-12-11
* \updates 2023-12-14
* \license GNU GPLv2 or above
*
* The Seq24 MIDI file is a standard, Format 1 MIDI file, with some extra
Expand Down Expand Up @@ -373,7 +373,7 @@ class midifile
bool read_byte_array (midistring & b, size_t len);
bool read_string (std::string & b, size_t len);
bool read_meta_data (sequence & s, event & e, midibyte metatype, size_t len);
int read_sysex_data
bool read_sysex_data
(
sequence & s, event & e,
size_t len, bool continuation = false
Expand Down
Loading

0 comments on commit 3ba3096

Please sign in to comment.