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.

Parameter as variable?

Featured Replies

Hi,

I want to make the following construction:

(defun mapping-integers (x y)
  (interval-to-pitch (integer-to-interval x) :start y))

(mapping-integers '(0 4 5 9 11) 'c5)


I get an error-warning having the wrong start parameter, how could this be done?

I have a list of integers (0 4 5 9 11) and a list of root notes (c5) and want them to process to get lists like (c5 e5 f5 a5 b5)..

ole

  • Author

to answer my own question, I found a workaround:

(defun mapping-integers-2 (x y)
  (chordize (pitch-transpose (pitch-to-integer y) (integer-to-pitch x))))

(mapping-integers-2 '(0 4 5 9 11) 'g4)


nevertheless I would like to know if it is possible to handle the keyword parameters with variables..

Solution:

(pitch-transpose-start 'c5 (integer-to-pitch '(0 4 5 9 11)))
=> (c5 e5 f5 a5 b5)


with &key

(defun mapping-integers (l &key start)
  (if start (pitch-transpose-start start (integer-to-pitch l))
    (integer-to-pitch l)))

(mapping-integers '(0 4 5 9 11) :start 'c5)
=> (c5 e5 f5 a5 b5)
 
with &optional
(defun mapping-integers2 (l &optional start)
  (if start (pitch-transpose-start start (integer-to-pitch l))
    (integer-to-pitch l)))

(mapping-integers2 '(0 4 5 9 11) 'c5)
=> (c5 e5 f5 a5 b5)

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.