packages feed

algorithmic-composition-basic-0.1.0.0: Composition/Sound/Extended.hs

-- |
-- Module      :  Composition.Sound.Extended
-- Copyright   :  (c) OleksandrZhabenko 2020-2021
-- License     :  MIT
-- Stability   :  Experimental
-- Maintainer  :  olexandr543@yahoo.com
--
-- Helps to create experimental music from a file (or its part) and a Ukrainian text. 
-- It can also generate a timbre for the notes. Uses SoX inside.

{-# OPTIONS_GHC -threaded #-}

module Composition.Sound.Extended (
  -- * Even more extended
  dviykyTA
  , triykyTA
  , chetvirkyTA
  , p'yatirkyTA
  , shistkyTA
  , simkyTA
  , visimkyTA
  , dev'yatkyTA
  , desyatkyTA
  , odynadtsyatkyTA
  , octavesTA
) where

--import qualified Data.Vector as V
import GHC.Arr
import Composition.Sound.Functional.Basics (NotePairs,notes)

dviykyTA :: NotePairs
dviykyTA = amap (\i -> (unsafeAt notes i, unsafeAt notes (i + 1))) . listArray (0,106) $ [0..106]

triykyTA :: NotePairs
triykyTA = amap (\i -> (unsafeAt notes i, unsafeAt notes (i + 2))) . listArray (0,105) $ [0..105]

chetvirkyTA :: NotePairs
chetvirkyTA = amap (\i -> (unsafeAt notes i, unsafeAt notes (i + 3))) . listArray (0,104) $ [0..104]

p'yatirkyTA :: NotePairs
p'yatirkyTA = amap (\i -> (unsafeAt notes i, unsafeAt notes (i + 4))) . listArray (0,103) $ [0..103]

shistkyTA :: NotePairs
shistkyTA = amap (\i -> (unsafeAt notes i, unsafeAt notes (i + 5))) . listArray (0,102) $ [0..102]

simkyTA :: NotePairs
simkyTA = amap (\i -> (unsafeAt notes i, unsafeAt notes (i + 6))) . listArray (0,101) $ [0..101]

visimkyTA :: NotePairs
visimkyTA = amap (\i -> (unsafeAt notes i, unsafeAt notes (i + 7))) . listArray (0,100) $ [0..100]

dev'yatkyTA :: NotePairs
dev'yatkyTA = amap (\i -> (unsafeAt notes i, unsafeAt notes (i + 8))) . listArray (0,99) $ [0..99]

desyatkyTA :: NotePairs
desyatkyTA = amap (\i -> (unsafeAt notes i, unsafeAt notes (i + 9))) . listArray (0,98) $ [0..98]

odynadtsyatkyTA  :: NotePairs
odynadtsyatkyTA = amap (\i -> (unsafeAt notes i, unsafeAt notes (i + 10))) . listArray (0,97) $ [0..97]

octavesTA :: NotePairs
octavesTA = amap (\i -> (unsafeAt notes i, unsafeAt notes (i + 11))) . listArray (0,96) $ [0..96]

--------------------------------------------------------------------------------------------------------------------------