• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Import of certain ChordPro files fails
#1
I'm supporting a guy who just starts providing his fakebook in ChordPro format.
https://songbook19.my-free.website/
The whole book as one big ChordPro file is not the way MSP is intended to be used, so I extracted some of the songs from the file for initial tests.

The import of those files into MSP fails badly, both using "import local file" as "batch import".
Sciurius' ChordPro reference implementation from chordpro.org renders them correctly.
Any advice what's wrong with those files?
An example is attached.


Attached Files
.cho   A BETTER PLACE TO BE - Harry Chapin.cho (Size: 8.18 KB / Downloads: 7)
first language: German
Acer A1-830, Android 4.4.2 - HP x2 210 G2 Detachable, Win 10 22H2 - Huawei Media Pad T5, Android 8.0 - Boox Tab Ultra C, Android 11
www.moonlightcrisis.de - www.basdjo.de - www.frankenbaend.de


Reply
#2
OK, I have had a look at your attached file and the website - I can see one obvious issue with the website file - The Chordpro specification syntax reserves square brackets "[ ]" exclusively for CHORDS, however, in the website files there are lots of "non-chord" items - dashes, commas and even the word "INTRO:" enclosed in square brackets.

Regardless - most of these should still compile OK, Chorpro will just display them in "Chord" format.

However, your extracted file shows even more issues with added vertical bars and spaces inside the square brackets - e.g. "[| D |]" which do not show in the website version. Chordpro does not allow spaces inside the square brackets, if there are the compiler will fail. It happens in every App for Chordpro files I have ever used. 

There are also some instances in the website files where there are square brackets with a single space "[ ]" these also will not compile correctly.

You should also be aware that not all Apps use the full (or latest) Chordpro syntax - what compiles OK in one App may not do so in another!  




itsme pid='29783' dateline='1596353537']I'm supporting a guy who just starts providing his fakebook in ChordPro format.
https://songbook19.my-free.website/
The whole book as one big ChordPro file is not the way MSP is intended to be used, so I extracted some of the songs from the file for initial tests.

The import of those files into MSP fails badly, both using "import local file" as "batch import".
Sciurius' ChordPro reference implementation from chordpro.org renders them correctly.
Any advice what's wrong with those files?
An example is attached.[/quote]
Reply
#3
I have imported the song in the beta and it gives no problems.
The INTRO line (and some similar lines) are not transposed, I've already discussed that with Alvin.
Johan
johanvromans.nl — hetgeluidvanseptember.nl — mojore.nl -- howsagoin.nl
Samsung Galaxy Note S7FE (T733) 12.4", Android 13.0, AirTurn Duo & Digit (Gigs).
Samsung Galaxy Note S4 (T830) 10.5", Android 10.0 (maintenance and backup).
Samsung A3 (A320FL), Android 8.0.0 (emergency).
Reply
#4
@Little-Uke
Text in square brackets is displayed like chords, above the lyrics. It's just not transposed if the content between [ and ] is not a chord.
I use in particular [ ] and [|] successfully within chord sequences and it worked correctly in almost any program that I tried so far. See attachment

@sciurius
Thanks for investigating.
That's what I found: your reference application imports and renders those files correctly but MSP 2.9.6 crashes, both the Win10 as the Android version. You tried the new MSP beta, right?


Attached Files
.pro   SisterKate.pro (Size: 967 bytes / Downloads: 2)
first language: German
Acer A1-830, Android 4.4.2 - HP x2 210 G2 Detachable, Win 10 22H2 - Huawei Media Pad T5, Android 8.0 - Boox Tab Ultra C, Android 11
www.moonlightcrisis.de - www.basdjo.de - www.frankenbaend.de


Reply
#5
@itsme: I meant I imported the song in the MSPro beta and it gives no problems.

@all: You guys really need https://www.chordpro.org/chordpro/directives-env_grid, don't you?
Johan
johanvromans.nl — hetgeluidvanseptember.nl — mojore.nl -- howsagoin.nl
Samsung Galaxy Note S7FE (T733) 12.4", Android 13.0, AirTurn Duo & Digit (Gigs).
Samsung Galaxy Note S4 (T830) 10.5", Android 10.0 (maintenance and backup).
Samsung A3 (A320FL), Android 8.0.0 (emergency).
Reply
#6
@Sciurius: you were too fast. I read your answer again and edited my post.

Yes, the grid directives would be the better way to go, but it's not supported yet by MSP. That's why I have to keep my [|] workaround for now. Hopefully Mike will soon find the time to add grid and some other useful new ChordPro features
first language: German
Acer A1-830, Android 4.4.2 - HP x2 210 G2 Detachable, Win 10 22H2 - Huawei Media Pad T5, Android 8.0 - Boox Tab Ultra C, Android 11
www.moonlightcrisis.de - www.basdjo.de - www.frankenbaend.de


Reply
#7
My goal is to get grid directives and some of the other Chord Pro enhancements done after the next major update is released, while also working on the iOS version.'

As far as the crashes, I don't think the beta has any changes in it for chord pro files that aren't in version 2.9.6. This sounds to me almost like an issue with the automatic font size feature. Do you have that enabled by chance? If you disable that, does the file import correctly? Different device sizes can cause edge cases where text wraps at unusual points.

Mike
Reply
#8
@itsme The file imports into 2.9.6 equally well.
Johan
johanvromans.nl — hetgeluidvanseptember.nl — mojore.nl -- howsagoin.nl
Samsung Galaxy Note S7FE (T733) 12.4", Android 13.0, AirTurn Duo & Digit (Gigs).
Samsung Galaxy Note S4 (T830) 10.5", Android 10.0 (maintenance and backup).
Samsung A3 (A320FL), Android 8.0.0 (emergency).
Reply
#9
So it seems that I have to investigate the settings. By now I tried two devices, both fail. On Win10 MSP hangs after importing the file. I have to close MSP, after restarting it, the file is there, it has been imported correctly. On Android the import never ends.
first language: German
Acer A1-830, Android 4.4.2 - HP x2 210 G2 Detachable, Win 10 22H2 - Huawei Media Pad T5, Android 8.0 - Boox Tab Ultra C, Android 11
www.moonlightcrisis.de - www.basdjo.de - www.frankenbaend.de


Reply
#10
Clarified:
Text File Settings - Auto-Size Font: ON
in combination with VERY long {c: comments cause the problem.

Nevertheless MSP should not crash. Maybe it might help to implement a "Minimum Auto Font Size" similar to the existing "Maximum Auto Font Size". Probably it's not required for the user to configure that, a hard-coded limit should be enough.
Not urgent at all as we can avoid the issue easily.
first language: German
Acer A1-830, Android 4.4.2 - HP x2 210 G2 Detachable, Win 10 22H2 - Huawei Media Pad T5, Android 8.0 - Boox Tab Ultra C, Android 11
www.moonlightcrisis.de - www.basdjo.de - www.frankenbaend.de


Reply
#11
I'll work on reproducing the problem and try to put a fix in place if I'm able to figure out the root cause.

Thanks,
Mike
Reply
#12
No hurry. With Auto-Size Font OFF everything works fine
first language: German
Acer A1-830, Android 4.4.2 - HP x2 210 G2 Detachable, Win 10 22H2 - Huawei Media Pad T5, Android 8.0 - Boox Tab Ultra C, Android 11
www.moonlightcrisis.de - www.basdjo.de - www.frankenbaend.de


Reply




Users browsing this thread:
2 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2024 MyBB Group.