dsyk Posted April 4, 2020 Share Posted April 4, 2020 Can I assign integer to attribute, for e.x integer to attribute? Quote Link to comment Share on other sites More sharing options...
opmo Posted April 4, 2020 Share Posted April 4, 2020 Example please. No. Integer (number) can't be variable. Quote Link to comment Share on other sites More sharing options...
dsyk Posted April 4, 2020 Author Share Posted April 4, 2020 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. Quote Link to comment Share on other sites More sharing options...
AM Posted April 5, 2020 Share Posted April 5, 2020 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) Quote Link to comment Share on other sites More sharing options...
opmo Posted April 5, 2020 Share Posted April 5, 2020 Check the mapping functions. Quote Link to comment Share on other sites More sharing options...
Stephane Boussuge Posted April 5, 2020 Share Posted April 5, 2020 Something like that : (substitute-map '(pizz arco+ord arco+tasto arco+ponte) '(0 1 2 3) '(0 3 2 3 1 3 2 3 3 1 0 0 2 0)) => (pizz arco+ponte arco+tasto arco+ponte arco+ord arco+ponte arco+tasto arco+ponte arco+ponte arco+ord pizz pizz arco+tasto pizz) SB. Quote Link to comment Share on other sites More sharing options...
dsyk Posted April 5, 2020 Author Share Posted April 5, 2020 Thank you! 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.