# Interpolation with pitches fra harmonic reservoir

Hello,

I am new to Open music. I am trying to find a way to interpolate between two chords where the pitches are chosen from a harmonic reservoir (collection of pitches).

I assume a solution would be using the patch from tutorial 18 on interpolation, then adding a rounding function that rounds each pitch in the output from the interpolation function (the sequence of interpolated chords/pitches) to the nearest available pitch in the harmonic reservoir.

If someone could help or point me in the right direction, I would highly appreciate it!

Hi benstsen,

Yes indeed, the tutorial 18 does that (check out the CHORD-SEQ (D).

If you are looking for something else, ie interpolation with restricted notes, you are not looking for the right method. In this case can you provide an example.

Best
K

Hi,

You can always check Esquisseâ€™s `best-transp` function.

All the best,
AntĂłnio

1 Like

Hi again,

thank you for the answers! Yes, I am looking for interpolation with restricted notes, as you suggested.

An example would be:
chord A (7200 7625 7950) should interpolate down to chord B (5000 5425 5750). Letâ€™s say, in 20 steps. In the 20-step sequence from A to B, only the following (octave-specific) pitches are available for use (5000 5425 5750 6000 6400 6700 7200 7625 7950). Each chord in the interpolation sequence should have 3 pitches.

best-transp does not seem to be the right solution, as far as I can tell.

What would be a better method? I also should add, I would like to include up to 1/8 notes if possible, like in the example. Or, if my suggestion is a workable solution, how can it be done?

Thank you!

Hi,

In order to interpolate you can follow the steps of tutorial 18. You only need to add an extra step, you need to run every chord through a rounding function like Esquisseâ€™s `best-transp` or OMTristanâ€™s `vocod-transp`.

All the best,
AntĂłnio

Hi everyone!

If you allow me, recently Iâ€™ve created a function to do this with melodic profiles and I believe it works for interpolations too. This is the visual version of the function â€śclosest-note-in-domainâ€ť with a possible solution for the problem (see the image and the patch attached):

interpolation-with-harmonic-reservoir.omp (16.5 KB)

I hope it helps.

Best,
Paulo

Hi,

As a rounding function I made this a while ago. Just input the list of (lists of) MIDIcents you want to transform in the first inlet and the â€śharmonic reservoirâ€ť in the second inlet. Et voilĂ :
om-snap.lisp (1.1 KB)

You only need to download and place `om-snap.lisp` in the `user` subfolder of your workspace in order to have it available as a function at all times.

All the best,
AntĂłnio

1 Like

Thank you so much for the help, both of you!

All the best,

2 Likes