Skip to content

Commit

Permalink
Hacking at issues #44 and #100, issues still.
Browse files Browse the repository at this point in the history
  • Loading branch information
ahlstromcj committed Oct 6, 2022
1 parent 742a955 commit f3d99c8
Show file tree
Hide file tree
Showing 35 changed files with 772 additions and 318 deletions.
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# README for Seq66 0.99.1

Chris Ahlstrom
2015-09-10 to 2022-09-27
2015-09-10 to 2022-10-05

__Seq66__ is a MIDI sequencer and live-looper with a hardware-sampler-like
grid-pattern interface, sets and playlists for song management, a scale and
Expand Down Expand Up @@ -94,17 +94,24 @@ Windows, and using a conventional source tarball.
## Recent Changes

* Version 0.99.1:
* Issue #44. Revisited to fix related additional issues. Can now
toggle a pattern's song record in perfnames. Record button:
Ctrl disables snap, Shift enables record at playback start.
* Issue #93. Revisited to fix related open pattern-editor issues.
* Issue #100. In progress. Added custom ringbuffer for MIDI message
objects to replace JACK's ringbuffer. Issue still somewhat
intractable :-(
intractable :-(. Also added configuration to calculate the sample
offset and set the buffer size.
* Various fixes:
* Fixed partial breakage of pattern-merge function.
* Fixed odd breakage of ALSA playback in release mode.
* Fixed Stop button when another Master has started playback.
* Shift-click on Stop button rewinds JACK transport when running
as JACK Slave.
* Display of some JACK server settings in Edit / Preferences.
* Fixed handling of Ctrl vs non-Ctrl zoom keys in perfroll.
* The pernames panel now matches the layout of a grid button
better.
* Version 0.99.0:
* Issue #44. Record live sequence changes functionality beefed up
to handle recording without snapping.
Expand Down
12 changes: 11 additions & 1 deletion TODO
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
TO DO for Seq66 0.99.1 (Sequencer64 refactored for C++14 and Qt)
Chris Ahlstrom
2019-04-13 to 2022-09-27
2019-04-13 to 2022-10-03

Ongoing efforts:

Expand Down Expand Up @@ -215,6 +215,16 @@ ISSUES:
the same track while focussing entirely on knob tweaking etc.) The song
timeline already supports arbitrary start/end points for pattern "chunks",
so it seems like this should already be possible. Thoughts?
1. When recording live sequence changes in song mode, turning "snap" mode
off makes the pattern block start exactly when you press the button on the
Launchpad, like you expect, but the end point always extends out to the
next multiple of the pattern length when you mute it again.
2. With "snap" mode enabled, live sequence changes always snap to pattern
length regardless of the snap size setting in the drop-down box. The snap
size does work when dragging and resizing pattern blocks in the timeline -
except.
3. ...off-by-one error in the snap size drop-down. 1/1 and 1/2 are both 1/1,
1/3 is actually 1/2, 1/4 is actually 1/3 etc. FIXED.
STATUS: to examine.

#45 Closed.
Expand Down
Binary file added contrib/midi/songtest.midi
Binary file not shown.
Binary file added contrib/midi/songtest.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
107 changes: 107 additions & 0 deletions contrib/midi/songtest.text
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
File name: /home/ahlstrom/Home/ca/mls/git/seq66/contrib/midi/songtest.text
No. of sets: 1
No. of tracks: 4
MIDI format: 1
PPQN: 192
Sequence #0 'Snap 1'
Channel: 0
Beats: 4/4
Busses: 0-->0
Length (ticks): 768
Events;triggers: 28; 2
Transposable: true
Key and scale: 0; 0
Color: 1
2 triggers:
trigger: 0 to 767 at 768 transpose by 0
trigger: 1728 to 2495 at 768 transpose by 0

Sequence #1 'Snap 2'
Channel: 128
Beats: 4/4
Busses: 0-->0
Length (ticks): 1536
Events;triggers: 64; 2
Transposable: false
Key and scale: 0; 0
Color: 2
2 triggers:
trigger: 0 to 1535 at 1536 transpose by 0
trigger: 3264 to 4799 at 1536 transpose by 0

Sequence #2 'Unsnap 1'
Channel: 0
Beats: 4/4
Busses: 0-->0
Length (ticks): 768
Events;triggers: 28; 2
Transposable: true
Key and scale: 0; 0
Color: 1
2 triggers:
trigger: 528 to 1295 at 0 transpose by 0
trigger: 2368 to 3135 at 0 transpose by 0

Sequence #3 'Unsnap 2'
Channel: 128
Beats: 4/4
Busses: 0-->0
Length (ticks): 1536
Events;triggers: 64; 2
Transposable: false
Key and scale: 0; 0
Color: 2
2 triggers:
trigger: 288 to 1823 at 0 transpose by 0
trigger: 3344 to 4879 at 0 transpose by 0

Start of SeqSpecs:
0xFF 0x7F 24240010 (MIDI control) = 0
0xFF 0x7F 24240003 (Track clocking) = 0
Screen-set Notes:
0xFF 0x7F 24240005 (Set notes) = 1
Set #0: 'New'
0xFF 0x7F 24240007 (Main beats/minute) = 200
BPM: 200
Mute Groups: 32 of size 32
0xFF 0x7F 24240009 (Song mute group data) = 32
Mute group # 0: 00000000 00000000 00000000 00000000 "Group 0"
Mute group # 1: 00000000 00000000 00000000 00000000 "Group 1"
Mute group # 2: 00000000 00000000 00000000 00000000 "Group 2"
Mute group # 3: 00000000 00000000 00000000 00000000 "Group 3"
Mute group # 4: 00000000 00000000 00000000 00000000 "Group 4"
Mute group # 5: 00000000 00000000 00000000 00000000 "Group 5"
Mute group # 6: 00000000 00000000 00000000 00000000 "Group 6"
Mute group # 7: 00000000 00000000 00000000 00000000 "Group 7"
Mute group # 8: 00000000 00000000 00000000 00000000 "Group 8"
Mute group # 9: 00000000 00000000 00000000 00000000 "Group 9"
Mute group #10: 00000000 00000000 00000000 00000000 "Group 10"
Mute group #11: 00000000 00000000 00000000 00000000 "Group 11"
Mute group #12: 00000000 00000000 00000000 00000000 "Group 12"
Mute group #13: 00000000 00000000 00000000 00000000 "Group 13"
Mute group #14: 00000000 00000000 00000000 00000000 "Group 14"
Mute group #15: 00000000 00000000 00000000 00000000 "Group 15"
Mute group #16: 00000000 00000000 00000000 00000000 "Group 16"
Mute group #17: 00000000 00000000 00000000 00000000 "Group 17"
Mute group #18: 00000000 00000000 00000000 00000000 "Group 18"
Mute group #19: 00000000 00000000 00000000 00000000 "Group 19"
Mute group #20: 00000000 00000000 00000000 00000000 "Group 20"
Mute group #21: 00000000 00000000 00000000 00000000 "Group 21"
Mute group #22: 00000000 00000000 00000000 00000000 "Group 22"
Mute group #23: 00000000 00000000 00000000 00000000 "Group 23"
Mute group #24: 00000000 00000000 00000000 00000000 "Group 24"
Mute group #25: 00000000 00000000 00000000 00000000 "Group 25"
Mute group #26: 00000000 00000000 00000000 00000000 "Group 26"
Mute group #27: 00000000 00000000 00000000 00000000 "Group 27"
Mute group #28: 00000000 00000000 00000000 00000000 "Group 28"
Mute group #29: 00000000 00000000 00000000 00000000 "Group 29"
Mute group #30: 00000000 00000000 00000000 00000000 "Group 30"
Mute group #31: 00000000 00000000 00000000 00000000 "Group 31"
Global key, scale, and background sequence:
0xFF 0x7F 24240011 (Track key) = 0
0xFF 0x7F 24240012 (Track scale) = 0
0xFF 0x7F 24240013 (Track background sequence) = 2048
Global beats, beat width, and tempo track:
0xFF 0x7F 24240015 (Perfedit beats/measure) = 4
0xFF 0x7F 24240016 (Perfedit beat-width) = 4
0xFF 0x7F 2424001a (Alternate tempo track number) = 0
125 changes: 97 additions & 28 deletions contrib/scripts/jackctl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# \library Any project
# \author Chris Ahlstrom
# \date 2022-09-25
# \update 2022-09-26
# \update 2022-10-03
# \version $Revision$
# \license $XPC_SUITE_GPL_LICENSE$
#
Expand Down Expand Up @@ -45,54 +45,123 @@
#
#------------------------------------------------------------------------------

JCTL_OPERATION="start"
JCTL_OPERATION="set"
JCTL_DRIVER="alsa"
JCTL_DEVICE="hw:CODEC" # see "cat /proc/asound/cards"
JCTL_RATE="48000"
JCTL_LATENCY="2"
JCTL_PERIOD="2048" # for TESTING

if [ "$1" == "--list" ] ; then
echo "Available drivers:"
jack_control dl
echo "Selecting ALSA (seq). Available parameters:"
jack_control ds $JCTL_DRIVER
jack_control dp
elif [ "$1" == "--help" ] ; then
if [ "$1" == "--help" ] ; then

cat << E_O_F
Usage:
jackctl Start with the usual parameters (TBD).
jackctl --list List the drivers and the ALSA parameters.
jackctl --start Start the JACK server, that's it.
jackctl --stop Stop the JACK server.
jackctl --kill Stop the JACK server and exit jackdbus.
jackctl --period F Change the period of the JACK server.
jackctl --nperiod P Change ALSA period (playback latency, 2 or 3).
jackctl --help Show this message.
jackctl [--start] [options] Start with the usual parameters (TBD).
Options:
--list List the drivers and the ALSA parameters.
--start Start the JACK server and apply current settings.
--stop Stop the JACK server.
--kill Stop the JACK server and exit jackdbus.
--period F Change the period of the JACK server.
--nperiod P Change ALSA period (playback latency, 2 or 3).
--rate R Change the "sample rate".
--help Show this message.
Getting tired of qjackctl and jackdbus wrestling with each other on
a newer Ubuntu system that runs jackdbus.
E_O_F
elif [ "$1" == "--start" ] ; then
jack_control start
elif [ "$1" == "--stop" ] ; then
jack_control stop
elif [ "$1" == "--kill" ] ; then

else

while [ "$1" != "" ] ; do

case "$1" in

--list | list)
JCTL_OPERATION="list"
;;

