Skip to content

Commit

Permalink
Tweak mutes-test and added LaunchPad Mini macros.
Browse files Browse the repository at this point in the history
  • Loading branch information
ahlstromcj committed Apr 18, 2023
1 parent 84a6118 commit 6a0f79b
Show file tree
Hide file tree
Showing 12 changed files with 197 additions and 61 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ Windows, and using a conventional source tarball.
* Renamed record-mode and grid-model control labels.
* Fixed accident disabling of grid-mode controls.
* Making MIDI control-out handling more reasonable.
* Added some LaunchPad Mini macros.
* Added reading/writing/displaying Meta text events such as Text
and Cue Point.
* Fixed broken "recent-files" features (by forcing 'rc' save).
Expand Down
8 changes: 3 additions & 5 deletions TODO
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
TO DO for Seq66 0.99.3 (Sequencer64 refactored for C++14 and Qt)
Chris Ahlstrom
2019-04-13 to 2023-04-17
2019-04-13 to 2023-04-18

Some of these issues will be pushed off for the distant Seq66v2.

Immediate issues to attack:

- MIDI control/display:
- ALSA/JACK issues with LaunchPad "alt" configuration.
- Fix MIDI control setting in ALSA by adding disabled announce buss
- Automatically enable the control-buss in the 'rc' file.
- Fix control/display selection not showing in Preferences.
- Automatically enable the control-buss in the 'rc' file. Done,
but requires a restart.
Issue #48
Port-map testing.

Expand Down
21 changes: 11 additions & 10 deletions contrib/notes/launchpad.text
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Quick Reference for Launchpad Mini
Chris Ahlstrom
2020-08-03 to 2021-06-11
2020-08-03 to 2023-04-18

Some of this information was adopted from the PDF file
launchpad-programmers-reference.pdf. That document notes that a Launchpad
Expand Down Expand Up @@ -33,13 +33,13 @@ X-Y Key Layout (mapping mode 1):
(1) (2) (3) (4) (5) (6) (7) (8)
90h
[00h] [01h] [02h] [03h] [04h] [05h] [06h] [07h] (A) : 08h
[11h] [11h] [12h] [13h] [14h] [15h] [16h] [17h] (B) : 18h
[22h] [21h] [22h] [23h] [24h] [25h] [26h] [27h] (C) : 28h
[33h] [31h] [32h] [33h] [34h] [35h] [36h] [37h] (D) : 38h
[44h] [41h] [42h] [43h] [44h] [45h] [46h] [47h] (E) : 48h
[55h] [51h] [52h] [53h] [54h] [55h] [56h] [57h] (F) : 58h
[66h] [61h] [62h] [63h] [64h] [65h] [66h] [67h] (G) : 68h
[77h] [71h] [72h] [73h] [74h] [75h] [76h] [77h] (H) : 78h
[10h] [11h] [12h] [13h] [14h] [15h] [16h] [17h] (B) : 18h
[20h] [21h] [22h] [23h] [24h] [25h] [26h] [27h] (C) : 28h
[30h] [31h] [32h] [33h] [34h] [35h] [36h] [37h] (D) : 38h
[40h] [41h] [42h] [43h] [44h] [45h] [46h] [47h] (E) : 48h
[50h] [51h] [52h] [53h] [54h] [55h] [56h] [57h] (F) : 58h
[60h] [61h] [62h] [63h] [64h] [65h] [66h] [67h] (G) : 68h
[70h] [71h] [72h] [73h] [74h] [75h] [76h] [77h] (H) : 78h

Drum Rack Key Layout (mapping mode 2):

Expand Down Expand Up @@ -112,12 +112,13 @@ More information can be found in the PDF.
For Seq66, we want to start with the basic keys, mapped to the top row of
circular buttons (very tentative):

Song* Keep* Grou*
Song* Keep* Group*
Panic* Stop Pause Play Record Queue Learn ???*
68h 69h 6ah 6bh 6ch 6dh 6eh 6fh
104 105 106 107 108 109 110 111

* means not yet supported
* means not yet supported, but see the latest LaunchPad 'ctrl' files
in the data/linux directory.

X-Y Key Layout (decimal version):

