Posted to tcl by jima at Fri Apr 02 20:42:33 GMT 2021view raw

  1. INDEX create NOTE {
  2. do {dos reb} re {res mib} mi fa {fas solb} sol {sols lab} la {las sib} si
  3. }
  4.  
  5. TBL0 create SCALE {.interval} {
  6. major {0 2 2 1 2 2 2}
  7. harmonic_major {0 2 2 1 2 1 3}
  8. natural_minor {0 2 1 2 2 1 2}
  9. melodic_minor {0 2 1 2 2 2 2}
  10. harmonic_minor {0 2 1 2 2 1 3}
  11. penta_minor {0 3 2 2 3}
  12. }
  13.  
  14. TBL0 create CLAW {.degree} {
  15. triad {0 2 4}
  16. }
  17.  
  18. set a [+ : {SV 5} {*}[+ : / {*}[SCALE : D.interval {*}[
  19. SCALE : I major natural_minor penta_minor
  20. ]]]]
  21. set b [| : "SV [NOTE . .le]" {*}$a]
  22. set t [CLAW : D.degree [CLAW . I triad]]
  23. set c [Select : "C_KL $t" {*}$b]
  24. set d [Select : "C_KL [+ : {SV 4} {*}$t]" {*}$b]
  25. puts [NOTE :1 D {*}$c]
  26. puts [NOTE :1 D {*}$d]
  27.  
  28. ----
  29. {fa la do} {fa sols do} {fa las res}
  30. {do mi sol} {do res sol} {res sols do}