pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/audio/xmms-meta-csound Import xmms-meta-csound-0.1, a ...
details: https://anonhg.NetBSD.org/pkgsrc/rev/31efb669b07b
branches: trunk
changeset: 465212:31efb669b07b
user: ben <ben%pkgsrc.org@localhost>
date: Wed Dec 24 00:12:50 2003 +0000
description:
Import xmms-meta-csound-0.1, a XMMS meta input script for csound.
This allows XMMS to play unified Csound scores.
An example unified Csound score may be found at
ftp://ftp.netbsd.org/pub/NetBSD/misc/ben/example.csd.gz
Many Csound songs are distributed in separate orchestra, score, and sample
files. A script to convert these to a unified Csound score file is at
ftp://ftp.netbsd.org/pub/NetBSD/misc/ben/orcsco2csd.sh
diffstat:
audio/xmms-meta-csound/DESCR | 9 ++++
audio/xmms-meta-csound/Makefile | 27 +++++++++++++
audio/xmms-meta-csound/PLIST | 2 +
audio/xmms-meta-csound/distinfo | 1 +
audio/xmms-meta-csound/files/csound.sh | 70 ++++++++++++++++++++++++++++++++++
5 files changed, 109 insertions(+), 0 deletions(-)
diffs (129 lines):
diff -r e6fa7a15948d -r 31efb669b07b audio/xmms-meta-csound/DESCR
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/xmms-meta-csound/DESCR Wed Dec 24 00:12:50 2003 +0000
@@ -0,0 +1,9 @@
+This is an input script for xmms-meta-input which allows xmms to play
+unified Csound scores using csound.
+
+An example unified Csound score may be found at
+ftp://ftp.netbsd.org/pub/NetBSD/misc/ben/example.csd.gz
+
+Many Csound songs are distributed in separate orchestra, score, and sample
+files. A script to convert these to a unified Csound score file is at
+ftp://ftp.netbsd.org/pub/NetBSD/misc/ben/orcsco2csd.sh
diff -r e6fa7a15948d -r 31efb669b07b audio/xmms-meta-csound/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/xmms-meta-csound/Makefile Wed Dec 24 00:12:50 2003 +0000
@@ -0,0 +1,27 @@
+# $NetBSD: Makefile,v 1.1.1.1 2003/12/24 00:12:50 ben Exp $
+#
+
+DISTNAME= xmms-meta-csound-0.1
+WRKSRC= ${WRKDIR}
+CATEGORIES= audio
+MASTER_SITES= # empty
+DISTFILES= # empty
+
+MAINTAINER= ben%netbsd.org@localhost
+HOMEPAGE= # empty
+COMMENT= XMMS meta input script for csound
+
+DEPENDS+= csound-dev-[0-9]*:../../audio/csound-dev
+DEPENDS+= sox-[0-9]*:../../audio/sox
+
+USE_BUILDLINK2= yes
+
+do-build:
+ ${SED} "s,XXXPREFIXXXX,${PREFIX},g" \
+ <${FILESDIR}/csound.sh >${WRKSRC}/csound.sh
+
+do-install:
+ ${INSTALL_SCRIPT} ${WRKSRC}/csound.sh ${PREFIX}/lib/xmms/Input/Meta
+
+.include "../../audio/xmms-meta-input/buildlink2.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r e6fa7a15948d -r 31efb669b07b audio/xmms-meta-csound/PLIST
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/xmms-meta-csound/PLIST Wed Dec 24 00:12:50 2003 +0000
@@ -0,0 +1,2 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2003/12/24 00:12:50 ben Exp $
+lib/xmms/Input/Meta/csound.sh
diff -r e6fa7a15948d -r 31efb669b07b audio/xmms-meta-csound/distinfo
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/xmms-meta-csound/distinfo Wed Dec 24 00:12:50 2003 +0000
@@ -0,0 +1,1 @@
+$NetBSD: distinfo,v 1.1.1.1 2003/12/24 00:12:50 ben Exp $
diff -r e6fa7a15948d -r 31efb669b07b audio/xmms-meta-csound/files/csound.sh
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/xmms-meta-csound/files/csound.sh Wed Dec 24 00:12:50 2003 +0000
@@ -0,0 +1,70 @@
+#!/bin/sh
+
+case "$1" in
+play)
+ file - <"$2" | grep -q gzip
+ if [ $? -eq 0 ]
+ then
+ tempfile="$$.csd"
+ gzip -dc <"$2" >"$tempfile"
+ i="$tempfile"
+ else
+ unset tempfile
+ i="$2"
+ fi
+ channels=1
+ grep -q '^nchnls[[:space:]=]' "$i"
+ if [ $? -eq 0 ]
+ then
+ channels=$(sed -n '/^nchnls/s/.* \([0-9]\)*$/\1/p' <"$i")
+ fi
+ if [ $channels -lt 1 -o $channels -gt 2 ]
+ then
+ echo "Unsupported number of channels." >&2
+ if [ ! -z "$tempfile" ]
+ then
+ rm -f "$tempfile"
+ fi
+ exit 1
+ fi
+ if [ $channels -eq 1 ]
+ then
+ XXXPREFIXXXX/bin/csound32 -d -ostdout -h -s -r 44100 -k 4410 \
+ "$i" 2>/dev/null | XXXPREFIXXXX/bin/sox -t raw \
+ -r 44100 -s -w -c 1 - -t raw -r 44100 -s -w -c 2 -
+ else
+ XXXPREFIXXXX/bin/csound32 -d -ostdout -h -s -r 44100 -k 4410 \
+ "$i" 2>/dev/null
+ fi
+ if [ ! -z "$tempfile" ]
+ then
+ rm -f "$tempfile"
+ fi
+ exit 0
+ ;;
+isOurFile)
+ file - <"$2" | grep -q gzip
+ if [ $? -eq 0 ]
+ then
+ tempfile="$$.csd"
+ gzip -dc <"$2" >"$tempfile"
+ i="$tempfile"
+ else
+ unset tempfile
+ i="$2"
+ fi
+ if [ $(dd if="$i" bs=19 count=1 2>/dev/null | strings) = \
+ "<CsoundSynthesizer>" ]
+ then
+ retval=0
+ else
+ retval=1
+ fi
+ if [ ! -z "$tempfile" ]
+ then
+ rm -f "$tempfile"
+ fi
+ exit $retval
+ ;;
+esac
+exit 1
Home |
Main Index |
Thread Index |
Old Index