j111 Posted January 21, 2023 Share Posted January 21, 2023 I've downloaded the trial version of Opusmodus, and it looks like exactly what I'm looking for. I'm having trouble running almost all of the code examples though. (M1 MacBook, Ventura 13.1) For example, I copied the score on this page and pasted it into a new opmo file. (setf pitches '(c4 cs4 fs4 g4 c5)) (setf p-transp (pitch-transpose (pitch-to-integer pitches) (gen-repeat 5 (list pitches)))) (setf r-transp (gen-retrograde p-transp :flatten t)) (setf c-ambitus (ambitus '(c2 c3) p-transp)) (setf p-ambitus (ambitus '(c2 c3) p-transp :type :flat-invert)) (setf s-ambitus (ambitus '((c2 c3) (b2 f3) (g3 cs4) (fs4 g5) (c4 c5)) p-transp)) (setf lengths (span p-transp '(1/8))) (setf interlude (span s-ambitus '(1/16))) (setf dynamics (mclist '(p mp mf f ff))) (setq r-dynamics (mclist '(ff f mf mp p))) (setf p-rh1 (make-omn :length lengths :pitch p-transp :velocity dynamics)) (setf p-lh1 (make-omn :length lengths :pitch c-ambitus :velocity dynamics)) (setf p-rh2 (make-omn :length interlude :pitch s-ambitus :velocity r-dynamics)) (setf p-lh2 (gen-pause p-rh2 :section '(0 1 2 3 4))) (setf p-rh3 (make-omn :length lengths :pitch r-transp :velocity dynamics)) (setf p-lh3 (make-omn :length lengths :pitch p-ambitus :velocity dynamics)) (setf rh-1 (assemble-seq p-rh1 p-rh2 p-rh3)) (setf lh-1 (assemble-seq p-lh1 p-lh2 p-lh3)) (setf timesigs (get-time-signature rh-1 :group '((5)))) (def-score lesson-16 (:key-signature 'chromatic :time-signature timesigs :flexible-clef t :tempo 80 :layout (piano-layout 'piano-rh 'piano-lh)) (piano-rh :omn rh-1 :channel 1 :sound 'gm :program 'acoustic-grand-piano) (piano-lh :omn lh-1) ) Then I save the file and run it with Tools -> Evaluate Score -> Notation. That produces an error like this: Maybe some functions were removed from the software since the tutorials were written? It looks like a function there rnd-range doesn't exist. If I change rnd-range to gen-integer it gets me past that point in the code, but then it doesn't recognize the variable line-rnd which was defined in the line above where it's used. In this screenshot, I've defined line-rnd in the REPL, but then when I try to use it, the variable says that it's unbound. I can define and use other variables though: Most of the code examples I've tried don't run. Am I doing something wrong? I'm not very familiar with lisps, but I do a bit of computer programming in other languages. Quote Link to comment Share on other sites More sharing options...
Stephane Boussuge Posted January 21, 2023 Share Posted January 21, 2023 All works fine here, I've just copied your code into a new file and Evaluate score to notation . SB. J111 question.mp4 Quote Link to comment Share on other sites More sharing options...
j111 Posted January 21, 2023 Author Share Posted January 21, 2023 Are you using an M1 Mac? Here's a video of what happens on my computer. opusmodus-errors.m4v Quote Link to comment Share on other sites More sharing options...
j111 Posted January 21, 2023 Author Share Posted January 21, 2023 (edited) Here's another example from the home page: Opusmodus OPUSMODUS.COM Screenshot of the code: My typed code: ;; I carefully checked that Ls and 1s are typed correctly. (setf transition (rnd-sample 32 '(01 0rl 0lr) :seed 90198)) (setf rotation (rnd-sample 32 '(0 -1 1) :seed 431458)) (tonnetz '(c4e4g4) transition :net 11 :join 1 :rotate rotation) My result: I'm guessing that it's a bug. I'm not sure how the program is supposed to be installed, but I dragged the extracted .app file into my Applications folder. For some reason, Spotlight doesn't find it though. I press command-space and type "opus" but the app doesn't appear. Could the problem be related to that? Is there a way to clear all the program data and reinstall the trial version without losing access to the trial? I want to make sure it works on my computer before I buy it. One other thing I did during installation is to set the opusmodus directory to ~/Dropbox/MUSIC/COMPOSITION/OPUSMODUS instead of the default location. I'm not sure if that might affect something. Edited January 21, 2023 by j111 added more info Quote Link to comment Share on other sites More sharing options...
opmo Posted January 21, 2023 Share Posted January 21, 2023 The first value should be 0l (0L) and not 01. '(01 0rl 0lr) (setf transition (rnd-sample 32 '(0L 0rl 0lr) :seed 90198)) (setf rotation (rnd-sample 32 '(0 -1 1) :seed 431458)) (tonnetz '(c4e4g4) transition :net 11 :join 1 :rotate rotation) Any error has nothing to do with M1 or Intel processor. Copy from html of pdf files will not always work - format problems. Images are not helpful with errors, only code please. j111 1 Quote Link to comment Share on other sites More sharing options...
j111 Posted January 21, 2023 Author Share Posted January 21, 2023 17 minutes ago, opmo said: The first value should be 0l (0L) and not 01. Thanks, I checked that so many times and still missed it. After fixing that, it generates the omn, but when I try to view the rendered score I get this other error. I see this error a lot, which I can only seem to fix by consing a note value to the beginning of the list. Example of how to get that snippet working: Is that the expected behavior? Any ideas why other examples aren't working? For example, in the first code snippet I pasted above, if I evaluate line by line, I get an error on line 2. It doesn't seem to know what the pitch-transpose function is. Could it have something to do with the alternate location of my opusmodus folder (in Dropbox)? Quote Link to comment Share on other sites More sharing options...
opmo Posted January 21, 2023 Share Posted January 21, 2023 Place the coursor on the end of the expression and press cmd-1 (tonnetz '(c4e4g4) transition :net 11 :join 1 :rotate rotation) I would suggest to contact Stephane and take a introduction lesson. All example in the How-to etc... are working I copied the code and I don't see any errors: (setf pitches '(c4 cs4 fs4 g4 c5)) (setf p-transp (pitch-transpose (pitch-to-integer pitches) (gen-repeat 5 (list pitches)))) (setf r-transp (gen-retrograde p-transp :flatten t)) (setf c-ambitus (ambitus '(c2 c3) p-transp)) (setf p-ambitus (ambitus '(c2 c3) p-transp :type :flat-invert)) (setf s-ambitus (ambitus '((c2 c3) (b2 f3) (g3 cs4) (fs4 g5) (c4 c5)) p-transp)) (setf lengths (span p-transp '(1/8))) (setf interlude (span s-ambitus '(1/16))) (setf dynamics (mclist '(p mp mf f ff))) (setq r-dynamics (mclist '(ff f mf mp p))) (setf p-rh1 (make-omn :length lengths :pitch p-transp :velocity dynamics)) (setf p-lh1 (make-omn :length lengths :pitch c-ambitus :velocity dynamics)) (setf p-rh2 (make-omn :length interlude :pitch s-ambitus :velocity r-dynamics)) (setf p-lh2 (gen-pause p-rh2 :section '(0 1 2 3 4))) (setf p-rh3 (make-omn :length lengths :pitch r-transp :velocity dynamics)) (setf p-lh3 (make-omn :length lengths :pitch p-ambitus :velocity dynamics)) (setf rh-1 (assemble-seq p-rh1 p-rh2 p-rh3)) (setf lh-1 (assemble-seq p-lh1 p-lh2 p-lh3)) (setf timesigs (get-time-signature rh-1 :group '((5)))) (def-score lesson-16 (:key-signature 'chromatic :time-signature timesigs :flexible-clef t :tempo 80 :layout (piano-layout 'piano-rh 'piano-lh)) (piano-rh :omn rh-1 :channel 1 :sound 'gm :program 'acoustic-grand-piano) (piano-lh :omn lh-1) ) Quit and restart the app and run the code from above. j111 1 Quote Link to comment Share on other sites More sharing options...
j111 Posted January 22, 2023 Author Share Posted January 22, 2023 2 hours ago, opmo said: Place the coursor on the end of the expression and press cmd-1 Thanks, I did that, but I'm getting inconsistent results. It worked now, but not earlier. Even the menu item works now. I'm not sure how lisp works other than briefly tinkering with some Scheme and Clojure years ago, but I'm wondering if that REPL is holding onto state that is causing the error(s) under certain conditions. If you look at one of my snippets above, the pitch-transpose function isn't syntax highlighted and the REPL thinks it's undefined. Here's a copy of the screenshot: But when I paste the code in now, pitch-transpose is syntax-highlighted, and the REPL is aware of it. 2 hours ago, opmo said: Quit and restart the app and run the code from above. I've tried it multiple times and just did it again. Here's a video of the latest attempt. The code was pasted directly from your comment above after restarting and creating a new file. opusmodus-syntax-error.m4v 2 hours ago, opmo said: I would suggest to contact Stephane and take a introduction lesson. Sounds like a good idea, but it's out of my budget. Even the software is out of my budget, but if I can get code running I'm going to take a risk on it. Quote Link to comment Share on other sites More sharing options...
Stephane Boussuge Posted January 22, 2023 Share Posted January 22, 2023 I'm offering to you 20mn of my time through a zoom session to help you to solve this problem. Please contact me at boussuge@opusmodus.com to arrange for the details. SB. Pli and j111 2 Quote Link to comment Share on other sites More sharing options...
Pli Posted January 22, 2023 Share Posted January 22, 2023 Hi J111, I am a very new user, for what it's worth I am running on m2 ventura 13.1 with installed to ~/Opusmodus and working fine, even pasting in code from this thread. j111 and Stephane Boussuge 2 Quote Link to comment Share on other sites More sharing options...
j111 Posted January 23, 2023 Author Share Posted January 23, 2023 21 hours ago, Stephane Boussuge said: help you to solve this problem Thanks for your offer. I will send an email. 18 hours ago, Pli said: running on m2 ventura 13.1 with installed to ~/Opusmodus As a quick experiment to try to eliminate a possible cause of the problem, I just tried renaming my Opusmodus folder in Dropbox (so that the program can't find it) and then restarted the program. Opusmodus then prompted me to choose a location for my Opusmodus folder. This time I chose the default location at ~/Opusmodus and I created a new workspace before pasting in code. The code example from above that works for everyone else still crashes on my computer though. It looks like it evaluates up to the piano-layout function successfully, but then fails on make-instrument, which I'm guessing is called by def-score. It looks like there are two blank spaces after the dot, so maybe there is a clue there? Error: syntax error in (make-instrument . ): The call (make-instrument . ) does not match the definition (make-instrument name &body body &key span text ast omn omn-plist length pitch velocity channel port sound program volume pan tuning duration duration-add controllers). The one other strange behavior I noticed is that Spotlight can't find Opusmodus.app. It's there in the Applications directory, and Spotlight seems to be able to find the other apps there, but when I type Opusmodus, it doesn't show up. I checked the file permissions and ownership in a terminal (they are the same as the other apps), and forced Spotlight to reindex the Applications directory, but it still can't find the app. Another possibility is that there is some condition that only exists in the trial version -- I might be getting that condition because I'm using the trial version, but everyone else in the topic here is probably using the full version? Quote Link to comment Share on other sites More sharing options...
j111 Posted January 23, 2023 Author Share Posted January 23, 2023 It just started working. After clearing the caches, moving the Opusmodus directory, tinkering with things, and rebooting the computer, everything suddenly works. Thanks for the help with debugging it. I'm going to dive into the function documentation tonight. Quote Link to comment Share on other sites More sharing options...
j111 Posted January 23, 2023 Author Share Posted January 23, 2023 Actually, the bug returned temporarily. I'm not sure how many users it affects, but you might be able to reproduce it with this information: I wanted to move the Opusmodus directory back to Dropbox, so I did the same process as before (deleting the existing ~/Opusmodus folder and restarting the program). The new folder was named OPUSMODUS (all-caps due to a naming scheme I use) in subfolders on Dropbox. (Dropbox has an online-only mode that could cause problems with some programs, but it is turned off for my music-related files.) As soon as I did that, code stopped running. I rebooted the computer. Same problem. I deleted OPUSMODUS in Dropbox and restarted the computer and program. Even though the folder was now at ~/Opusmodus and I restarted multiple times, the code still wasn't working. Finally, I left the folder at ~/Opusmodus alone for one more reboot (instead of recreating it after reboot), and it's working again. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.