dn-m / MusicXML

Implementation of the musicXML specification in Swift
MIT License
70 stars 19 forks source link

Problem on getting the Score #237

Open nrigoni22 opened 1 year ago

nrigoni22 commented 1 year ago

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.

Treata11 commented 1 year ago

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 ...

mossheim commented 1 year ago

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.

Treata11 commented 1 year ago

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?

nrigoni22 commented 1 year ago

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

Treata11 commented 1 year ago

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?

nrigoni22 commented 1 year ago

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

Treata11 commented 1 year ago

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?

nrigoni22 commented 1 year ago

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

mossheim commented 1 year ago

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

No, sorry.

nrigoni22 commented 1 year ago

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

Treata11 commented 1 year ago

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.

nrigoni22 commented 1 year ago

Yes you can contact me on my email nickrig95@me.com