Safe Haskell | Safe-Inferred |
---|
Utilities for solkattu. This re-exports Solkattu.Db so I can find pre-defined korvais.
E.g.: > return $ LSol.search $ LSol.hasInstrument "kendang_tunggal" > return $ LSol.search $ LSol.aroundDate (LSol.date 2017 7 10) 10 > 59: .... etc > LSol.insert_k1 True 1 59 0
Synopsis
- type SectionIndex = Int
- type ScoreIndex = Int
- search :: Monad m => [Korvai.Score -> Bool] -> m Text
- insert_m :: Cmd.M m => Bool -> TrackTime -> ScoreIndex -> SectionIndex -> m ()
- insert_k1 :: Cmd.M m => Bool -> TrackTime -> ScoreIndex -> SectionIndex -> m ()
- insert_r :: Cmd.M m => Bool -> TrackTime -> ScoreIndex -> SectionIndex -> m ()
- insert_sargam :: Cmd.M m => TrackTime -> ScoreIndex -> SectionIndex -> m ()
- insert :: (Cmd.M m, Solkattu.Notation stroke, Expr.ToExpr (Realize.Stroke stroke), Ord stroke) => Korvai.Instrument stroke -> Bool -> TrackTime -> ScoreIndex -> SectionIndex -> m ()
- realize :: (Ui.M m, Solkattu.Notation stroke, Expr.ToExpr (Realize.Stroke stroke), Ord stroke) => Korvai.Instrument stroke -> Bool -> Korvai.Korvai -> SectionIndex -> TrackTime -> TrackTime -> m ModifyNotes.NoteTrack
- to_note_track :: ToScore.ToScore stroke -> TrackTime -> TrackTime -> [S.Flat g (Realize.Note stroke)] -> ModifyNotes.NoteTrack
- place :: TrackTime -> TrackTime -> Event.Event -> Event.Event
- strokes_to_events :: Expr.ToExpr (Realize.Stroke a) => [S.Flat g (Realize.Note a)] -> [Event.Event]
- edit_new :: Cmd.M m => Korvai.Korvai -> SectionIndex -> Text -> m ReplProtocol.Result
- get_key :: Cmd.M m => m Block.SourceKey
- edit :: Ui.M m => Block.SourceKey -> m ReplProtocol.Result
- module_to_fname :: Text -> FilePath
- reintegrate :: Ui.M m => Block.SourceKey -> m ()
- event_key :: Event.Event -> Maybe Block.SourceKey
- integrate_track :: Cmd.M m => Korvai.Korvai -> SectionIndex -> Text -> m Block.SourceKey
- korvai_key :: Korvai.Korvai -> SectionIndex -> Text -> Maybe Block.SourceKey
- get_by_key :: Block.SourceKey -> Maybe (Korvai.Korvai, SectionIndex, Korvai.GInstrument)
- realizep :: Korvai.Korvai -> IO ()
- realizeM :: (Config -> Config) -> Korvai.Korvai -> IO ()
- realizek :: Korvai.Korvai -> IO ()
- realizekp :: Korvai.Korvai -> IO ()
- realizeR :: (Config -> Config) -> Korvai.Korvai -> IO ()
- type Select = forall i. [(i, Korvai.Score)] -> [(i, Korvai.Score)]
- scores :: [(Int, Korvai.Score)]
- recentDates :: Int -> Select
- aroundDate :: Day -> Integer -> Korvai.Korvai -> Bool
- ofType :: Text -> Korvai.Score -> Bool
- nameLike :: Text -> Korvai.Score -> Bool
- hasInstrument :: Text -> Korvai.Score -> Bool
- tagHas :: Text -> Text -> Korvai.Score -> Bool
- date :: Stack => Int -> Int -> Int -> Day
- searchAll :: Select -> [Korvai.Score -> Bool] -> [(Int, Korvai.Score)]
- formats :: [(Int, Korvai.Score)] -> Text
- format :: (Int, Korvai.Score) -> Text
- writeAll :: IO ()
- writeHtml :: IO ()
- writeHtml1 :: Korvai.Score -> IO ()
- writeHtmlTo :: FilePath -> IO ()
- scoreFname :: Korvai.Score -> FilePath
- qualifiedName :: Korvai.Score -> Text
- writeText :: IO ()
- writeTextTo :: FilePath -> FilePath -> Format.Abstraction -> IO ()
- writeText1 :: Korvai.Score -> IO ()
- stripColors :: Text -> Text
- writeWithStatus :: (Korvai.Score -> IO ()) -> [Korvai.Score] -> IO ()
- writeCommit :: FilePath -> IO ()
- clearDir :: FilePath -> IO ()
Documentation
type SectionIndex = Int Source #
type ScoreIndex = Int Source #
insert_m :: Cmd.M m => Bool -> TrackTime -> ScoreIndex -> SectionIndex -> m () Source #
insert_k1 :: Cmd.M m => Bool -> TrackTime -> ScoreIndex -> SectionIndex -> m () Source #
insert_r :: Cmd.M m => Bool -> TrackTime -> ScoreIndex -> SectionIndex -> m () Source #
insert_sargam :: Cmd.M m => TrackTime -> ScoreIndex -> SectionIndex -> m () Source #
insert :: (Cmd.M m, Solkattu.Notation stroke, Expr.ToExpr (Realize.Stroke stroke), Ord stroke) => Korvai.Instrument stroke -> Bool -> TrackTime -> ScoreIndex -> SectionIndex -> m () Source #
Insert the korvai at the selection. TODO implement ModifyNotes.replace_tracks to clear existing notes first
realize :: (Ui.M m, Solkattu.Notation stroke, Expr.ToExpr (Realize.Stroke stroke), Ord stroke) => Korvai.Instrument stroke -> Bool -> Korvai.Korvai -> SectionIndex -> TrackTime -> TrackTime -> m ModifyNotes.NoteTrack Source #
to_note_track :: ToScore.ToScore stroke -> TrackTime -> TrackTime -> [S.Flat g (Realize.Note stroke)] -> ModifyNotes.NoteTrack Source #
place :: TrackTime -> TrackTime -> Event.Event -> Event.Event Source #
strokes_to_events :: Expr.ToExpr (Realize.Stroke a) => [S.Flat g (Realize.Note a)] -> [Event.Event] Source #
edit_new :: Cmd.M m => Korvai.Korvai -> SectionIndex -> Text -> m ReplProtocol.Result Source #
Find the korvai, do integrate_track
for it, and open an editor on the
source file. The editor has bindings to reintegrate
after an edit.
get_key :: Cmd.M m => m Block.SourceKey Source #
Find the SourceKey of integrated events around the cursor.
edit :: Ui.M m => Block.SourceKey -> m ReplProtocol.Result Source #
module_to_fname :: Text -> FilePath Source #
reintegrate :: Ui.M m => Block.SourceKey -> m () Source #
This can be called manually to reintegrate after a change, but is also
called automatically by edit
.
integrate_track :: Cmd.M m => Korvai.Korvai -> SectionIndex -> Text -> m Block.SourceKey Source #
Get the SourceKey, create an empty track with that.
korvai_key :: Korvai.Korvai -> SectionIndex -> Text -> Maybe Block.SourceKey Source #
realizep :: Korvai.Korvai -> IO () Source #
realizek :: Korvai.Korvai -> IO () Source #
realizekp :: Korvai.Korvai -> IO () Source #
type Select = forall i. [(i, Korvai.Score)] -> [(i, Korvai.Score)] Source #
Select scores to search. Filter can only look at one score at a time, this can select a group of them.
scores :: [(Int, Korvai.Score)] Source #
recentDates :: Int -> Select Source #
The number of date groups starting from the most recent.
aroundDate :: Day -> Integer -> Korvai.Korvai -> Bool Source #
hasInstrument :: Text -> Korvai.Score -> Bool Source #
searchAll :: Select -> [Korvai.Score -> Bool] -> [(Int, Korvai.Score)] Source #
writeHtml1 :: Korvai.Score -> IO () Source #
writeHtmlTo :: FilePath -> IO () Source #
Write all Korvais as HTML into the given directory.
scoreFname :: Korvai.Score -> FilePath Source #
qualifiedName :: Korvai.Score -> Text Source #
Write to solkattu-text for grepping and diffing, and solkattu-color for catting.
writeTextTo :: FilePath -> FilePath -> Format.Abstraction -> IO () Source #
The usual text dir is a git repo, so I can see what effect changes have, in the same manner as App.VerifyPerformance.
writeText1 :: Korvai.Score -> IO () Source #
stripColors :: Text -> Text Source #
writeWithStatus :: (Korvai.Score -> IO ()) -> [Korvai.Score] -> IO () Source #
writeCommit :: FilePath -> IO () Source #