add nesting to off example variation in pattern-effects.mdx

I was immediately curious whether `off` could be nested - it turns out it can, so I added an example of it in action.
This example should also add clarity to the flexibility of pattern naming inside `off` arguments as well
This commit is contained in:
Bernard Gray 2024-04-27 11:35:08 +10:00 committed by GitHub
parent bbf8577f85
commit 975eb684b9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -155,14 +155,16 @@ In the notation `x=>x.`, the `x` is the shifted pattern, which where modifying.
</Box> </Box>
off is also useful for sounds: off is also useful for modifying other sounds, and can even be nested:
<MiniRepl <MiniRepl
client:visible client:visible
tune={`s("bd sd [rim bd] sd,[~ hh]*4").bank("CasioRZ1") tune={`s("bd sd [rim bd] sd,[~ hh]*4").bank("CasioRZ1")
.off(1/16, x=>x.speed(1.5).gain(.25))`} .off(2/16, x=>x.speed(1.5).gain(.25)
.off(3/16, y=>y.vowel("<a e i o>*8")))`}
/> />
| name | description | example | | name | description | example |
| ---- | ------------------------------ | ------------------------------------------------------------------------------------------- | | ---- | ------------------------------ | ------------------------------------------------------------------------------------------- |
| rev | reverse | <MiniRepl client:visible tune={`n("0 2 4 6 ~ 7 9 5").scale("C:minor").rev()`} /> | | rev | reverse | <MiniRepl client:visible tune={`n("0 2 4 6 ~ 7 9 5").scale("C:minor").rev()`} /> |