catrahpete Posted November 18, 2023 Share Posted November 18, 2023 Hi, I've discovered that if I run the following code: (list (gen-combine '(1/2 1/4) '(1/8 1/16)) (gen-combine '(1/2 1/3) '(1/4 1/5))) the result is: (((1/2 1/8) (1/4 1/16)) ((1/2 1/4) (1/3 1/3 1/3 1/5 1/5 1/5 1/5 1/5))) whilst I was expecting (and the documentation suggests should be the result): (((1/2 1/8) (1/4 1/16)) ((1/2 1/4) (1/3 1/5))) In general any input that is not of the form 1/2^n (n>1) generates a sequence of the input elements rather than a single instance. Am I misunderstanding the function or is this a bug? Many thanks for any assistance. Pete Quote Link to comment Share on other sites More sharing options...
opmo Posted November 18, 2023 Share Posted November 18, 2023 This makes no sence (1/3 1/5) this is why the function will compete the tuplet. Tuplet here is used as one unit: (gen-combine '(1/2 1/3 1/3 1/3) '(1/4 1/5 4/5)) => ((1/2 1/4) (1/3 1/3 1/3 1/5 4/5)) Quote Link to comment Share on other sites More sharing options...
catrahpete Posted November 18, 2023 Author Share Posted November 18, 2023 OK, so my error is in assuming that in gen-combine items expressed as a ratio are 'just' numbers, but they are treated as omn lengths. The behaviour with floats is as I had expected. (gen-combine '(1/2 1/4) '(0.333 0.2)) --> ((1/2 0.333) (1/4 0.2)) 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.