Jump to content

Working with Dictum, Dictum not evaluating


Recommended Posts

Hi folks,
 

I'm working with the new dictum and am having trouble evaluating the results of my work. See snippet:
 

;=====BIRDCALLS=====
(setf bird1 '(3q d5 leg gs4 d5 leg gs4 d5 leg gs4))
(setf bird2 '(q a3 e. b3 x c5 leg e.. bb4))
(setf bird3 '(e fs4 leg c5 q bb4 3q fs4 stacc c5 bb4))
(setf rest1 '(-e))
(setf rest2 '(-q.))
(setf rest3 '(-e.))

;=====OMN MAKER=====> dictum doesn't evaluate

(setf loop1 (gen-loop 7 (list
             (rnd-pick (list bird1 bird2 bird3))
             (rnd-pick (list rest1 rest2 rest3))
             (rnd-pick (list rest1 rest2 rest3)))))

(dictum '(:if e :do q) loop1) ;this returns errors

;=====DICTUM EXAMPLE==== works as intended

(setf omn '(e g4 f leg gs4 fs4 mf leg a4 s f4 p bb4 e4 b4 eb4 c5 d4 cs5))

(dictum '(:if e :do q) omn)



My dictum I'm applying to loop1 looks identical to the example given in the assistant, but, unlike the example, I only get errors returned if I try to evaluate the dictum for loop1. I'm guessing it's because I'm evaluating a variable which itself is a nest of rnd-picks from lists.

How should I test a dictum based on loop1?

Link to comment
Share on other sites

Hi,

 

the output of your loop get too many nested parenthesis. Use assemble-seq function to arrange this material as correct OMN expression usable by dictum.

 

;=====BIRDCALLS=====
(setf bird1 '(3q d5 leg gs4 d5 leg gs4 d5 leg gs4))
(setf bird2 '(q a3 e. b3 x c5 leg e.. bb4))
(setf bird3 '(e fs4 leg c5 q bb4 3q fs4 stacc c5 bb4))
(setf rest1 '(-e))
(setf rest2 '(-q.))
(setf rest3 '(-e.))

;=====OMN MAKER=====

(setf loop1 (assemble-seq
             (gen-loop 
              7
              (list
               (rnd-pick (list bird1 bird2 bird3))
               (rnd-pick (list rest1 rest2 rest3))
               (rnd-pick (list rest1 rest2 rest3))))))

(dictum '(:if e :do q) loop1)

 

Link to comment
Share on other sites

On 2/14/2024 at 3:42 AM, Stephane Boussuge said:

Hi,

 

the output of your loop get too many nested parenthesis. Use assemble-seq function to arrange this material as correct OMN expression usable by dictum.

 

 

Thanks! If there's too many parentheses, I'm not sure why adding yet another two will help, but hey, it works!

Opusmodus/Lisp is super weird.

Link to comment
Share on other sites

Dear All, 

 

I really enjoyed the way Dictum works now. In my opinion, it´s also a way of implementing variations over the material.

I just have one suggestion:

Maybe it could have a length keyword to make the gen-pause (or any operation) in the first positive length event, or only in positive values (not over the rests), so you don´t need to count the events to apply the operation. For the bars that start with rests (an have many rests) this could be useful.

 

Something like this:

 

(setf omn2b '((-5q 5q fs4 p bb3 f3 e4 -3q g4 c5 s eb5 mf a5 cs6 gs6)
(5q gs6 f cs6 a5 eb5 - -s c5 g4 e4)))

;;; length keyword to make the gen-pause (or any operation) in the first length event, or only in positive values (not over the rests) so you don´t need to count the events to apply.

(dictum '((:if 5q :do tasto :bar 1)
(:first ord :bar 2)
(:do (gen-pause x) :bar 1 :event 1 :length t)
(:if e :do tasto :bar 2)) omn2b)

; RESULT
((-5q - bb3 p tasto f3 tasto e4 tasto -3q g4 c5 s eb5 mf a5 cs6 gs6) (5q gs6 f ord cs6 a5 eb5 - -s c5 g4 e4))

 

All the best !

Julio

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

Terms of Use Privacy Policy