/* Copyright 2016 Jack Humbert
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
#ifndef PROCESS_MUSIC_H
#define PROCESS_MUSIC_H
#include "quantum.h"
#if defined(AUDIO_ENABLE) || (defined(MIDI_ENABLE) && defined(MIDI_BASIC))
enum music_modes { MUSIC_MODE_CHROMATIC, MUSIC_MODE_GUITAR, MUSIC_MODE_VIOLIN, MUSIC_MODE_MAJOR, NUMBER_OF_MODES };
# ifdef MUSIC_MAP
extern const uint8_t music_map[MATRIX_ROWS][MATRIX_COLS];
# endif
bool process_music(uint16_t keycode, keyrecord_t *record);
bool is_music_on(void);
void music_toggle(void);
void music_on(void);
void music_off(void);
bool is_midi_on(void);
void midi_toggle(void);
void midi_on(void);
void midi_off(void);
void music_on_user(void);
void midi_on_user(void);
void music_scale_user(void);
void music_all_notes_off(void);
void music_mode_cycle(void);
void matrix_scan_music(void);
bool music_mask(uint16_t keycode);
bool music_mask_kb(uint16_t keycode);
bool music_mask_user(uint16_t keycode);
# ifndef SCALE
# define SCALE \
(int8_t[]) { 0 + (12 * 0), 2 + (12 * 0), 4 + (12 * 0), 5 + (12 * 0), 7 + (12 * 0), 9 + (12 * 0), 11 + (12 * 0), 0 + (12 * 1), 2 + (12 * 1), 4 + (12 * 1), 5 + (12 * 1), 7 + (12 * 1), 9 + (12 * 1), 11 + (12 * 1), 0 + (12 * 2), 2 + (12 * 2), 4 + (12 * 2), 5 + (12 * 2), 7 + (12 * 2), 9 + (12 * 2), 11 + (12 * 2), 0 + (12 * 3), 2 + (12 * 3), 4 + (12 * 3), 5 + (12 * 3), 7 + (12 * 3), 9 + (12 * 3), 11 + (12 * 3), 0 + (12 * 4), 2 + (12 * 4), 4 + (12 * 4), 5 + (12 * 4), 7 + (12 * 4), 9 + (12 * 4), 11 + (12 * 4), }
# endif
#endif // defined(AUDIO_ENABLE) || (defined(MIDI_ENABLE) && defined(MIDI_BASIC))
#endif
input type='hidden' name='h' value='4.1.1-rc2'/>
blob: 3209f2f8bd5891ef443c232941d411ad454c8924 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
|
XEN_ROOT = ../
include $(XEN_ROOT)/tools/Rules.mk
SUBDIRS-y :=
SUBDIRS-y += check
SUBDIRS-y += include
SUBDIRS-y += libxc
SUBDIRS-y += flask
SUBDIRS-$(CONFIG_OCAML_XENSTORED) += ocaml-xenstored
SUBDIRS-y += xenstore
SUBDIRS-y += misc
SUBDIRS-y += examples
SUBDIRS-y += hotplug
SUBDIRS-y += xentrace
SUBDIRS-$(CONFIG_XCUTILS) += xcutils
SUBDIRS-$(CONFIG_X86) += firmware
SUBDIRS-$(ACM_SECURITY) += security
SUBDIRS-y += console
SUBDIRS-y += xenmon
SUBDIRS-$(VTPM_TOOLS) += vtpm_manager
SUBDIRS-$(VTPM_TOOLS) += vtpm
SUBDIRS-y += xenstat
SUBDIRS-$(CONFIG_Linux) += libaio
SUBDIRS-$(CONFIG_Linux) += blktap
SUBDIRS-y += libfsimage
SUBDIRS-$(LIBXENAPI_BINDINGS) += libxen
SUBDIRS-$(CONFIG_Linux) += fs-back
SUBDIRS-$(CONFIG_IOEMU) += ioemu-dir
SUBDIRS-y += xenpmd
# These don't cross-compile
ifeq ($(XEN_COMPILE_ARCH),$(XEN_TARGET_ARCH))
SUBDIRS-$(PYTHON_TOOLS) += python
SUBDIRS-$(PYTHON_TOOLS) += pygrub
endif
# For the sake of linking, set the sys-root
ifneq ($(CROSS_COMPILE),)
CROSS_BIN_PATH ?= /usr/$(CROSS_COMPILE:-=)/bin
CROSS_SYS_ROOT ?= /usr/$(CROSS_COMPILE:-=)/sys-root
export CROSS_SYS_ROOT # exported for check/funcs.sh
export CROSS_BIN_PATH # exported for cross-install.sh
endif
.PHONY: all
all: subdirs-all
.PHONY: install
install: subdirs-install
$(INSTALL_DIR) $(DESTDIR)/var/xen/dump
$(INSTALL_DIR) $(DESTDIR)/var/log/xen
$(INSTALL_DIR) $(DESTDIR)/var/lib/xen
$(INSTALL_DIR) $(DESTDIR)/var/lock/subsys
.PHONY: clean distclean
clean distclean: subdirs-clean
ifneq ($(XEN_COMPILE_ARCH),$(XEN_TARGET_ARCH))
IOEMU_CONFIGURE_CROSS ?= --cpu=$(XEN_TARGET_ARCH) \
--cross-prefix=$(CROSS_COMPILE) \
--interp-prefix=$(CROSS_SYS_ROOT)
endif
ioemu/config-host.mak:
cd ioemu && XEN_TARGET_ARCH=$(XEN_TARGET_ARCH) sh configure \
--prefix=$(PREFIX) $(IOEMU_CONFIGURE_CROSS)
subdir-all-ioemu subdir-install-ioemu: ioemu/config-host.mak
subdir-clean-ioemu:
$(MAKE) -C ioemu distclean
ioemu-dir-find:
set -ex; \
if test -d $(CONFIG_QEMU); then \
rm -f ioemu-dir; \
ln -sf $(CONFIG_QEMU) ioemu-dir; \
else \
if [ ! -d ioemu-remote ]; then \
rm -rf ioemu-remote ioemu-remote.tmp; \
mkdir ioemu-remote.tmp; rmdir ioemu-remote.tmp; \
$(GIT) clone $(CONFIG_QEMU) ioemu-remote.tmp; \
if [ "$(QEMU_TAG)" ]; then \
cd ioemu-remote.tmp; \
$(GIT) branch -D dummy >/dev/null 2>&1 ||:; \
$(GIT) checkout -b dummy $(QEMU_TAG); \
cd ..; \
fi; \
mv ioemu-remote.tmp ioemu-remote; \
fi; \
rm -f ioemu-dir; \
ln -sf ioemu-remote ioemu-dir; \
fi
set -e; \
$(absolutify_xen_root); \
PREFIX=$(PREFIX); \
XEN_SCRIPT_DIR=$(XEN_SCRIPT_DIR); \
export PREFIX; \
export XEN_SCRIPT_DIR; \
cd ioemu-dir; \
./xen-setup $(IOEMU_CONFIGURE_CROSS)
subdir-all-ioemu-dir subdir-install-ioemu-dir: ioemu-dir-find
subdir-clean-ioemu-dir:
set -e; if test -d ioemu-dir/.; then \
$(absolutify_xen_root); \
$(MAKE) -C ioemu-dir clean; \
fi
ocaml-xenstored:
set -ex; \
rm -rf ocaml-xenstored.tmp; \
hg clone $(OCAML_XENSTORED_REPO) ocaml-xenstored.tmp; \
if [ "$(OCAML_XENSTORED_TAG)" ]; then \
hg -R ocaml-xenstored.tmp update -r $(OCAML_XENSTORED_TAG) ;\
hg -R ocaml-xenstored.tmp branch mybranch ;\
fi; \
mv ocaml-xenstored.tmp ocaml-xenstored; \
subdir-all-ocaml-xenstored subdir-install-ocaml-xenstored: ocaml-xenstored
$(absolutify_xen_root); \
$(MAKE) -C ocaml-xenstored $(patsubst subdir-%-ocaml-xenstored,%,$@);
subdir-clean-ocaml-xenstored:
set -e; if test -d ocaml-xenstored; then \
$(MAKE) -C ocaml-xenstored clean; \
fi
|