-- Copyright 2013 Evan Laforge
-- This program is distributed under the terms of the GNU General Public
-- License 3.0, see COPYING or http://www.gnu.org/licenses/gpl-3.0.txt

-- | Constants for control change numbers.
module Midi.CC where
import qualified Data.Word as Word


type Control = Word.Word8

bank, bank_lsb :: Control
bank :: Control
bank = Control
0x0
bank_lsb :: Control
bank_lsb = Control
0x20

mod, mod_lsb :: Control
mod :: Control
mod = Control
0x1
mod_lsb :: Control
mod_lsb = Control
0x21

breath, breath_lsb :: Control
breath :: Control
breath = Control
0x2
breath_lsb :: Control
breath_lsb = Control
0x22

foot, foot_lsb :: Control
foot :: Control
foot = Control
0x04
foot_lsb :: Control
foot_lsb = Control
0x24

portamento_time, portamento_time_lsb :: Control
portamento_time :: Control
portamento_time = Control
0x5
portamento_time_lsb :: Control
portamento_time_lsb = Control
0x25

data_entry, data_entry_lsb :: Control
data_entry :: Control
data_entry = Control
0x6
data_entry_lsb :: Control
data_entry_lsb = Control
0x26

volume, volume_lsb :: Control
volume :: Control
volume = Control
0x7
volume_lsb :: Control
volume_lsb = Control
0x27

balance, balance_rpn :: Control
balance :: Control
balance = Control
0x8
balance_rpn :: Control
balance_rpn = Control
0x28

pan, pan_lsb :: Control
pan :: Control
pan = Control
0x0a
pan_lsb :: Control
pan_lsb = Control
0x2a

nrpn_lsb, nrpn_msb :: Control
nrpn_lsb :: Control
nrpn_lsb = Control
0x62
nrpn_msb :: Control
nrpn_msb = Control
0x63

rpn_lsb, rpn_msb :: Control
rpn_lsb :: Control
rpn_lsb = Control
0x64
rpn_msb :: Control
rpn_msb = Control
0x65

-- | My own convention: vibrato speed, when vibrato depth is controlled by
-- 'mod'.
vib_speed :: Control
vib_speed :: Control
vib_speed = Control
3

-- | There are spare CCs which are ripe for the mapping.
cc14, cc15, cc16, cc17, cc18, cc19, cc20, cc21, cc22, cc23, cc24 :: Control
Control
cc14 : Control
cc15 : Control
cc16 : Control
cc17 : Control
cc18 : Control
cc19 : Control
cc20 : Control
cc21 : Control
cc22 : Control
cc23 : Control
cc24 : [Control]
_
    = [Control
14..]

cc25, cc26, cc27, cc28, cc29, cc30, cc31 :: Control
Control
cc25 : Control
cc26 : Control
cc27 : Control
cc28 : Control
cc29 : Control
cc30 : Control
cc31 : [Control]
_ = [Control
25..]