-- 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

-- | Native Instruments' Massive softsynth.
module User.Elaforge.Instrument.Massive where
import qualified Cmd.Instrument.MidiInst as MidiInst
import qualified Derive.ScoreT as ScoreT

import           Global


synth :: MidiInst.Synth
synth :: Synth
synth = SynthName -> SynthName -> [Patch] -> Synth
MidiInst.synth SynthName
"massive" SynthName
"Native Instrument Massive" ([Patch] -> Synth) -> [Patch] -> Synth
forall a b. (a -> b) -> a -> b
$
    [(Control, Control)] -> [Patch] -> [Patch]
MidiInst.synth_controls [(Control, Control)]
controls [Patch]
patches
    where
    controls :: [(Control, Control)]
controls = (Control
1, Control
"macro1") (Control, Control) -> [(Control, Control)] -> [(Control, Control)]
forall a. a -> [a] -> [a]
:
        [ (Control
18 Control -> Control -> Control
forall a. Num a => a -> a -> a
+ Control
n, SynthName -> Control
ScoreT.unchecked_control (SynthName -> Control) -> SynthName -> Control
forall a b. (a -> b) -> a -> b
$ SynthName
"macro" SynthName -> SynthName -> SynthName
forall a. Semigroup a => a -> a -> a
<> Control -> SynthName
forall a. Show a => a -> SynthName
showt Control
n)
        | Control
n <- [Control
2..Control
8]
        ]

patches :: [MidiInst.Patch]
patches :: [Patch]
patches = [PbRange -> [(Control, Control)] -> Patch
MidiInst.default_patch (-Int
24, Int
24) []]