Questions about the API for Score Format Plugins
blueapple25130 opened this issue · comments
Looking at the current MilliSim API for Score Format Plugins,
the compiler seems to compile MilliSim.SourceScore
into MilliSim.RuntimeScore
.
I think that the feature should be in MilliSim and not neccessary for external plugins.
[Example: flow of compile with external plugin]
1. (plugin).ScoreReader.ReadAsSourceScore
(something source file)
-> (plugin).SourceScore
(convert by (plugin).Extensions.ToMilliSimSourceScore)
-> MilliSim.SourceScore
2. (plugin).ScoreCompiler.Compile
(MilliSim.SourceScore)
-> MilliSim.RuntimeScore
(the 2nd process is unnecessary for external plugin)
Yes, this is a problem in current IScoreCompiler
design.
I abstracted IScoreCompiler
in order to provide an open access to SourceNote
and RuntimeNote
. It is reserved for the ExtraProperties
property on SourceNote
and RuntimeNote
. This property is not placed yet. It would be of type Dynamic
, to store custom information on ordinary notes. For example, note attribute, custom command, etc. This feature should be used with custom Element
s, to achieve those effects in Deleste, or something like this.
However the basic compile methods are quite the same, so I think these methods can be wrapped in a helper class instead of making everyone copy the code. A custom IScoreCompiler
just need to call the methods to create a basic RuntimeNote
(with timing info, etc.) and then fill in compiler-specific properties if there is any.
Right now I'm solving other bugs. I'll see if I can make this change in a few days.
BTW, thanks.