Skip to content

Conversation

@rogerb831
Copy link

This PR adds Studio One project scanning support to OwlPlug.

Changes

  • Add StudioOneProjectExplorer for .song file format (ZIP-based XML)
  • Add StudioOneAudioMixerPluginCollector for audio effect plugins
  • Add StudioOneSynthPluginCollector for instrument plugins
  • Integrate Studio One support into ProjectSyncTask
  • Add STUDIO_ONE to DawApplication enum
  • Implement plugin name normalization in PluginLookupService to handle platform suffixes (x64, x32, etc.)
  • Prioritize classInfo over deviceData for plugin name extraction to avoid instance names
  • Filter out autosave files from scanning
  • Add minimal debug-level logging matching other DAW patterns

Testing

Tested on Windows with Studio One project files. Successfully extracts:

  • Audio effect plugins from audiomixer.xml
  • Instrument plugins from audiosynthfolder.xml
  • Properly matches plugins using normalized names

Notes

  • Studio One .song files are ZIP archives containing XML files
  • Plugin names are extracted from classInfo to avoid duplicate instance names
  • Autosave files (containing "(Autosaved)" or in History folders) are automatically filtered

- Add StudioOneProjectExplorer for .song file format
- Add StudioOneAudioMixerPluginCollector for audio effect plugins
- Add StudioOneSynthPluginCollector for instrument plugins
- Integrate Studio One support into ProjectSyncTask
- Add STUDIO_ONE to DawApplication enum
- Add Studio One icon support in ApplicationDefaults
- Implement plugin name normalization in PluginLookupService
- Prioritize classInfo over deviceData for plugin name extraction
- Filter out autosave files from scanning
- Add minimal debug-level logging matching other DAW patterns
@coderabbitai
Copy link

coderabbitai bot commented Nov 10, 2025

Important

Review skipped

Auto reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@DropSnorz
Copy link
Owner

Hi @rogerb831, thanks for your PR !

I'll take a look in the next days.

- Extract helper methods in StudioOneProjectExplorer (extractMetadata, collectPlugins)
- Create StudioOneDomUtils utility class to eliminate code duplication
- Refactor StudioOneAudioMixerPluginCollector and StudioOneSynthPluginCollector to use utility methods
- Add targeted file extraction to ArchiveUtils to avoid Windows reserved name issues
- Update StudioOneProjectExplorer to extract only required files (metainfo.xml, Devices/audiomixer.xml, Devices/audiosynthfolder.xml)
- Handle extraction failures gracefully in StudioOneProjectExplorer
- Add null checks in ProjectSyncTask to prevent database errors when extraction fails
- All methods now under 20 lines to meet complexity requirements
@rogerb831
Copy link
Author

Hi @rogerb831, thanks for your PR !

I'll take a look in the next days.

Thanks for that. Fair warning, I'm not a dev by trade and this was heavily enabled by AI. But I'm happy to address whatever issues come up.

- Split long lines to stay under 120 characters
- Make variables final to address distance concerns
- Reorder overloaded extractFiles methods to be adjacent
- Fix line length issues in PluginLookupService, StudioOneProjectExplorer, and ArchiveUtils
@DropSnorz
Copy link
Owner

Hi @rogerb831, thanks for your PR !
I'll take a look in the next days.

Thanks for that. Fair warning, I'm not a dev by trade and this was heavily enabled by AI. But I'm happy to address whatever issues come up.

Don't worry too much with codacy code complexity, recent changes in complexity compute broke my previous rules, so it's sometimes failing even with acceptable complexity.

Copy link
Owner

@DropSnorz DropSnorz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @rogerb831

Thanks for your contribution, it could be great to have Studio One support in OwlPlug !

I've added some elements in #217 and reviewed your changes here.

Overall, the logic is valid and design aligns well with the existing principles.
Some adjustments and refactoring steps are required before we can move forward with this PR.

Let me know if you need help with any of the changes.

…llectors

- Fix redundant format detection logic (remove startsWith checks)
- Refactor StudioOneDomUtils to use private findAttributeByXId helper
- Fix log level for cleanup failure (debug -> error)
- Move extractPluginName/extractPluginFormat to StudioOneDomUtils utilities
- Move plugin name normalization from lookup to collectors (during sync)
- Revert PluginLookupService to original simple implementation

This addresses all maintainer feedback from PR DropSnorz#394:
- Removes redundant startsWith() checks in format detection
- Eliminates code duplication between collectors
- Improves code organization with shared utilities
- Normalizes plugin names during project sync for cleaner database data
@rogerb831
Copy link
Author

Hi @DropSnorz, I've addressed all the feedback from your review:

Fixed redundant format detection logic - Removed unnecessary startsWith() checks, now using only contains() for VST2/VST3 detection

Refactored StudioOneDomUtils - Created private findAttributeByXId() helper method and refactored all public methods to use it, eliminating code duplication

Fixed log level - Changed cleanup failure logging from debug to error in StudioOneProjectExplorer

Eliminated code duplication - Moved extractPluginName() and extractPluginFormat() methods to StudioOneDomUtils as static utilities, removing ~60 lines of duplicated code between collectors

Moved normalization to collectors - Plugin name normalization now happens during project sync (in collectors) rather than during lookup, ensuring cleaner database data as requested

Reverted PluginLookupService - Restored to original simple implementation since normalization is now handled during sync

All changes have been committed and pushed. The code is now cleaner, more maintainable, and follows the patterns you suggested. Ready for re-review!

…ix metadata extraction

- Simplify ArchiveUtils.extractFiles() to match maintainer's suggested implementation
  - Remove complex parent directory management and compression stream support
  - Use simpler approach with Collection<String> parameter
  - Align with maintainer's code suggestion exactly

- Fix metadata extraction in StudioOneProjectExplorer
  - Use only Document:Generator (remove Document:Creator check)
  - Add individual try-catch blocks for each XPath query
  - Set default values per query if extraction fails

This addresses the remaining maintainer feedback that was missed in the previous commit.
@rogerb831
Copy link
Author

Hi @DropSnorz, I realized we missed some additional feedback from your review. I've now addressed those items:

Simplified ArchiveUtils.extractFiles() - Refactored to match your suggested implementation exactly:

  • Removed complex parent directory management (PathCollection, collectParentDirectories, etc.)
  • Removed compression stream support (assumes ZIP format for Studio One .song files)
  • Simplified to a single method using Collection parameter
  • Aligned variable names and error messages with your suggestion

Fixed Document:Generator usage - Now only uses Document:Generator attribute (removed Document:Creator check) as requested

Individual XPath exception handling - Each XPath query now has its own try-catch block with appropriate default values, making the code more robust

All changes have been committed and pushed. The code now fully addresses all your feedback and is ready for re-review!

@rogerb831 rogerb831 requested a review from DropSnorz January 7, 2026 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants