Jump to content

integer to attribute


Recommended Posts

I want to define pizz=0, arco-ord =1, arco-tasto=2, arco-ponte=3, then to apply to a string of pitch classes (0-11) mod 4, this will give me another string (0-3) and I want this string to be transformed to a string of attributes according to my definition.

Link to comment
Share on other sites

you want to map some integers (in your case pc..) to attributes? like that?

 

(position-filter  '(0 1 2 3 4 5)  '(pizz arco ponte molto-ponte stacc stacc+pizz ten+arco ten+molto-ponte))
=> (pizz arco ponte molto-ponte stacc stacc+pizz)


(position-filter  (pcs '6-Z10) '(pizz arco ponte molto-ponte stacc stacc+pizz ten+arco ten+molto-ponte))
=> (pizz arco molto-ponte stacc stacc+pizz ten+molto-ponte)

or in pure CCL

(loop 
  for i in '(0 1 2 3 4 5)
  with attr-list = '(pizz arco ponte molto-ponte stacc stacc+pizz ten+arco ten+molto-ponte)
  collect (nth i  attr-list))
=> (pizz arco ponte molto-ponte stacc stacc+pizz)

 

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