I currently don't know what is wrong, but I have two options right now:
**1. A Workaround
Investigate the thrown error**
The Workaround
Currently, instead of decoding an array of Signature, I decoded an array of beats an another array for beatType.
This would decode the data in the following way:
The workaround would be to write some logic for the decoded beats & beatTypes that would initialize an array of Time.Signature with the number of elements based on the count of beats & then return the decoded data using the created array.
Though it isn't a very convenient approach, it'll work at least for the decode process.
The Investigation
Involves more debugging & more reading for me unless some one with more skills identifies the issue & makes my life easier.
Time fails to decode array of
Time.Signature
Based on
Time.Measured
implementations& based on Time's elements in a common MusicXML
The array of Time.Signature is certainly an unkeyed element since no keys for this variable exist in a MusicXML file.
Unkeyed element of type
[Signature]
in Measured fails to be decodedThe line
self.values = try decoder.collectArray()
should be able to decode the array of `[Time.Signature] but throws an error in the debugger:I currently don't know what is wrong, but I have two options right now:
**1. A Workaround
The Workaround
Currently, instead of decoding an array of Signature, I decoded an array of
beats
an another array forbeatType
. This would decode the data in the following way:The workaround would be to write some logic for the decoded
beats
&beatType
s that would initialize an array ofTime.Signature
with the number of elements based on the count of beats & then return the decoded data using the created array. Though it isn't a very convenient approach, it'll work at least for the decode process.The Investigation
Involves more debugging & more reading for me unless some one with more skills identifies the issue & makes my life easier.