Finding modules does not work properly in a merged project

Found a bug? Post it here.
Post Reply
User avatar
sk0
Posts: 63
Joined: Fri Oct 18, 2019 10:45 am
Location: Tokyo

Finding modules does not work properly in a merged project

Post by sk0 »

In the attached file "bug_find_merge.sunvox", when you try to find module 03, module 02 comes up instead.

How to reproduce:
- create an empty project
- merge the attached project file "bug_find_merge_template.sunvox", which was made by adding amplifiers and removing some of them (module 01,05)
Attachments
bug_find_merge_template.sunvox
(2.53 KiB) Downloaded 87 times
bug_find_merge.sunvox
(2.51 KiB) Downloaded 82 times
User avatar
NightRadio
Site Admin
Posts: 3941
Joined: Fri Jan 23, 2004 12:28 am
Location: Ekaterinburg. Russia
Contact:

Re: Finding modules does not work properly in a merged project

Post by NightRadio »

I just did as you described, then opened the FIND A MODULE window, entered "03" - as a result, module 03 was highlighted.
User avatar
sk0
Posts: 63
Joined: Fri Oct 18, 2019 10:45 am
Location: Tokyo

Re: Finding modules does not work properly in a merged project

Post by sk0 »

I tried again and found that typing "03" in the search box displayed module 03, and typing only "3" displayed module 02. It seems that the modules that are displayed when only one digit is entered in the box are different in the files "bug_find_merge_template.sunvox" and "bug_find_merge.sunvox".
Looking at this alone, it seems that when you enter all the digits you can find the desired module, but the search may not work for projects where the module number is 3 digits. For example, when I try to search for module AD in the attached project file and enter "AD" or "0AD" in the search box, it does not come up (actually, the module AD is in the module A9's connection)
Attachments
sk0 - Mimosa_compo_2021_version.zip
(49.21 KiB) Downloaded 77 times
User avatar
NightRadio
Site Admin
Posts: 3941
Joined: Fri Jan 23, 2004 12:28 am
Location: Ekaterinburg. Russia
Contact:

Re: Finding modules does not work properly in a merged project

Post by NightRadio »

For example, when I try to search for module AD in the attached project file and enter "AD" or "0AD" in the search box, it does not come up (actually, the module AD is in the module A9's connection)
This happened because the algorithm (iterating through all the modules sequentially) first found a module containing the string "AD" in its name (ADSR for example).
Should I prioritize searching by module numbers - I'm not sure
User avatar
sk0
Posts: 63
Joined: Fri Oct 18, 2019 10:45 am
Location: Tokyo

Re: Finding modules does not work properly in a merged project

Post by sk0 »

Thank you very much for the clear explanation. This seems to explain everything that is happening (it was caused by the module number changing in the merge. I didn't know I could search by module name :oops: ).
Some of my projects use 0x16d or 0x1ac modules, and therefore many of their module numbers contain alphabetic characters. It seems that there are not that many module numbers that apply to this case (among them are CE, DE, EC, AD, EE, and BA, for example), but as I frequently use module numbers for commands such as manipulating effects and have encountered this problem several times along the way, it would be nice to make it easier to search by module number.
For example, there could be a solution to separate the search input fields for module number and module name, and/or to allow the user to move back and forth between multiple candidates.
Post Reply