summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonKholomiov <>2015-10-29 13:01:00 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2015-10-29 13:01:00 (GMT)
commit7211a5f60e01ea876d31783187491a300789da8a (patch)
treea0e8088bc7e5bb20a013a09c316392587f586e2d
parent20faa284b7f642412c23e68e647124c7472afc2b (diff)
version 0.4.00.4.0
-rw-r--r--csound-catalog.cabal5
-rw-r--r--src/Csound/Catalog/Wave.hs24
-rw-r--r--src/Csound/Catalog/Wave/Amsterdam.hs6
-rw-r--r--src/Csound/Catalog/Wave/Misc.hs25
-rw-r--r--src/Csound/Catalog/Wave/Sharc.hs219
-rw-r--r--src/Csound/Patch.hs295
6 files changed, 549 insertions, 25 deletions
diff --git a/csound-catalog.cabal b/csound-catalog.cabal
index 5dd92c4..cf71983 100644
--- a/csound-catalog.cabal
+++ b/csound-catalog.cabal
@@ -1,5 +1,5 @@
Name: csound-catalog
-Version: 0.3.0
+Version: 0.4.0
Cabal-Version: >= 1.6
License: BSD3
License-file: LICENSE
@@ -27,7 +27,7 @@ Source-repository head
Library
Ghc-Options: -Wall
Build-Depends:
- base >= 4, base < 5, transformers >= 0.3, csound-expression >= 4.8.3, csound-sampler >=0.0.6.3
+ base >= 4, base < 5, transformers >= 0.3, csound-expression >= 4.9.0, csound-sampler >=0.0.6.4, sharc-timbre
Hs-Source-Dirs: src/
Exposed-Modules:
Csound.Catalog
@@ -55,4 +55,5 @@ Library
Csound.Catalog.Wave.Flavio
Csound.Catalog.Wave.Thor
Csound.Catalog.Wave.Bitwig
+ Csound.Catalog.Wave.Sharc
diff --git a/src/Csound/Catalog/Wave.hs b/src/Csound/Catalog/Wave.hs
index 1585432..f317343 100644
--- a/src/Csound/Catalog/Wave.hs
+++ b/src/Csound/Catalog/Wave.hs
@@ -91,9 +91,30 @@ module Csound.Catalog.Wave(
-- * Pads
polySynthFx, polySynth,
dreamPad, underwaterPad, lightIsTooBrightPad, whaleSongPad,
+ dreamPadBy,
+
+ -- * SHARC instruments
+ -- | SHARC ported to Csound. SHARC is a database of musical timbre information by Gregory Sandell.
+ -- It's a collection of sustain notes for real orchestra instruments.
+
+ -- ** Oscillators
+ sharcOsc, sigSharcOsc, rndSharcOsc, rndSigSharcOsc,
+ soloSharcOsc, orcSharcOsc, purePadSharcOsc, padSharcOsc,
+
+ -- ** Instriments
+ SharcInstr(..),
+ shViolin, shViolinPizzicato, shViolinMuted, shViolinMarteleBowing, shViolinsEnsemble, shViola, shViolaPizzicato, shViolaMuted,
+ shViolaMarteleBowing, shTuba, shTromboneMuted, shTrombone, shPiccolo, shOboe, shFrenchHornMuted, shFrenchHorn, shFlute,
+ shEnglishHorn, shClarinetEflat, shTrumpetMutedC, shTrumpetC, shContrabassClarinet, shContrabassoon, shCello, shCelloPizzicato,
+ shCelloMuted, shCelloMarteleBowing, shContrabassPizzicato, shContrabassMuted, shContrabassMarteleBowing, shContrabass,
+ shClarinet, shBassTrombone, shBassClarinet, shBassoon, shBassFlute, shTrumpetBach, shAltoTrombone, shAltoFlute,
+
+ -- ** Low-level getters
+ getInstrTab, note2sig, note2tab,
-- * Other instruments
- okComputer, deepBass
+ okComputer, deepBass,
+ impulseMarimba1, impulseMarimba2
) where
@@ -116,6 +137,7 @@ import Csound.Catalog.Wave.Bitwig
import Csound.Catalog.Wave.Misc
import Csound.Catalog.Reson
+import Csound.Catalog.Wave.Sharc
-- |
-- > nightPad fadeInTime cps
diff --git a/src/Csound/Catalog/Wave/Amsterdam.hs b/src/Csound/Catalog/Wave/Amsterdam.hs
index 4847e2c..4d9fd8a 100644
--- a/src/Csound/Catalog/Wave/Amsterdam.hs
+++ b/src/Csound/Catalog/Wave/Amsterdam.hs
@@ -14,8 +14,8 @@ import Csound.Base
-- * off - frequency step of the harmonics ~ (0.01, 0.03)
--
-- * cps - the frequency of the note
-tibetan :: Int -> Sig -> D -> Sig
-tibetan n off cps = chorusPitch n (2 * off * fromIntegral n) (oscBy wave) (sig cps)
- where wave = ifB (cps `lessThan` 230) (waveBy 5) (ifB (cps `lessThan` 350) (waveBy 3) (waveBy 1))
+tibetan :: Int -> Sig -> Sig -> Sig
+tibetan n off cps = chorusPitch n (2 * off * fromIntegral n) (oscBy wave) cps
+ where wave = ifB ((ir cps) `lessThan` 230) (waveBy 5) (ifB ((ir cps) `lessThan` 350) (waveBy 3) (waveBy 1))
waveBy x = sines $ [0.3, 0, 0, 0] ++ replicate x 0.1
diff --git a/src/Csound/Catalog/Wave/Misc.hs b/src/Csound/Catalog/Wave/Misc.hs
index 0351149..f875e25 100644
--- a/src/Csound/Catalog/Wave/Misc.hs
+++ b/src/Csound/Catalog/Wave/Misc.hs
@@ -1,7 +1,10 @@
module Csound.Catalog.Wave.Misc (
okComputer, polySynthFx, polySynth,
dreamPad, underwaterPad, lightIsTooBrightPad, whaleSongPad,
- deepBass
+ dreamPadBy,
+ deepBass,
+
+ impulseMarimba1, impulseMarimba2
) where
import Csound.Base
@@ -26,11 +29,8 @@ polySynthFx = mixAt 0.25 largeHall2 . mixAt 0.25 (echo 0.25 0.65) . at (chorus 0
uni = multiHz 2 (cent 50)
-dreamPad = genDreamPadInstr mkOsc
- where mkOsc vibLfo1 vibLfo2 x = uni rndSaw (vibLfo1 x) + uni rndSaw (vibLfo2 $ x * cent 14)
-
-underwaterPad = genDreamPadInstr mkOsc
- where mkOsc vibLfo1 vibLfo2 x = uni rndTri (vibLfo1 x) + uni rndTri (vibLfo2 $ x * cent 14)
+dreamPad = dreamPadBy rndSaw
+underwaterPad = dreamPadBy rndTri
lightIsTooBrightPad = genDreamPadInstr mkOsc
where mkOsc vibLfo1 vibLfo2 x = uni rndSaw (vibLfo1 x) + uni rndSaw (vibLfo2 $ x * cent 14) + mul 0.3 (mul (uosc 0.25) (rndTri (vibLfo2 $ x * 7 * cent 4)) + mul (isawSeq [1, 0.5, 0.25] 6 * uosc 0.17) (rndTri (vibLfo2 $ x * 13)) + mul (sqrSeq [1, 0.5, 0.25, 0.1] 8 * uosc 0.28) (rndOsc (vibLfo2 $ x * 9 * cent 3)))
@@ -38,6 +38,10 @@ lightIsTooBrightPad = genDreamPadInstr mkOsc
whaleSongPad = genDreamPadInstr mkOsc
where mkOsc vibLfo1 vibLfo2 x = uni rndTri (vibLfo1 x) + uni rndTri (vibLfo2 $ x * cent 14) + uni rndTri (vibLfo2 $ 3 * x * cent 14) + mul 0.15 (uni rndTri (vibLfo2 $ 7 * x * cent 14)) + mul 0.15 (uni rndTri ((vibLfo2 $ 11 * x * cent 14) + 400 * uosc 0.2))
+dreamPadBy :: (Sig -> SE Sig) -> Sig -> Sig -> SE Sig
+dreamPadBy wave = genDreamPadInstr mkOsc
+ where mkOsc vibLfo1 vibLfo2 x = uni wave (vibLfo1 x) + uni wave (vibLfo2 $ x * cent 14)
+
genDreamPadInstr mkOsc brightness x = do
a1 <- oscs
a2 <- nois
@@ -67,3 +71,12 @@ genDreamPadInstr mkOsc brightness x = do
vibLfo2 = lfo2 0.007
deepBass x = mul 0.5 $ at (hp1 45) $ at (\x -> dam x 0.45 2 2 0.01 0.01) $ mul (xeg 0.005 0.6 1 0.05) $ sum [(filt 2 lp 275 0.25) (saw $ x * 0.5), osc (x * 0.5)]
+
+impulseMarimba1 :: Sig -> Sig
+impulseMarimba1 cps = mul 4 $ at (mlp cps 0.95) $ impulse 0
+
+impulseMarimba2 :: Sig -> Sig
+impulseMarimba2 cps = bat (bp cps 120) $ impulse 0
+
+
+
diff --git a/src/Csound/Catalog/Wave/Sharc.hs b/src/Csound/Catalog/Wave/Sharc.hs
new file mode 100644
index 0000000..0390678
--- /dev/null
+++ b/src/Csound/Catalog/Wave/Sharc.hs
@@ -0,0 +1,219 @@
+module Csound.Catalog.Wave.Sharc(
+ -- * Oscillators
+ sharcOsc, sigSharcOsc, rndSharcOsc, rndSigSharcOsc,
+ soloSharcOsc, orcSharcOsc, purePadSharcOsc, padSharcOsc,
+
+ -- * Instriments
+ SharcInstr(..),
+ shViolin, shViolinPizzicato, shViolinMuted, shViolinMarteleBowing, shViolinsEnsemble, shViola, shViolaPizzicato, shViolaMuted,
+ shViolaMarteleBowing, shTuba, shTromboneMuted, shTrombone, shPiccolo, shOboe, shFrenchHornMuted, shFrenchHorn, shFlute,
+ shEnglishHorn, shClarinetEflat, shTrumpetMutedC, shTrumpetC, shContrabassClarinet, shContrabassoon, shCello, shCelloPizzicato,
+ shCelloMuted, shCelloMarteleBowing, shContrabassPizzicato, shContrabassMuted, shContrabassMarteleBowing, shContrabass,
+ shClarinet, shBassTrombone, shBassClarinet, shBassoon, shBassFlute, shTrumpetBach, shAltoTrombone, shAltoFlute,
+
+ -- * Low-level getters
+ getInstrTab, note2sig, note2tab
+) where
+
+import qualified Sharc.Types as Sh
+import qualified Sharc.Data as Sh
+import Csound.Base
+import Sharc.Types
+
+note2sig :: Sh.Note -> Sig
+note2sig n = oscBy (harmonics2tab $ Sh.noteHarmonics n) (sig $ double $ Sh.pitchFund $ Sh.notePitch n)
+
+note2tab :: Sh.Note -> Tab
+note2tab n = (harmonics2tab $ Sh.noteHarmonics n)
+
+deg x = 180 * x / pi
+
+harmonics2tab harmonics = sines3 $ fmap (\h -> (fromIntegral $ Sh.harmonicId h, Sh.harmonicAmplitude h, deg $ Sh.harmonicPhase h)) harmonics
+
+-- | Get instrument wae table by midi pitch number.
+getInstrTab :: SharcInstr -> Int -> Tab
+getInstrTab (SharcInstr instr) n = note2tab $ Sh.instrNotes instr !! idx
+ where
+ ns = Sh.instrNotes instr
+ keys = fmap (Sh.pitchKeyNum . Sh.notePitch) ns
+ keyMin = minimum keys
+ keyMax = maximum keys
+ idx = (min (max keyMin n) keyMax - keyMin)
+
+---------------------------------------------------------------------------
+-- oscilliators
+
+-- | Sharc oscillator
+sharcOsc :: SharcInstr -> D -> Sig
+sharcOsc instr cpsTab = sigSharcOsc instr cpsTab (sig cpsTab)
+
+-- | Sharc oscillator with continuous pitch.
+-- The second argument picks upth table by frequency
+-- and the third supplies the frequency.
+sigSharcOsc :: SharcInstr -> D -> Sig -> Sig
+sigSharcOsc = genSharcOsc' oscBy
+
+-- | Sharc oscillator with randomized phase.
+rndSharcOsc :: SharcInstr -> D -> SE Sig
+rndSharcOsc instr cpsTab = rndSigSharcOsc instr cpsTab (sig cpsTab)
+
+-- | Sharc oscillator with continuous pitch and randomized phase.
+rndSigSharcOsc :: SharcInstr -> D -> Sig -> SE Sig
+rndSigSharcOsc = genSharcOsc' rndOscBy
+
+genSharcOsc' :: (Tab -> Sig -> a) -> SharcInstr -> D -> Sig -> a
+genSharcOsc' wave (SharcInstr instr) cps cpsSig = wave t cpsSig
+ where
+ t = fromTabListD tabs (cps2pitch cps - int keyMin)
+
+ tabs = tabList $ fmap note2tab ns
+
+ ns = Sh.instrNotes instr
+ keys = fmap (Sh.pitchKeyNum . Sh.notePitch) ns
+ keyMin = minimum keys
+
+cps2pitch :: Floating a => a -> a
+cps2pitch x = 69 + 12 * logBase 2 (x / 440)
+
+---------------------------------------------------------------------------
+-- patches
+
+uni = multiHz 4 (cent 40)
+
+-- | Plays a solo instrument
+soloSharcOsc :: SharcInstr -> D -> SE Sig
+soloSharcOsc instr cps = mul (fades 0.001 0.05) $ rndSharcOsc instr cps
+
+-- | Plays a orchestrated instrument (with pitch chorus)
+orcSharcOsc :: SharcInstr -> D -> SE Sig
+orcSharcOsc instr cps = mul (fades 0.01 0.42) $ uni (rndSharcOsc instr . ir) (sig cps)
+
+-- | Plays a solo instrument with pad-like envelope
+purePadSharcOsc :: SharcInstr -> D -> SE Sig
+purePadSharcOsc instr cps = mul (fades 0.65 0.75) $ rndSharcOsc instr cps
+
+-- | Plays orchestrated instrument with pad-like envelope
+padSharcOsc :: SharcInstr -> D -> SE Sig
+padSharcOsc instr cps = mul (fades 0.65 0.75) $ uni (rndSharcOsc instr . ir) (sig cps)
+
+---------------------------------------------------------------------------
+-- sharc instr
+
+newtype SharcInstr = SharcInstr { unSharcInstr :: Sh.Instr }
+
+shViolin :: SharcInstr
+shViolin = SharcInstr Sh.violin
+
+shViolinPizzicato :: SharcInstr
+shViolinPizzicato = SharcInstr Sh.violinPizzicato
+
+shViolinMuted :: SharcInstr
+shViolinMuted = SharcInstr Sh.violinMuted
+
+shViolinMarteleBowing :: SharcInstr
+shViolinMarteleBowing = SharcInstr Sh.violinMarteleBowing
+
+shViolinsEnsemble :: SharcInstr
+shViolinsEnsemble = SharcInstr Sh.violinsEnsemble
+
+shViola :: SharcInstr
+shViola = SharcInstr Sh.viola
+
+shViolaPizzicato :: SharcInstr
+shViolaPizzicato = SharcInstr Sh.violaPizzicato
+
+shViolaMuted :: SharcInstr
+shViolaMuted = SharcInstr Sh.violaMuted
+
+shViolaMarteleBowing :: SharcInstr
+shViolaMarteleBowing = SharcInstr Sh.violaMarteleBowing
+
+shTuba :: SharcInstr
+shTuba = SharcInstr Sh.tuba
+
+shTromboneMuted :: SharcInstr
+shTromboneMuted = SharcInstr Sh.tromboneMuted
+
+shTrombone :: SharcInstr
+shTrombone = SharcInstr Sh.trombone
+
+shPiccolo :: SharcInstr
+shPiccolo = SharcInstr Sh.piccolo
+
+shOboe :: SharcInstr
+shOboe = SharcInstr Sh.oboe
+
+shFrenchHornMuted :: SharcInstr
+shFrenchHornMuted = SharcInstr Sh.frenchHornMuted
+
+shFrenchHorn :: SharcInstr
+shFrenchHorn = SharcInstr Sh.frenchHorn
+
+shFlute :: SharcInstr
+shFlute = SharcInstr Sh.flute
+
+shEnglishHorn :: SharcInstr
+shEnglishHorn = SharcInstr Sh.englishHorn
+
+shClarinetEflat :: SharcInstr
+shClarinetEflat = SharcInstr Sh.clarinetEflat
+
+shTrumpetMutedC :: SharcInstr
+shTrumpetMutedC = SharcInstr Sh.trumpetMutedC
+
+shTrumpetC :: SharcInstr
+shTrumpetC = SharcInstr Sh.trumpetC
+
+shContrabassClarinet :: SharcInstr
+shContrabassClarinet = SharcInstr Sh.contrabassClarinet
+
+shContrabassoon :: SharcInstr
+shContrabassoon = SharcInstr Sh.contrabassoon
+
+shCello :: SharcInstr
+shCello = SharcInstr Sh.cello
+
+shCelloPizzicato :: SharcInstr
+shCelloPizzicato = SharcInstr Sh.celloPizzicato
+
+shCelloMuted :: SharcInstr
+shCelloMuted = SharcInstr Sh.celloMuted
+
+shCelloMarteleBowing :: SharcInstr
+shCelloMarteleBowing = SharcInstr Sh.celloMarteleBowing
+
+shContrabassPizzicato :: SharcInstr
+shContrabassPizzicato = SharcInstr Sh.contrabassPizzicato
+
+shContrabassMuted :: SharcInstr
+shContrabassMuted = SharcInstr Sh.contrabassMuted
+
+shContrabassMarteleBowing :: SharcInstr
+shContrabassMarteleBowing = SharcInstr Sh.contrabassMarteleBowing
+
+shContrabass :: SharcInstr
+shContrabass = SharcInstr Sh.contrabass
+
+shClarinet :: SharcInstr
+shClarinet = SharcInstr Sh.clarinet
+
+shBassTrombone :: SharcInstr
+shBassTrombone = SharcInstr Sh.bassTrombone
+
+shBassClarinet :: SharcInstr
+shBassClarinet = SharcInstr Sh.bassClarinet
+
+shBassoon :: SharcInstr
+shBassoon = SharcInstr Sh.bassoon
+
+shBassFlute :: SharcInstr
+shBassFlute = SharcInstr Sh.bassFlute
+
+shTrumpetBach :: SharcInstr
+shTrumpetBach = SharcInstr Sh.trumpetBach
+
+shAltoTrombone :: SharcInstr
+shAltoTrombone = SharcInstr Sh.altoTrombone
+
+shAltoFlute :: SharcInstr
+shAltoFlute = SharcInstr Sh.altoFlute \ No newline at end of file
diff --git a/src/Csound/Patch.hs b/src/Csound/Patch.hs
index caa50f9..c7ea101 100644
--- a/src/Csound/Patch.hs
+++ b/src/Csound/Patch.hs
@@ -15,12 +15,15 @@ module Csound.Patch(
amPiano, fmPiano,
epiano2, epianoHeavy, epianoBright,
vibraphonePiano1, vibraphonePiano2,
+ addHammer,
-- * Organ
cathedralOrgan, toneWheelOrgan,
HammondOrgan(..), hammondOrgan, hammondOrgan',
sawOrgan, triOrgan, sqrOrgan, pwOrgan, waveOrgan,
+ hammondOrganm, hammondOrganm', sawOrganm, triOrganm, sqrOrganm, pwOrganm, waveOrganm,
+
-- * Accordeon
accordeon, accordeonBright1, accordeonBright2, brokenAccordeon,
accordeon', Accordeon(..),
@@ -35,8 +38,15 @@ module Csound.Patch(
pwPad, triPad, nightPad, overtonePad, caveOvertonePad,
chorusel, pwEnsemble, fmDroneSlow, fmDroneMedium, fmDroneFast, vibrophonePad,
RazorPad(..), razorPadSlow, razorPadFast, razorPadTremolo, razorPad, razorPad',
- dreamPad, underwaterPad, lightIsTooBrightPad, whaleSongPad,
- dreamPad', underwaterPad', lightIsTooBrightPad', whaleSongPad',
+ dreamPad, underwaterPad, lightIsTooBrightPad, whaleSongPad, dreamPadBy,
+ dreamPad', underwaterPad', lightIsTooBrightPad', whaleSongPad', dreamPad', dreamPadBy',
+
+ -- ** Pad Monosynth
+ pwPadm, triPadm, nightPadm, overtonePadm, caveOvertonePadm, choruselm,
+ pwEnsemblem, fmDroneSlowm, fmDroneMediumm, fmDroneFastm,
+ razorPadSlowm, razorPadFastm, razorPadTremolom, razorPadm, razorPadm',
+ dreamPadm, dreamPadBym, underwaterPadm, lightIsTooBrightPadm, whaleSongPadm, dreamPadm', underwaterPadm', dreamPadBym',
+ lightIsTooBrightPadm', whaleSongPadm',
-- * Lead
polySynth,
@@ -44,11 +54,14 @@ module Csound.Patch(
razorLead, razorLead',
overtoneLead,
+ -- ** Lead Monosynth
+ polySynthm,
+
-- * Bass
simpleBass, pwBass, deepBass, withDeepBass,
-- * Plucked
- guitar, harpsichord,
+ guitar, harpsichord,
-- * Strike
@@ -90,6 +103,19 @@ module Csound.Patch(
scrapePadUniformAluminumBar, scrapePadVibraphone1, scrapePadVibraphone2, scrapePadChalandiPlates, scrapePadTibetanBowl152,
scrapePadTibetanBowl140, scrapePadWineGlass, scrapePadSmallHandbell, scrapePadAlbertClockBellBelfast, scrapePadWoodBlock,
+
+ -- ** Scrape monosynth
+ -- | Unfortunately they don't work with @atMonoMidi@. Though @atNote@ works fine.
+ scrapeDahinam, scrapeBanyanm, scrapeXylophonem, scrapeTibetanBowl180m, scrapeSpinelSpherem, scrapePotLidm, scrapeRedCedarWoodPlatem,
+ scrapeTubularBellm, scrapeRedwoodPlatem, scrapeDouglasFirWoodPlatem, scrapeUniformWoodenBarm, scrapeUniformAluminumBarm,
+ scrapeVibraphone1m, scrapeVibraphone2m, scrapeChalandiPlatesm, scrapeTibetanBowl152m, scrapeTibetanBowl140m, scrapeWineGlassm,
+ scrapeSmallHandbellm, scrapeAlbertClockBellBelfastm, scrapeWoodBlockm,
+
+ scrapePadDahinam, scrapePadBanyanm, scrapePadXylophonem, scrapePadTibetanBowl180m, scrapePadSpinelSpherem, scrapePadPotLidm,
+ scrapePadRedCedarWoodPlatem, scrapePadTubularBellm, scrapePadRedwoodPlatem, scrapePadDouglasFirWoodPlatem, scrapePadUniformWoodenBarm,
+ scrapePadUniformAluminumBarm, scrapePadVibraphone1m, scrapePadVibraphone2m, scrapePadChalandiPlatesm, scrapePadTibetanBowl152m,
+ scrapePadTibetanBowl140m, scrapePadWineGlassm, scrapePadSmallHandbellm, scrapePadAlbertClockBellBelfastm, scrapePadWoodBlockm,
+
-- * Woodwind
Wind(..), woodWind',
@@ -112,8 +138,19 @@ module Csound.Patch(
diziSpec, shortDiziSpec,
dizi, shortDizi, diziVibrato, mutedDizi, brightDizi,
+ -- * SHARC instruments
+ SharcInstr,
+ soloSharc, orcSharc, padSharc, purePadSharc, dreamSharc, dreamSharc',
+
+ -- ** concrete instruments
+ shViolin, shViolinPizzicato, shViolinMuted, shViolinMarteleBowing, shViolinsEnsemble, shViola, shViolaPizzicato, shViolaMuted,
+ shViolaMarteleBowing, shTuba, shTromboneMuted, shTrombone, shPiccolo, shOboe, shFrenchHornMuted, shFrenchHorn, shFlute,
+ shEnglishHorn, shClarinetEflat, shTrumpetMutedC, shTrumpetC, shContrabassClarinet, shContrabassoon, shCello, shCelloPizzicato,
+ shCelloMuted, shCelloMarteleBowing, shContrabassPizzicato, shContrabassMuted, shContrabassMarteleBowing, shContrabass,
+ shClarinet, shBassTrombone, shBassClarinet, shBassoon, shBassFlute, shTrumpetBach, shAltoTrombone, shAltoFlute,
+
-- * X-rays
- pulseWidth, xanadu, alienIsAngry, noiz, blue, black, simpleMarimba, okComputer, noiseBell,
+ pulseWidth, xanadu, alienIsAngry, noiz, blue, black, simpleMarimba, impulseMarimba1, impulseMarimba2, okComputer, noiseBell,
-- * Robotic vowels
robotVowels, robotLoopVowels, robotVowel,
@@ -139,10 +176,19 @@ import qualified Csound.Catalog.Reson as C
import Csound.Catalog.Wave(maleA, maleE, maleIY, maleO, maleOO, maleU, maleER, maleUH,
femaleA, femaleE, femaleIY, femaleO, femaleOO)
-import Csound.Catalog.Wave(Accordeon(..))
+import Csound.Catalog.Wave(Accordeon(..),
+ SharcInstr,
+ shViolin, shViolinPizzicato, shViolinMuted, shViolinMarteleBowing, shViolinsEnsemble, shViola, shViolaPizzicato, shViolaMuted,
+ shViolaMarteleBowing, shTuba, shTromboneMuted, shTrombone, shPiccolo, shOboe, shFrenchHornMuted, shFrenchHorn, shFlute,
+ shEnglishHorn, shClarinetEflat, shTrumpetMutedC, shTrumpetC, shContrabassClarinet, shContrabassoon, shCello, shCelloPizzicato,
+ shCelloMuted, shCelloMarteleBowing, shContrabassPizzicato, shContrabassMuted, shContrabassMarteleBowing, shContrabass,
+ shClarinet, shBassTrombone, shBassClarinet, shBassoon, shBassFlute, shTrumpetBach, shAltoTrombone, shAltoFlute)
import Data.Char
+onSig1 :: SigSpace a => (Sig -> a) -> Sig2 -> a
+onSig1 f (amp, cps) = mul amp $ f cps
+
fx1 :: Sig -> (a -> a) -> [FxSpec a]
fx1 dw f = [FxSpec dw (return . f)]
@@ -160,7 +206,7 @@ singleFx' :: Sig -> (a -> SE a) -> [FxSpec a]
singleFx' = fx1'
-- | Limits the release section of the note.
-limRel :: SigSpace a => D -> Patch a -> Patch a
+limRel :: SigSpace b => D -> Patch a b -> Patch a b
limRel rel p = p { patchInstr = fmap (mul (fadeOut rel)) . patchInstr p }
----------------------------------------------
@@ -199,20 +245,24 @@ fmPiano = Patch
{ patchInstr = at fromMono . mul 0.75 . onCps (C.fmFlavio 6 3)
, patchFx = fx1 0.15 smallHall2 }
-epiano2 = Patch
+epiano2 = addHammer 0.15 $ Patch
{ patchInstr = mul 1.125 . at fromMono . (onCps $ C.epiano [C.EpianoOsc 4 5 1 1, C.EpianoOsc 8 10 2.01 1])
, patchFx = fx1 0.25 smallHall2 }
-epianoHeavy = Patch
+epianoHeavy = addHammer 0.15 $ Patch
{ patchInstr = mul 1.125 . at fromMono . (onCps $ C.epiano [C.EpianoOsc 4 5 1 1, C.EpianoOsc 8 10 2.01 1, C.EpianoOsc 8 15 0.5 0.5])
, patchFx = fx1 0.2 smallHall2 }
-epianoBright = Patch
+epianoBright = addHammer 0.15 $ Patch
{ patchInstr = mul 1.12 . at fromMono . (onCps $ C.epiano [C.EpianoOsc 4 5 1 1, C.EpianoOsc 8 10 3.01 1, C.EpianoOsc 8 15 5 0.5, C.EpianoOsc 8 4 7 0.3])
, patchFx = fx1 0.2 smallHall2 }
-vibraphonePiano1 = smallVibraphone1 { patchInstr = mul (1.5 * fadeOut 0.25) . at (mlp 6500 0.1). patchInstr smallVibraphone1 }
-vibraphonePiano2 = smallVibraphone2 { patchInstr = mul (1.5 * fadeOut 0.25) . at (mlp 6500 0.1). patchInstr smallVibraphone2 }
+vibraphonePiano1 = addHammer 0.15 $ smallVibraphone1 { patchInstr = mul (1.5 * fadeOut 0.25) . at (mlp 6500 0.1). patchInstr smallVibraphone1 }
+vibraphonePiano2 = addHammer 0.15 $ smallVibraphone2 { patchInstr = mul (1.5 * fadeOut 0.25) . at (mlp 6500 0.1). patchInstr smallVibraphone2 }
+
+-- | Adds a hammer strike sound. The first argument is the amount of hammer sound.
+addHammer :: Sig -> Patch2 -> Patch2
+addHammer amt = mixInstr amt impulseMarimba2
----------------------------------------------
-- organs
@@ -230,12 +280,18 @@ instance Default HammondOrgan where
hammondOrgan = hammondOrgan' def
+hammondOrganm = hammondOrganm' def
+
hammondOrgan' (HammondOrgan detune) = Patch
{ patchInstr = mul 0.4 . at fromMono . onCps (C.hammondOrgan detune)
, patchFx = fx1 0.15 smallRoom2 }
+hammondOrganm' (HammondOrgan detune) = Patch
+ { patchInstr = mul 0.4 . at fromMono . onSig1 (C.hammondOrgan detune)
+ , patchFx = fx1 0.15 smallRoom2 }
+
toneWheelOrgan = Patch
- { patchInstr = at fromMono . mul 0.6 . onCps C.toneWheel
+ { patchInstr = at fromMono . mul (0.6 * fadeOut 0.05) . onCps C.toneWheel
, patchFx = fx1 0.3 smallHall2 }
sawOrgan = mul 0.45 $ waveOrgan rndSaw
@@ -243,12 +299,23 @@ triOrgan = mul 0.5 $ waveOrgan rndTri
sqrOrgan = mul 0.45 $ waveOrgan rndSqr
pwOrgan k = mul 0.45 $ waveOrgan (rndPw k)
+sawOrganm = mul 0.45 $ waveOrganm rndSaw
+triOrganm = mul 0.5 $ waveOrganm rndTri
+sqrOrganm = mul 0.45 $ waveOrganm rndSqr
+pwOrganm k = mul 0.45 $ waveOrganm (rndPw k)
+
waveOrgan :: (Sig -> SE Sig) -> Patch2
waveOrgan wave = Patch
{ patchInstr = onCps $ at fromMono . mul (fades 0.01 0.01) . at (mlp 3500 0.1) . wave
, patchFx = fx1 0.25 smallHall2
}
+waveOrganm :: (Sig -> SE Sig) -> PatchSig2
+waveOrganm wave = Patch
+ { patchInstr = onSig1 $ at fromMono . mul (fades 0.01 0.01) . at (mlp 3500 0.1) . wave
+ , patchFx = fx1 0.25 smallHall2
+ }
+
----------------------------------------------
-- accordeons
@@ -330,40 +397,78 @@ pwPad = Patch
{ patchInstr = mul 0.6 . at fromMono . onCps C.pwPad
, patchFx = fx1 0.25 smallHall2 }
+pwPadm = Patch
+ { patchInstr = mul 0.6 . at fromMono . onSig1 C.pwPad
+ , patchFx = fx1 0.25 smallHall2 }
+
triPad = Patch
{ patchInstr = fmap fromMono . mul 0.7 . onCps C.triPad
, patchFx = fx1' 0.25 C.triPadFx }
+triPadm = Patch
+ { patchInstr = fmap fromMono . mul 0.7 . onSig1 C.triPad
+ , patchFx = fx1' 0.25 C.triPadFx }
+
nightPad = Patch
{ patchInstr = mul 0.48 . at fromMono . onCps (mul (fadeOut 1) . C.nightPad 0.5)
, patchFx = fx1 0.25 largeHall2 }
+nightPadm = Patch
+ { patchInstr = mul 0.48 . return . fromMono . onSig1 ((fadeOut 1 * ) . C.nightPad 0.5)
+ , patchFx = fx1 0.25 largeHall2 }
+
overtonePad = Patch
{ patchInstr = mul 0.65 . at fromMono . mixAt 0.25 (mlp 1500 0.1) . onCps (\cps -> mul (fades 0.25 1.2) (C.tibetan 11 0.012 cps) + mul (fades 0.25 1) (C.tibetan 13 0.015 (cps * 0.5)))
, patchFx = fx1 0.35 smallHall2 }
+overtonePadm = Patch
+ { patchInstr = mul 0.65 . return . fromMono . mixAt 0.25 (mlp 1500 0.1) . onSig1 (\cps -> mul (fades 0.25 1.2) (C.tibetan 11 0.012 cps) + mul (fades 0.25 1) (C.tibetan 13 0.015 (cps * 0.5)))
+ , patchFx = fx1 0.35 smallHall2 }
+
caveOvertonePad = overtonePad { patchFx = fx1 0.2 (magicCave2 . mul 0.8) }
+caveOvertonePadm = overtonePadm { patchFx = fx1 0.2 (magicCave2 . mul 0.8) }
+
chorusel = Patch
{ patchInstr = mul 0.9 . at (mlp (3500 + 2000 * uosc 0.1) 0.1) . onCps (mul (fades 0.65 1) . C.chorusel 13 0.5 10)
, patchFx = fx1 0.35 smallHall2 }
+choruselm = Patch
+ { patchInstr = mul 0.9 . return . at (mlp (3500 + 2000 * uosc 0.1) 0.1) . onSig1 (mul (fades 0.65 1) . C.chorusel 13 0.5 10)
+ , patchFx = fx1 0.35 smallHall2 }
+
pwEnsemble = Patch
{ patchInstr = at fromMono . mul 0.55 . onCps C.pwEnsemble
, patchFx = fx1 0.25 smallHall2 }
+pwEnsemblem = Patch
+ { patchInstr = at fromMono . mul 0.55 . onSig1 C.pwEnsemble
+ , patchFx = fx1 0.25 smallHall2 }
+
fmDroneSlow = Patch
{ patchInstr = at fromMono . mul 0.5 . onCps (C.fmDrone 3 (10, 5))
, patchFx = fx1 0.35 largeHall2 }
+fmDroneSlowm = Patch
+ { patchInstr = return . at fromMono . mul 0.5 . onSig1 (C.fmDrone 3 (10, 5))
+ , patchFx = fx1 0.35 largeHall2 }
+
fmDroneMedium = Patch
{ patchInstr = at fromMono . mul 0.5 . onCps (C.fmDrone 3 (5, 3))
, patchFx = fx1 0.25 smallHall2 }
+fmDroneMediumm = Patch
+ { patchInstr = return . at fromMono . mul 0.5 . onSig1 (C.fmDrone 3 (5, 3))
+ , patchFx = fx1 0.25 smallHall2 }
+
fmDroneFast = Patch
{ patchInstr = at fromMono . mul 0.5 . onCps (C.fmDrone 3 (0.5, 1))
, patchFx = fx1 0.25 smallHall2 }
+fmDroneFastm = Patch
+ { patchInstr = return . at fromMono . mul 0.5 . onSig1 (C.fmDrone 3 (0.5, 1))
+ , patchFx = fx1 0.25 smallHall2 }
+
vibrophonePad = largeVibraphone1 { patchInstr = mul (1.5 * fades 0.5 0.25) . at (mlp 2500 0.1). patchInstr largeVibraphone1 }
data RazorPad = RazorPad { razorPadSpeed :: Sig }
@@ -375,13 +480,23 @@ razorPadSlow = razorPad' (def { razorPadSpeed = 0.1 })
razorPadFast = razorPad' (def { razorPadSpeed = 1.7 })
razorPadTremolo = razorPad' (def { razorPadSpeed = 6.7 })
+razorPadSlowm = razorPadm' (def { razorPadSpeed = 0.1 })
+razorPadFastm = razorPadm' (def { razorPadSpeed = 1.7 })
+razorPadTremolom = razorPadm' (def { razorPadSpeed = 6.7 })
+
razorPad = razorPad' def
+razorPadm = razorPadm' def
+
razorPad' (RazorPad speed) = Patch
{ patchInstr = at fromMono . mul 0.6 . onCps (uncurry $ C.razorPad speed)
, patchFx = fx1 0.35 largeHall2 }
+razorPadm' (RazorPad speed) = Patch
+ { patchInstr = at fromMono . mul 0.6 . (uncurry $ C.razorPad speed)
+ , patchFx = fx1 0.35 largeHall2 }
+
dreamPadFx = [FxSpec 0.35 (return . largeHall2), FxSpec 0.25 (at $ echo 0.25 0.65), FxSpec 0.25 (at $ chorus 0.07 1.25 1)]
dreamPad = dreamPad' 0.35
@@ -389,6 +504,15 @@ underwaterPad = underwaterPad' 0.35
lightIsTooBrightPad = lightIsTooBrightPad' 0.55
whaleSongPad = whaleSongPad' 0.35
+dreamPadBy = dreamPadBy' 0.35
+
+dreamPadm = dreamPadm' 0.35
+underwaterPadm = underwaterPadm' 0.35
+lightIsTooBrightPadm = lightIsTooBrightPadm' 0.55
+whaleSongPadm = whaleSongPadm' 0.35
+
+dreamPadBym = dreamPadBym' 0.35
+
-- | The first argument is brightness (0 to 1)
dreamPad' :: Sig -> Patch2
dreamPad' bright = Patch
@@ -396,6 +520,27 @@ dreamPad' bright = Patch
, patchFx = dreamPadFx
}
+-- | The first argument is brightness. The second argument is a wave shape function.
+dreamPadBy' :: Sig -> (Sig -> SE Sig) -> Patch2
+dreamPadBy' bright wave = Patch
+ { patchInstr = fmap fromMono . onCps (C.dreamPadBy wave bright)
+ , patchFx = dreamPadFx
+ }
+
+-- | The first argument is brightness (0 to 1)
+dreamPadm' :: Sig -> PatchSig2
+dreamPadm' bright = Patch
+ { patchInstr = fmap fromMono . onSig1 (C.dreamPad bright)
+ , patchFx = dreamPadFx
+ }
+
+-- | The first argument is brightness (0 to 1). The second argument is a wave function.
+dreamPadBym' :: Sig -> (Sig -> SE Sig) -> PatchSig2
+dreamPadBym' bright wave = Patch
+ { patchInstr = fmap fromMono . onSig1 (C.dreamPadBy wave bright)
+ , patchFx = dreamPadFx
+ }
+
-- | The first argument is brightness (0 to 1)
underwaterPad' :: Sig -> Patch2
underwaterPad' bright = Patch
@@ -404,12 +549,25 @@ underwaterPad' bright = Patch
}
-- | The first argument is brightness (0 to 1)
+underwaterPadm' :: Sig -> PatchSig2
+underwaterPadm' bright = Patch
+ { patchInstr = fmap fromMono . onSig1 (C.underwaterPad bright)
+ , patchFx = dreamPadFx
+ }
+
+-- | The first argument is brightness (0 to 1)
lightIsTooBrightPad' :: Sig -> Patch2
lightIsTooBrightPad' bright = Patch
{ patchInstr = fmap fromMono . onCps (C.lightIsTooBrightPad bright)
, patchFx = dreamPadFx
}
+lightIsTooBrightPadm' :: Sig -> PatchSig2
+lightIsTooBrightPadm' bright = Patch
+ { patchInstr = fmap fromMono . onSig1 (C.lightIsTooBrightPad bright)
+ , patchFx = dreamPadFx
+ }
+
-- | The first argument is brightness (0 to 1)
whaleSongPad' :: Sig -> Patch2
whaleSongPad' bright = Patch
@@ -417,6 +575,12 @@ whaleSongPad' bright = Patch
, patchFx = dreamPadFx
}
+whaleSongPadm' :: Sig -> PatchSig2
+whaleSongPadm' bright = Patch
+ { patchInstr = fmap fromMono . onSig1 (C.whaleSongPad bright)
+ , patchFx = dreamPadFx
+ }
+
------------------------------------
-- leads
@@ -425,6 +589,11 @@ polySynth = Patch
, patchFx = [FxSpec 0.25 (return . largeHall2), FxSpec 0.25 (at $ echo 0.25 0.65), FxSpec 0.25 (at $ chorus 0.07 1.25 1)]
}
+polySynthm = Patch
+ { patchInstr = fmap fromMono . onSig1 C.polySynth
+ , patchFx = [FxSpec 0.25 (return . largeHall2), FxSpec 0.25 (at $ echo 0.25 0.65), FxSpec 0.25 (at $ chorus 0.07 1.25 1)]
+ }
+
phasingLead = Patch
{ patchInstr = at fromMono . mul (0.7 * fadeOut 0.05) . onCps (uncurry C.phasingSynth)
, patchFx = fx1 0.25 smallHall2 }
@@ -505,7 +674,7 @@ data Strike = Strike
instance Default Strike where
def = Strike 1.5 True smallHall2
-strike' :: Strike -> (Sig -> Sig) -> Patch Sig2
+strike' :: Strike -> (Sig -> Sig) -> Patch2
strike' spec instr = Patch
{ patchInstr = \x@(amp, cps) -> return $ fromMono $ mul (0.75 * sig amp * fadeOut (rel x)) $ instr (sig cps)
, patchFx = fx1' 0.25 (strikeFx spec) }
@@ -723,8 +892,16 @@ scrape k m = Patch
{ patchInstr = \x@(amp, cps) -> (mul (0.75 * sig amp * k * fades 0.5 (scrapeRelease x 0.97)) . at fromMono . C.scrapeModes m) (sig cps)
, patchFx = fx1 0.15 largeHall2 }
+scrapem k m = Patch
+ { patchInstr = \(amp, cps) -> (mul (0.75 * amp * k * fades 0.5 1.97) . at fromMono . C.scrapeModes m) cps
+ , patchFx = fx1 0.15 largeHall2 }
+
scrapePad k m = Patch
{ patchInstr = \x@(amp, cps) -> (mul (0.75 * sig amp * k * fades 0.5 (scrapeRelease x 2.27 )) . at fromMono . C.scrapeModes m) (sig cps)
+ , patchFx = fx1 0.15 largeHall2 }
+
+scrapePadm k m = Patch
+ { patchInstr = \(amp, cps) -> (mul (0.75 * amp * k * fades 0.5 2.27) . at fromMono . C.scrapeModes m) cps
, patchFx = fx1 0.15 largeHall2 }
scaleScrapeDahina = 1.32
@@ -771,6 +948,28 @@ scrapeSmallHandbell = scrape scaleScrapeSmallHandbell C.smallHandbellModes
scrapeAlbertClockBellBelfast = scrape scaleScrapeAlbertClockBellBelfast C.albertClockBellBelfastModes
scrapeWoodBlock = scrape scaleScrapeWoodBlock C.woodBlockModes
+scrapeDahinam = scrapem scaleScrapeDahina C.dahinaModes
+scrapeBanyanm = scrapem scaleScrapeBanyan C.banyanModes
+scrapeXylophonem = scrapem scaleScrapeXylophone C.xylophoneModes
+scrapeTibetanBowl180m = scrapem scaleScrapeTibetanBowl180 C.tibetanBowlModes180
+scrapeSpinelSpherem = scrapem scaleScrapeSpinelSphere C.spinelSphereModes
+scrapePotLidm = scrape scaleScrapePotLid C.potLidModes
+scrapeRedCedarWoodPlatem = scrapem scaleScrapeRedCedarWoodPlate C.redCedarWoodPlateModes
+scrapeTubularBellm = scrapem scaleScrapeTubularBell C.tubularBellModes
+scrapeRedwoodPlatem = scrapem scaleScrapeRedwoodPlate C.redwoodPlateModes
+scrapeDouglasFirWoodPlatem = scrapem scaleScrapeDouglasFirWoodPlate C.douglasFirWoodPlateModes
+scrapeUniformWoodenBarm = scrapem scaleScrapeUniformWoodenBar C.uniformWoodenBarModes
+scrapeUniformAluminumBarm = scrapem scaleScrapeUniformAluminumBar C.uniformAluminumBarModes
+scrapeVibraphone1m = scrapem scaleScrapeVibraphone1 C.vibraphoneModes1
+scrapeVibraphone2m = scrapem scaleScrapeVibraphone2 C.vibraphoneModes2
+scrapeChalandiPlatesm = scrapem scaleScrapeChalandiPlates C.chalandiPlatesModes
+scrapeTibetanBowl152m = scrapem scaleScrapeTibetanBowl152 C.tibetanBowlModes152
+scrapeTibetanBowl140m = scrapem scaleScrapeTibetanBowl140 C.tibetanBowlModes140
+scrapeWineGlassm = scrapem scaleScrapeWineGlass C.wineGlassModes
+scrapeSmallHandbellm = scrapem scaleScrapeSmallHandbell C.smallHandbellModes
+scrapeAlbertClockBellBelfastm = scrapem scaleScrapeAlbertClockBellBelfast C.albertClockBellBelfastModes
+scrapeWoodBlockm = scrapem scaleScrapeWoodBlock C.woodBlockModes
+
scrapeFastDahina = scrapeFast scaleScrapeDahina C.dahinaModes
scrapeFastBanyan = scrapeFast scaleScrapeBanyan C.banyanModes
scrapeFastXylophone = scrapeFast scaleScrapeXylophone C.xylophoneModes
@@ -815,6 +1014,29 @@ scrapePadSmallHandbell = scrapePad scaleScrapeSmallHandbell C.smallHandbellModes
scrapePadAlbertClockBellBelfast = scrapePad scaleScrapeAlbertClockBellBelfast C.albertClockBellBelfastModes
scrapePadWoodBlock = scrapePad scaleScrapeWoodBlock C.woodBlockModes
+scrapePadDahinam = scrapePadm scaleScrapeDahina C.dahinaModes
+scrapePadBanyanm = scrapePadm scaleScrapeBanyan C.banyanModes
+scrapePadXylophonem = scrapePadm scaleScrapeXylophone C.xylophoneModes
+scrapePadTibetanBowl180m = scrapePadm scaleScrapeTibetanBowl180 C.tibetanBowlModes180
+scrapePadSpinelSpherem = scrapePadm scaleScrapeSpinelSphere C.spinelSphereModes
+scrapePadPotLidm = scrapePadm scaleScrapePotLid C.potLidModes
+scrapePadRedCedarWoodPlatem = scrapePadm scaleScrapeRedCedarWoodPlate C.redCedarWoodPlateModes
+scrapePadTubularBellm = scrapePadm scaleScrapeTubularBell C.tubularBellModes
+scrapePadRedwoodPlatem = scrapePadm scaleScrapeRedwoodPlate C.redwoodPlateModes
+scrapePadDouglasFirWoodPlatem = scrapePadm scaleScrapeDouglasFirWoodPlate C.douglasFirWoodPlateModes
+scrapePadUniformWoodenBarm = scrapePadm scaleScrapeUniformWoodenBar C.uniformWoodenBarModes
+scrapePadUniformAluminumBarm = scrapePadm scaleScrapeUniformAluminumBar C.uniformAluminumBarModes
+scrapePadVibraphone1m = scrapePadm scaleScrapeVibraphone1 C.vibraphoneModes1
+scrapePadVibraphone2m = scrapePadm scaleScrapeVibraphone2 C.vibraphoneModes2
+scrapePadChalandiPlatesm = scrapePadm scaleScrapeChalandiPlates C.chalandiPlatesModes
+scrapePadTibetanBowl152m = scrapePadm scaleScrapeTibetanBowl152 C.tibetanBowlModes152
+scrapePadTibetanBowl140m = scrapePadm scaleScrapeTibetanBowl140 C.tibetanBowlModes140
+scrapePadWineGlassm = scrapePadm scaleScrapeWineGlass C.wineGlassModes
+scrapePadSmallHandbellm = scrapePadm scaleScrapeSmallHandbell C.smallHandbellModes
+scrapePadAlbertClockBellBelfastm = scrapePadm scaleScrapeAlbertClockBellBelfast C.albertClockBellBelfastModes
+scrapePadWoodBlockm = scrapePadm scaleScrapeWoodBlock C.woodBlockModes
+
+
------------------------------------
-- woodwind
@@ -1111,6 +1333,14 @@ simpleMarimba = Patch
{ patchInstr = at fromMono . mul (0.8 * fades 0.01 0.5). onCps (C.simpleMarimba 5)
, patchFx = fx1 0.25 smallHall2 }
+impulseMarimba1 = Patch
+ { patchInstr = at fromMono . mul (0.8 * fadeOut 0.75). onCps C.impulseMarimba1
+ , patchFx = fx1 0.3 smallHall2 }
+
+impulseMarimba2 = Patch
+ { patchInstr = at fromMono . mul (0.8 * fadeOut 0.75). onCps C.impulseMarimba2
+ , patchFx = fx1 0.3 smallHall2 }
+
okComputer = Patch
{ patchInstr = \(amp, cps) -> (at fromMono . mul (0.75 * sig amp * fades 0.01 0.01) . at (mlp (1500 + sig amp * 8500) 0.1) . (C.okComputer . (/ 25))) (sig cps)
, patchFx = fx1 0.25 id }
@@ -1156,3 +1386,42 @@ wind = Patch
------------------------------------
-- drums
+------------------------------------
+-- SHARC patches
+
+-- | Solo instrument.
+soloSharc :: SharcInstr -> Patch2
+soloSharc instr = Patch
+ { patchInstr = fmap fromMono . onCps (C.soloSharcOsc instr)
+ , patchFx = fx1 0.25 smallHall2
+ }
+
+-- | Instrumet played in ensemble (with chorus).
+orcSharc :: SharcInstr -> Patch2
+orcSharc instr = Patch
+ { patchInstr = fmap fromMono . onCps (C.orcSharcOsc instr)
+ , patchFx = fx1 0.25 largeHall2
+ }
+
+-- | Pad orchestra instrument.
+padSharc :: SharcInstr -> Patch2
+padSharc instr = Patch
+ { patchInstr = fmap fromMono . onCps (C.padSharcOsc instr)
+ , patchFx = fx1 0.35 largeHall2
+ }
+
+-- | Pad solo instrument.`
+purePadSharc :: SharcInstr -> Patch2
+purePadSharc instr = Patch
+ { patchInstr = fmap fromMono . onCps (C.purePadSharcOsc instr)
+ , patchFx = fx1 0.35 largeHall2
+ }
+
+-- | Dream Pad patch made with SHARC oscillators.
+dreamSharc :: SharcInstr -> Patch2
+dreamSharc instr = dreamPadBy (\cps -> C.rndSigSharcOsc instr (ir cps) cps)
+
+-- | Dream Pad patch made with SHARC oscillators.
+dreamSharc' :: SharcInstr -> Sig -> Patch2
+dreamSharc' instr brightness = dreamPadBy' brightness (\cps -> C.rndSigSharcOsc instr (ir cps) cps)
+