Safe Haskell | Safe-Inferred |
---|
Vienna Symphonic Library.
Synopsis
- synth :: MidiInst.Synth
- find_attrs :: InstT.Name -> String -> [Text]
- write_matrices :: IO ()
- show_matrix :: VslInst.Instrument -> Text
- map_shape :: ([a] -> [b]) -> [[a]] -> [[b]]
- patches :: [MidiInst.Patch]
- instruments :: [((VslInst.Instrument, Maybe HarmonicMap), Text)]
- solo_string_instruments :: [(VslInst.Instrument, Maybe HarmonicMap)]
- note_calls :: Maybe HarmonicMap -> Patch.Patch -> [MidiInst.Call Note]
- patch_attributes :: Patch.Patch -> [Attrs.Attributes]
- has_attr :: Attrs.Attributes -> Patch.Patch -> Bool
- grace_call :: [Attrs.Attributes] -> Generator Note
- grace_intervals :: Map Int Attrs.Attributes
- harmonic :: Patch.AttributeMap -> Note.Config -> HarmonicMap -> Note.GenerateNote
- type Instrument = (InstT.Name, [Keyswitch])
- type Keyswitch = (Attrs.Attributes, [Patch.Keyswitch])
- make_patch :: VslInst.Instrument -> Text -> MidiInst.Patch
- instrument_patch :: Text -> Instrument -> MidiInst.Patch
- make_instrument :: VslInst.Instrument -> Instrument
- keyswitch_map :: [Keyswitch] -> Patch.AttributeMap
- attribute_priority :: Map Attrs.Attributes Int
- matrix :: VslInst.Keys -> [[Attrs.Attributes]] -> [Keyswitch]
- keys_from :: Midi.Key -> [Patch.Keyswitch]
- strip_attrs :: [Attrs.Attributes] -> [Attrs.Attributes]
- strip_attr :: Attrs.Attributes -> (Set Attrs.Attributes, [Attrs.Attributes]) -> (Set Attrs.Attributes, [Attrs.Attributes])
- expand_ab :: Attrs.Attributes -> Maybe [Attrs.Attributes]
- data HarmonicMap = HarmonicMap {}
- type OpenString = Attrs.Attributes
- find_harmonic :: HarmonicMap -> Bool -> Midi.Key -> Maybe OpenString -> Maybe Midi.Key
- harmonic_map :: [(OpenString, Midi.Key)] -> HarmonicMap
- violin_harmonics :: HarmonicMap
- viola_harmonics :: HarmonicMap
- cello_harmonics :: HarmonicMap
- bass_harmonics :: HarmonicMap
- natural_harmonics :: [(Midi.Key, Int)]
- gliss_natural_harmonics :: [(Midi.Key, Int)]
- c_infer_seconds :: Library.Calls Note
- infer_seconds :: Maybe Call.UpDown -> [Attrs.Attributes] -> Score.Event -> Score.Event
Documentation
util
find_attrs :: InstT.Name -> String -> [Text] Source #
For interactive use, find keyswitches with the given attributes.
write_matrices :: IO () Source #
Write matrices to a file for visual reference.
show_matrix :: VslInst.Instrument -> Text Source #
map_shape :: ([a] -> [b]) -> [[a]] -> [[b]] Source #
Transform elements but retain the matrix's shape.
instrument definition
patches :: [MidiInst.Patch] Source #
instruments :: [((VslInst.Instrument, Maybe HarmonicMap), Text)] Source #
note_calls :: Maybe HarmonicMap -> Patch.Patch -> [MidiInst.Call Note] Source #
Add various note calls, depending on the attributes that the patch understands.
has_attr :: Attrs.Attributes -> Patch.Patch -> Bool Source #
grace_call :: [Attrs.Attributes] -> Generator Note Source #
harmonic :: Patch.AttributeMap -> Note.Config -> HarmonicMap -> Note.GenerateNote Source #
If +harm+nat (and optionally a string) attributes are present, try to play this pitch as a natural harmonic. That means replacing the pitch and reapplying the default note call.
keyswitches
type Instrument = (InstT.Name, [Keyswitch]) Source #
type Keyswitch = (Attrs.Attributes, [Patch.Keyswitch]) Source #
make_patch :: VslInst.Instrument -> Text -> MidiInst.Patch Source #
instrument_patch :: Text -> Instrument -> MidiInst.Patch Source #
keyswitch_map :: [Keyswitch] -> Patch.AttributeMap Source #
attribute_priority :: Map Attrs.Attributes Int Source #
Order attributes by priority. This should correspond to specificity, or
to perceptual importance, as documented in Patch.AttributeMap
.
matrix :: VslInst.Keys -> [[Attrs.Attributes]] -> [Keyswitch] Source #
Since the VSL matrix is only 12x12, a row of articulations greater than that overflows to the next row. Given that I'm definitely going to overflow 12 rows, I wind up overflowing to the next matrix, and when counting tha AB switch, each articulation has 3 or 4 keyswitches.
I could probably cram most instruments into 144 cells and only require 2-3 keyswitches, but it would be hard to read and easy to mess up, wouldn't let me disable and enable cells by row, and with custom patches I'll probably wind up with more than 144 anyway.
keys_from :: Midi.Key -> [Patch.Keyswitch] Source #
attrs
strip_attrs :: [Attrs.Attributes] -> [Attrs.Attributes] Source #
Remove attrs which can be assumed as a default. The idea is to make it easier to address an articulation while still remaining non-ambiguous.
Attrs are removed in order unless removal would create a conflict with
another articulation. The result is that the attrs early in the strip list
are removed first, so if you have both VslInst.med
and Attrs.short
,
VslInst.med
will become the default, while Attrs.short
retains its
attribute.
strip_attr :: Attrs.Attributes -> (Set Attrs.Attributes, [Attrs.Attributes]) -> (Set Attrs.Attributes, [Attrs.Attributes]) Source #
Strip the given attr, but only if it wouldn't cause clashes.
natural harmonics
data HarmonicMap Source #
HarmonicMap | |
|
Instances
Show HarmonicMap Source # | |
Defined in User.Elaforge.Instrument.Vsl showsPrec :: Int -> HarmonicMap -> ShowS # show :: HarmonicMap -> String # showList :: [HarmonicMap] -> ShowS # |
type OpenString = Attrs.Attributes Source #
find_harmonic :: HarmonicMap -> Bool -> Midi.Key -> Maybe OpenString -> Maybe Midi.Key Source #
harmonic_map :: [(OpenString, Midi.Key)] -> HarmonicMap Source #
natural_harmonics :: [(Midi.Key, Int)] Source #
gliss_natural_harmonics :: [(Midi.Key, Int)] Source #
infer seconds
infer_seconds :: Maybe Call.UpDown -> [Attrs.Attributes] -> Score.Event -> Score.Event Source #