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

How to use this program? #28

Open
femboykirby opened this issue Oct 14, 2023 · 17 comments
Open

How to use this program? #28

femboykirby opened this issue Oct 14, 2023 · 17 comments

Comments

@femboykirby
Copy link

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.

@DivannKokos
Copy link

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

@rageagainsthepc
Copy link
Owner

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

@Metaphysics0
Copy link

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

@femboykirby
Copy link
Author

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.

@rageagainsthepc
Copy link
Owner

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

@Metaphysics0
Copy link

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.

Screen.Recording.2023-11-06.at.13.18.39.mov

@rageagainsthepc
Copy link
Owner

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

@femboykirby
Copy link
Author

femboykirby commented Nov 15, 2023

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.

@rageagainsthepc
Copy link
Owner

rageagainsthepc commented Nov 15, 2023

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.

@femboykirby
Copy link
Author

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

@rageagainsthepc
Copy link
Owner

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

@femboykirby
Copy link
Author

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?

@DivannKokos
Copy link

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.

@femboykirby
Copy link
Author

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.

@DivannKokos
Copy link

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.

@rageagainsthepc
Copy link
Owner

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.

@DivannKokos
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants