packages feed

dobutokO2 0.7.1.1 → 0.7.2.0

raw patch · 4 files changed

+47/−19 lines, 4 files

Files

CHANGELOG.md view
@@ -59,3 +59,7 @@ ## 0.7.1.1 -- 2020-03-10  * Seventh version revised B. Fixed issue with improper README.markdown file information.++## 0.7.2.0 -- 2020-03-11++* Seventh version revised C. Improved README.markdown file. Added exporting for all the basic functions in the DobutokO.Sound module.
DobutokO/Sound.hs view
@@ -21,9 +21,11 @@   , oberTones2   , oberSoXSynth2   , oberSoXSynthN2+  , oberSoXSynthN3   -- *** Uses a file for information   , oberSoXSynthNGen   , oberSoXSynthNGen2+  , oberSoXSynthNGen3   -- ** For the unique for the String structure timbre   , uniqOberTonesV   , uniqOberSoXSynth@@ -77,7 +79,8 @@ -- notes V.! 57 = 440.0   -- A4 in Hz notes = V.generate 108 (\t ->  fromIntegral 440 * 2 ** (fromIntegral (t - 57) / fromIntegral 12)) --- | Function returns either the nearest two musical notes if frequency is higher than one for C0 and lower than one for B8 or the nearest note duplicated in a tuple.+-- | Function returns either the nearest two musical notes if frequency is higher than one for C0 and lower than one for B8+-- or the nearest note duplicated in a tuple. neighbourNotes :: Double -> V.Vector Double -> (Double, Double) neighbourNotes x v   | compare x (V.unsafeIndex v 0) /= GT = (V.unsafeIndex v 0, V.unsafeIndex v 0)@@ -676,8 +679,8 @@     ("й", 7), ("к", 10), ("л", 7), ("м", 7), ("н", 7), ("о", 12), ("п", 10), ("р", 7), ("с", 10), ("т", 2), ("у", 12), ("ф", 2), ("х", 2),       ("ц", 11), ("ч", 11), ("ш", 1), ("і", 12), ("ґ", 9)])  --- | Function to get from the number of semi-tones and a note a 'Maybe' note for the second note if any. If there is no need to obtain such a note,--- then the result is 'Nothing'.+-- | Function to get from the number of semi-tones and a note a 'Maybe' note for the second lower note in the interval if any. If there is+-- no need to obtain such a note, then the result is 'Nothing'. dNote :: Int -> Double -> Maybe Double dNote n note   | n == 0 || compare note (V.unsafeIndex notes 0) == LT || compare note (V.unsafeIndex notes 107) == GT = Nothing@@ -933,6 +936,8 @@                recAndProcess file 8)   | x == 9 = onException (do      putStrLn "Please, input the Ukrainian text that will be used to define intervals to be used to produce the lower note for the given main one: "+     putStrLn The default one is \"й\". "+     putStrLn "To use the default value, you can simply press Enter."      vs <- getLine      if null vs then return "й"      else return vs) (do
README.markdown view
@@ -20,21 +20,40 @@   the full absolute path to the sound .wav file (or other one format   that is supported by your SoX installation) to obtain sound information from. -If the first command line argument equals to "1", or "3", or "5", then the executable-uses the oberTones functions, so for the given parameters the obertones-are the same for every call. The "3" adittionally gives an opportunity-to specify the signs for the harmonics coefficients for obertones by additional-String. And the "5" additionally to that one functionality provided by "3" gives-an opportunity to specify in how many times the amplitude for the second lower note-(if any) is greater, than the amplitude for the main note and specify the intervals-to be used for every note. Otherwise, the executable uses uniqOberTones functions, which-can have different obertones because of the provided the second, additional,-text. The third one is used to generate the obertones. In such a case, another-text gives the other obertones. If you specify something else, than "1", or "2", or "3",-or "5", then the program uses uniqOberTones functions and (similarly to "3" option)-it uses additional String to define signs for the harmonics coefficients for obertones.-If you specify the "6" option, then the program behaves like for the "5" option,-but generates obertones using additional String.+If the first command line argument equals to one of the numbers below, then+the program behaves as follows:++  "1", or "3", or "5" ->  then the executable uses the oberTones functions,+    so for the given parameters the obertones are the same for every call.++  "2", or "4", or "6" -> then the program uses uniqOberTones functions.++  "3", or "4", or "5", or "6" -> the program uses additional String+    to define signs for the harmonics coefficients for obertones.+      +  In more detail:++  "1" -> basic functionality without the possibility to define individual obertones.+  +  "2" -> basic functionality with the possibility to define individual obertones.+     In such a case, another text gives the other obertones.++  "3" -> adittionally to basic functionality gives an opportunity +     to specify the signs for the harmonics coefficients for obertones+       by additional String.++  "4" -> similarly to "2" gives an opportunity to specify the signs+     for the harmonics coefficients for obertones by additional String.++  "5" -> additionally to that one functionality provided by "3" gives+     an opportunity to specify in how many times the amplitude for+       the second lower note (if any) is greater, than the amplitude+         for the main note and specify the intervals to be used+           for every note.++   _  -> the program behaves like for the "5" option, but generates+     obertones using additional String and allows maximum control over+        the parameters.  After the program executing (it takes some time) there is a file "end.wav" in the directory. This is the resulting melody generated.
dobutokO2.cabal view
@@ -2,7 +2,7 @@ -- documentation, see http://haskell.org/cabal/users-guide/  name:                dobutokO2-version:             0.7.1.1+version:             0.7.2.0 synopsis:            A program and a library to create experimental music from a mono audio and a Ukrainian text description:         It can also create a timbre for the notes homepage:            https://hackage.haskell.org/package/dobutokO2