Music Search

21/5/2024 Bug fix: plugin was not dealing properly with distances between notes of an octave or higher. Also NOTE: plugin ignores ties. This may give false positives.
5/18/2024 Fixed some bugs
Major update 5/15/2024
The posted plugin yielded lots of false positives for arbitrary (single notes, chord, rests) sequences. It has been renamed SearchChordInversions.qml and should only be used for that purpsose. It finds identical, transposed and inverted chords of the selection sequence.
The new MusicSearch.qml correctly handles search for identical or transposed arbitrary sequences that match the selection in the same file. MusicSearch+ has also been updated to search in multiple files.


EDIT6: A new variant (MU3.6 and probably Windows specific) (MusicSearch+.qml) allows for searching a group of files in one go.
Proceed as follows:
Load the attached file (Selection.mscz). This must be the leftmost file in MU. Now load a bunch of files to be searched (I have routinely loaded 35 lead sheets at a time without any problems. I think the only limitation is available memory). Select the first file (Selection.mscz), enter what you want searched for, select it, and run the plugin from the Plugin Creator window so you can see error messages. Be patient. Output comes in a Notepad file.


EDIT5: plugin now works with 'mixed' selections (chords, rests, single notes)
EDIT4: The plugin now also works with a selection of single notes and detects transpositions of the selected pattern. The code has Smartquit() and may work in MU4.
Caveat: More than 1 rest at beginning of selection does not work properly.

EDIT3: clarified what you can select
EDIT2: fixed some bugs: the score pointer ran off the deep end...
EDIT: for background see
https://musescore.org/en/node/345409
my comments from Aug 24 2023 on

This MU 3.6 plugin finds all equivalents of your selection in a score. (Select 1 or more chords or measures on 1 or more staves. The plugin detects the match with the selection but does not report it. So if you select everything you get 0 matches reported)

By equivalents I mean not only exact copies but also transpositions and/or inversions of selected chords. In single note melodies only exact copies are detected.

Adjust var measure in a plain text editor as needed: default is 1920 for 4/4
In scores with time sig changes the reported measure will be wrong

There is output to console.log and to Notepad.

The plugin is ‘slow’ on complex scores. Just be patient. The piano version of La Valse by Ravel (755 measures) takes 2’15’’ on my ‘reasonable’ system.

Issue Tracker

API compatibility
3.x
Plugin categories
Analysis
Upload
Attachment Size
Selection.mscz 5.58 KB
SearchChordInversions.qml 45.87 KB
MusicSearch.qml 8.53 KB
MusicSearch+.qml 10.54 KB