-
Notifications
You must be signed in to change notification settings - Fork 3k
Labels
communityIssues particularly suitable for community contributors to work onIssues particularly suitable for community contributors to work onpluginsRelated to MuseScore's QML plugin framework (NOT VST/audio plugins)Related to MuseScore's QML plugin framework (NOT VST/audio plugins)
Description
Your idea
Add a new method replaceInstrument(part, instrumentId) to the Plugin API Score class that allows plugins to programmatically change the instrument of a part.
This would work similarly to the "Change Instrument" dialog in Staff/Part Properties, but accessible from QML plugins.
Example usage:
var part = curScore.parts[0];
curScore.replaceInstrument(part, "bandurria");Problem to be solved
Currently, plugins can read instrument information (instrumentId, longName, shortName) but cannot change instruments programmatically. Users need this functionality for:
- Porting scores between different ensembles.
- Batch processing multiple scores to standardize instrumentation
- Automating instrument assignments based on score analysis
The only workaround is manual interaction with the Change Instrument dialog, which cannot be scripted.
Prior art
- Feature request Make staff properties 'change instrument' and 'change channel' available in plugin API
- Forum discussion of users asking for this capability
- Existing methods like
appendPartByMusicXmlId()for instrument manipulation via Plugin API
Additional context
The instrumentId parameter should match IDs from instruments.xml (e.g., "pluck.guitar.nylon-string", "wind.flutes.flute").
Checklist
- This request follows the guidelines for reporting issues
- I have verified that this feature request has not been logged before, by searching the issue tracker for similar requests
Metadata
Metadata
Assignees
Labels
communityIssues particularly suitable for community contributors to work onIssues particularly suitable for community contributors to work onpluginsRelated to MuseScore's QML plugin framework (NOT VST/audio plugins)Related to MuseScore's QML plugin framework (NOT VST/audio plugins)
Type
Projects
Status
In progress