Jump to content

length-divide: ensuring that all possibly matching notes are split


Recommended Posts

Revising some older code of my I noticed that the function length-divide changed its behaviour somewhat and became more likely to cause an error.

 

In a previous version, where the arguments count and divide where given separately, it was possible to set the count to some very high number, say, 1000, simply to mean that all notes the function can split (depending on its other arguments) will be split. 

 

Meanwhile, the function have been revised to introduce control over intervals (thank you 🙂), but since then it seems it is not possible anymore to set an arbitrarily high count value anymore. For example, the following code now results in an error. I would prefer the previous behaviour, if only because it is more forgiving and stable.

 

(length-divide '(1000 2) '(q ab3 num1+leg c4 leg e ab3 leg g3 leg ab3 num1+leg c4 leg))
Error: The value ab3 is not of the expected type sequence.

 

In case it helps: my debugger tells me the functions gen-repeat and then maybe-section are called (perhaps within a nested function of length-divide* ?) with an argument sequence bound to ab3 (i.e. a plain pitch), and a call (length ab3) then causes this error. 

 

Thank you!

 

Best,

Torsten

Link to comment
Share on other sites

>  You will need to wait for the upgrade.

 

No worries, I already applied a workaround (disabling certain code...).

 

Here is another issue I ran into with length-divide: if the argument ignore is set to either min or max, and all note values are of the same length, then that also causes an error. Now, perhaps that should be expected, but then at least the error message could be more helpful. On the other hand, perhaps it would be preferable in this situation if a warning was printed and the effect of the argument ignore was, well, ignored? 

 

(length-divide '(1 4) 
               '(1/8 c4 mf num1+leg 1/8 d4 mf num1+leg 1/8 fs3 mf leg 1/8 gs3 mf)
               :ignore 'min)
Error: The value nil is not of the expected type number.

 

> We have started work on microtonality  

👍 

Link to comment
Share on other sites

49 minutes ago, opmo said:

I am not getting any error with the expression.

 

Just for the record, when I start Opusmodus without any of my extensions, I run into the same problem.

? (length-divide '(1000 2) '(q ab3 num1+leg c4 leg e ab3 leg g3 leg ab3 num1+leg c4 leg))
length-divide, set: nil ignore: nil section: nil exclude: nil seed: 35424
> Error: The value ab3 is not of the expected type sequence.
> While executing: ccl::sequence-type, in process Listener-1(7).
> Type cmd-. to abort, cmd-\ for a list of available restarts.
> Type :? for other options.
1 > 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

Terms of Use Privacy Policy