AM Posted August 8, 2016 Share Posted August 8, 2016 hi all i need a little lisp-help... i want to split things like this perhaps 'an3 into '(a n 3) is there a way? thanx andré Quote Link to comment Share on other sites More sharing options...
tonality systems Posted August 8, 2016 Share Posted August 8, 2016 (explode 'an3) => (a n 3) Nigel Quote Link to comment Share on other sites More sharing options...
AM Posted August 8, 2016 Author Share Posted August 8, 2016 thanx, but i see my idea don't work with that... concrete: i want to split 2/20 into exactly '(2 20) function with numerator/denominator it will be '(1 10) - not what i need also with (explode '2/20) => (1 / 1 0) is there any solution? Quote Link to comment Share on other sites More sharing options...
opmo Posted August 8, 2016 Share Posted August 8, 2016 2/20 = 1/10 Quote Link to comment Share on other sites More sharing options...
AM Posted August 8, 2016 Author Share Posted August 8, 2016 i know, but only mathematically!! -> you remember the problem with gen-stacc? => we discussed that with rangarajan? for some functions it's necessary that 2/20 will not be "reduced" to 1/20 => https://opusmodus.com/forums/topic/528-gen-stacc-question/#comment-1446 Quote Yes, I have also experienced this difficulty, for example, can't distinguish between 4/4 and 2/2 because both reduce to 1! As JP points out, this is a Lisp issue, nothing to do with OM. If we are adventurous, we could implement our own "data type", for example keeping numerator and denominator separately as a cons pair (numerator . denominator) or something similar. We can write a set of functions that operate on this, and then apply reduction when actually needed. More work, of course, but Lisp gives you control. Regards, Rangarajan 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.