AM Posted June 16, 2018 Share Posted June 16, 2018 ...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))) (midi-to-pitch (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) JulioHerrlein and loopyc 2 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.