Skip to content

Commit

Permalink
convert to console app
Browse files Browse the repository at this point in the history
  • Loading branch information
rageagainsthepc committed Nov 24, 2020
1 parent 9ad5d8e commit ccc09da
Show file tree
Hide file tree
Showing 21 changed files with 476 additions and 340 deletions.
1 change: 1 addition & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ root = true

[*]
charset = utf-8
end_of_line = lf
indent_style = space
indent_size = 4
insert_final_newline = true
Expand Down
101 changes: 101 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
name: Build

on:
push:
branches:
- master
pull_request:
release:
types:
- created

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
include:
- os: ubuntu-latest
dotnet-platform: linux-x64
- os: windows-latest
dotnet-platform: win-x64
- os: macos-latest
dotnet-platform: osx-x64

steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: '5.0.x'
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build

build-release:
if: github.event_name == 'release'
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
include:
- os: ubuntu-latest
dotnet-platform: linux-x64
- os: windows-latest
dotnet-platform: win-x64
- os: macos-latest
dotnet-platform: osx-x64

steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: '5.0.x'
- name: Build self-contained binary
run: dotnet publish -r ${{ matrix.dotnet-platform }} -p:PublishSingleFile=true,IncludeNativeLibrariesForSelfExtract=true --self-contained true
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: artifact_${{ matrix.dotnet-platform }}
path: |
./**/${{ matrix.dotnet-platform }}/publish/*
!./**/*.pdb
if-no-files-found: error


publish-release:
needs: build-release
if: github.event_name == 'release'
runs-on: ubuntu-latest
strategy:
matrix:
dotnet-platform: [linux-x64, win-x64, osx-x64]

steps:
- name: Download Artifact
uses: actions/download-artifact@v2
with:
name: artifact_${{ matrix.dotnet-platform }}
path: artifact
- name: Get release
id: get_release
uses: bruceadams/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Find artifact
id: find_artifact
run: echo "::set-output name=artifact_path::$(find artifact -type f)"
- name: Create zip archive
run: zip -j guitarprotomidi_${{ matrix.dotnet-platform }}.zip ${{ steps.find_artifact.outputs.artifact_path }}
- name: Upload release asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: guitarprotomidi_${{ matrix.dotnet-platform }}.zip
asset_name: guitarprotomidi_${{ matrix.dotnet-platform }}.zip
asset_content_type: application/zip
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
bin/
obj/
.vscode/
39 changes: 39 additions & 0 deletions GuitarProToMidi.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26124.0
MinimumVisualStudioVersion = 15.0.26124.0
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{F27A2087-5E55-4AE6-AC9E-D3A1703E5FF3}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GuitarProToMidi", "src\GuitarProToMidi.Console\GuitarProToMidi.csproj", "{CBC4E1FC-BCD4-41D4-B3CB-38B8EF75C34C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{CBC4E1FC-BCD4-41D4-B3CB-38B8EF75C34C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CBC4E1FC-BCD4-41D4-B3CB-38B8EF75C34C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CBC4E1FC-BCD4-41D4-B3CB-38B8EF75C34C}.Debug|x64.ActiveCfg = Debug|Any CPU
{CBC4E1FC-BCD4-41D4-B3CB-38B8EF75C34C}.Debug|x64.Build.0 = Debug|Any CPU
{CBC4E1FC-BCD4-41D4-B3CB-38B8EF75C34C}.Debug|x86.ActiveCfg = Debug|Any CPU
{CBC4E1FC-BCD4-41D4-B3CB-38B8EF75C34C}.Debug|x86.Build.0 = Debug|Any CPU
{CBC4E1FC-BCD4-41D4-B3CB-38B8EF75C34C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CBC4E1FC-BCD4-41D4-B3CB-38B8EF75C34C}.Release|Any CPU.Build.0 = Release|Any CPU
{CBC4E1FC-BCD4-41D4-B3CB-38B8EF75C34C}.Release|x64.ActiveCfg = Release|Any CPU
{CBC4E1FC-BCD4-41D4-B3CB-38B8EF75C34C}.Release|x64.Build.0 = Release|Any CPU
{CBC4E1FC-BCD4-41D4-B3CB-38B8EF75C34C}.Release|x86.ActiveCfg = Release|Any CPU
{CBC4E1FC-BCD4-41D4-B3CB-38B8EF75C34C}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{CBC4E1FC-BCD4-41D4-B3CB-38B8EF75C34C} = {F27A2087-5E55-4AE6-AC9E-D3A1703E5FF3}
EndGlobalSection
EndGlobal
23 changes: 18 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
# GuitarPro-to-Midi

Simply import the unitypackage into your Unity program and run the only scene "call_gp_decoder".
Click on the button to open any GuitarPro file.
A file "output.mid" will be created in the home folder of your Unity project.
GuitarPro-to-Midi is a cross-platform command line application for converting GuitarPro files to MIDI files.

(The cs-files in this repo are just for quick access and needn't be downloaded.)
## Features

Features:
- Reading GuitarPro 3 - 5 Files (based on the open python pyGuitarPro project)
- Reading GuitarPro 6 Files (using a simple bitwise compression and an xml structure with dictionary and ids)
- Reading GuitarPro 7 Files (packed like a normal zip-file and using a very large xml structure)
Expand All @@ -26,3 +23,19 @@ Features:
(I must mention that GuitarPro's native Midi export lacks far behind in this functionality!)

Please enjoy and create some great software with this!

## Getting started

You can download a self-contained binary for Windows, MacOS and Linux in the release
section of this repository on github.

Usage: `GuitarProToMidi path/to/GuitarProFile.gp`

The above command should create a file `GuitarProFile.mid` in the same directory as
the input file.

### Build and run from source

- Install dotnet core SDK (preferably at least v5.0)
- Run `dotnet build` in the project root folder
- Run `dotnet run --project src/GuitarProToMidi.Console/GuitarProToMidi.csproj -- path/to/GuitarProFile.gp`
Binary file removed gpxToMidi.unitypackage
Binary file not shown.
137 changes: 0 additions & 137 deletions open_gp_file.cs

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit ccc09da

Please sign in to comment.