temporal-csound (empty) → 0.1.0
raw patch · 4 files changed
+107/−0 lines, 4 filesdep +basedep +csound-expressiondep +temporal-music-notationsetup-changed
Dependencies added: base, csound-expression, temporal-music-notation
Files
- LICENSE +30/−0
- Setup.hs +2/−0
- src/Csound.hs +43/−0
- temporal-csound.cabal +32/−0
+ LICENSE view
@@ -0,0 +1,30 @@+Copyright (c) 2013, Anton Kholomiov++All rights reserved.++Redistribution and use in source and binary forms, with or without+modification, are permitted provided that the following conditions are met:++ * Redistributions of source code must retain the above copyright+ notice, this list of conditions and the following disclaimer.++ * Redistributions in binary form must reproduce the above+ copyright notice, this list of conditions and the following+ disclaimer in the documentation and/or other materials provided+ with the distribution.++ * Neither the name of Anton Kholomiov nor the names of other+ contributors may be used to endorse or promote products derived+ from this software without specific prior written permission.++THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ Setup.hs view
@@ -0,0 +1,2 @@+import Distribution.Simple+main = defaultMain
+ src/Csound.hs view
@@ -0,0 +1,43 @@+module Csound (+ -- * Converters+ CsdNote, csdNote, CsdDrum, csdDrum, + + -- * Scores+ + -- | Tools to make compositions out of timbres.+ sco, notes, drums,+ module Temporal.Music,+ + -- * Colors+ -- | Tools to construct timbres.+ module Csound.Base+) where++import Temporal.Music+import Csound.Base++-- | Plays some notes with Csound instrument. +sco :: Arg a => (a -> Out) -> Score a -> SigOut+sco instr s = score instr (fmap unpackEvent $ alignByZero $ render s)+ where unpackEvent e = (eventStart e, eventDur e, eventContent e)++-- | Playes notes.+notes :: Arg a => (CsdNote a -> Out) -> Score (Note a) -> SigOut+notes instr as = sco instr (fmap csdNote as)++-- | Plays drum-notes.+drums :: Arg a => (CsdDrum a -> Out) -> Score (Drum a) -> SigOut+drums instr as = sco instr (fmap csdDrum as)+ +-- | Csound note: (amplitude, cyclesPerSecond, otherParams) +type CsdNote a = (D, D, a) ++csdNote :: Note a -> CsdNote a+csdNote a = (double $ amp $ noteVolume a, double $ hz $ notePitch a, noteParam a)++-- | Csound drum-note: (amplitude, otherParams)+type CsdDrum a = (D, a)++csdDrum :: Drum a -> CsdDrum a+csdDrum a = (double $ amp $ drumVolume a, drumParam a)+
+ temporal-csound.cabal view
@@ -0,0 +1,32 @@+-- Initial temporal-csound.cabal generated by cabal init. For further+-- documentation, see http://haskell.org/cabal/users-guide/++name: temporal-csound+version: 0.1.0+synopsis: brings together temporal-music-notation and csound-expression packages+-- description: +license: BSD3+license-file: LICENSE+author: Anton Kholomiov+maintainer: anton.kholomiov@gmail.com+-- copyright: +category: Music, Sound+build-type: Simple+cabal-version: >=1.6++Extra-Source-Files : ++Homepage: https://github.com/anton-k/temporal-csound+Bug-Reports: https://github.com/anton-k/temporal-csound/issues++Source-repository head+ Type: git+ Location: https://github.com/anton-k/temporal-csound+++library+ Hs-Source-Dirs: src/+ exposed-modules: + Csound+ -- other-modules: + build-depends: base >= 4, base < 5, temporal-music-notation>=0.2.2, csound-expression>=1.0.0