Last active
December 6, 2018 11:01
-
-
Save jarmitage/5a5aa7d1d86a32bce4f3c8082b90c48f to your computer and use it in GitHub Desktop.
init.tidal
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Sound.Tidal.SpectralTricks -- https://github.com/datamads/SpectralTricks | |
| import Sound.Tidal.Scales as Sc | |
| import Sound.Tidal.Chords as Ch | |
| let (accel,_) = pF "accel" (Just 0) | |
| (bits,_) = pI "bits" (Just 0) | |
| (carPartial,_) = pF "carPartial" (Just 0) | |
| (detune,_) = pF "detune" (Just 0) | |
| (fm,_) = pF "fm" (Just 0) | |
| (fmf,_) = pF "fmf" (Just 0) | |
| (fmod,_) = pF "fmod" (Just 0) | |
| (freq,_) = pI "freq" (Just 80) | |
| (index,_) = pI "index" (Just 0) | |
| (kcutoff,_) = pF "kcutoff" (Just 0) | |
| (krush,_) = pF "krush" (Just 0) | |
| (modPartial,_) = pF "modPartial" (Just 0) | |
| (modFreq,_) = pF "modFreq" (Just 100) | |
| (modAmount,_) = pF "modAmount" (Just 100) | |
| (mul,_) = pF "mul" (Just 0) | |
| (nharm,_) = pI "nharm" (Just 0) | |
| (noisy,_) = pF "noisy" (Just 0) | |
| (rate,_) = pI "rate" (Just 1) | |
| (ring,_) = pF "ring" (Just 0) | |
| (ringf,_) = pF "ringf" (Just 0) | |
| (slide,_) = pI "slide" (Just 0) | |
| (slidefrom,_) = pI "slidefrom" (Just 1) | |
| (vib,_) = pI "vib" (Just 0) | |
| (wah,_) = pF "wah" (Just 0) | |
| (wahf,_) = pF "wahf" (Just 0) | |
| -- turn ^ intro groups | |
| let adsr = grp [attack_p, decay_p, sustain_p, release_p] | |
| del = grp [delay_p, delaytime_p, delayfeedback_p] | |
| gco = grp [gain_p, cut_p, orbit_p] | |
| scc = grp [shape_p, coarse_p, crush_p] | |
| lpf = grp [cutoff_p, resonance_p] | |
| bpf = grp [bandf_p, bandq_p] | |
| hpf = grp [hcutoff_p, hresonance_p] | |
| spa = grp [speed_p, accelerate_p] | |
| rvb = grp [room_p, size_p] | |
| io = grp [begin_p, end_p] | |
| eq = grp [ | |
| cutoff_p, resonance_p, | |
| bandf_p, bandq_p, | |
| hcutoff_p, hresonance_p | |
| ] | |
| tremolo = grp [tremolorate_p, tremolodepth_p] | |
| phaser = grp [phaserrate_p, phaserdepth_p] | |
| -- add SpectralTricks / SC FX groups | |
| let adsr' a d s r = attack a # decay d # sustain s # release r | |
| del' l t f = delay l # delaytime t # delayfeedback f | |
| gco' g c o = gain g # cut c # orbit o | |
| scc' s c c' = shape s # coarse c # crush c' | |
| lpf' c r = cutoff c # resonance r | |
| bpf' f q = bandf f # bandq q | |
| hpf' c r = hcutoff c # hresonance r | |
| spa' s a = speed s # accelerate a | |
| rvb' r s = room r # size s | |
| io' i o = begin i # end o | |
| eq' lc lr f q hc hr = cutoff lc # resonance lr # bandf f # bandq q # hcutoff hc # hresonance hr | |
| tremolo' r d = tremolorate r # tremolodepth d | |
| phaser' r d = phaserrate r # phaserdepth d | |
| let mute p = (const $ sound "~") p | |
| r = run | |
| ri a = rev (r a) | |
| c = choose | |
| odd a = (((r a) + 1) * 2) - 1 | |
| even a = ((r a) + 1) * 2 | |
| codd a = c (patToList (odd a)) | |
| ceven a = c (patToList (even a)) | |
| oddi a = rev (odd a) | |
| eveni a = rev (even a) | |
| coddi a = rev (codd a) | |
| ceveni a = rev (ceven a) | |
| -- primes ..? | |
| xf = xfade | |
| xfI = xfadeIn | |
| -- screw l c = loopAt l $ chop c | |
| let sin = sine | |
| sq = square | |
| sc = scale | |
| scx = scalex | |
| sinf f = fast f $ sin | |
| trif f = fast f $ tri | |
| sawf f = fast f $ saw | |
| sqf f = fast f $ sq | |
| randf f = fast f $ rand | |
| ssin i o = sc i o sin | |
| stri i o = sc i o tri | |
| ssaw i o = sc i o saw | |
| ssq i o = sc i o sq | |
| srand i o = sc i o rand | |
| sxsin i o = scx i o sin | |
| sxtri i o = scx i o tri | |
| sxsaw i o = scx i o saw | |
| sxsq i o = scx i o sq | |
| sxrand i o = scx i o rand | |
| ssinf i o f = fast f $ ssin i o | |
| strif i o f = fast f $ stri i o | |
| ssawf i o f = fast f $ ssaw i o | |
| ssqf i o f = fast f $ ssq i o | |
| srandf i o f = fast f $ srand i o | |
| sxsinf i o f = fast f $ sxsin i o | |
| sxtrif i o f = fast f $ sxtri i o | |
| sxsawf i o f = fast f $ sxsaw i o | |
| sxsqf i o f = fast f $ sxsq i o | |
| sxrandf i o f = fast f $ sxrand i o | |
| let bank p = with s_p (liftA2 (++) (p::Pattern String)) | |
| b = bank | |
| let chords t h = enchord [Ch.major, Ch.minor, Ch.major7, Ch.dom7, Ch.minor7, Ch.aug, Ch.dim, Ch.dim7, Ch.one, Ch.five, Ch.plus, Ch.sharp5, Ch.msharp5, Ch.sus2, Ch.sus4, Ch.six, Ch.m6, Ch.sevenSus2, Ch.sevenSus4, Ch.sevenFlat5, Ch.m7flat5, Ch.sevenSharp5, Ch.m7sharp5, Ch.nine, Ch.m9, Ch.m7sharp9, Ch.maj9, Ch.nineSus4, Ch.sixby9, Ch.m6by9, Ch.sevenFlat9, Ch.m7flat9, Ch.sevenFlat10, Ch.nineSharp5, Ch.m9sharp5, Ch.sevenSharp5flat9, Ch.m7sharp5flat9, Ch.eleven, Ch.m11, Ch.maj11, Ch.evelenSharp, Ch.m11sharp, Ch.thirteen, Ch.m13] t h | |
| toUpScale sc p = fmap fromIntegral $ toScale sc p | |
| toNScale sc p = toScale sc p |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment