Rangarajan Posted October 20, 2020 Share Posted October 20, 2020 Hi, I am trying to understand the polygon-rhythm function, but having some difficulty with the finer details. The expression (polygon-rhythm 5 8 4) returns 8 points (randomly generated) like this: => (-1/8 -1/8 1/8 1/8 1/8 1/8 1/8 -1/8) Likewise, (polygon-rhythm 5 16 4) returns 16 points: => (1/16 -1/16 -1/16 -1/16 1/16 -1/16 -1/16 -1/16 1/16 1/16 -1/16 -1/16 -1/16 -1/16 -1/16 1/16) This: (polygon-rhythm 3 16 8) also returns 16 points: => (-1/16 -1/16 -1/16 -1/16 -1/16 1/16 -1/16 -1/16 1/16 -1/16 -1/16 1/16 -1/16 -1/16 -1/16 -1/16) What is the role of the first and 3rd arguments to this function? Next: What does the keyword argument :legato achieve? The expression (polygon-rhythm 5 8 4 :legato t) returns: => (-1/8 1/8 1/4 1/4 1/8 1/8) I can see that the result has only 6 elements, instead of 8. What is going on? I went through the documentation, but still couldn't understand these points. Regards, Rangarajan Quote Link to comment Share on other sites More sharing options...
Rangarajan Posted October 20, 2020 Author Share Posted October 20, 2020 After posting the above message, I happened to watch the video "How-to in 100 sec" Part 4. The author clearly says that the first argument indicates the number of "beats". I am able to verify this. So, the expression (polygon-rhythm 5 8 4 ) returns 8 points and 5 of them are beats while the remaining 3 are rest. I still do not know the answer for the other two questions I asked: 1) What is the third argument for? 2) What is the impact of :legato keyword? Regards, Rangarajan Quote Link to comment Share on other sites More sharing options...
Stephane Boussuge Posted October 20, 2020 Share Posted October 20, 2020 I’m not on my computer but by memory i think the 3rd argument is the start point on the circle. legato remove rests and tie the notes. example: s -s s s. Become e s s with legato. sb. Quote Link to comment Share on other sites More sharing options...
Rangarajan Posted October 20, 2020 Author Share Posted October 20, 2020 You are correct, the third argument represents the starting point on the circle. It makes sense in terms of visualisation, but how does it affect the values returned by the expression? Sorry, I still do not understand :legato. In your example, you have said that legato removes rests and ties the notes. Even then, how does "s -s s s" become "e s s"? If I remove the rest, the list becomes "s s s" and then how does tie happen? Thanks for your help. Regards, Rangarajan Quote Link to comment Share on other sites More sharing options...
opmo Posted October 20, 2020 Share Posted October 20, 2020 The :legato T in POLYGON-RHYTHM function use the LENGTH-LEGATO function: LENGTH-LEGATO inverts length-rests to a length-note and adds the sum of the rests in sequence to the previous length-note. (length-legato '(1/8 -1/16 1/16 -1/12 2/12 2/20 -3/20 -1/8 3/8)) => (3/16 7/48 1/6 3/8 3/8) (length-legato '(-1/8 -1/16 1/16 -1/12 2/12 2/20 -3/20 -1/8 3/8)) => (-3/16 7/48 1/6 3/8 3/8) (length-legato '((-1/8 -1/16 1/16 -1/12) (2/12 2/20 -3/20 -1/8 3/8))) => ((-3/16 7/48) (1/6 3/8 3/8)) Quote Link to comment Share on other sites More sharing options...
Rangarajan Posted October 20, 2020 Author Share Posted October 20, 2020 Thanks Janusz, for the clarification. That only leaves the question about 3rd argument. Regards, Rangarajan Quote Link to comment Share on other sites More sharing options...
opmo Posted October 20, 2020 Share Posted October 20, 2020 The 3rd argument is the start point (1st point). Evaluate each of the expressions a few times. (circle-rhythm-plot (polygon-rhythm 3 16 0) :points 16) (circle-rhythm-plot (polygon-rhythm 3 16 1) :points 16) (circle-rhythm-plot (polygon-rhythm 3 16 2) :points 16) (circle-rhythm-plot (polygon-rhythm 3 16 3) :points 16) Quote Link to comment Share on other sites More sharing options...
Rangarajan Posted October 21, 2020 Author Share Posted October 21, 2020 Thanks! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.