'Midi Editor' plugin: a way to manipulate midi events in Musescore.
The idea for this plugin came to me while reflecting on some requests (some a bit weird) seen in this forum. Some were difficult to achieve, especially since it is one thing to manipulate the properties of notes in the abstract, another is to modify their real representation in a notation software.
For this reason, i thought i could make some 'conversions' by treating the notes as midi events, then leaving the task of translating them into a graphic representation to the software itself.
This plugin was born, initially, as an integration of 'Automatic addition of Dynamics' that i created some time ago, but it has expanded with the passing of the days, with the progressive addition of DAW-like features.
It is based on a freeware utility (you can run it in the 'prompt' command line window - Windows users - or in the Linux 'Terminal' with 'wine' installed) that you can find on the net: 'midicsv' which can turn a midi file into a text file (.csv) and vice versa.
Even this plugin, which uses the Musescore API only for its display, could be transformed (with some modifications) into an independent executable.
Once the midi file has been converted to csv, through the plugin it is possible:
1) assign the velocity of the notes the value of a Control Change (typically the number 7, but it can be changed). This operation, as far as i know, is not feasible even with Cubase's 'Logical Editor' (which however allows you to do the opposite) and therefore could make the plugin interesting for multiple purposes.
Options: you can delete the CC values; it is possible to set the velocity to a fixed value (the CC value) or keep the previous value in proportion to the CC value (in this case the CC value is then set to 127). The plugin also offers the ability to assign the value to the 'note off' event, more for demonstration intent than for practical purposes: for those who are able to do so, the plugin could be customized for other types of replacement.
Through a context menu (right click) linked to 'Apply' button, you can also change the action of the button:
2) remove or add a fixed value to the velocity;
3) extract the lyrics;
4) extract the text;
In the lower part we can:
5) lengthen or shorten the durations of the notes (and other events) according to the percentages indicated, adapting the time signature to the desired conversion if necessary. It is possible, for example, by choosing 'Triplet' (66.6% periodic) to transform a 12/8 piece into a piece with C time with triplets; by choosing 150% it is possible to achieve the opposite. 25%, 50%, 200% are the most logical conversions, for the others (75% 125% 175%)... someone will be able to imagine a possible use.
Through a context menu linked to 'Stretch Midi' button, you can also change the action of the button:
6) 'Quantize' i don't think it needs explanations. For values, 'D' = 'Dotted', 'T' = 'Triplet'.
All of these transformations can be applied to notes only, or to all events (Default), and are adapted to the 'division' (ticks for quarter) of the MIDI file.
'Get Time Sign' it is used to set the time signature present in the midi file (only the first one is read); then you can edit it as you like.
Warning: Musescore, for reasons i don't know, when exporting a midi, if there are 'chord symbols' it also exports those as notes, which i don't think is desirable: better to delete them by making a copy of the file.
The changes appear in the text box; you can save your changes to a file with a default name and destination, or by copying the contents of the text box, and then proceed to its retransformation into a MIDI file.
Available for Musescore 3.6-4.4 on the plugins download page. Recommended for advanced users.
Comments
Interesting.
Note that Linux users don't need wine to run midicsv. There is a makefile in the sourcecode. Untar, type make and you have 2 native Linux executables
In reply to Interesting. Note that Linux… by graffesmusic
Certainly, as you prefer. There is not much difference (having 'wine' I did not think of this possibility), in any case thanks for the clarification that it will certainly be useful to someone.
In reply to Interesting. Note that Linux… by graffesmusic
I'm not an 'exclusive' Linux user, i often use Windows too...
I fixed 2 small 'bugs' and posted the last versions. Until i find more...or if i add (as i think) other functions.