Skip to content
View in the app

A better way to browse. Learn more.

Opusmodus

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

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

Featured Replies

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

  • Author

>  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  

👍 

  • Author
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 > 

 

> We have started work on microtonality  🙂

Create an account or sign in to comment


Copyright © 2014-2026 Opusmodus™ Ltd. All rights reserved.
Product features, specifications, system requirements and availability are subject to change without notice.
Opusmodus, the Opusmodus logo, and other Opusmodus trademarks are either registered trademarks or trademarks of Opusmodus Ltd.
All other trademarks contained herein are the property of their respective owners.

Powered by Invision Community

Important Information

Terms of Use Privacy Policy

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.