-- |
-- Module      :  DobutokO.Sound.Extended
-- Copyright   :  (c) OleksandrZhabenko 2020, 2024
-- License     :  MIT
-- Stability   :  Experimental
-- Maintainer  :  oleksandr.zhabenko@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 DobutokO.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 DobutokO.Sound.Functional.Basics (NotePairs,notes)

dviykyTA :: NotePairs
dviykyTA :: NotePairs
dviykyTA = Int -> (Int -> (Float, Float)) -> NotePairs
forall a. Int -> (Int -> a) -> Vector a
V.generate Int
107 (\Int
i -> (Vector Float -> Int -> Float
forall a. Vector a -> Int -> a
V.unsafeIndex Vector Float
notes Int
i, Vector Float -> Int -> Float
forall a. Vector a -> Int -> a
V.unsafeIndex Vector Float
notes (Int
i Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
1)))

triykyTA :: NotePairs
triykyTA :: NotePairs
triykyTA = Int -> (Int -> (Float, Float)) -> NotePairs
forall a. Int -> (Int -> a) -> Vector a
V.generate Int
106 (\Int
i -> (Vector Float -> Int -> Float
forall a. Vector a -> Int -> a
V.unsafeIndex Vector Float
notes Int
i, Vector Float -> Int -> Float
forall a. Vector a -> Int -> a
V.unsafeIndex Vector Float
notes (Int
i Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
2)))

chetvirkyTA :: NotePairs
chetvirkyTA :: NotePairs
chetvirkyTA = Int -> (Int -> (Float, Float)) -> NotePairs
forall a. Int -> (Int -> a) -> Vector a
V.generate Int
105 (\Int
i -> (Vector Float -> Int -> Float
forall a. Vector a -> Int -> a
V.unsafeIndex Vector Float
notes Int
i, Vector Float -> Int -> Float
forall a. Vector a -> Int -> a
V.unsafeIndex Vector Float
notes (Int
i Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
3)))

p'yatirkyTA :: NotePairs
p'yatirkyTA :: NotePairs
p'yatirkyTA = Int -> (Int -> (Float, Float)) -> NotePairs
forall a. Int -> (Int -> a) -> Vector a
V.generate Int
104 (\Int
i -> (Vector Float -> Int -> Float
forall a. Vector a -> Int -> a
V.unsafeIndex Vector Float
notes Int
i, Vector Float -> Int -> Float
forall a. Vector a -> Int -> a
V.unsafeIndex Vector Float
notes (Int
i Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
4)))

shistkyTA :: NotePairs
shistkyTA :: NotePairs
shistkyTA = Int -> (Int -> (Float, Float)) -> NotePairs
forall a. Int -> (Int -> a) -> Vector a
V.generate Int
103 (\Int
i -> (Vector Float -> Int -> Float
forall a. Vector a -> Int -> a
V.unsafeIndex Vector Float
notes Int
i, Vector Float -> Int -> Float
forall a. Vector a -> Int -> a
V.unsafeIndex Vector Float
notes (Int
i Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
5)))

simkyTA :: NotePairs
simkyTA :: NotePairs
simkyTA = Int -> (Int -> (Float, Float)) -> NotePairs
forall a. Int -> (Int -> a) -> Vector a
V.generate Int
102 (\Int
i -> (Vector Float -> Int -> Float
forall a. Vector a -> Int -> a
V.unsafeIndex Vector Float
notes Int
i, Vector Float -> Int -> Float
forall a. Vector a -> Int -> a
V.unsafeIndex Vector Float
notes (Int
i Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
6)))

visimkyTA :: NotePairs
visimkyTA :: NotePairs
visimkyTA = Int -> (Int -> (Float, Float)) -> NotePairs
forall a. Int -> (Int -> a) -> Vector a
V.generate Int
101 (\Int
i -> (Vector Float -> Int -> Float
forall a. Vector a -> Int -> a
V.unsafeIndex Vector Float
notes Int
i, Vector Float -> Int -> Float
forall a. Vector a -> Int -> a
V.unsafeIndex Vector Float
notes (Int
i Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
7)))

dev'yatkyTA :: NotePairs
dev'yatkyTA :: NotePairs
dev'yatkyTA = Int -> (Int -> (Float, Float)) -> NotePairs
forall a. Int -> (Int -> a) -> Vector a
V.generate Int
100 (\Int
i -> (Vector Float -> Int -> Float
forall a. Vector a -> Int -> a
V.unsafeIndex Vector Float
notes Int
i, Vector Float -> Int -> Float
forall a. Vector a -> Int -> a
V.unsafeIndex Vector Float
notes (Int
i Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
8)))

desyatkyTA :: NotePairs
desyatkyTA :: NotePairs
desyatkyTA = Int -> (Int -> (Float, Float)) -> NotePairs
forall a. Int -> (Int -> a) -> Vector a
V.generate Int
99 (\Int
i -> (Vector Float -> Int -> Float
forall a. Vector a -> Int -> a
V.unsafeIndex Vector Float
notes Int
i, Vector Float -> Int -> Float
forall a. Vector a -> Int -> a
V.unsafeIndex Vector Float
notes (Int
i Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
9)))

odynadtsyatkyTA  :: NotePairs
odynadtsyatkyTA :: NotePairs
odynadtsyatkyTA = Int -> (Int -> (Float, Float)) -> NotePairs
forall a. Int -> (Int -> a) -> Vector a
V.generate Int
98 (\Int
i -> (Vector Float -> Int -> Float
forall a. Vector a -> Int -> a
V.unsafeIndex Vector Float
notes Int
i, Vector Float -> Int -> Float
forall a. Vector a -> Int -> a
V.unsafeIndex Vector Float
notes (Int
i Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
10)))

octavesTA :: NotePairs
octavesTA :: NotePairs
octavesTA = Int -> (Int -> (Float, Float)) -> NotePairs
forall a. Int -> (Int -> a) -> Vector a
V.generate Int
97 (\Int
i -> (Vector Float -> Int -> Float
forall a. Vector a -> Int -> a
V.unsafeIndex Vector Float
notes Int
i, Vector Float -> Int -> Float
forall a. Vector a -> Int -> a
V.unsafeIndex Vector Float
notes (Int
i Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
11)))

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