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.

Help on Get-Beats

Featured Replies

Dear Friends , 

 

I have this question regarding Get-Beats Function.

 

All the best !

Julio

 

;;; THIS WORKS !

(setf omn-forum '((h b4 s d5 mf ord g5 ord c5 ord e. a5 ord s b5 ord e5 ord fs5 ord d5 ord e g5 f stacc c5 stacc a5 stacc - b5 stacc q e5 mf ord)(h bb4 s d5 mf ord gb5 ord c5 ord e. ab5 ord s b5 ord e5 ord fs5 ord d5 ord e g5 f stacc c5 stacc a5 stacc - b5 stacc q eb5 mf ord))

(get-beats '(
(1 1 (1 2 4 7 5 8 6 3)) 
(1 2 (1 2 4 4 4 7 6 3))) 
omn-forum)

;;; But THIS WON´T WORK - Why ?

(setf bts (rnd-unique 8 '(4 7 5 8 3 6 1 2)))

(get-beats '(
(list 1 1 bts) 
(1 2 (1 2 4 4 4 7 6 3))) 
omn-forum)

 

  • Author

Dear friends,

 

Is there a way to use the rnd-beat-order function but specifying a list of beats ? The get-beats is the way in this case ? Or there is such a function like beat-order ? or maybe a space for determining the order inside the rnd-beat-order function ? In negative case, I´ll use the get-beats for doing this.

 

All the best !

Julio

  • Author

Dear friends, 

A LISP question...

 

;;; Dear Friends,

; LISP question for using with get-beats

;;; voice and bar list
((1 1) (1 2) (1 3) (1 4) (1 5)) 
;;; beats 
((1 2) (1 2 3 4 5 6 7 8) (1 2) (1 2 3 4 5 6 7 8) (1 2))

;;; matrix result
(matrix-transpose '(((1 1) (1 2) (1 3) (1 4) (1 5)) ((1 2) (1 2 3 4 5 6 7 8) (1 2) (1 2 3 4 5 6 7 8) (1 2))))

;;; desired result to use in gen-beats

((1 1 (1 2)) (1 2 (1 2 3 4 5 6 7 8)) (1 3 (1 2)) (1 4 (1 2 3 4 5 6 7 8)) (1 5 (1 2)))

;;; how can I achieve the last result in LISP ? That kind of list, like (x x ( y z)) kind of list ?

;;; Best !

 

Summarizing...

 

How to transform this

 

(((1 1) (1)) ((1 2) (1 3 5 7)) ((1 3) (1)) ((1 4) (1 3 5 7)))

 

into this

 

((1 1 (1)) ((1 2 (1 3 5 7)) ((1 3 (1)) ((1 4 (1 3 5 7))

 

How is the name of this type of list ?

 

Best !

  • Author

This is a suggestion for a function like

 

get-bars-beats

 

to be used in conjunction with get-beats 

 

;;;This is an idea to get all the bars and beats from an OMN expression to be used/edited with GEN-BEATS

(progn
(setf omn-idea (gen-repeat 5 '((q b4 p<f tie+long) (q b4 s d5 mf ord g5 ord c5 ord e. a5 ord s b5 ord e5 ord fs5 ord d5 ord e g5 stacc c5 stacc a5 stacc - b5 stacc q e5 ord) (q gb4 p<f tie+long) (q gb4 s fs5 mf ord cs5 ord gs5 ord e. f5 ord s eb5 ord bb5 ord c5 ord fs5 ord e cs5 stacc gs5 stacc f5 stacc - eb5 stacc q bb5 ord) (q as4 p<f tie+long))))

(setf all-bars 
(cdr (gen-divide 2 (flatten 
(matrix-transpose (list
(gen-divide 1 (gen-repeat (get-count (get-count omn-idea)) '(1)))
(gen-divide 1 (gen-integer (get-count (get-count omn-idea))))))))))

(setf beats-zerobase 
(loop for i in 
(find-everyother 3 (flatten (get-time-signature (gen-divide 1 (get-span omn-idea)))))
 collect (gen-integer i)))

(setf all-beats (gen-divide (get-count beats-zerobase) (loop for i in (flatten beats-zerobase)
collect (+ 1 i))))

(setf all-bars-n-beats (matrix-transpose (list all-bars all-beats)))
)

 

The result is this

 

(((1 1) (1 2)) ((1 2) (1 2 3 4 5 6 7 8)) ((1 3) (1 2)) ((1 4) (1 2 3 4 5 6 7 8)) ((1 5) (1 2)) ((1 6) (1 2 3 4 5 6 7 8)) ((1 7) (1 2)) ((1 😎 (1 2 3 4 5 6 7 8)) ((1 9) (1 2)) ((1 10) (1 2 3 4 5 6 7 8)) ((1 11) (1 2)) ((1 12) (1 2 3 4 5 6 7 8)) ((1 13) (1 2)) ((1 14) (1 2 3 4 5 6 7 8)) ((1 15) (1 2)) ((1 16) (1 2 3 4 5 6 7 8)) ((1 17) (1 2)) ((1 18) (1 2 3 4 5 6 7 8)) ((1 19) (1 2)) ((1 20) (1 2 3 4 5 6 7 8)) ((1 21) (1 2)))
 

Not yet appropriate to use in GET-BEATS, but close...

 

All this could be made inside one function, to extract, bars and beats in the form of GET-BEATS function.

 

Best,

Julio

(defparameter b-val (matrix-transpose '(((1 1) (1 2) (1 3) (1 4) (1 5))
                                        ((1 2) (1 2 3 4 5 6 7 8) (1 2) (1 2 3 4 5 6 7 8) (1 2)))))

(loop for i in b-val
      for j = (first i)
      collect (list (first j) (second j) (second i)))
=> ((1 1 (1 2)) (1 2 (1 2 3 4 5 6 7 8)) (1 3 (1 2)) (1 4 (1 2 3 4 5 6 7 8)) (1 5 (1 2)))

 

  • Author

Thanks a lot, Janusz ! 

(get-bars-beats) would be useful and easier !

Best !

Julio

 

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.