Jump to content

Featured Replies

Posted

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).

 

 

  • Author

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. 

 

  • Author

More generally what I'm after is the technique where a pitch doesn't repeat until after x number of notes have passed in a seq. 

 

Is there a function like this?

  • 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.

 

 

  • Author

Thank you very much!  Will check it out.

Create an account or sign in to comment


Copyright © 2014-2025 Opusmodus™ Ltd. All rights reserved.
Product features, specifications, system requirements and availability are subject to change without notice.
Opusmodus, the Opusmodus logo, and other Opusmodus trademarks are either registered trademarks or trademarks of Opusmodus Ltd.
All other trademarks contained herein are the property of their respective owners.

Powered by Invision Community

Important Information

Terms of Use Privacy Policy