Jump to content
Sign in to follow this  
AM

filter-repeat for pairs?

Recommended Posts

is there a possibility to filter some "combinations"?

when i have a seq like that:

 

(a4 gs4 a4 gs4 a4 fs4 gs4 g5 bb5 g5 gs4)

i want to filter all immediate repetitions with pattern-length = 2

the result would be:

 

(a4 gs4 a4 fs4 gs4 g5 bb5 g5 gs4)

because a4-gs4 is the pair that repeats

 

 

Share this post


Link to post
Share on other sites

Filter with sequence option:

 

(filter-repeat 1 '(a4 gs4 a4 gs4 a4 fs4 gs4 g5 bb5 g5 g5 g5 gs4 a4 gs4) :seq 2)
=> (a4 gs4 a4 fs4 gs4 g5 bb5 g5 g5 g5 gs4 a4 gs4)

(filter-repeat 1 '(a4 gs4 a4 gs4 a4 fs4 gs4 g5 bb5 g5 g5 g5 gs4 a4 gs4))
=> (a4 gs4 a4 gs4 a4 fs4 gs4 g5 bb5 g5 gs4 a4 gs4)

 

Is this what you are looking for ?

Share this post


Link to post
Share on other sites

With the next release.

 

I wonder if the result should remove the repeats of single notes:

 

(filter-repeat 1 '(a4 gs4 a4 gs4 a4 fs4 gs4 g5 bb5 g5 g5 g5 gs4 a4 gs4) :seq 2)
=> (a4 gs4 a4 fs4 gs4 g5 bb5 g5 gs4 a4 gs4)

Share this post


Link to post
Share on other sites

i think it's better when it's seperate. keep the function/process as simple and clear as possible?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×