Group Admins

  • Profile picture of Karim
  • Profile picture of Jean

OpenMusic

Public Group active 1 day, 15 hours ago

User group for OpenMusic and computer-aided composition. Visit the Forum for discussions.

Mapping a melody to a harmonic skin?

Author 3 Subscribed Users |
Profile photo of Dagfinn Koch
Dagfinn Koch

Dear colleagues, I hope you can help me with this matter: how to write an algorithm that is showing which positions in the harmonic skin the melody have. I do think it can be solved by using a kind of mapping, but I have not found a way to solve it.

I would like free to write melodies within the harmonic skin, that I can apply on other harmonic skins, and of course, make harmonies and block chords.

Best, Dagfinn

March 7, 2019 at 09:35 #29902
Profile photo of rubengjertsen
rubengjertsen

Dear Dagfinn,
I think you can simply use posn-match. First input is the reservoir of pitches as midicent, second is index order. You can replace the first input to apply the melody to a different scale. If it is short, you may get some ‘nil’, which you can use ‘remove’ ‘nil’ to get rid of.
For chords, you would need an omloop: add or subtract from the position (like Messiaens harmony) and do the posn-match within the loop.
Best
Ruben

March 7, 2019 at 10:14 #29905
Profile photo of Dagfinn Koch
Dagfinn Koch

Dear Ruben, thanks a lot. I have added a Patch and Screen Shot that I hope explains much better, what I want to achieve:

I would like to have the possibility to represent a melody in MIDI-cents within a harmonic skin, and then through ¬ęcybernetic magic¬Ľ, get a list of which positions they have within the harmonic skin.

The main reason for this is not of laziness, but being sure that pointers are correct. Also practical when importing MIDI- or Music-XML Files.

I’m still struggling to grasp the inner life of the OM Loop. But I’m on it. It would be great to work with chords also because then I can work with transformations within the harmonic skin. The Profile library doesn’t accept harmonic skins as far as I can see (and that’s a lot…)

Best, Dagfinn

Attachments:
  1. Skjermbilde-2019-03-07-kl.-10.50.58

    Skjermbilde-2019-03-07-kl.-10.50.58.png

  2. Skjermbilde-2019-03-07-kl.-10.50.58

    Skjermbilde-2019-03-07-kl.-10.50.58.png

  1. Oratio-for-baroque-viola.omp
  2. Oratio-for-baroque-viola.omp
March 7, 2019 at 11:21 #29926
Profile photo of anders
anders

Hi Dagfinn. #’position will do what you want here, you give it an item (ie. a note value) and ask for its position in a sequence (your skin). Check screen-shot.

If you need your lambda-patch to handle lists of notes (chords) within the melody, you can check whether the current note is a list, and in that case do a recursive call on the #’skin-match function.

In general, the whole set of sequence functions in CL are extremely powerful: http://www.lispworks.com/documentation/lw50/CLHS/Body/c_sequen.htm – if for instance you’ve got microtonal variations you want to match to a ‘closest class’ in your skin, you can use #’position-if with a suitable predicate.

March 7, 2019 at 14:29 #29941
Profile photo of Dagfinn Koch
Dagfinn Koch

Hello Anders, thanks a lot. I tested your algorithm now, and it is perfect! I would have never found that solution. And also thanks for the link, I do really lack a lot of basic knowledge on CL. Best, Dagfinn

March 7, 2019 at 14:48 #29944

You must be logged in to reply to this topic.

Log in now