-
Similar Topics
-
By Lance Massey
I'm ok (not great) with music and algorithms, but I know *nothing* about Lisp, so please excuse me if I'm completely off base...
I'd like to set up a system where I can tag parts of midi files and then use random weights to create new pieces that are similar to the source material. For example, I'd like to create a new melody from the openings of three different pieces where each of the source motifs are tagged with something like "dark" "rhythmic" "complex"
In my day job the way I'd do this is to have all the motifs, melodies, basslines, chord progressions, descriptive tags, etc. stored in a database, and I'd run a query: "SELECT * from motifs WHERE tag LIKE 'dark' LIMIT 3. And then I'd basically use random numbers to select which of the resultant notes would play and when. I'd then rate the result, and if it's good enough INSERT it back in to the database to provide a new generation of material
So my question is, would I need a database in OpusModus, or is there a "Lispy-way" to do this kind of genetic manipulation? If I need a database, any recommendations?
Thanks for your patience!!
Lance
-
By Rangarajan
Hi,
I am encountering a funny problem with the following score. As shown in the comments, notes played in some bars are not as per the
supplied pitches list. Strangely, the musicxml notation and what is played agree!
Request your comment on what might be wrong.
;;; ---------------
;;; Notes played in the last 2 bars are not as per this list
(setf m1 '((c4) (e4) (b4) (d5) (g4) (g4) (c5 d4 c5 c5 c5) (a4 d4 a4 e5 a4)))
(setf rhy1 '((-w) (-w) (-w) (-w) (-w) (-w) (1/4 1/4 1/8 1/8 1/4) (1/4 1/4 1/8 1/8 1/4)))
;;; Notes played in the 6th and 8th bars are not as per this list
(setf m2 '((c4 g4 c4 f4 f4) (e4 d4 c4 d4 f4) (b4 a4 a4 d5 a4) (d5 d5 g4 g4 g4) (g4 d4 d4 g4 c4)
(g4 d4 f4 g4 e4) (c5 e5 a4 c5 d4) (a4 a4 e5 e5 a4)))
(setf rhy2 '((1/4 1/4 1/8 1/8 1/4) (1/4 1/4 1/8 1/8 1/4) (1/4 1/8 -1/8 1/4 1/4)
(1/4 1/4 1/8 1/8 1/4) (1/4 1/8 1/8 1/4 1/4) (1/4 1/8 -1/8 1/4 1/4)
(1/4 1/4 1/4 1/8 1/8) (1/8 1/8 1/4 -1/8 3/8)))
(def-score progression-example
(
:key-signature 'chromatic
:time-signature '(4 4)
:tempo 120
)
(instr1 :pitch m1 :length rhy1 :velocity '(f) :channel 1 :sound 'gm :program 'Glockenspiel)
(instr2 :pitch m2 :length rhy2 :velocity '(f) :channel 2 :sound 'gm :program 'Flute)
)
;;; ------------------
Regards,
Rangarajan
-
By ajf-
Following from this question, I want to use several different Lisp packages through quicklisp, but I can't get the installation to work correctly.
After doing some digging, I found out that the path to quicklisp is not defined correctly. This is the content of the ql:*quicklisp-home* global:
> ql:*quicklisp-home* #P"/Users/opusmodus/quicklisp/"
I realised that changing this manually doesn't fix the issue, and because of this I can't install or use quicklisp correctly. Note that I do not have a user by the name opusmodus and creating that directory with my user's permission does not fix it.
I managed to do something by using SBCL as my own user to load and install quicklisp, and then in opusmodus use the following:
(load #p"/Users/ajf-/quicklisp/setup.lisp")
But it's actually a workaround and it's not very reliable (also gives an error sometimes). Can you please point me in the right direction?
Thank you very much
-