creation of i control for tune and xen functions

This commit is contained in:
tyow
2026-02-04 20:28:19 -05:00
parent 4439599117
commit cbf472fe0a
5 changed files with 163 additions and 110 deletions
+10 -11
View File
@@ -20,7 +20,7 @@ These functions allow the use of scales other than your typical chromatic 12 bas
Here's an example of how to configure a basic hexany scale:
<MiniRepl client:idle tune={`"0 1 2 3 4 5".tune("hexany15").mul("220").freq()`} />
<MiniRepl client:idle tune={`i("0 1 2 3 4 5").tune("hexany15").mul("220").freq()`} />
Try other scales like `hexany1`, `iraq`, `gumbeng`, `gunkali`, or `tranh3`
@@ -30,7 +30,7 @@ You can set your root to be a particular note with `getFreq`
<MiniRepl
client:idle
tune={`"4 8 9 10 - - 5 7 9 11 - -".tune("tranh3")
tune={`i("4 8 9 10 - - 5 7 9 11 - -").tune("tranh3")
.mul(getFreq('c3'))
.freq().clip(.5).room(1)`}
/>
@@ -39,7 +39,7 @@ Some tunings become more pronounced with a longer reverb decay:
<MiniRepl
client:idle
tune={`"<[5 6 8 10] - [5 7 9 12] -> -".tune("gumbeng")
tune={`i("<[5 6 8 10] - [5 7 9 12] -> -").tune("gumbeng")
.mul(getFreq('c3'))
.freq().clip(.8).room("3:10").rdim(10000).rfade(5)`}
/>
@@ -48,7 +48,7 @@ Additionally, you can combo this with `fmap` so that the base note changes:
<MiniRepl
client:idle
tune={`"9 11 12 10 - - -".tune("gunkali")
tune={`i("9 11 12 10 - - -").tune("gunkali")
.mul("<c3 c3 a3 d#3>".fmap(getFreq))
.freq().legato("2 .7").room("1:15").rdim(8500).rlp(14000).rfade(8)`}
/>
@@ -57,8 +57,7 @@ Combining this with various polyrhythm tricks can become very evocative:
<MiniRepl
client:idle
tune={`"<[0 3 1 -] [-1 4 2 8]> ~ ~,<-4 -5>"
.transpose(4)
tune={`i("<[0 3 1 -] [-1 4 2 8]> ~ ~,<-4 -5>".add(4))
.tune("iraq")
.mul("<c3 d3 c#3>".fmap(getFreq))
.freq().clip(.5).room(1).rfade(9)`}
@@ -71,7 +70,7 @@ Take the `sanza` tuning:
<MiniRepl
client:idle
tune={`"4 5 6 7 8 9".tune("sanza")
tune={`i("4 5 6 7 8 9").tune("sanza")
.mul(getFreq('c3'))
.freq()`}
/>
@@ -79,15 +78,15 @@ Take the `sanza` tuning:
Notes 7 and 9 will clash quite a bit if you arp them normally. Many tunings will have this sort of sound, and it can feel distracting on its own.
See how close they are on the pitch wheel?
<MiniRepl client:idle tune={`"[7 9]!3".tune("sanza").mul(getFreq('c3')).freq()._pitchwheel()`} />
<MiniRepl client:idle tune={`i("[7 9]!3").tune("sanza").mul(getFreq('c3')).freq()._pitchwheel()`} />
This quality is often due to how the tunings were formed with instruments that were played differently than a piano.
As such, some tunings are much better strummed, with the subtle clash of the detuned notes actually making the sound much more magical:
<MiniRepl
client:idle
tune={`"[0 1 2 3 4 5 6]@0.3 -"
.transpose("<2 5 8 1>")
tune={`i("[0 1 2 3 4 5 6]@0.3 -"
.add("<2 5 8 1>"))
.tune("sanza")
.mul(getFreq('c3')).freq()
.legato("3").room(1).rfade(5)`}
@@ -102,7 +101,7 @@ You can also give tune a list of frequencies to use as the scale:
<MiniRepl
client:idle
tune={`"0 1 2 3 4".tune([
tune={`i("0 1 2 3 4").tune([
261.6255653006,
302.72962012827,
350.29154279212,