Jump to content

replacing or removing intrevals from a melody


Recommended Posts

Is there a way to remove or replace  intervals from a melody? I am

looking for a function like chord-interval-replace but for a melody instead of chords.

Link to comment
Share on other sites

Convert the pitch list to intervals, remove the unwanted intervals, then back to pitches.

(setf pitches '(g0 fs1 e2 bb4 eb3 e3 fs3 a4 b3 d4 e4 fs4 g4 a5))
(setf intervals (pitch-to-interval pitches))
=> (11 10 30 -19 1 2 15 -10 3 2 2 1 14)

(setf new (filter-remove '(2 19 30) intervals))
(interval-to-pitch new :start 'g4)
=> (g4 fs5 e6 a4 bb4 cs6 eb5 fs5 g5 a6)

 

or

(interval-ambitus 11 '(g0 fs1 e2 bb4 eb3 e3 fs3 a4 b3 d4 e4 fs4 g4 a5))

 

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