MusicXML icon indicating copy to clipboard operation
MusicXML copied to clipboard

Problem on getting the Score

Open nrigoni22 opened this issue 2 years ago • 12 comments

I'm trying to get the score from the HelloWorld example so I have created the HelloWorld.muscixml file in the bundle of the app and trying with this code

` class MusicManager: ObservableObject { var musicScore: Score? let url: URL = Bundle.main.url(forResource: "HelloWorld" , withExtension: "musicxml")!

init() {
    do {
        let string = try String(contentsOf: url)
        musicScore = try Score(data: string.data(using: .utf8)!)
    } catch {
        print(error.localizedDescription)
    }
    
}

} `

but I get this error:

The data couldn’t be read because it isn’t in the correct format.

nrigoni22 avatar Jan 19 '23 15:01 nrigoni22

True, tried it myself with even older versions of musicxml, but got the same error: The data couldn’t be read because it isn’t in the correct format.

I think the package is not working at this point at all ... @jsbean @DJBen @bwetherfield It would be great if you address this issue ...

Treata11 avatar Sep 03 '23 17:09 Treata11

As one of the former dev team, I am pretty certain that dn-m is discontinued or at least dormant. I would recommend trying another project.

mossheim avatar Sep 04 '23 05:09 mossheim

As one of the former dev team, I am pretty certain that dn-m is discontinued or at least dormant. I would recommend trying another project.

Are there any suggestions you can recommend to be used as a package dependency?

Treata11 avatar Sep 04 '23 06:09 Treata11

I have build a custom decoder when I found that this doesn’t work! It’s not a package dependency but if you want I can send you the class. I was created to work with my requirements

nrigoni22 avatar Sep 04 '23 06:09 nrigoni22

I have build a custom decoder when I found that this doesn’t work! It’s not a package dependency but if you want I can send you the class. I was created to work with my requirements

I really appreciate it if you share it @nrigoni22 ... & why haven't you published it as a package may I ask?

Treata11 avatar Sep 04 '23 06:09 Treata11

Simply because I haven’t had time to make it fully functional package

nrigoni22 avatar Sep 04 '23 07:09 nrigoni22

Simply because I haven’t had time to make it fully functional package

If the "custom decoder" that you've created is functional, I don't think it'll take you long to make a package out of it. If you needed any assistance, I'd be happy to help. Anyway, how are you going to share it with me right now? Is it available in one of your repos?

Treata11 avatar Sep 04 '23 07:09 Treata11

You can find the project in the attached link from a repo of my team mate for that project. Yes I would like to publish as a package maybe we can discuss about it. For now try it and it’s not perfect but I think it’s a very good starting point. Of course it could be optimized

HearMeOut

nrigoni22 avatar Sep 04 '23 07:09 nrigoni22

Are there any suggestions you can recommend to be used as a package dependency?

No, sorry.

mossheim avatar Sep 07 '23 09:09 mossheim

@Treata11 let me know what you think about my decoder when you try it. Thanks

nrigoni22 avatar Sep 08 '23 07:09 nrigoni22

Absolutely @nrigoni22 . But I believe this comment section on an open issue is not a suitable place ... I have questions & comments about your project, but I couldn't find your email on your profile. I'm looking forward to contact you via email or any other ways you'd prefer.

Treata11 avatar Sep 09 '23 10:09 Treata11

Yes you can contact me on my email [email protected]

nrigoni22 avatar Sep 09 '23 11:09 nrigoni22