Skip to content

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

@Jeswang

Description

@Jeswang

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

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions