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.

Expand pitches within range

Featured Replies

Can't find the Opusmodus function to do the following:

 

input: '(c4 e4 g4 bb4 c5)

input: '(0 127) -> from - to range in midi note numbers

output:'(c-1 e-1 g-1 bb-1 c0 e0 g0 bb0 c1 e1 g1 bb1 c2 e2 g2 bb2 ... c9 e9 g9)

 

Many thanks in advance :-)  


(gen-sieve '(c0 c9) (pitch-to-interval '(c4 e4 g4 bb4 c5)) :type :pitch)
(gen-sieve (midi-to-pitch '(12 127)) (pitch-to-interval '(c4 e4 g4 bb4 c5)) :type :pitch)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; putted in a little function ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(defun gen-sequence  (pitch-sequence midi-ambitus)
  (gen-sieve (midi-to-pitch midi-ambitus) (pitch-to-interval pitch-sequence) :type :pitch))

;; eval
(gen-sequence '(c4 e4 g4 bb4 c5) '(12 127))
;; => (c0 e0 g0 bb0 c1 e1 g1 bb1 c2 e2 g2 bb2 c3 e3 g3 bb3 c4 e4 g4 bb4 c5 e5 g5 bb5 c6 e6 g6 bb6 c7 e7 g7 bb7 c8 e8 g8 bb8 c9 e9 g9)

 

version in (almost) pure lisp (only "midi-to-pitch" is OM)

 

(defun gen-sieve-userdefined (ambitus.midi intervals)
  (midi-to-pitch 
   (loop
     with interval.cnt = -1
     for pitch = (first ambitus.midi) then (setq pitch (+ (nth interval.cnt intervals) pitch))
     when (<= pitch (second ambitus.midi))
     collect pitch into bag
     else return bag
     
     do (incf interval.cnt)
     when (= interval.cnt (length intervals))
     do (setq interval.cnt 0))))

(gen-sieve-userdefined '(12 72) '(4 2 3))

 

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.