Compare commits

...

3 Commits
0.9 ... master

Author SHA1 Message Date
nixo 6d5a3b1ef4 add guix build file 2020-07-25 21:44:33 +02:00
nixo e00ab5e45b Fix jog back on djcontrol instinct 2020-07-25 21:30:17 +02:00
Albert Graef b6068a73c0 Minimal Mackie emulation for the Harley Benton MP-100 a.k.a. MeloAudio MIDI Commander. 2019-12-18 10:56:19 +01:00
3 changed files with 112 additions and 2 deletions

59
examples/MP100.midizaprc Normal file
View File

@ -0,0 +1,59 @@
# Minimal Mackie emulation for the Harley Benton MP-100 a.k.a. MeloAudio MIDI
# Commander foot controller (https://meloaudio.com)
# This device is rather limited in what it can do as a Mackie controller (no
# feedback, just 4 switches, 4 toggles, and 2 continuous controllers), but it
# may still come in handy to guitarists for basic hands-free DAW control. Note
# that we can't make good use of the bank switches on the device (the two
# extra switches on the right), since these always emit a PC message, which
# interferes with our use of the PC messages for the transport controls. It
# may be possible to do something better by configuring a custom mode on the
# device, but here we stick to what's available in the factory settings.
# Copyright (c) 2019 Albert Graef <aggraef@gmail.com>
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice and
# this notice are preserved. This file is offered as-is, without any
# warranty.
JACK_NAME "midizap-MP100"
JACK_PORTS 1
# Auto-connect to the MP-100 on the input, and Ardour's Mackie control input
# on the output side.
JACK_IN TSMIDI.* MIDI 1
JACK_OUT ardour:mackie control in
# The following configuration assumes that the MP-100 is set to mode 1 (JAMP),
# which is the default. Note that the controller numbers for the top row and
# the expression pedal inputs are specific to JAMP mode, so you will have to
# adjust these if you run the device in a different host mode. As implemented
# below, the controls are laid out as follows:
# top row: [mute] [solo] [rec] [select] EXP1: volume (current channel)
# bottom row: [stop] [play] [chan<] [chan>] EXP2: volume (master)
[MIDI]
# Note that MCP expects a note-on/off pair for each activation of the
# mure/solo/rec/select switches, while the MP-100 top switches act as toggles,
# so we have to use suitable mod translations for the top row.
# top row (mute/solo/rec/select for current channel)
CC22[] E1{127} E1{0} # Mute
CC25[] G#0{127} G#0{0} # Solo
CC24[] C0{127} C0{0} # Rec
CC26[] C2{127} C2{0} # Select
# bottom row (basic transport and bank controls)
PC0 A7 # Stop
PC1 A#7 # Play
PC2 C4 # Channel Left
PC3 C#4 # Channel Right
# EXP-1 and EXP-2 (current channel and master volume)
CC4[] PB[129]-1 # Volume
CC7[] PB[129]-9 # Master

View File

@ -1428,10 +1428,10 @@ handle_event(uint8_t *msg, uint8_t portno, int depth, int recursive)
} else if (msg[2] > 64) {
int step = get_cc_step(tr, portno, chan, msg[1], -1);
if (step) {
int d = (msg[2]-64)/step;
uint8_t d = (msg[2]-128)/step;
while (d) {
send_strokes(tr, portno, status, chan, msg[1], 0, 0, -1, depth);
d--;
d++;
}
}
}

51
midizap.scm Normal file
View File

@ -0,0 +1,51 @@
(define-module (guixpkgs midizap)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix build-system gnu)
#:use-module (guix packages)
#:use-module (guix git-download)
#:use-module (gnu packages xorg)
#:use-module (gnu packages audio)
#:use-module (guix gexp))
(define-public midizap
(package
(name "midizap")
(version "0.8")
(source
(local-file "." "midizap" #:recursive? #t)
;; (origin
;; (method git-fetch)
;; (uri (git-reference
;; (url "https://github.com/agraef/midizap.git")
;; (commit version)))
;; (sha256
;; (base32
;; "0y31fnffl31n9lpkiw1dc3q4rnpfnras30n9y2h5j6586dkmgni4")))
)
(arguments
`(#:tests? #f ; no check target
#:make-flags
(list "CC=gcc"
(string-append "DESTDIR=" %output)
"prefix=")
#:phases
(modify-phases %standard-phases
(replace 'configure
(lambda* (#:key inputs outputs #:allow-other-keys)
(substitute* "Makefile"
(("/usr/include/X11/")
(string-append (assoc-ref inputs "xorgproto") "/include/X11/"))
(("-lXtst") "-lXtst -ljack"))
#t)))))
;; (native-inputs `(("pkg-config" ,pkg-config)))
(inputs `(("jack" ,jack-1)
("libx11" ,libx11)
("libxtst" ,libxtst)
("xorgproto" ,xorgproto)))
(build-system gnu-build-system)
(home-page "")
(synopsis "")
(description "")
(license license:gpl2+)))
midizap