Last active
April 19, 2021 17:02
-
-
Save pd3v/0f9b4ab9a13545437cccb9a566d64cfd to your computer and use it in GitHub Desktop.
Simulating a wah effect with TidalCycles
This file contains 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
-- with @yaxu and @bgold help | |
d1 $ n "c5*8" # s "supersquare" # release "0.3" | |
# bandf (density 3 $ saw1 * (4500 * rand) + (100 * (density 1.0001 rand))) | |
# bandq "5.5" | |
# delay "0.9" # delaytime "0.15" # delayfeedback "0.5" -- some sonic sugar | |
-- this one is similiar to previous one, just adding harmonic richness by replacing one note (c5) with a chord (c5 major 7th) | |
d1 $ n "[c5,e5,g5,b5]*8" # s "supersquare" # release "0.3" | |
# bandf (density 3 $ saw1 * (4500 * rand) + (300 * (density 1.0001 rand))) | |
# bandq "5.5" | |
# room "0.3" # size "0.3" |
Cool! I just changed it based on your thoughts. Added also a chord playing version.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A couple of thoughts.. First you don't need the second
discretise
because when you combine two patterns (in this case with+
) the structure always comes from the left:in fact along these lines you don't need the first one either, you can just swap round the left and right side of
*
, then the structure will come from4500
, which already is one event per cycle (being the number4500
)(I swapped the second one as well to put
100
first, just for tidiness)However there is a problem with using
rand
more than once in a pattern.rand
is a deterministic stream of pseudo-random numbers - if you use it twice in the same pattern, it will have the same value in both cases. You can fix this by changing the density of one of the patterns, then you magically get a different stream of random numbers by 'zooming in' (asrand
gives a continuous pattern, this doesn't mean you get fewer values back!).However I'm unsure about the usefulness of adding together two random streams in this way, unless you wanted the particular distribution it gives you..
Anyway sorry for the ramble, found this interesting!