From 0101a2a22a15762b8fd9dbfaaa60655ea3da96c2 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Mon, 9 Jul 2018 08:58:36 +0100 Subject: audio/unsf: Added (convert .sf2 files to GUS-type patches). Signed-off-by: David Spencer --- audio/unsf/README | 21 +++++++++++ audio/unsf/git2targz.sh | 51 ++++++++++++++++++++++++++ audio/unsf/slack-desc | 19 ++++++++++ audio/unsf/unsf.SlackBuild | 90 ++++++++++++++++++++++++++++++++++++++++++++++ audio/unsf/unsf.info | 10 ++++++ 5 files changed, 191 insertions(+) create mode 100644 audio/unsf/README create mode 100644 audio/unsf/git2targz.sh create mode 100644 audio/unsf/slack-desc create mode 100644 audio/unsf/unsf.SlackBuild create mode 100644 audio/unsf/unsf.info (limited to 'audio/unsf') diff --git a/audio/unsf/README b/audio/unsf/README new file mode 100644 index 000000000000..38c97db2a373 --- /dev/null +++ b/audio/unsf/README @@ -0,0 +1,21 @@ +unsf (converts SoundFont .sf2 files into GUS-type instrument patches) + +UnSF is a tool to convert SoundFont (sf2) files into GUS patches. libunsf +is a library that is used by UnSF. + +Some reasons you might want to do such a thing are: + + - Your MIDI player can use GUS patches but doesn't know how to read + soundfonts. + + - You want a convenient way of substituting patches or reassigning + banks of instruments by editing GUS config files. + + - You need to modify patches by changing amplitude, stripping + envelopes, or make other changes that can easily be done by attaching + options in config files. + +Note: the set of patches created by unsf will be quite a bit larger +that the original .sf2 file. As an example, FluidR3_GM.sf2 (from +fluid-soundfont) is a 142MB file, and it converts to almost 2GB of patches +(size increased by a factor of 13.5). diff --git a/audio/unsf/git2targz.sh b/audio/unsf/git2targz.sh new file mode 100644 index 000000000000..5ef1cd911073 --- /dev/null +++ b/audio/unsf/git2targz.sh @@ -0,0 +1,51 @@ +#!/bin/sh + +# Create source tarball from unsf git repo, with generated version +# number. We don't include the git history in the tarball. + +# Note that this script doesn't need to be run as root. It does +# need to be able to write to the current directory it's run from. + +PRGNAM=unsf +CLONE_URL=https://github.com/psi29a/$PRGNAM.git + +# Last released version. Normally we'd use a git tag for this, but +# upstream mentions a version 1.1 in their README... and there's no +# 1.1 release tag! +RELVER=1.1 + +set -e + +GITDIR=$( mktemp -dt $PRGNAM.git.XXXXXX ) +rm -rf $GITDIR +git clone $CLONE_URL $GITDIR + +CWD="$( pwd )" +cd $GITDIR + +# Extract date from last entry in git log. git has so many useful +# options that it's a PITA to find the one you need... +DATE=$( git log --date=format:%Y%m%d --pretty=format:%cd -n1 ) + +VERSION=${RELVER}+git$DATE + +rm -rf .git +find . -name .gitignore -print0 | xargs -0 rm -f + +cd "$CWD" +rm -rf $PRGNAM-$VERSION $PRGNAM-$VERSION.tar.xz +mv $GITDIR $PRGNAM-$VERSION +tar cvfJ $PRGNAM-$VERSION.tar.xz $PRGNAM-$VERSION + +cat < $PKG/usr/man/man1/$PRGNAM.1.gz + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a README* LICENSE $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/audio/unsf/unsf.info b/audio/unsf/unsf.info new file mode 100644 index 000000000000..b8f7b8e75cb4 --- /dev/null +++ b/audio/unsf/unsf.info @@ -0,0 +1,10 @@ +PRGNAM="unsf" +VERSION="1.1+git20180608" +HOMEPAGE="https://github.com/psi29a/unsf" +DOWNLOAD="http://urchlay.naptime.net/~urchlay/src/unsf-1.1+git20180608.tar.xz" +MD5SUM="936232090224001eda5248f927f02618" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="B. Watson" +EMAIL="yalhcru@gmail.com" -- cgit v1.2.3