Auto Set Manipulation (... Retrograde, Inversion, etc.)
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
Could you give examples of how you would like this feature to work? Like step by step instructions and what the result should be ?
In reply to Could you give examples of by [DELETED] 5
I hope this is clear: http://dl.dropbox.com/u/3049618/retrograde.jpg
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 Interested as well in this feature... by padaneis
Thanks so much! It seems like it would be something simple to program (compared to some of the other stuff being done anyway).
Let me know if there's any way I can help.
In reply to Precisely! by Calem Bendell_
Sounds like a job for a plug-in. Could you write it?
In reply to Plugin? 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 Plugin? 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 The current plugin framework 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 Problem 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.
In reply to For simple notes (no tuplet) by [DELETED] 5
This is great! Even this really small plugin should speed things up immensely.
In reply to Great! by Calem Bendell_
I'm curious of what you'll do with it :) Please post your result !
In reply to I'm curious of what you'll do by [DELETED] 5
Thanks! Really quick! Is this plugin difficult to adapt to inversion? I have tried to understand it, but with still no results...
(I cannot see where maths reaaly acts). Many thanks.
Best wishes,
Padaneis
In reply to Thanks! 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 It could be simpler for 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
In reply to pitch by padaneis
As stated in the documentation, the pitch is a MIDI pitch between 0 and 127.
Here is a table describing the mapping between notes and midi pitch : http://en.wikipedia.org/wiki/File:NoteNamesFrequenciesAndMidiNumbers.svg
In reply to As stated in the by [DELETED] 5
Thank you so much. Sorry I missed that in the documentation.
Best regards,
Padaneis
In reply to For simple notes (no tuplet) by [DELETED] 5
This may sound stupid, but where is the plugin directory?
In reply to Plugin Directory? by davva
Seventh menu item in the right side menubar: Plugins.
In reply to For simple notes (no tuplet) by [DELETED] 5
I was so excited to use this until I realized it would only work for Linux. Is ther by any chance a mac version? I do know some basics of various programming languages but I'm not sure how to convert it manually. That or I'm being stupid and not using it right somehow.
In reply to I was so excited to use this… by Ethan Holland 2
What works only in Linux? This is a 7 years old post...
Plugins work differently now in MuseScore 2.x, but still in general the same on all platforms. The retrograde plugin has never been posted to 2.x though.
In reply to I was so excited to use this… by Ethan Holland 2
It's not Linux specific, but rather museScore version 1.x specific. This is a really old post and plugins got a new language in version 2. Since I don't know enough about the programming languages I don't know how difficult it would be to port it to version 2.
In reply to It's not Linux specific, but… by mike320
If we only knew exactly what "it" is.
In reply to If we only knew exactly what… by Jojo-Schmitz
The reply lines up with lasconic's retrograde utility post. I could be wrong.
In reply to The reply lines up with… by mike320
My assumption too, but this is far from clear. And as said that plugin has never been ported. (and I once tried and failed)
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
Has this been done yet??
In reply to Has this been done yet?? by Eliyahs
No, see https://musescore.org/en/node/7943#comment-801481
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 It's pretty odd/strange 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.