GuitarPro-to-Midi icon indicating copy to clipboard operation
GuitarPro-to-Midi copied to clipboard

How to use this program?

Open femboykirby opened this issue 1 year ago • 17 comments

Sorry, I'm a bit of a newbie to this kind of stuff and I can't figure out how to use this program (I'm on a Mac btw). When I unzip the zip file it creates a file named GuitarProToMidi that only lets me open it using TextEdit, which shows a bunch of gibberish. I'm not sure what to do or how to use it, and I would appreciate some assistance.

femboykirby avatar Oct 14 '23 05:10 femboykirby

i'm think it has something to do with security settings or something like that i don't own mac, but i've previously run hackintosh and if i remember correctly, you open apps from internet somehow differently try googling it around, maybe you will find something helpful in the internet

DivannKokos avatar Oct 14 '23 05:10 DivannKokos

I don't own a mac either, but I would guess that you need to make that file executable.

rageagainsthepc avatar Oct 14 '23 16:10 rageagainsthepc

do the following:

  1. Install dotnet core SDK
  2. install the dotnet CLI (for mac)
  3. open up Terminal, and cd into the project directory.
  4. Run dotnet build
  5. Run dotnet run --project src/GuitarProToMidi.Console/GuitarProToMidi.csproj -- <path/to>/GuitarProFile.gp

Metaphysics0 avatar Nov 02 '23 17:11 Metaphysics0

When I run dotnet build, it gives me this error: error MSB4025: The project file could not be loaded. Data at the root level is invalid. Line 1, position 1. Also, it might be relevant that I'm on an arm64 Mac and not an Intel Mac.

femboykirby avatar Nov 02 '23 21:11 femboykirby

The instructions posted by @Metaphysics0 assume that you have downloaded the source code. Performing dotnet build on the compiled binary from the release section won't work. And yes, it is very relevant that you own an Apple Silicon Mac because there is no binary for those in the release section yet. ;)

rageagainsthepc avatar Nov 06 '23 10:11 rageagainsthepc

I have an M1 mac and i'm able to use it just fine.

@femboykirby you can try this. I compiled the project into a single executable script for M1 (using a rust based package called Warp), and it might be easier for you to use.

Download it here.

After downloading it ^, you can use it by doing this in the following:

  1. open up Terminal
  2. run the following command: chmod +x <path-to-single-exec-script>
  3. run <path-to-single-exec-script> <path-to-guitar-pro-file>, replacing the paths with the files.

On a mac, you can get the path of any file by right clicking it, holding down the option key, and selecting copy Pathname.

See screenshot. I'm also creating a simple web app to convert guitar pro files to midi files, which uses this in the backend. it will be live in the next coming days, and i'll write here when it's live.

https://github.com/rageagainsthepc/GuitarPro-to-Midi/assets/47161696/7772b448-9f4c-48d7-b568-0ebafbe1a0e1

Metaphysics0 avatar Nov 06 '23 11:11 Metaphysics0

@femboykirby I've taken the liberty of adding a new Apple Silicon target to the prebuilt binaries in the release section. Just look for the zip file containing osx-arm64 in the name.

rageagainsthepc avatar Nov 15 '23 15:11 rageagainsthepc

When I navigate to the directory in terminal and try to run the command, it just tells me zsh: command not found: GuitarProToMidi Do I need to do something else first besides navigating to the directory?

@Metaphysics0 I also tried following your instructions but it gives me this error:

Error: Unhandled value. (Parameter 'harmonicFret')
Actual value was 0.

femboykirby avatar Nov 15 '23 16:11 femboykirby

You need to prefix your command with ./ (like this ./GuitarProToMidi). Otherwise zsh will not look for the executable in the current directory.

As for the error: That just looks like a bug.

rageagainsthepc avatar Nov 15 '23 17:11 rageagainsthepc

Now it says zsh: permission denied: ./GuitarProToMidi If I use terminal to change the file permissions to read, write, and execute, it says zsh: killed ./guitarprotomidi

femboykirby avatar Nov 15 '23 18:11 femboykirby

On newer versions of MacOS, binaries need to be signed. You can sign it yourself with this command: codesign --force --deep -s - ./GuitarProToMidi. Maybe I should add a note about this in the README... :thinking:

rageagainsthepc avatar Nov 16 '23 10:11 rageagainsthepc

Thanks, that seems to have worked. I can convert most files perfectly fine, but any files that have harmonics in the gp4 or gp5 format seem to give this error: Error: Unhandled value. (Parameter 'harmonicFret') Actual value was 0. Is this a known bug or is it something I'm doing wrong?

femboykirby avatar Nov 16 '23 20:11 femboykirby

you can't actually do harmonic in midi (well, you can if your VSTi or for whatever you are need midi, can do harmonics, but you're gonna need to do manually, via keyswitches/however your vsti is doing the harmonics), so harmonics just won't be moved to the midi, and that's all. if you got the midi after the export, and it is fine, despite you having errors, then it is probably okay.

DivannKokos avatar Nov 17 '23 04:11 DivannKokos

uhh yeah I probably should have mentioned but if the file has any harmonics then it doesn't give me a midi file at all. it just gives me the error and doesn't do anything else.

femboykirby avatar Nov 17 '23 04:11 femboykirby

hm, it is strange, when i had this error, the program still produced the midi file for me. although i don't think so (i'm not sure), but maybe this behaviour difference is because i'm on windows. try maybe doing with -v parameter (it goes in the end, after whole command), and maybe it will say something else, that do not allow you to get the result.

DivannKokos avatar Nov 17 '23 07:11 DivannKokos

you can't actually do harmonic in midi

That might be true, but this project still handles harmonics. There is a calculation which transforms harmonics to midi notes. There seems to exist a lookup table for certain harmonic values and the value 0 simply isn't in there. That's why the program exits with an error.

rageagainsthepc avatar Nov 17 '23 16:11 rageagainsthepc

well yes midi notes, i just thought guitar pro is something like "you have this note and this note is harmonic" like a checkmark/parameter to note though i don't remember missing anything when ive got this error myself in the past...

DivannKokos avatar Nov 17 '23 23:11 DivannKokos