Expand Down
32 changes: 17 additions & 15 deletions contrib/scripts/timid
Original file line number Diff line number Diff line change
Expand Up @@ -4,43 +4,45 @@
# \file timid
# \library bin
# \author Chris Ahlstrom
# \date 2021-04-19 to 2021-10-11
# \date 2021-04-19 to 2023-04-18
# \version $Revision$
# \license GNU GPLv2 or above
#
# This script runs timidity, so one can avoid having to deal with timidity as
# a service. Starts it under ALSA as a daemon, not a service.
#
# -Oj Output to JACK.
# -Od Output to audio device (default).
# -Os Output to ALSA.
# -Od Output to audio device.
# -iA Launch as an ALSA sequencer client. No JACK, apparently.
# -Oj Output to JACK
# -iA Launch as an ALSA sequencer client
# --background Start as a daemon.
#
# See https://wiki.debian.org/AlsaMidi
#
#------------------------------------------------------------------------------

SETTLETIME="3"
OPTIONS=""

if [ "$1" == "kill" ] ; then

SETTLETIME="1"
killall timidity

elif [ "$1" == "jack" ] ; then

timidity -Oj -iA --background
sleep 1
aplaymidi -l

else

timidity -Os -iA --background
if [ "$1" == "jack" ] ; then
OPTIONS="-Oj"
elif [ "$1" == "alsa" ] ; then
OPTIONS="-Os -iA"
fi

fi
timidity $OPTIONS --background
echo "Waiting 3 seconds to settle..."
sleep 3
aplaymidi -l

echo "Waiting $SETTLETIME seconds to settle..."
sleep $SETTLETIME
aplaymidi -l
fi

#******************************************************************************
# qbuild (Seq66)
Expand Down
60 changes: 60 additions & 0 deletions data/linux/alsa_ports.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Seq66 0.99.3 main ('rc') configuration file
#
# /home/ahlstrom/.config/seq66/qseq66.rc
# Written 2023-04-18 13:49:08

[midi-input]

5 # number of input MIDI buses

0 1 "[0] 0:1 system:ALSA Announce"
1 1 "[1] 14:0 Midi Through Port-0"
2 1 "[2] 20:0 nanoKEY2 nanoKEY2 _ CTRL"
3 1 "[3] 40:0 Launchpad Mini MIDI 1"
4 1 "[4] 44:0 E-MU XMidi1X1 Tab Out"

# This table is similar to the [midi-clock-map] section.

[midi-input-map]

1 # map is active

0 1 "ALSA Announce"
1 1 "Midi Through Port-0"
2 1 "nanoKEY2 nanoKEY2 _ CTRL"
3 1 "Launchpad Mini MIDI 1"
4 1 "E-MU XMidi1X1 Tab Out"

[midi-clock]

10 # number of MIDI clocks (output buses)

0 0 "[0] 14:0 Midi Through Port-0"
1 0 "[1] 20:0 nanoKEY2 nanoKEY2 _ CTRL"
2 0 "[2] 40:0 Launchpad Mini MIDI 1"
3 0 "[3] 44:0 E-MU XMidi1X1 Tab Out"
4 0 "[4] 128:0 yoshimi:input"
5 0 "[5] 129:0 FLUID Synth (2531):Synth input port (2531:0)"
6 0 "[6] 130:0 TiMidity port 0"
7 0 "[7] 130:1 TiMidity port 1"
8 0 "[8] 130:2 TiMidity port 2"
9 0 "[9] 130:3 TiMidity port 3"

[midi-clock-map]

1 # map is active

0 0 "Midi Through Port-0"
1 0 "nanoKEY2 nanoKEY2 _ CTRL"
2 0 "Launchpad Mini MIDI 1"
3 0 "E-MU XMidi1X1 Tab Out"
4 0 "yoshimi:input"
5 0 "FLUID Synth"
6 0 "TiMidity port 0"
7 0 "TiMidity port 1"
8 0 "TiMidity port 2"
9 0 "TiMidity port 3"

# End of /home/ahlstrom/.config/seq66/qseq66.rc
#
# vim: sw=4 ts=4 wm=4 et ft=dosini
48 changes: 48 additions & 0 deletions data/linux/jack_ports.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Seq66 0.99.3 main ('rc') configuration file
#
# /home/ahlstrom/.config/seq66/qseq66.rc
# Written 2023-04-18 14:15:12

[midi-input]

4 # number of input MIDI buses

0 1 "[0] 0:0 system:midi_capture_1" # 'Midi Through'
1 1 "[1] 0:1 system:midi_capture_2" # 'nanoKEY2'
2 1 "[2] 0:2 system:midi_capture_3" # 'Launchpad Mini'
3 1 "[3] 0:3 system:midi_capture_4" # 'E MU XMidi1X1 Tab'

[midi-input-map]

1 # map is active

0 1 "Midi Through"
1 1 "nanoKEY2"
2 1 "Launchpad Mini"
3 1 "E MU XMidi1X1 Tab"

[midi-clock]

6 # number of MIDI clocks (output buses)

0 0 "[0] 0:0 system:midi_playback_1" # 'Midi Through'
1 0 "[1] 0:1 system:midi_playback_2" # 'nanoKEY2'
2 0 "[2] 0:2 system:midi_playback_3" # 'Launchpad Mini'
3 0 "[3] 0:3 system:midi_playback_4" # 'E MU XMidi1X1 Tab'
4 0 "[4] 1:4 yoshimi:midi in"
5 0 "[5] 2:5 qsynth:midi_00"

[midi-clock-map]

1 # map is active

0 0 "Midi Through"
1 0 "nanoKEY2"
2 0 "Launchpad Mini"
3 0 "E MU XMidi1X1 Tab"
4 0 "yoshimi:midi in"
5 0 "qsynth:midi_00"

# End of /home/ahlstrom/.config/seq66/qseq66.rc
#
# vim: sw=4 ts=4 wm=4 et ft=dosini
30 changes: 18 additions & 12 deletions data/linux/qseq66-lp-mini-alt.ctrl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Seq66 0.99.3 MIDI control configuration file
#
# /home/ahlstrom/.config/seq66/qseq66-lp-mini-alt.ctrl
# Written 2023-04-09 08:49:56
# Written 2023-04-18 08:45:50
#
# Sets up MIDI I/O control. The format is like the 'rc' file. To use it, set it
# active in the 'rc' [midi-control-file] section. It adds loop, mute, &
Expand Down Expand Up @@ -35,16 +35,16 @@ See doc/launchpad-mini.ods for the mappings implemented by this 'ctrl' file.

# Input settings to control Seq66. 'control-buss' ranges from 0 to the highest
# system input buss. If set, that buss can send MIDI control. 255 (0xFF) means
# any enabled input device can send control. ALSA provides an extra 'announce'
# buss, altering port numbering vice JACK. With port-mapping enabled, the port
# any ENABLED MIDI input can send control. ALSA has an extra 'announce' buss,
# so add 1 to the port number with ALSA. With port-mapping enabled, the port
# nick-name can be provided.
#
# 'midi-enabled' applies to the MIDI controls; keystroke controls are always
# enabled. Supported keyboard layouts are 'qwerty' (default), 'qwertz', and
# 'azerty'. AZERTY turns off auto-shift for group-learn.

drop-empty-controls = false
control-buss = 3
control-buss = 4
midi-enabled = true
button-offset = 0
button-rows = 4
Expand Down Expand Up @@ -160,8 +160,8 @@ keyboard-layout = qwerty

[automation-control]

