GithubHelp home page GithubHelp logo

sfarkxtc's Introduction

sfarkxtc

Build Status

sfArk extractor, console version

Converts soundfonts in the legacy sfArk v2 file format to sf2

Building

Prerequisites

Building

$ sudo make install

that's it!

Usage

$ ./sfarkxtc somefile.sfArk somefile.sf2

sfarkxtc's People

Contributors

edwardbetts avatar maltouzes avatar raboof avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sfarkxtc's Issues

can`t extract old version sfark with recent git

[reandr@kuh3h3 all-sf] $ sfarkxtc "Arachno SoundFont - Version 1.0.sfArk" ArachnoSoundFont-Version-1.0.sf2
========================================================================
sfarkxtc 3.0-SNAPSHOT (using sfArkLib version: 300)
copyright (c) 1998-2002 melodymachine.com, distributed under the GNU GPL
========================================================================
Uncompressing Arachno SoundFont - Version 1.0.sfArk to ArachnoSoundFont-Version-1.0.sf2...
*** ERROR - Invalid length for .txt file (apparently 6320129691294369312 bytes) - This file appears to be corrupted.
cpu time taken 0 ms
Result: Invalid compressed data (file is corrupt)  errorcode 7
*** FAILED ***


[reandr@kuh3h3 all-sf] $ ls -al  "Arachno SoundFont - Version 1.0.sfArk"
-rw-rw-r-- 1 reandr reandr 73981184 12월  5  2010 Arachno SoundFont - Version 1.0.sfArk
[reandr@kuh3h3 all-sf] $ file "Arachno SoundFont - Version 1.0.sfArk"
Arachno SoundFont - Version 1.0.sfArk: sfArk compressed Soundfont : Arachno SoundFont - Version 1.0.sf2



[reandr@kuh3h3 all-sf] $ */sfarkxtc  "Arachno SoundFont - Version 1.0.sfArk" ArachnoSoundFont-Version-1.0.sf2
======================================================================
sfArkXTc 1.03 (using sfArkLib version: 224)
copyright (c) 1998-2004 melodymachine.com, free for non-commercial use
======================================================================
Uncompressing Arachno SoundFont - Version 1.0.sfArk to ArachnoSoundFont-Version-1.0.sf2...
Created notes file: Arachno SoundFont - Version 1.0.txt
Progress: 100%
Created ArachnoSoundFont-Version-1.0.sf2 (151763 kb) successfully.

Time taken 114.36 seconds
Result: Successful

Missing header file

$ make
g++ -L/usr/local/lib sfarkxtc.cpp -lsfark -lz -o sfarkxtc
sfarkxtc.cpp:37:10: fatal error: sfArkLib.h: No such file or directory
#include <sfArkLib.h>
^~~~~~~~~~~~
compilation terminated.
make: *** [: sfarkxtc] Error 1

Compiling question concerning sfArkLib.h

Hallo raboof,

Tried to "make" after putting sfArkLib.h (from sfArkLib) in the same directory. Still fails with "file not found" error.
I should say i almost never "built" or worked with git before. Should this work or do i really need to install sfArkLib before or is the location of sfArkLib.h not correct? (you say in the readme "If you just want to convert an sfArk file to sf2, check out https://github.com/raboof/sfArkXTm" but then mention sfArkLib again as a prerequisite.)
Dank voor your work!

(edit) ...Ahum...shame on me. Looked good at my system and figured out where my header files live and the function of -dev packages and such :) . Will read some more before asking dumb questions.
Compiled sfArkLib (with just an "unused value" warning) and sfArkxtc without problem. Thanx

This won't compile

It fails on line 37:

#include "sfArkLib.h"

which isn't included in the repo.

sfarkxtc: error while loading shared libraries: libsfark.so: cannot open shared object file: No such file or directory

On Fedora x86_64:

I have installed sfArkLib, and I have libsfark.so at /usr/local/lib, and sfArkLib.h at /usr/local/include/, but I cannot run sfarkxtc after building and installing it, neither in its build directory, neither from /usr/local/bin/. The error I get upon issuing the command sfarkxtc is:

sfarkxtc: error while loading shared libraries: libsfark.so: cannot open shared object file: No such file or directory

I tried creating a pkg-config file libsfark.so.pc at the /usr/local/lib/pkgconfig/ location with the following contents:

prefix=/usr/local
exec_prefix=${prefix}
includedir=${prefix}/include
libdir=${exec_prefix}/lib

Name: libsfark
Description: The sfArkLib library
Version: 2.23
Cflags: -I${includedir}
Libs: -L${libdir} -llibsfark

Still, sfarkxtc complains about lack of libsfark.so.

Known good sfArk files to test? The ones I tried all fail.

Hi,
Got some sounds fonts from http://www.thejazzpage.de/index1.html
Very nice jazz midis. Tried out your utility but have no known good sfArks to test with.
This is on Fedora 31 x64. Below is the error and file.
Thanks in advance,
Flint Jr

[flintjr@zowie69 Downloads]$ sfarkxtc jAzZgUiTaRL-5v21.sfArk jAzZgUiTaRL-5v21.sf2

sfarkxtc 3.0-SNAPSHOT (using sfArkLib version: 300)
copyright (c) 1998-2002 melodymachine.com, distributed under the GNU GPL

Uncompressing jAzZgUiTaRL-5v21.sfArk to jAzZgUiTaRL-5v21.sf2...
*** ERROR - Invalid length for jAzZgUiTaRL-5v21.license.txt file (apparently -7976547325793271497 bytes) - This file appears to be corrupted.
cpu time taken 0 ms
Result: Invalid compressed data (file is corrupt) errorcode 7
*** FAILED ***

Here is the file:

jAzZgUiTaRL-5v21.sfArk.gz

If built in linux x64, sfarkxtc can't correctly extract files

I think the issue stems from the code assuming that sizeof unsigned long is 4, but when building in a linux x64 environment, sizeof unsigned long is 8.

Currently, in linux x64, everything appears to build, but decoding any file, even valid files, gives the error Invalid length... Result: Invalid compressed data (file is corrupt) errorcode 7. The issue is also mentioned here: http://linux-audio.4202.n7.nabble.com/sfArk-for-Linux-git-repo-access-td93130.html#a93161

Possible approaches,

  • add a static assert+explanation so that it won't build if sizeof unsigned long != 4
  • alter the makefiles to make x86 builds. the following worked for me:
    • added a -m32 to the CXXFLAGS and LD sections of the makefiles
    • I needed to install the g++-multilibs and zlib1g-dev:i386 packages
  • fix the issue by using a known-length type like uint32_t. Possibly use the patch in the link above.

Which do we think is best? I know I can code at least the first 2.

Works only for sf in current dir

If you try to call the tool with a complete path like

./sfarkxtc /Users/me/SoundFonts/Fluid.sfArk /Users/me/SoundFonts/Fluid.sf2

it fails with errorcode 9 (at least on OSX). It works, if you cd to the soundfont’s directory.

Please at least document, that it doesn’t work with paths, but only with files.

Uncompress FluidR3_GM.sfArk without checksum errors

The resulting .sfArk appears okay, but the program reports a checksum failure.

The difference occurs well into the file (at 0x08d4b080 of the sf2, so almost at the end of the ~142MB file...

arnouten@jaga:/dev/sfArkXTm$ diff -u <(hexdump -C ../sfATest/x) <(hexdump -C ../sfATest/FluidR3\ GM.SF2)
--- /dev/fd/63 2013-08-24 17:04:54.215564541 +0200
+++ /dev/fd/62 2013-08-24 17:04:54.215564541 +0200
@@ -9245220,14 +9245220,12 @@
08d4b050 54 64 f4 64 91 65 30 66 d0 66 6f 67 0d 68 ae 68 |Td.d.e0f.fog.h.h|
08d4b060 4b 69 ea 69 87 6a 28 6b c5 6b 64 6c 02 6d a2 6d |Ki.i.j(k.kdl.m.m|
08d4b070 42 6e df 6e 7f 6f 1d 70 bb 70 5a 71 f9 71 97 72 |Bn.n.o.p.pZq.q.r|
-08d4b080 35 73 d5 73 74 74 15 75 b6 75 57 76 f8 76 99 77 |5s.stt.u.uWv.v.w|
-08d4b090 3a 78 db 78 7c 79 1d 7a be 7a 5f 7b 00 7c a1 7c |:x.x|y.z.z_{.|.||
-08d4b0a0 42 7d e3 7d 84 7e 25 7f c6 7f 67 80 08 81 a9 81 |B}.}.
%...g.....|
-08d4b0b0 4a 82 eb 82 8c 83 2d 84 ce 84 6f 85 10 86 b1 86 |J.....-...o.....|
-08d4b0c0 e0 f8 e2 f8 e4 f8 e6 f8 e5 f9 4e fc c1 ff 45 03 |..........N...E.|
-08d4b0d0 d7 05 0d 07 56 07 91 07 55 08 6a 09 d5 09 7a 08 |....V...U.j...z.|
-08d4b0e0 d6 04 3c ff 7a f8 23 f1 07 e9 43 df cd d2 24 c3 |..<.z.#...C...$.|
-08d4b0f0 bb b0 af 9c e7 87 6e 72 8d 5b 65 42 91 26 7d 08 |......nr.[eB.&}.|
+08d4b080 35 73 d5 73 74 74 15 75 b3 75 52 76 ee 76 8d 77 |5s.stt.u.uRv.v.w|
+08d4b090 2d 78 cd 78 6b 79 06 7a a8 7a 47 7b e5 7b e7 83 |-x.xky.z.zG{.{..|
+08d4b0a0 87 84 23 85 c4 85 61 86 02 87 a0 87 3c 88 dc 88 |..#...a.....<...|
+08d4b0b0 7a 89 1a 8a b9 8a 59 8b f5 8b 95 8c 34 8d d3 8d |z.....Y.....4...|
+08d4b0c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+*
08d4b100 4c 49 53 54 b6 14 03 00 70 64 74 61 70 68 64 72 |LIST....pdtaphdr|
08d4b110 34 1c 00 00 47 75 6e 20 53 68 6f 74 00 00 e9 01 |4...Gun Shot....|
08d4b120 20 09 e9 01 30 30 30 00 7f 00 00 00 00 00 8b 00 | ...000.........|

Available from various sources, like http://www.synthfont.com/SoundFonts/FluidR3_GM.sfArk and http://soundfonts.homemusician.net/files/FluidR3122501.zip

Compile on Mac

On Mac OS X 10.10, I had to add "-L/usr/local/lib" to "LDLIBS" flag to make it compile.
This is because the sfArkLib's "make install" copies things over there, which is not part of the default dynamic library path.

If you have time, you might want to add this to your make file.
Thanks.

Tagging

Can you tag of a release? I'm working on a debian package.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.