User Extensions Source Code
Here you can share your functions source code
200 topics in this forum
-
Friends, Time for yet another blog post! This week I have described a technique that you can use to read a MIDI file and then transform the corresponding score. I personally think that Opusmodus could introduce many interesting functions for working with MIDI files, not just for transforming as explained in my blog, but also for analyzing the score. Hope you find this article interesting. Regards, Rangarajan
- 16 replies
- 4.1k views
-
Friends, In today's blog, I have talked about how to start with a simple motif and then incrementally apply different transformations on the motif to get interesting piece of music. As usual, I would appreciate your comments and feedback. Regards, Rangarajan
- 4 replies
- 1.8k views
-
Opusmodus 1.1.1.8740 New macro IF* added to Opusmodus system. The IF* (public domain) macro used in Allegro: if* Arguments: (test-form {then then-form+ | thenret} {elseif else-test-form {then else-then-form+ | thenret}}* [else else-form+]) This form consists of a series of clauses introduced by the symbols then, elseif, else, and thenret. First the predicate test-form is evaluated. If it is true, the then-forms are evaluated, and the value of the last such form is returned. If test-form evaluates to nil, any remaining clauses are processed. If no clauses remain, if* returns nil. When a thenret clause is encountered no further evaluation takes plac…
-
- 1 reply
- 2k views
-
-
I am reading a very good book "The Geometry of Musical Rhythms". Chapter 15 discusses an interesting idea called "Rhythmic Oddity". In today's blog of mine, I have briefly written about this idea and how it can be implemented in Opusmodus. Hope members will find it useful in their work. Do read the book for many great insights! Regards, Rangarajan
- 8 replies
- 2.6k views
-
Hi, I have a set of utility functions in a file called "Utils.opmo". These functions have been tested and have no errors. In order to load these functions at start up, I copied this file to my Extensions folder. When I launch OM, what I notice is that some of the functions in this file are loaded correctly, but some others are not loaded at all (I get error when I call them from the console) even though all are in the same source file. I do not get any error messages at load time. I then included the call "(load "<path>/Utils.opmo"), where <path> is the location of the file, in "Quicklisp Start.lisp". Now, when I start OM, as part of Quicklisp…
-
- 4 replies
- 1.9k views
-
-
Hi, Opusmodus has some neat functions for working with text and converting letters to pitches. I wanted to see if we can go beyond that, so wrote a program to determine the parts of speech (POS) of words in a piece of text and then use that to generate pitches. The code shows how to use the REST API to access one of the popular text analysis engines (TextRazor). I have written up the details in my blog post. Regards, Rangarajan
-
- 2 replies
- 1.6k views
-
-
Hi, I know support for quicklisp is not expected of this forum, but in case someone has found a fix, I would appreciate the insight. I installed quicklisp without any problem. But when I try to install "drakma" library (via console), I am getting this error: -------------- ? (ql:quickload "drakma") To load "drakma": Load 1 ASDF system: drakma ; Loading "drakma" Read error between positions 66 and 163 in /Users/Rangarajan/quicklisp/dists/quicklisp/software/usocket-0.6.3.2/backend/openmcl.lisp. > Error: Foreign function not found: x86-darwin64::|gethostname| > While executing: ccl::load-external-function, in process Liste…
- 2 replies
- 2.3k views
-
little lisp-problem/question with &optionel / &key... here are two test-programs to explore keyword and optional paramters this test-program works (defun test1 (liste add &key (add-on/off)) (loop for i in liste when (equal add-on/off 'on) collect (+ i add) else collect i)) (test1 '(1 2 3 4 5) 100 :add-on/off 'on) this version with &optional don't work... why? (defun test2 (liste add &optional (x 10) &key (add-on/off)) (loop for i in liste when (equal add-on/off 'on) collect (+ i add x) else collec…
-
- 2 replies
- 2.1k views
-
-
Hi, Is there any UI library that works with Opusmodus? Is it possible to build dialogs with UI controls in OM environment? Likewise, any way to interact with JVM? I have earlier used JFLI in LispWorks with reasonable success. Regards, Rangarajan
-
- 1 reply
- 1.6k views
-
-
Hi, I stumbled upon two functions in Opusmodus that seem to be undocumented: - (left-rotate a-list) - (right-rotate a-list) Could you take care of this in the next release? Both are useful functions. Regards, Rangarajan
-
- 2 replies
- 1.7k views
-
-
Hi, Is there support for open sound control in Opusmodus? I mean, can we send/receive OSC commands by writing Lisp code, for example to talk to Reaktor or MAX, for example? Regards, Rangarajan
- 2 replies
- 2.1k views
-
For programmers and developers Install the Quicklisp beta library manager. Evaluate: (load "http://beta.quicklisp.org/quicklisp.lisp") To continue, evaluate: (quicklisp-quickstart:install) Place the attached file 'Quicklisp Start.lisp' file into your ~/Opusmodus/User Source/Extensions folder. Edit the file and add the libraries you like to load. Example: (ql:quickload "ieee-floats") (ql:quickload "osc") Quicklisp Start.lisp
-
- 0 replies
- 3.9k views
-
-
I'm curious to know if there is any way to contribute to the list of instruments as found under ambitus-instrument? I often compose for Oud and Korean traditional instruments, and it would be nice to find other instrument templates that are ready to work with.
- 3 replies
- 2.7k views
-
Hi, Just got the license and start getting into Opusmodus and lisp. The first task I try is to set the whole midirange to a tonality . I tried to write a function but somehow i only get part of the expected result. '(c0 d0 e0 f0) ; plays with Cmd-1 (setf pat1 (flatten(pitch-transpose-repeat '(c0 c1 c2 c3 c4 c5 c6 c7) (expand-chord-name '(major) :type :pitch)))) ;;(c1 d1 e1 f1 g1 a0 b0 c1 d1 e1 f1 g1 a1 b1 c2 d2 e2 f2 g2 a2 b2 c3 d3 e3 f3 g3 a3 b3 c4 d4 e4 f4 g4 a4 b4 c5 d5 e5 f5 g5 a5 b5 c6 d6 e6 f6 g6 a6 b6 c7 d7 e7 f7 g7 a7 b7 (defun gen-c0-scale ( shift chord_name &optional (ambituslist '(c0 b7)) ) (ambitus-remove ambituslist (pitch-t…
- 13 replies
- 4.5k views
-
Is there a way or a function to check the structure of a tonality for example: (integer-to-pitch Arabic) -> 1 3 1 ETC. Or with pitches or intervals
-
- 1 reply
- 1.8k views
-
-
Hi, This seems to be a rather simple problem but I can't find a solution myself: I have a list of 16th notes and 16th rests and I want to make sublists every nth 16th (note or rest), like so: (setf list '(1/16 1/16 -1/16 1/16 1/16 1/16 -1/16 1/16 1/16 -1/16 1/16 1/16 1/16 -1/16 1/16 1/16 1/16 -1/16 1/16 1/16 1/16 1/16 1/16 -1/16)) (make-sublists '4 list) -> ((1/16 1/16 -1/16 1/16) (1/16 1/16 -1/16 1/16) (1/16 -1/16 1/16 1/16) (1/16 -1/16 1/16 1/16) (1/16 -1/16 1/16 1/16) (1/16 1/16 1/16 -1/16))thanks for hints, best ole
-
- 2 replies
- 2.1k views
-
-
Hi, I want to distribute every second note (with its length) to one voice (instrument) and every first and third note to another voice (instrument) like in the example. Is there a way to do this automatically? What I want it to spread a voice to different instruments, preserving the position.. Thanks for help! ole edit: I just saw that half of the work could be done with gen-swallow, just need to change every nth length-value into a rest-value (preferably leaving my sublists (bars) untouched)..something like length-to-rest for position instead of size of the length. (setf stimme1 '((h d4 q a4 g4) (q a4 e4 h f4) (h e4 g4) (q f4 e4 d4 cs4) (h d4 q a4 a4))) …
- 2 replies
- 2.3k views
- 1 follower
-
Hi, what I want to do is to use ambitus-pitch-remove in the second voice but preserving the rhythmical places for the remaining pitches (so that the pitches swallowed by ambitus-pitch-remove are replaced by rests of the same lengths). Or asking more generally: Is it possible to manipulate on the level where pitches and length are already glued together (omn?)? code: (setf mel '(c4 d4 e4 gs4 bb5 eb6)) (setf rhy '(1/4 -1/8 1/8 1/8 -1/8 1/4 1/4 -1/8 1/8 1/8 -1/4)) (setf mel2 (gen-eval 20 '(rnd-sample 6 mel))) (setf rhy2 (gen-eval 10 '(rnd-sample 12 rhy))) (setf rhy3 (assemble-seq '(-1/4) rhy2)) (setf eins (make-omn :length rhy2 :pitch mel2))…
-
- 6 replies
- 3.2k views
-
-
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
-
- 2 replies
- 2.3k views
-
-
Hi, Do the lists for pitches and lengths have to be of the same sublists (do the sublists have to have the same length)? e.g.: (setf pitches '((c4 d4 e4) (f4 g4 a4 b4))) (setf pitches2 '((c4 d4) (e4 f4) (g4 a4) (b4))) (setf rhy '((1/4 1/4 -1/4) (1/4 1/4 -1/4) (1/4 1/4 -1/4) (1/4))) (make-omn :length rhy :pitch pitches) this does not work, with 'pitches2' it works fine.. so I have to be aware that my sublists are 'in sync' and use 'flatten' if my sublists are different..? ole
-
- 9 replies
- 3.5k views
-
-
The subject says it all... Best, Torsten LENGTH-DIVIDE2 Documentation seemingly not updated (neither reference nor examples) after function has been changed for the argument :position. For example, the following example call throws an error (length-divide2 '(1 2 2) '(1/16) '(1/4 1/4 1/4 1/4) :type 'n :position 'e) > Error: There is no POSITION named: e. > Allowed POSITION: 'f (first) 'l (last) 'c (center) and '? (at random). BTW: Unfortunately, that helpful error message is not shown if I try to directly output the above …
-
- 2 replies
- 2.4k views
-
-
Dear developers, Below I report another bug (or at least what I assume is a bug). Thank you! Best, Torsten LENGTH-ADJUST If arg value is below the overall length (duration) of the given phrase, then the result is nevertheless longer than the input, seemingly by the absolute difference. This corner case is not covered by the documentation, but for consistency it would likely be better to shorten the input sequence, if the given length value is shorter than the sequence. Examples: (length-adjust 3/4 '(q c3 e d3 e3 q f3 e g3 a3)) (length-adjust 2/4 '(q c3 e d3 e3 q f3 e g3 a3)) …
-
- 0 replies
- 1.6k views
-
-
Dear developers, Opusmodus has a nice and rather extensive documentation. Nevertheless, I wondered why you use manually written rtf files for that. As you most likely know, Common Lisp already supports facilities to add documentation to symbols (e.g., functions) themselves. Example: try (documentation 'list 'function). With such facilities some automatically generated documentation could be created (at least partly), which would at least avoids certain typos. I ran in only a few typos so far in the documentation, but they exist. Here is an example: In reference, the first argument of TONALITY-SERIES is root, but th…
-
- 0 replies
- 1.8k views
-
-
This question is answered beautifully by Rainer Joswig on 'Stack Overflow' site. Difference between `set`, `setq`, and `setf` in Common Lisp? STACKOVERFLOW.COM What is the difference between "set", "setq", and "setf" in Common Lisp? (set 'mat '(c4 d4 e4)) (setq mat '(c4 d4 e4)) (setf mat '(c4 d4 e4))
-
- 0 replies
- 6k views
-
-
To add a SEED to your own function and make it work you need to follow three simple rules: Add keyword SEED into the function arguments. (rnd-seed seed) should be placed at the beginning of the function. Nested functions that use seed need to use a (seed) function and not a seed argument. Example: (defun rnd-number (n low high &key seed) (do-verbose ("rnd-number") (rnd-seed seed) (if (zerop n) nil (cons (round (+ low (rnd-round 0 (- high low) :seed (seed)))) (rnd-number (decf n) low high :seed (seed)))))) Each time we evaluate the expression we get a different res…
-
- 0 replies
- 1.9k views
-