0 "'" [ 0 0x00 0 0 0 ] [ 0 0x90 104 1 127 ] [ 0 0x00 0 0 0 ] # BPM Up
1 ";" [ 0 0x00 0 0 0 ] [ 0 0x90 120 1 127 ] [ 0 0x00 0 0 0 ] # BPM Dn
0 "'" [ 0 0x00 0 0 0 ] [ 0 0x90 103 1 127 ] [ 0 0x00 0 0 0 ] # BPM Up
1 ";" [ 0 0x00 0 0 0 ] [ 0 0x90 119 1 127 ] [ 0 0x00 0 0 0 ] # BPM Dn
2 "]" [ 0 0x00 0 0 0 ] [ 0 0x90 71 1 127 ] [ 0 0x00 0 0 0 ] # Set Up
3 "[" [ 0 0x00 0 0 0 ] [ 0 0x90 87 1 127 ] [ 0 0x00 0 0 0 ] # Set Dn
4 "KP_Home" [ 0 0x00 0 0 0 ] [ 0 0x90 40 1 127 ] [ 0 0x00 0 0 0 ] # Replace
Expand All @@ -186,7 +186,7 @@ keyboard-layout = qwerty
23 "F1" [ 0 0x00 0 0 0 ] [ 0 0x00 0 0 0 ] [ 0 0x00 0 0 0 ] # Top
24 "F2" [ 0 0x00 0 0 0 ] [ 0 0x90 70 1 127 ] [ 0 0x90 86 1 127 ] # Play List
25 "F3" [ 0 0x00 0 0 0 ] [ 0 0x90 102 1 127 ] [ 0 0x90 118 1 127 ] # Play Song
26 "F9" [ 0 0x90 103 1 127 ] [ 0 0x00 0 0 0 ] [ 0 0x00 0 0 0 ] # Tap BPM
26 "F9" [ 0 0x90 104 1 127 ] [ 0 0x00 0 0 0 ] [ 0 0x00 0 0 0 ] # Tap BPM
27 "Space" [ 0 0x00 0 0 0 ] [ 0 0x00 0 0 0 ] [ 0 0x00 0 0 0 ] # Start
28 "Esc" [ 0 0x00 0 0 0 ] [ 0 0x00 0 0 0 ] [ 0 0x00 0 0 0 ] # Stop
29 "KP_Ins" [ 0 0x00 0 0 0 ] [ 0 0x00 0 0 0 ] [ 0 0x00 0 0 0 ] # Reserved 29
Expand All @@ -195,15 +195,15 @@ keyboard-layout = qwerty
32 "\" [ 0 0x90 8 127 127 ] [ 0 0x00 0 0 0 ] [ 0 0x00 0 0 0 ] # Keep Queue
33 "/" [ 0 0x00 0 0 0 ] [ 0 0xb0 110 1 127 ] [ 0 0x00 0 0 0 ] # Slot Shift
34 "0" [ 0 0x00 0 0 0 ] [ 0 0x00 0 0 0 ] [ 0 0x00 0 0 0 ] # Mutes Clear
35 "Quit" [ 0 0x00 0 0 0 ] [ 0 0x90 119 1 127 ] [ 0 0x00 0 0 0 ] # Quit
35 "Quit" [ 0 0x00 0 0 0 ] [ 0 0x90 120 1 127 ] [ 0 0x00 0 0 0 ] # Quit
36 "=" [ 0 0x00 0 0 0 ] [ 0 0xb0 111 1 127 ] [ 0 0x00 0 0 0 ] # Loop Edit
37 "-" [ 0 0x00 0 0 0 ] [ 0 0x00 0 0 0 ] [ 0 0x00 0 0 0 ] # Event Edit
38 "F10" [ 0 0x90 72 127 127 ] [ 0 0x00 0 0 0 ] [ 0 0x00 0 0 0 ] # Song Mode
39 "F11" [ 0 0x00 0 0 0 ] [ 0 0x00 0 0 0 ] [ 0 0x00 0 0 0 ] # Toggle JACK
40 "F12" [ 0 0x00 0 0 0 ] [ 0 0x00 0 0 0 ] [ 0 0x00 0 0 0 ] # Menu Mode
41 "F4" [ 0 0x00 0 0 0 ] [ 0 0x00 0 0 0 ] [ 0 0x00 0 0 0 ] # Follow JACK
42 "~" [ 0 0x00 0 0 0 ] [ 0 0xb0 104 1 127 ] [ 0 0x00 0 0 0 ] # Panic
43 ">" [ 0 0x00 0 0 0 ] [ 0 0x00 0 0 0 ] [ 0 0x00 0 0 0 ] # Visibility
43 ">" [ 0 0x00 0 0 0 ] [ 0 0xb0 111 1 127 ] [ 0 0x00 0 0 0 ] # Visibility
44 "0xfa" [ 0 0x00 0 0 0 ] [ 0 0x00 0 0 0 ] [ 0 0x00 0 0 0 ] # Save Session
45 "0xfb" [ 0 0x00 0 0 0 ] [ 0 0x00 0 0 0 ] [ 0 0x00 0 0 0 ] # Reserved 45
46 "0xfc" [ 0 0x00 0 0 0 ] [ 0 0x00 0 0 0 ] [ 0 0x00 0 0 0 ] # Reserved 46
Expand Down Expand Up @@ -245,7 +245,7 @@ keyboard-layout = qwerty
[midi-control-out-settings]

set-size = 32
output-buss = 2
output-buss = 3
midi-enabled = true
button-offset = 0
button-rows = 4
Expand Down Expand Up @@ -377,7 +377,7 @@ button-columns = 8
1 [ 0x90 118 62 ] [ 0x90 118 62 ] [ 0x90 118 12 ] # Song-Dn
1 [ 0x90 71 60 ] [ 0x90 71 60 ] [ 0x90 71 12 ] # Set-Up
1 [ 0x90 87 62 ] [ 0x90 87 62 ] [ 0x90 87 12 ] # Set-Dn
1 [ 0x90 104 60 ] [ 0x90 104 60 ] [ 0x90 104 12 ] # Tap_BPM
1 [ 0x90 104 60 ] [ 0x90 104 60 ] [ 0x90 104 12 ] # Tap-BPM
1 [ 0x90 120 15 ] [ 0x90 120 15 ] [ 0x90 120 12 ] # Quit
1 [ 0xb0 111 46 ] [ 0xb0 111 46 ] [ 0xb0 111 12 ] # Visibility
0 [ 0x00 0 0 ] [ 0x00 0 0 ] [ 0x00 0 0 ] # Alt_2
Expand All @@ -394,11 +394,17 @@ button-columns = 8
# are macro-names preceded by a '$'. Some values should always be defined, even
# if empty: footer, header, reset, startup, and shutdown.

all-leds-high = 0xB0 0x00 0x7F
all-leds-low = 0xB0 0x00 0x7D
all-leds-med = 0xB0 0x00 0x7E
drum-layout = 0xB0 0x00 0x02
duty-cycle-default = 0xB0 0x1E 0x02
footer = 0xF7
header = 0xF0 0x00 0x00
reset = $header 0x00 $footer
reset = 0xB0 0x00 0x00
shutdown = $header 0x00 $footer
startup = $header 0x00 $footer
xy-layout = 0xB0 0x00 0x01


# End of /home/ahlstrom/.config/seq66/qseq66-lp-mini-alt.ctrl
Expand Down
21 changes: 18 additions & 3 deletions doc/latex/tex/launchpad_mini.tex
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ \subsection{Launchpad Mini Basics}
\texttt{n8}.

There are two layouts available, \textbf{X-Y} and \textbf{Drum}.
In \textsl{Seq66}, the drum layout is not used; see the
file \texttt{contrib/notes/launchpad.txt}.
X-Y Key Layout (mapping mode 1):
In \textsl{Seq66}, the drum layout is not used.
See the file \texttt{contrib/notes/launchpad.txt}.
X-Y Key Layout (mapping mode 1) in hexadecimal format:

\begin{verbatim}
1 2 3 4 5 6 7 8
Expand All @@ -92,6 +92,21 @@ \subsection{Launchpad Mini Basics}
[70h] [71h] [72h] [73h] [74h] [75h] [76h] [77h] (78h) H
\end{verbatim}

X-Y Key Layout in decimal format:

\begin{verbatim}
1 2 3 4 5 6 7 8
176: (104) (105) (106) (107) (108) (109) (110) (111)
144: [ 0] [ 1] [ 2] [ 3] [ 4] [ 5] [ 6] [ 7] ( 8) A
[ 16] [ 17] [ 18] [ 19] [ 20] [ 21] [ 22] [ 23] ( 24) B
[ 32] [ 33] [ 34] [ 35] [ 36] [ 37] [ 38] [ 39] ( 40) C
[ 48] [ 49] [ 50] [ 51] [ 52] [ 53] [ 54] [ 55] ( 56) D
[ 64] [ 65] [ 66] [ 67] [ 68] [ 69] [ 70] [ 71] ( 72) E
[ 80] [ 81] [ 82] [ 83] [ 84] [ 85] [ 86] [ 87] ( 88) F
[ 96] [ 97] [ 98] [ 99] [100] [101] [102] [103] (104) G
[112] [113] [114] [115] [116] [117] [118] [119] (120) H
\end{verbatim}

The colors of the grid-buttons LED can be set via the command
\texttt{90h key vel}, where:

Expand Down
Loading

0 comments on commit 6a0f79b

Please sign in to comment.