From the to-do list: MPA V1.0: Older issues and tasks
✔ Sound library: Auto tagging imported files part 1
(Completed by Pierre henri Seylan on December 18, 2018)
Comments
Pierre henri Seylan on August 12, 2018:
This task is about putting in place the structure for a new feature, the auto tagging of imported sound library files.
The goal is to auto-tag the user files with meaningful tags. This mechanism will be fairly complex, but will be built step by steps.
After the new API integration, further tagging will be implemented, for now we should start putting in place the basic mechanism and the structure.
1. Initial files tagging: In the first step of the implementation, we will tag files only based on the files tittle. This means that during the files import, the app performs an analysis of the file's tittle and extract tags which are matching with tags of the sound library.
The matching tags are then assigned to the file.
For example: If a file is named house piano.wav The the tags "house" and "piano" are assigned to the file.
Note: The JUCE scanning functionality used for plugin and projects scanning is maybe a good choice (just a suggestion)
Requirements:
1.1 Combinable: The tags should be combinable, meaning that several tags can be extracted from the files tittle.
1.2 Factory and user tags: When searching for matches, we are using both the factory and user tags.
1.3 Tempo tags: The analysis should also look for tempo values. Here we are however ignoring values not in the range 40-300 For example, if a file is named "drum loop 126.wav" the matching tags are "drum" + "loop" + "126" (126 being the tempo)
1.4 Case for folders: When a folder is imported, the folder name is also analyzed. The matching tags are applied to all files within the folder. Here we should pay attention to the current structure and functionalities:
This works regardless of the option "ignore folders structure"
This also works for nested folders (see below)
In the case of nested folders, the tags are applied for all the nested files, for example:
-folder level 1 -files of folder level 1 -folder level 2 -files of folder level 2
In the above example, the "files of folder level 1" are all tagged with the folder 1 tags. The files of folder level 2 are all tagged with the folder 1 tags + folder 2 tags
2. Structure and implementation:
2.1 Analysis step: The auto tagging should occur during the file's import, this should be done in a separate step before or after the file's hash calculation. Let me know if you think this is not a good idea.
We should make sure that it doesn't conflict with certain features:
auto-adding files to collections/folders
uploading files after uploads are re-enabled
2.2 Analysis module: In the code, this functionality should be implemented as a separate module, something along the lines of "SS file analysis"
This must be done in a way that other developers can later enhance the module to perform additional analysis.
Note that the order of the analysis should be clear, since the module will grow with other types of analysis.
For example, if later we are adding a "file root key" analysis which analyzes the audio file frequency to determine the root key, we should be able to insert it at a specific step of the analysis process.
Karim Alabtakh on August 22, 2018:
done
Pierre henri Seylan on August 22, 2018:
Feedback:
Overall it works pretty good.
so far 1 issue found: If characters identified as tags are duplicated, the file is tagged twice. I guess this adds up if the characters are appearing more than 2 times in the file name.
For example: For the file named "Alienlead_lead3.wav" The tag "lead" was added twice.
We should add a check so that a tag already assigned to file can't be assigned again.
PS: This should probably be a general fix, so that it works also when the user is tagging the files manually.
Comments
Pierre henri Seylan on August 12, 2018:
The goal is to auto-tag the user files with meaningful tags.
This mechanism will be fairly complex, but will be built step by steps.
After the new API integration, further tagging will be implemented, for now we should start putting in place the basic mechanism and the structure.
1. Initial files tagging:
In the first step of the implementation, we will tag files only based on the files tittle.
This means that during the files import, the app performs an analysis of the file's tittle and extract tags which are matching with tags of the sound library.
The matching tags are then assigned to the file.
For example:
If a file is named house piano.wav
The the tags "house" and "piano" are assigned to the file.
Note: The JUCE scanning functionality used for plugin and projects scanning is maybe a good choice (just a suggestion)
Requirements:
1.1 Combinable:
The tags should be combinable, meaning that several tags can be extracted from the files tittle.
1.2 Factory and user tags:
When searching for matches, we are using both the factory and user tags.
1.3 Tempo tags:
The analysis should also look for tempo values.
Here we are however ignoring values not in the range 40-300
For example, if a file is named "drum loop 126.wav"
the matching tags are "drum" + "loop" + "126" (126 being the tempo)
1.4 Case for folders:
When a folder is imported, the folder name is also analyzed.
The matching tags are applied to all files within the folder.
Here we should pay attention to the current structure and functionalities:
- This works regardless of the option "ignore folders structure"
- This also works for nested folders (see below)
In the case of nested folders, the tags are applied for all the nested files, for example:-folder level 1
-files of folder level 1
-folder level 2
-files of folder level 2
In the above example, the "files of folder level 1" are all tagged with the folder 1 tags.
The files of folder level 2 are all tagged with the folder 1 tags + folder 2 tags
2. Structure and implementation:
2.1 Analysis step:
The auto tagging should occur during the file's import, this should be done in a separate step before or after the file's hash calculation.
Let me know if you think this is not a good idea.
We should make sure that it doesn't conflict with certain features:
2.2 Analysis module:
In the code, this functionality should be implemented as a separate module, something along the lines of "SS file analysis"
This must be done in a way that other developers can later enhance the module to perform additional analysis.
Note that the order of the analysis should be clear, since the module will grow with other types of analysis.
For example, if later we are adding a "file root key" analysis which analyzes the audio file frequency to determine the root key, we should be able to insert it at a specific step of the analysis process.
Karim Alabtakh on August 22, 2018:
Pierre henri Seylan on August 22, 2018:
Overall it works pretty good.
so far 1 issue found:
If characters identified as tags are duplicated, the file is tagged twice.
I guess this adds up if the characters are appearing more than 2 times in the file name.
For example:
For the file named "Alienlead_lead3.wav"
The tag "lead" was added twice.
We should add a check so that a tag already assigned to file can't be assigned again.
PS: This should probably be a general fix, so that it works also when the user is tagging the files manually.
Karim Alabtakh on August 23, 2018: