Copyright | (c) OleksandrZhabenko 2021 |
---|---|
License | MIT |
Maintainer | olexandr543@yahoo.com |
Stability | Experimental |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Extensions |
|
The module is highly experimental approach to estimate further the rhythmicity of the not very long lists (well, not longer than e. g. 30 elements). Is rather computationally expensive, so must be used with caution. If the period of rhythm is less than 4 it is not effective.
Synopsis
- data Marker3s
- data RhythmBasis = Rhythm {}
- data Choices = Ch {}
- validChRhPair :: Choices -> RhythmBasis -> Bool
- twoFourthCh :: Choices
- getChRhData :: Ord a => Choices -> RhythmBasis -> [a] -> [[Marker3s]]
- similarityABC :: Double -> Double -> Double -> [[Marker3s]] -> Double
- similarityABC0 :: Double -> Double -> Double -> [[Marker3s]] -> Double
- similarityLogics :: Double -> Double -> Double -> [Marker3s] -> [Marker3s] -> Double
- similarityLogics0 :: Double -> Double -> Double -> [Marker3s] -> [Marker3s] -> Double
- similarityF1 :: Marker3s -> Marker3s -> Double -> Double -> Double -> Double
- similarityF0 :: Marker3s -> Marker3s -> Double -> Double -> Double -> Double
- rhythmicityABC :: Ord a => Double -> Double -> Double -> Choices -> RhythmBasis -> [a] -> Double
- rhythmicityABC0 :: Ord a => Double -> Double -> Double -> Choices -> RhythmBasis -> [a] -> Double
Documentation
The data type that is used to mark the syllables accordingly to
their importance in general rhythm constituting. More important syllables
are marked with the less data constuctors (since the data type has an
instance of the Ord
type class). Can be used in case of three levels of
importance for rhythm constituting
with the last, third C
level of the syllables which position is thought as
not significant (though it actually, is not, but for simplicity).
data RhythmBasis Source #
Data to specify some quantitative information of the structure of rhythmicity.
Instances
Eq RhythmBasis Source # | |
Defined in Rhythmicity.TwoFourth (==) :: RhythmBasis -> RhythmBasis -> Bool # (/=) :: RhythmBasis -> RhythmBasis -> Bool # | |
Show RhythmBasis Source # | |
Defined in Rhythmicity.TwoFourth showsPrec :: Int -> RhythmBasis -> ShowS # show :: RhythmBasis -> String # showList :: [RhythmBasis] -> ShowS # |
Data to specify (mostly) the qualitative information of the structure of rhythmicity.
validChRhPair :: Choices -> RhythmBasis -> Bool Source #
The predicate to check whether the two given arguments can be used together to get meaningful results.
twoFourthCh :: Choices Source #
The value for the Choices
with the two maximum highlighted values and two other ones in the 4-element period.
:: Ord a | |
=> Choices | |
-> RhythmBasis | Data specifies the quantities of the syllables on the corresponding levels of importance. |
-> [a] | |
-> [[Marker3s]] |
Converts the list into the form where its rhythmicity
can be estimated further. Uses integer division and, therefore,
can be not sensible for the last values in the given list. The length of the list must be not less than the first argument
qty
value though it is not checked. Therefore, the function is not total.
:: Double | The positive factor (multiplier) coefficient that increases or decreases the result in case of |
-> Double | The addition (positive subtraction) coefficient that increases or decreases (probably) the result in case of |
-> Double | The initial value starting from which it counts. Usually, equals to 1.0. |
-> [[Marker3s]] | |
-> Double | In case of positive previous |
The function that uses a simple arithmetic logics to calculate the similarity of the two equal by length (if not they are truncated to the least one)
lists of Marker3s
. It emphasises the A
similarity and for most values have not so simply defined B
-behaviour. Uses similarityLogics
inside.
:: Double | The positive factor (multiplier) coefficient that increases or decreases the result in case of |
-> Double | The addition coefficient that increases the result in case of |
-> Double | The initial value starting from which it counts. Usually, equals to 1.0. |
-> [[Marker3s]] | |
-> Double | In case of positive previous |
The function that uses a simple arithmetic logics to calculate the similarity of the two equal by length (if not they are truncated to the least one)
lists of Marker3s
. It emphasises the A
and B
similarities. Uses similarityLogics0
inside.
The more straightforward variant of the similarityABC
function.
:: Double | The initial value starting from which it counts. Usually, equals to 1.0. |
-> Double | The positive factor (multiplier) coefficient that increases or decreases the result in case of |
-> Double | The addition (positive subtraction) coefficient that increases or decreases (probably) the result in case of |
-> [Marker3s] | |
-> [Marker3s] | |
-> Double | In case of positive previous |
:: Double | The initial value starting from which it counts. Usually, equals to 1.0. |
-> Double | The positive factor (multiplier) coefficient that increases or decreases the result in case of |
-> Double | The addition coefficient that increases the result in case of |
-> [Marker3s] | |
-> [Marker3s] | |
-> Double | In case of positive previous |
The more straightforward variant of the similarityLogics
function.
:: Marker3s | |
-> Marker3s | |
-> Double | The positive factor (multiplier) coefficient that increases or decreases the result in case of |
-> Double | The addition (positive subtraction) coefficient that increases or decreases (probably) the result in case of |
-> Double | The initial value. |
-> Double |
:: Marker3s | |
-> Marker3s | |
-> Double | The positive factor (multiplier) coefficient that increases or decreases the result in case of |
-> Double | The addition coefficient that increases the result in case of |
-> Double | The initial value. |
-> Double |
The more straightforward variant of the similarityF1
function.
:: Ord a | |
=> Double | The initial value starting from which it counts. Usually, equals to 1.0. |
-> Double | The positive factor (multiplier) coefficient that increases or decreases the result in case of |
-> Double | The addition (positive subtraction) coefficient that increases or decreases (probably) the result in case of |
-> Choices | Data specifies the structure of the period of rhythmicity -- whether maximum or minimum elements are considered and how many syllables costitute the period. |
-> RhythmBasis | Data specifies the quantities of the syllables on the corresponding levels of importance. |
-> [a] | |
-> Double | In case of positive previous |
General function to estimate the inner rhythmicity of the Ord
ered list of values. For many cases its arguments can be
guessed or approximated by some reasonable values. Nevertheless, it is a highly experimental one.
:: Ord a | |
=> Double | The initial value starting from which it counts. Usually, equals to 1.0. |
-> Double | The positive factor (multiplier) coefficient that increases or decreases the result in case of |
-> Double | The addition coefficient that increases the result in case of |
-> Choices | Data specifies the structure of the period of rhythmicity -- whether maximum or minimum elements are considered and how many syllables costitute the period. |
-> RhythmBasis | Data specifies the quantities of the syllables on the corresponding levels of importance. |
-> [a] | |
-> Double | In case of positive previous |
General function to estimate the inner rhythmicity of the Ord
ered list of values. For many cases its arguments can be
guessed or approximated by some reasonable values. Nevertheless, it is a highly experimental one.
The more straightforward variant of the rhythmicityABC
function.