Auto Set Manipulation (... Retrograde, Inversion, etc.)

• Nov 14, 2010 - 04:42

Would it be possible to add a set of functions in MuseScore that can do tasks such as retrograde and inversion very quickly? If done well, this could make MuseScore far more advanced (though many would of course consider such functions merely gimmicks).

I'm sorry this may not sound very clear... I've been experimenting with retrograde and inversion a lot lately, but it's a real pain to do by hand. I think if it were easier, it would be extremely popular again. You can do amazing things with these.


Comments

I would be interested in this feature too! "Inversion" means the following:
1) arbitrarily choose a note;
2) turn ascending intervals into descending ones and vice versa.
By a mathematical point of view this corresponds to the function x->K-x, where K corresponds to the choice of the arbitrary note.
For example, "Frère Jacques" melody is C D E C C D E C E F G E F G ....
Once "inverted" with respect to C it would be: C Bb Ab C C Bb Ab C Ab G F Ab G F .....
In this case: C=0, D=2, E=4, F=5, G=7 (tempered semitones) in the original melody, whereas
C=0, Bb=-2, Ab=-4 G=-5, F=-7 tempered semitones in the "transposed" melody.

"Retrograde", instead, means "played backwards", from the last note to the first one, as in the illustration.

All the above would be quite useful for contrapunctal music.
Thank you very much.
Best wishes,
Padaneis

In reply to by cwhysall

I wish I could code that well. I'm going to school for it soon, I think. Then I'll be able to help that well.

Edit: I can read code and interpret it enough to change it if that's any use. I tend to be extremely buggy though. I've never received training in any language other than html. This is my last year of highschool though, and I'll have a lot more time to explore coding, even if I choose some other major (US or Canadian school system)

In reply to by cwhysall

The current plugin framework can't modify or remove existing notes, so it would be hard to have this kind of workflow. A possible way could be to create a new score from the selection and inversing/reversing before writing the score. Unfortunatly, it will not work with tuplets since the plugin framework can't handle them...

In reply to by [DELETED] 5

Sorry if this sounds dumb (and a waste of your time), but could you please briefly explain why it can't modify tuplets?

And what do you mean by inversing before writing the score? Wouldn't that still just be putting in notes one by one?

Would a plugin be capable of automating inversion/retrograde for simple notes?

In reply to by Calem Bendell_

For simple notes (no tuplet) and no voice, it's possible. The attached plugin works on a selection.
Select a couple of notes/ chords/rest on one staff and one voice without tuplet
Select Plugins -> retrograde selection and a new score will be created containing a retrograde of the select music.
It does not work with tie neither.

A short demo:

To install, copy the file in your plugin directory and rename to retrograde.js.

I agree than a special paste function would be better.

Attachment Size
retrograde.txt 4.01 KB

In reply to by padaneis

It could be simpler for inversion (if again, you don't care about triplet, ties etc...). In the retrograde plugin, I put all the chords and rests of the selection in an array, then reverse the array and create a new score where I write the chords and rests.
For inversion, you could write the second score while browsing the selection.

In reply to by [DELETED] 5

After a bit of studying, I begin to understand the script. Could you please tell me how the "pitch" is considered?
To be more precise, here:
function addNote(chord, pitch)
{
var note = new Note();
note.pitch = pitch;
chord.addNote(note);
};
I should change to something like:

function addNote(chord, pitch)
{
var note = new Note();
note.pitch = K - pitch; (*)
chord.addNote(note);
};
I cannot figure, however, which kind of data should be "K" in "K-pitch" (*)
Many thanks,
best wishes,
Padaneis

Hello,
as to me, I am afraid I am not able to write this plug-in either: I am a mathematician and a musician, but I have no programming skills at the moment.
I remain at your disposal for mathematical issues related to this problem. Many thanks.
Best wishes,
Padaneis

Maybe further explanation of this issue could help: the "inversion"/"retrograde" operations should be analogous to the "copy and paste" one, i.e.
1) first select a segment
2) copy it to the "clipboard"
3) invert or reverse the content of the clipboard
4) paste the result elsewhere in the score.
In fact no existing notes should be modified. This would help while writing canons.
So the "inversion" module should be analogous to the "transport" one but, instead of being based upon to operation x--> K+x should be based upon the operation x-->K-x. By default, the segment could be transposed by respect to its first note, since "transport" could be applied thereafter if needed.

Also, some kind of workaround could help too, e.g. the "clipoaboard" (containing a segment) being able to export/import notes in numeric format: in this case "inversion" or "reversion" could be performed by an electronic sheet and then imported again into musescore.
Many thanks.
Best wishes,
Padaneis

It's pretty odd/strange to me that Musescore does not have this built in.

I have an old Cakewalk Pro Studio 9.0 and we're talking probably from the late 90's and it has retrograde and inversion built in. Literally select the phrase you want, select Retrograde or Invert and you're done. This should be standard if its 22 years later and still not implimented. Just my personal opinion. But because it's not featured I'll import my score as a midi into CWP9.0 and just do what needs to be done without downloading any additional plugins...

In reply to by aelevy81

Takes only a couple of minutes to download and install the plugins, then from then on, it truly is as simple as select and run the command. Much, much, much faster than going through a whole export / import process every time you want to do this. But anyhow, MuseScore 4 will provide these by default.

Do you still have an unanswered question? Please log in first to post your question.