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.

Convert pitch to chord based on length

Featured Replies

Hi, sorry I am missing something very basic. I would like to convert a particular pitch to a chord based on its duration. For example, if I have a omn-sequence, I would like to search for all half-notes and add to their current pitch some other pitches in order to form a chord.

 

I have looked at map functions, but I have not found a way of adding something to the already existing pitch instead of replacing it with something completely new.

 

Thanks!

Rodrigo

 

 

  • Author

Dear Stephane, thanks! It worked perfectly!

 

Best,

Rodrigo

Another possibility is to generate ONLY chords and "dechord" all events between some length values like this:

 

(setf omn (make-omn
           :pitch (chord-pitch-unique
                   (chordize-list 
                    (gen-divide 
                     4 
                     (rnd-sample 
                      256 
                     (make-scale 'd4 8 :alt '(2 1 3))
                     ))))
           :length (rnd-sample 24 '((h q q)(s s s s q e e)(3q = = q h)(h h)(q e e q)))
           ))


(setf omn2 (dictum '((:range (t e) :apply (dechord x))) omn))

S.

  • 3 weeks later...
  • Author
On 5/2/2022 at 8:30 PM, rcadiz said:

Dear Stephane, thanks! It worked perfectly!

 

Best,

Rodrigo

I have a strange problem related to this function. As I said before, your code works fine inside opusmodus, I can see the chords in the score and hear them with no problem at all. But when I export the score to xml all the added notes to form the chord are missing. 

 

For example, one of the chords I generated this way is the following. When I export this score to xml only the bb3 shows up. What could be wrong?

 

(setf mat2 '((h bb3d4bb4 mf arp-down -)))
(def-instrument-set test
                    :instruments
  (:group clefs
          :rec
          (:layout soprano-recorder-layout
                   :port nil
                   :channel 1
                   :sound 'gm
                   :program '(recorder)
                   :controllers nil
                   :pan (pan 30)
                   :volume 100)
          ))
(ps 'test
    :rec (list mat2)
    :tempo 40
    :time-signature '(4 4)
)


 

  • Author
1 minute ago, opmo said:

I don't see any problem here:

Screenshot 2022-05-18 at 16.35.42.png

 

 

Yes, but is that opusmodus? Or an external editor? I can see the same thing inside opusmodus, but I just checked that the exported xml file does not contains the extra notes (see the exported test.xml file). Thanks!

test.xml

  • Author
2 minutes ago, opmo said:

Your test.xml file is not the same as my.

 

sop-rec.xml 1.93 kB · 0 downloads

 

How to save musicxml file:

1. click on the musicxml panel (file)

2. In File menu select "Safe As..."

Ok, it works now. I was using menu File, Export Last Score to XML.... and if you do that, the notes are missing. 

 

Thanks!

Rodrigo

 

Export Last Score to XML... is correct method.

Looks like there is a bug when arp-down is used.

The arp alone works fine.

 

arp-down etc... is customised attribute and is not a part of the musicxml standard.

 

  • Author
Just now, opmo said:

Export Last Score to XML... is correct method.

Looks like there is a bug when arp-down is used.

The arp alone works fine.

 

arp-down etc... is customised attribute and is not a part of the musicxml standard.

 

Ok, that explains what I was experiencing. Thanks! However, when I use arp-down with the "Save As..." method it works ok, but not with the "Export Last Score to XML...  " one.

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

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.