--start | start)
JCTL_OPERATION="start"
;;

--stop | stop)
JCTL_OPERATION="stop"
;;

--kill | kill)
JCTL_OPERATION="kill"
;;

--rate | rate)
shift
JCTL_RATE="$1"
;;

--period | period)
shift
JCTL_PERIOD="$1"
;;

--nperiod | nperiod)
shift
JCTL_LATENCY="$1"
;;

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

esac
shift

done

fi

if [ "$JCTL_OPERATION" == "list" ] ; then

echo "Available sound sinks:"
cat /proc/asound/cards | grep "^[ 0-9][0-9]"
# echo "Available drivers:"
# jack_control dl
echo "Selecting ALSA (seq). Available parameters:"
jack_control ds $JCTL_DRIVER
# jack_control dp
jack_control dp | grep "ALSA\|rate\:\|period\:\|nperiods\:"

elif [ "$JCTL_OPERATION" == "stop" ] ; then

jack_control stop
jack_control exit
elif [ "$1" == "--period" ] ; then
JCTL_PERIOD="$2"
jack_control dps period $JCTL_PERIOD
elif [ "$1" == "--nperiod" ] ; then
JCTL_LATENCY="$2"
jack_control dps nperiod $JCTL_LATENCY
else

elif [ "$JCTL_OPERATION" == "kill" ] ; then

jack_control stop
jack_control exit

elif [ "$JCTL_OPERATION" == "start" ] ; then

jack_control start
jack_control ds $JCTL_DRIVER
jack_control dps device $JCTL_DEVICE
jack_control dps rate $JCTL_RATE
jack_control dps nperiods $JCTL_LATENCY
jack_control dps period $JCTL_PERIOD

elif [ "$JCTL_OPERATION" == "set" ] ; then

jack_control ds $JCTL_DRIVER
jack_control dps device $JCTL_DEVICE
jack_control dps rate $JCTL_RATE
jack_control dps nperiods $JCTL_LATENCY
jack_control dps period $JCTL_PERIOD

fi

#******************************************************************************
Expand Down
24 changes: 12 additions & 12 deletions doc/latex/tex/song_editor.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 2022-03-22
% \update 2022-10-04
% \version $Revision$
% \license $XPC_GPL_LICENSE$
%
Expand Down Expand Up @@ -181,9 +181,10 @@ \subsection{Song Editor / Top Panel}
\texttt{x}.

\itempar{Record Snap}{song editor!record snap}
If enabled, it allows only full clips of a pattern to be added.
If enabled, it allows not only full clips of a pattern to be added,
but smaller intervals listed below.
It turns on record-snap for recording live performance triggers,
and it also enables the grid snap functionality noted below.
and it also enables the grid snap functionality.
If disabled, it allows the trigger to be placed and to be smoothly extended
in either direction, without snapping, when the mouse is moved left or
right.
Expand All @@ -195,17 +196,16 @@ \subsection{Song Editor / Top Panel}
of the song editor snap value are in fractions of a measure length.
The following values are supported:

\textsl{Length, 1/1, 1/2, 1/4, 1/8, 1/16, and 1/32}
\textsl{1/1, 1/2, 1/4, 1/8, 1/16, and 1/32}

The fractions represent fractions of measures.
% When \textbf{Snap} is on, causes the addition of
% a trigger to act as in \textsl{Seq24}: the pattern is added, but snaps to
% the length of the pattern so that the new trigger is always an integral
% number of pattern lengths from the beginning. For long patterns, this
% feature can result in the trigger beginning well before the click.

The \texttt{Length} entry, when \textbf{Snap} is on, causes the addition of
a trigger to act as in \textsl{Seq24}: the pattern is added, but snaps to
the length of the pattern so that the new trigger is always an integral
number of pattern lengths from the beginning. For long patterns, this
feature can result in the trigger beginning well before the click.

Also, in patterns longer than a measure, if \texttt{Length} is not selected,
In patterns longer than a measure,
% if \texttt{Length} is not selected,
the pattern may wrap, so that beginning notes appear at the end of the
trigger, and notes can wrap around. When this happens, a trick is needed:

Expand Down
Loading

0 comments on commit f3d99c8

Please sign in to comment.