Jump to content

Recommended Posts

Hello, I have a generated seq of pitches and would like to remove repeated pitches and also prevent a seq like  b5 f5 b5 ( where the pitch following f5 returns to the pitch before f5 in this case ).

 

I'm not sure if filter-repeat is what I need or some other function?

 

If I do   (filter-repeat 1 '(b5 b5 f5 b5 f5 a5 gs5 a5 fs5 bb5))  ,  the result is  (b5 f5 b5 f5 a5 gs5 a5 fs5 bb5)  

but what I want is         (b5 f5 a5 gs5 fs5 bb5)

 

There is a :seq arg but haven't had luck with that ( and don't understand what it does).

 

 

Link to comment
Share on other sites

Thank you Stephane.  But in that result, I see a5 gs5 a5 which is still a pitch ( a5 ) returning to the prior pitch.  What I'd like is  (b5 f5 a5 gs5 fs5 bb5).  It would be ok if a5 appeared again later in the seq, but I don't want it appearing so soon after the prior a5 if that makes sense. 

 

Link to comment
Share on other sites

  • 2 weeks later...

With the update (3.0.29349) you will be able to do that:
 

(filter-repeat 5 '(1 2 2 3 1 4 5 2 1 6 4 3 4 2 2 3 1 1 3) :position t)
=> (1 2 3 4 5 2 1 6 4 3 2 1)

(filter-repeat 5 '(b5 b5 f5 b5 f5 a5 gs5 a5 fs5 bb5) :position t)
=> (b5 f5 a5 gs5 fs5 bb5)


Please check the updated document.

 

 

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