Jump to content


Recommended Posts

...how ti filter all "unused/complementary" pitches inside a sieve (if you like to extend the function... could be interesting if it works also with chords)


(defun neg-sieve (pitchlist)
  (let ((pitchlist (pitch-to-midi pitchlist)))
     (loop for i from (car pitchlist) to (car (last pitchlist))
       when (null (member i pitchlist))
       collect i))))

(setf sieve '(fs3 g3 as3 b3 c4 cs4 ds4 e4 f4 gs4 a4 d5 eb5 fs5 g5 gs5 bb5 b5 c6 cs6 e6 f6))

(neg-sieve sieve) 
=> (gs3 a3 d4 fs4 g4 bb4 b4 c5 cs5 e5 f5 a5 d6 eb6)

(neg-sieve '(c4 d4 e4 fs4 gs4 as4 c5))
=> (cs4 eb4 f4 g4 a4 b4)




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.

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