# Length-Displace Function

## Recommended Posts

Dear Friends,

I´m searching for a function to make rhythmic displacement of lists and sublists at once. It´s not like rotating, it´s more like displacing all the rhythms by a fixed amount, like transforming this:

(-e he. d4 mf e cs4 hs eb4)

into this
(he. d4 mf e cs4 hs eb4 -e)

This means displace all the phrase one 8th note earlier in time.

Thank you all !

Best !

Julio

rotation

##### Share on other sites

Dear Janusz,

Thank you, but I did not find such a function. The gen-rotate is a different thing. And the other functions named rotations are more prone to serial manipulations. This length-displace would be more like a displace in time, rewriting the rhythm with an offset (positive or negative) based in a length, like 1/8 or -1/8, or 1/16 or -1/16. Similar to pcs-rhythm but not confined in a 12 module.

Best,

Julio

For example:

(setf omn '(q c4 p ten e d4 mp trem s e4 f stacc))

(gen-rotate 1 omn)

(s e4 f stacc q c4 p ten e d4 mp trem)

but

(length-displace 1/8 omn)

would be something like

(-e q c4 p ten e d4 mp trem s e4 f stacc)

Best !

Julio

##### Share on other sites

single-events then rotation

```(setf omn (single-events '(-e he. d4 mf e cs4 hs eb4)))

(gen-rotate -1 omn)
=> ((he. d4 mf) (e cs4 mf) (hs eb4 mf) (-e))

(gen-rotate -2 omn)
=> ((e cs4 mf) (hs eb4 mf) (-e) (he. d4 mf))```

Thanks, Janusz.

Best !

##### Share on other sites

Please make a sequence of bars with a result.

In the example from above you simply added a rest:

```(setf omn '(q c4 p ten e d4 mp trem s e4 f stacc)) ; 7/16

(append '(-e) omn)
=> (-e q c4 p ten e d4 mp trem s e4 f stacc) ; 9/16```

##### Share on other sites

Yes, Janusz

I just did it as a fast example to get the idea. Adding a rest is easy. The function would be useful especially when making the rhythms displace to a earlier point (with negative values, like -1/8 or -1/16) where the append would not work.. Would be interesting to keep the bar structure but in this case the function would necessarily involve rotation and not only displacing, in order to put the beginning note/rest to the end of the list or the final note/rest into the beginning of the list. If the bar size is disregarded just using append for forward displacing is enough, but how to make backward displacing ?

Best,

Julio

## Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
• #### Browser

• Video Gallery

• Lessons