Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The file generated by Gp7Exporter cannot show multiple tracks in Guitar Pro 8 #1238

Closed
1 task done
Jeswang opened this issue Aug 4, 2023 · 11 comments · Fixed by #1241
Closed
1 task done

The file generated by Gp7Exporter cannot show multiple tracks in Guitar Pro 8 #1238

Jeswang opened this issue Aug 4, 2023 · 11 comments · Fixed by #1241
Assignees
Labels
area-file-formats Related to supported file formats platform-all Affects all platforms state-needs-investigation

Comments

@Jeswang
Copy link

Jeswang commented Aug 4, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

When a score conrtains multiple tracks, Guitar Pro 8 cannot open the file.

With an exported score with one track, Guitar Pro 8 cannot visualize multiple tracks.

There seems to be memory leak in Guitar Pro 8 when it deals with files without ScoreViews or LayoutConfiguration.

image Screenshot 2023-08-04 at 1 39 36 PM

Expected Behavior

The exported file should be able to add more tracks, and enable mutiple track view in Guitar Pro.

Screenshot 2023-08-04 at 1 31 56 PM

Steps To Reproduce

You can create a file from Guitar Pro 8 which shows multiple tracks fine, and then import and export the file. Now the file is broken.

const alphaTab = require("@coderline/alphatab");
const fs = require("fs");

const fileData = fs.readFileSync("Example.gp");
const settings = new alphaTab.Settings();
const score = alphaTab.importer.ScoreLoader.loadScoreFromBytes(
	new Uint8Array(fileData),
	settings
);

const exporter = new alphaTab.exporter.Gp7Exporter()
const data = exporter.export(score, settings);

fs.writeFile("Example-output.gp", data, (err) => {
	if (err) {
		console.log(err);
	} else {
		console.log('File written successfully!');
	}
});

console.log(score.title);

reproduce_files.zip

Link to jsFiddle, CodePen, Project

No response

Found in Version

1.3-alpha

Platform

Node.js

Environment

- **OS**: macOS, 13.5 (22G74)
- Guitar Pro 8: 8.1.0 Build 48

Anything else?

No response

@Jeswang Jeswang added the state-needs-triage Bug not triaged yet. label Aug 4, 2023
@Danielku15 Danielku15 added 🕷️ type-bug area-file-formats Related to supported file formats state-accepted This is a valid topic to work on. platform-all Affects all platforms and removed state-needs-triage Bug not triaged yet. labels Aug 5, 2023
@Danielku15
Copy link
Member

Thanks for reporting this problem and the detailed analysis. It is a bit unfortunate that Guitar Pro still has some special proprietary binary files in their format. But even if it might be a bug in GP8 (which we could report) I guess it should be possible to write files which makes GP7 and 8 happy. It is a bit a gray zone with the reverse engineering of file formats but as we talk about interopability here it should be fine. Maybe Arobas would be even willing to share some insights about their format like they did in the old days with publishing the GP4 file format description.

@Danielku15
Copy link
Member

Intermediate findings: The problem seems to be in the PartConfiguration the LayoutConfiguration seems optional and not making a difference (e.g. when deleting the file in the GP-zip). But it seems the way we generate the PartConfiguration is rather wrong compared to what GP8 is doing. Will have to do some deeper reverse engineering there because the file is mandatory. But if we write it wrong that's not good.

@Danielku15
Copy link
Member

Problems identified and fixed.

@Jeswang
Copy link
Author

Jeswang commented Aug 7, 2023

Thanks for the quick responses! Now I can open a multi-track score from the generator (with the new change, it's by default rendering one track)! But I think it still have the same issue when clicking the button to "Switch single track / multitrack".

Screenshot 2023-08-07 at 8 04 53 AM

reproduce.zip

@Danielku15
Copy link
Member

@Jeswang Do you still experience a bug? I opened your provided example files and it works fine for me with Guitar Pro 8 (8.1.0 Build 48) on Windows. I see you are on a Mac.

I re-created your testfile with GP8 on windows and sent it through alphaTab to export it and also it works fine. Can you try following two files on your environment and check what happens?
multi-track-win.zip

@Danielku15 Danielku15 added state-needs-investigation and removed state-accepted This is a valid topic to work on. labels Dec 24, 2023
@Danielku15 Danielku15 moved this from Todo to In Progress in Version 1.3 Dec 24, 2023
@Jeswang
Copy link
Author

Jeswang commented Dec 25, 2023

Yep, confirmed that Guitar Pro 8 still cannot render mutlipe tracks with the files attached in the above comment.

image

@Danielku15
Copy link
Member

@Jeswang Do I understand you correctly that you also get an error when you try to open multi-track-win.zip/Example.gp? Or does it only happen with multi-track-win.zip/Example-output.gp?

Example.gp has been created with Guitar Pro 8 and was not touched by alphaTab at all. This would mean Guitar Pro 8 has a bug and we cannot do much from our side.

@Danielku15
Copy link
Member

Ping @Jeswang any feedback on my last question?

@Jeswang
Copy link
Author

Jeswang commented Jan 27, 2024

Sorry for the slow response.

@Jeswang Do I understand you correctly that you also get an error when you try to open multi-track-win.zip/Example.gp? Or does it only happen with multi-track-win.zip/Example-output.gp?

I can open multi-track-win.zip/Example.gp fine without any error when showing multiple tracks, and only encounter issues with multi-track-win.zip/Example-output.gp.

Example.gp has been created with Guitar Pro 8 and was not touched by alphaTab at all. This would mean Guitar Pro 8 has a bug and we cannot do much from our side.

@Danielku15
Copy link
Member

@Jeswang: I double checked now many things again and I cannot reporduce the problem with Guitar Pro 8.1.1 Build 17. I took the files from reproduce.zip and multi-track-win.zip but I can open all files and switch tracks without problems.

at-issue-1238.mp4

From the screenshot I realized that there might be something else important: The example files have two tracks one with an empty name and one with "Stell Guitar" but in your screenshot you have two empty strings and one track is muted.

Are there more details you can share about your environment? I tested on macOS Sonoma using the files we have shared until now.

@Danielku15
Copy link
Member

Closing this bug as it is not reproducible for me. Tested the same files under the same Reported version and everything is find. If you have more input on how to reproduce this let me know.

@Danielku15 Danielku15 closed this as not planned Won't fix, can't repro, duplicate, stale Apr 28, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in Version 1.3 Apr 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-file-formats Related to supported file formats platform-all Affects all platforms state-needs-investigation
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants