aboutsummaryrefslogtreecommitdiff
path: root/audio
diff options
context:
space:
mode:
Diffstat (limited to 'audio')
-rw-r--r--audio/stretchplayer/README20
-rw-r--r--audio/stretchplayer/doinst.sh9
-rw-r--r--audio/stretchplayer/fine_tuning.diff156
-rw-r--r--audio/stretchplayer/setcap.sh1
-rw-r--r--audio/stretchplayer/slack-desc19
-rw-r--r--audio/stretchplayer/stretch_25_125.diff35
-rw-r--r--audio/stretchplayer/stretchplayer.1131
-rw-r--r--audio/stretchplayer/stretchplayer.SlackBuild142
-rw-r--r--audio/stretchplayer/stretchplayer.info12
-rw-r--r--audio/stretchplayer/stretchplayer.rst112
10 files changed, 637 insertions, 0 deletions
diff --git a/audio/stretchplayer/README b/audio/stretchplayer/README
new file mode 100644
index 000000000000..ab8f0f079cc5
--- /dev/null
+++ b/audio/stretchplayer/README
@@ -0,0 +1,20 @@
+stretchplayer (audio player with time stretch and pitch shift)
+
+StretchPlayer is an audio file player that allows you to change the
+speed of the song without changing the pitch. It will also allow
+you to transpose the song to another key (while also changing the
+speed). This is a very powerful tool for musicians who are learning
+to play a pre-recorded song. Its features include Time Stretch (25% to
+125% of song speed, without changing pitch), Pitch Shift (up or down 1
+octave), A/B repeat, and lots of keyboard accelerators.
+
+The player supports all the audio formats that libsndfile supports,
+which currently includes OGG/Vorbis, WAV, W64, AIFF, SND, and
+FLAC. Note that neither libsndfile nor StretchPlayer supports MP3
+files for patent liability reasons.
+
+This package uses POSIX filesystem capabilities to execute with
+elevated privileges (required for realtime audio processing). This
+may be considered a security/stability risk. Please read
+http://www.slackbuilds.org/caps/ for more information. To disable
+capabilities, pass SETCAP=no to the script.
diff --git a/audio/stretchplayer/doinst.sh b/audio/stretchplayer/doinst.sh
new file mode 100644
index 000000000000..3e5691a052b5
--- /dev/null
+++ b/audio/stretchplayer/doinst.sh
@@ -0,0 +1,9 @@
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
+fi
+
+if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
+ if [ -x /usr/bin/gtk-update-icon-cache ]; then
+ /usr/bin/gtk-update-icon-cache usr/share/icons/hicolor >/dev/null 2>&1
+ fi
+fi
diff --git a/audio/stretchplayer/fine_tuning.diff b/audio/stretchplayer/fine_tuning.diff
new file mode 100644
index 000000000000..10aa30e43010
--- /dev/null
+++ b/audio/stretchplayer/fine_tuning.diff
@@ -0,0 +1,156 @@
+diff -Naur stretchplayer-0.503/src/Engine.cpp stretchplayer-0.503.patched/src/Engine.cpp
+--- stretchplayer-0.503/src/Engine.cpp 2010-07-18 00:44:20.000000000 -0400
++++ stretchplayer-0.503.patched/src/Engine.cpp 2014-02-28 17:43:36.000000000 -0500
+@@ -46,6 +46,7 @@
+ _sample_rate(48000.0),
+ _stretch(1.0),
+ _pitch(0),
++ _fine(0),
+ _gain(1.0)
+ {
+ QString err;
+@@ -153,7 +154,7 @@
+ uint32_t srate = _audio_system->sample_rate();
+
+ _stretcher->setTimeRatio( srate / _sample_rate / _stretch );
+- _stretcher->setPitchScale( ::pow(2.0, double(_pitch)/12.0) * _sample_rate / srate );
++ _stretcher->setPitchScale( ::pow(2.0, double(_pitch)/12.0 + double(_fine)/1200.0) * _sample_rate / srate );
+
+ uint32_t frame;
+ uint32_t reqd, gend, zeros, feed;
+diff -Naur stretchplayer-0.503/src/Engine.hpp stretchplayer-0.503.patched/src/Engine.hpp
+--- stretchplayer-0.503/src/Engine.hpp 2010-07-18 00:44:20.000000000 -0400
++++ stretchplayer-0.503.patched/src/Engine.hpp 2014-03-01 11:26:57.000000000 -0500
+@@ -81,6 +81,21 @@
+ //_state_changed = true;
+ }
+
++ int get_fine() {
++ return _fine;
++ }
++ void set_fine(int fin) {
++ if(fin < -99) {
++ _fine = fin % 100;
++ set_pitch(get_pitch() - 1);
++ } else if (fin > 99) {
++ _fine = fin % 100;
++ set_pitch(get_pitch() + 1);
++ } else {
++ _fine = fin;
++ }
++ }
++
+ /**
+ * Clipped to [0.0, 10.0]
+ */
+@@ -146,6 +161,7 @@
+ float _sample_rate;
+ float _stretch;
+ int _pitch;
++ int _fine;
+ float _gain;
+ std::auto_ptr<RubberBand::RubberBandStretcher> _stretcher;
+ std::auto_ptr<AudioSystem> _audio_system;
+diff -Naur stretchplayer-0.503/src/PlayerWidget.cpp stretchplayer-0.503.patched/src/PlayerWidget.cpp
+--- stretchplayer-0.503/src/PlayerWidget.cpp 2010-07-18 00:44:20.000000000 -0400
++++ stretchplayer-0.503.patched/src/PlayerWidget.cpp 2014-03-01 10:04:02.000000000 -0500
+@@ -35,6 +35,7 @@
+ #include <QBitmap>
+ #include <QAction>
+ #include <QResizeEvent>
++#include <QApplication>
+ #include <QCoreApplication>
+
+ #include <cmath>
+@@ -152,11 +153,21 @@
+
+ void PlayerWidget::pitch_inc()
+ {
++ if(QApplication::keyboardModifiers() == Qt::ShiftModifier)
++ _engine->set_fine( _engine->get_fine() + 10);
++ else if(QApplication::keyboardModifiers() == Qt::ControlModifier)
++ _engine->set_fine( _engine->get_fine() + 1);
++ else
+ _engine->set_pitch( _engine->get_pitch() + 1 );
+ }
+
+ void PlayerWidget::pitch_dec()
+ {
++ if(QApplication::keyboardModifiers() == Qt::ShiftModifier)
++ _engine->set_fine( _engine->get_fine() - 10);
++ else if(QApplication::keyboardModifiers() == Qt::ControlModifier)
++ _engine->set_fine( _engine->get_fine() - 1);
++ else
+ _engine->set_pitch( _engine->get_pitch() - 1);
+ }
+
+@@ -262,8 +273,9 @@
+ float sch = _engine->get_stretch();
+ _status->speed(sch);
+
++ int fin = _engine->get_fine();
+ int pit = _engine->get_pitch();
+- _status->pitch(pit);
++ _status->pitch(pit, fin);
+
+ float cpu = _engine->get_cpu_load();
+ _status->cpu(cpu);
+@@ -471,8 +483,9 @@
+ QList<QKeySequence> inc_shortcuts;
+ inc_shortcuts << Qt::Key_Plus;
+ inc_shortcuts << Qt::Key_Equal;
++ inc_shortcuts << QKeySequence("Ctrl+=");
+ _act.pitch_inc = new QAction("+", this);
+- _act.pitch_inc->setToolTip("Pitch Increase [+]");
++ _act.pitch_inc->setToolTip("Pitch Increase [+ or =] (Ctl/Shift=Fine)");
+ _act.pitch_inc->setShortcuts(inc_shortcuts);
+ _act.pitch_inc->setShortcutContext(Qt::ApplicationShortcut);
+ _act.pitch_inc->setIcon( _ico.plus );
+@@ -480,9 +493,13 @@
+ connect(_act.pitch_inc, SIGNAL(triggered()),
+ this, SLOT(pitch_inc()));
+
++ QList<QKeySequence> dec_shortcuts;
++ dec_shortcuts << Qt::Key_Minus;
++ dec_shortcuts << Qt::Key_Underscore;
++ dec_shortcuts << QKeySequence("Ctrl+-");
+ _act.pitch_dec = new QAction("-", this);
+- _act.pitch_dec->setToolTip("Pitch Decrease [-]");
+- _act.pitch_dec->setShortcut(Qt::Key_Minus);
++ _act.pitch_dec->setToolTip("Pitch Decrease [-] (Ctl/Shift=Fine)");
++ _act.pitch_dec->setShortcuts(dec_shortcuts);
+ _act.pitch_dec->setShortcutContext(Qt::ApplicationShortcut);
+ _act.pitch_dec->setIcon( _ico.minus );
+ addAction(_act.pitch_dec);
+diff -Naur stretchplayer-0.503/src/StatusWidget.cpp stretchplayer-0.503.patched/src/StatusWidget.cpp
+--- stretchplayer-0.503/src/StatusWidget.cpp 2010-07-18 00:44:20.000000000 -0400
++++ stretchplayer-0.503.patched/src/StatusWidget.cpp 2014-03-01 11:16:47.000000000 -0500
+@@ -85,10 +85,13 @@
+ .arg(val, 3, 'f', 0);
+ }
+
+- void StatusWidget::pitch(int p)
++ void StatusWidget::pitch(int p, int f)
+ {
+- _pitch = QString("PITCH: %1")
+- .arg(int(p));
++ _pitch = QString("PITCH: %1").arg(int(p));
++ if(f > 0)
++ _pitch += QString("+%1").arg(int(f));
++ else if(f < 0)
++ _pitch += QString("%1").arg(int(f));
+ }
+
+ void StatusWidget::volume(float g)
+diff -Naur stretchplayer-0.503/src/StatusWidget.hpp stretchplayer-0.503.patched/src/StatusWidget.hpp
+--- stretchplayer-0.503/src/StatusWidget.hpp 2010-07-18 00:44:20.000000000 -0400
++++ stretchplayer-0.503.patched/src/StatusWidget.hpp 2014-02-28 19:20:49.000000000 -0500
+@@ -54,7 +54,7 @@
+ void position(float);
+ void time(float);
+ void speed(float);
+- void pitch(int);
++ void pitch(int, int);
+ void volume(float);
+ void cpu(float);
+ void message(QString);
diff --git a/audio/stretchplayer/setcap.sh b/audio/stretchplayer/setcap.sh
new file mode 100644
index 000000000000..b58a0bcf226c
--- /dev/null
+++ b/audio/stretchplayer/setcap.sh
@@ -0,0 +1 @@
+[ -x /sbin/setcap ] && /sbin/setcap cap_ipc_lock,cap_sys_nice=ep usr/bin/stretchplayer
diff --git a/audio/stretchplayer/slack-desc b/audio/stretchplayer/slack-desc
new file mode 100644
index 000000000000..665dc650dd50
--- /dev/null
+++ b/audio/stretchplayer/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+stretchplayer: stretchplayer (audio player with time stretch and pitch shift)
+stretchplayer:
+stretchplayer: StretchPlayer is an audio file player that allows you to change the
+stretchplayer: speed of the song without changing the pitch. It will also allow
+stretchplayer: you to transpose the song to another key (while also changing the
+stretchplayer: speed). This is a very powerful tool for musicians who are learning
+stretchplayer: to play a pre-recorded song. Its features include Time Stretch (25%
+stretchplayer: to 125% of song speed, without changing pitch), Pitch Shift (up or
+stretchplayer: down 1 octave), A/B repeat, and lots of keyboard accelerators.
+stretchplayer:
+stretchplayer:
diff --git a/audio/stretchplayer/stretch_25_125.diff b/audio/stretchplayer/stretch_25_125.diff
new file mode 100644
index 000000000000..ab3bb33f0cda
--- /dev/null
+++ b/audio/stretchplayer/stretch_25_125.diff
@@ -0,0 +1,35 @@
+diff --git a/src/Engine.hpp b/src/Engine.hpp
+index 873ec4d..0d3c988 100644
+--- a/src/Engine.hpp
++++ b/src/Engine.hpp
+@@ -60,7 +60,7 @@ public:
+ return _stretch;
+ }
+ void set_stretch(float str) {
+- if(str > 0.5 && str < 2.0) {
++ if(str > 0.2499 && str < 1.2501) { /* would be 'if(str >= 0.25 && str <= 1.25)', but floating point is tricky... */
+ _stretch = str;
+ //_state_changed = true;
+ }
+diff --git a/src/PlayerWidget.cpp b/src/PlayerWidget.cpp
+index e906446..489856b 100644
+--- a/src/PlayerWidget.cpp
++++ b/src/PlayerWidget.cpp
+@@ -234,7 +234,7 @@ namespace StretchPlayer
+
+ void PlayerWidget::stretch(int pos)
+ {
+- _engine->set_stretch( 0.5 + double(pos)/1000.0 );
++ _engine->set_stretch( 0.25 + double(pos)/1000.0 );
+ }
+
+ void PlayerWidget::volume(int vol)
+@@ -322,7 +322,7 @@ namespace StretchPlayer
+ _volume->setValue( _to_fader(vol) );
+ _status->volume( _volume->value() / 1000.0 );
+
+- _stretch->setValue( (sch-0.5) * 1000 );
++ _stretch->setValue( (sch-0.25) * 1000 );
+ _status->update();
+ }
+
diff --git a/audio/stretchplayer/stretchplayer.1 b/audio/stretchplayer/stretchplayer.1
new file mode 100644
index 000000000000..4b8312caf5d5
--- /dev/null
+++ b/audio/stretchplayer/stretchplayer.1
@@ -0,0 +1,131 @@
+.\" Man page generated from reStructuredText.
+.
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.TH "STRETCHPLAYER" 1 "2022-01-18" "0.503_4" "SlackBuilds.org"
+.SH NAME
+stretchplayer \- audio player with time stretch and pitch shift
+.\" RST source for stretchplayer(1) man page. Convert with:
+.
+.\" rst2man.py stretchplayer.rst > stretchplayer.1
+.
+.\" rst2man.py comes from the SBo development/docutils package.
+.
+.SH SYNOPSIS
+.sp
+stretchplayer [\fIfile\fP]
+.SH DESCRIPTION
+.sp
+\fBstretchplayer\fP is an audio file player that allows you to change
+the speed of the song without changing the pitch. It will also allow
+you to transpose the song to another key (while also changing the
+speed independently). This is a very powerful tool for musicians who
+are learning to play a pre\-recorded song. Its features include:
+.INDENT 0.0
+.IP \(bu 2
+Time Stretch (25% to 125% of song speed, without changing pitch)
+.IP \(bu 2
+Pitch shift (up or down 1 octave)
+.IP \(bu 2
+A/B repeat
+.IP \(bu 2
+Lots of keyboard accelerators
+.UNINDENT
+.sp
+The player supports all the audio formats that libsndfile supports, which
+currently includes OGG/Vorbis, WAV, W64, AIFF, SND, and FLAC. Note that
+neither libsndfile nor StretchPlayer supports MP3 files for patent liability
+reasons.
+.sp
+\fBstretchplayer\fP takes no arguments other than an optional \fIfile\fP to play.
+.SH KEYBOARD
+.INDENT 0.0
+.TP
+.B \fBSpace\fP
+Play/Pause.
+.TP
+.B \fBS\fP
+Stop.
+.TP
+.B \fBEnter\fP
+A/B Loop.
+.TP
+.B \fBLeft\fP, \fBRight\fP arrows
+Playback Speed.
+.TP
+.B \fB+\fP, \fB\-\fP
+Transposition/tuning. Increase/decrease pitch by 100 cents (1 semitone). With
+\fIShift\fP, adjust pitch by 10 cents. With \fIControl\fP, adjust by 1 cent.
+.TP
+.B \fBUp\fP, \fBDown\fP arrows
+Increase/decrease volume.
+.TP
+.B \fBO\fP
+Open new file.
+.TP
+.B \fBEscape\fP
+Quit.
+.TP
+.B \fBHome\fP
+Reset pitch and speed to defaults, seek to beginning of song.
+.UNINDENT
+.SH BUGS
+.sp
+\fBstretchplayer\fP will not work if you have a small JACK buffer size (<= 256 frames).
+Bug reports can be sent to \fI\%gabriel@teuton.org\fP\&.
+.SH COPYRIGHT
+.sp
+See the file /usr/doc/stretchplayer\-0.503_4/COPYING for license information.
+.SH AUTHORS
+.sp
+stretchplayer was written by Gabriel M. Beddingfield.
+.sp
+The fine\-tuning patch (Ctrl/Shift to adjust +/\- 1 or 10 cents) was
+written by B. Watson.
+.sp
+This man page written for the SlackBuilds.org project
+by B. Watson, and is licensed under the WTFPL.
+.SH SEE ALSO
+.sp
+\fBmplayer\fP(1), \fBmpv\fP(1), \fBjackd\fP(1), \fBqjackctl\fP(1)
+.sp
+/usr/doc/stretchplayer\-0.503_4/README.txt
+.sp
+The stretchplayer homepage:
+.INDENT 0.0
+.INDENT 3.5
+.sp
+.nf
+.ft C
+https://www.teuton.org/~gabriel/stretchplayer/
+.ft P
+.fi
+.UNINDENT
+.UNINDENT
+.\" Generated by docutils manpage writer.
+.
diff --git a/audio/stretchplayer/stretchplayer.SlackBuild b/audio/stretchplayer/stretchplayer.SlackBuild
new file mode 100644
index 000000000000..a7ca8119009a
--- /dev/null
+++ b/audio/stretchplayer/stretchplayer.SlackBuild
@@ -0,0 +1,142 @@
+#!/bin/bash
+
+# Slackware build script for stretchplayer
+
+# Written by B. Watson (yalhcru@gmail.com)
+
+# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+
+# Upstream git is: https://gitlab.com/stretchplayer/stretchplayer.git
+# Latest commits there are post 0.503 release, development
+# stopped in 2014. Lots of nice new features there, including mp3
+# support. Unfortunately building the latest git code results in a
+# stretchplayer that segfaults on startup, and I don't have a fix, so
+# I didn't try to package that. I did cherry-pick one commit though.
+
+##### TODO:
+# on every exit (close with the close button):
+# corrupted double-linked list
+# Aborted
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=stretchplayer
+VERSION=${VERSION:-0.503_4}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+SRCVER="$( echo $VERSION | cut -d_ -f1 )"
+DEBVER="$( echo $VERSION | cut -d_ -f2 )"
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$SRCVER
+tar xvf $CWD/${PRGNAM}_$SRCVER.orig.tar.gz
+cd $PRGNAM-$SRCVER
+tar xvf $CWD/${PRGNAM}_$SRCVER-$DEBVER.debian.tar.xz
+chown -R root:root .
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
+
+# Apply Debian's patches, especially qt5.diff!
+for i in $( cat debian/patches/series ); do
+ patch -p1 < debian/patches/$i
+done
+
+# Patch by SlackBuild author. Allows tuning up and down by 10 cents
+# (1/10 of a semitone) when holding the Shift key, or 1 cent when
+# holding Control. Helps with stuff that was recorded slightly out of
+# tune, or mastered from ancient tapes. Patch was sent upstream, but
+# upstream isn't responding.
+patch -p1 < $CWD/fine_tuning.diff
+
+# Patch from upstream git, changes the stretch range from 25%-125%.
+# commit a3e0f1f.
+patch -p1 < $CWD/stretch_25_125.diff
+
+mkdir -p build
+cd build
+ cmake \
+ -DENABLE_UNIT_TESTS=OFF \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DLIB_SUFFIX=${LIBDIRSUFFIX} \
+ -DMAN_INSTALL_DIR=/usr/man \
+ -DCMAKE_BUILD_TYPE=Release ..
+ make
+ make install/strip DESTDIR=$PKG
+cd ..
+
+# man page by SlackBuild author. Based on the Debian one, but
+# includes a list of keystrokes.
+mkdir -p $PKG/usr/man/man1
+gzip -9c < $CWD/$PRGNAM.1 > $PKG/usr/man/man1/$PRGNAM.1.gz
+
+# I don't think stretchplayer needs this at runtime:
+rm -rf $PKG/usr/share/$PRGNAM $PKG/usr/share/icons
+
+for i in art/$PRGNAM-icon-*.png; do
+ size="$( basename $i .png | cut -d- -f3 )"
+ mkdir -p $PKG/usr/share/icons/hicolor/$size/apps
+ cp -a $i $PKG/usr/share/icons/hicolor/$size/apps/$PRGNAM.png
+done
+mkdir -p $PKG/usr/share/icons/hicolor/scalable/apps
+cp -a art/$PRGNAM-icon.svg $PKG/usr/share/icons/hicolor/scalable/apps/$PRGNAM.svg
+
+rm $PKG/usr/share/pixmaps/*
+ln -s ../icons/hicolor/48x48/apps/$PRGNAM.png $PKG/usr/share/pixmaps/$PRGNAM.png
+
+sed -i "/^Icon/s,=.*,=$PRGNAM," $PKG/usr/share/applications/$PRGNAM.desktop
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a AUTHORS BUGS* COPYING ChangeLog README* $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
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+if [ "${SETCAP:-yes}" = "yes" ]; then
+ cat $CWD/setcap.sh >> $PKG/install/doinst.sh
+ chown root:audio $PKG/usr/bin/$PRGNAM
+ chmod 0750 $PKG/usr/bin/$PRGNAM
+fi
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/audio/stretchplayer/stretchplayer.info b/audio/stretchplayer/stretchplayer.info
new file mode 100644
index 000000000000..eac4e4728282
--- /dev/null
+++ b/audio/stretchplayer/stretchplayer.info
@@ -0,0 +1,12 @@
+PRGNAM="stretchplayer"
+VERSION="0.503_4"
+HOMEPAGE="https://www.teuton.org/~gabriel/stretchplayer/"
+DOWNLOAD="https://www.teuton.org/~gabriel/stretchplayer/stretchplayer_0.503.orig.tar.gz \
+ http://deb.debian.org/debian/pool/main/s/stretchplayer/stretchplayer_0.503-4.debian.tar.xz"
+MD5SUM="2c5b412eaf3760b397dee27a3bdfc088 \
+ b009648334e33b15068fbf7c53475b20"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="rubberband jack"
+MAINTAINER="B. Watson"
+EMAIL="yalhcru@gmail.com"
diff --git a/audio/stretchplayer/stretchplayer.rst b/audio/stretchplayer/stretchplayer.rst
new file mode 100644
index 000000000000..af50a6c60b06
--- /dev/null
+++ b/audio/stretchplayer/stretchplayer.rst
@@ -0,0 +1,112 @@
+.. RST source for stretchplayer(1) man page. Convert with:
+.. rst2man.py stretchplayer.rst > stretchplayer.1
+.. rst2man.py comes from the SBo development/docutils package.
+
+.. |version| replace:: 0.503_4
+.. |date| date::
+
+=============
+stretchplayer
+=============
+
+----------------------------------------------
+audio player with time stretch and pitch shift
+----------------------------------------------
+
+:Manual section: 1
+:Manual group: SlackBuilds.org
+:Date: |date|
+:Version: |version|
+
+SYNOPSIS
+========
+
+stretchplayer [*file*]
+
+DESCRIPTION
+===========
+
+**stretchplayer** is an audio file player that allows you to change
+the speed of the song without changing the pitch. It will also allow
+you to transpose the song to another key (while also changing the
+speed independently). This is a very powerful tool for musicians who
+are learning to play a pre-recorded song. Its features include:
+
+- Time Stretch (25% to 125% of song speed, without changing pitch)
+
+- Pitch shift (up or down 1 octave)
+
+- A/B repeat
+
+- Lots of keyboard accelerators
+
+The player supports all the audio formats that libsndfile supports, which
+currently includes OGG/Vorbis, WAV, W64, AIFF, SND, and FLAC. Note that
+neither libsndfile nor StretchPlayer supports MP3 files for patent liability
+reasons.
+
+**stretchplayer** takes no arguments other than an optional *file* to play.
+
+KEYBOARD
+========
+
+**Space**
+ Play/Pause.
+
+**S**
+ Stop.
+
+**Enter**
+ A/B Loop.
+
+**Left**, **Right** arrows
+ Playback Speed.
+
+**+**, **-**
+ Transposition/tuning. Increase/decrease pitch by 100 cents (1 semitone). With
+ *Shift*, adjust pitch by 10 cents. With *Control*, adjust by 1 cent.
+
+**Up**, **Down** arrows
+ Increase/decrease volume.
+
+**O**
+ Open new file.
+
+**Escape**
+ Quit.
+
+**Home**
+ Reset pitch and speed to defaults, seek to beginning of song.
+
+BUGS
+====
+
+**stretchplayer** will not work if you have a small JACK buffer size (<= 256 frames).
+Bug reports can be sent to gabriel@teuton.org.
+
+COPYRIGHT
+=========
+
+See the file /usr/doc/stretchplayer-|version|/COPYING for license information.
+
+AUTHORS
+=======
+
+stretchplayer was written by Gabriel M. Beddingfield.
+
+The fine-tuning patch (Ctrl/Shift to adjust +/- 1 or 10 cents) was
+written by B. Watson.
+
+This man page written for the SlackBuilds.org project
+by B. Watson, and is licensed under the WTFPL.
+
+SEE ALSO
+========
+
+**mplayer**\(1), **mpv**\(1), **jackd**\(1), **qjackctl**\(1)
+
+/usr/doc/stretchplayer-|version|/README.txt
+
+The stretchplayer homepage::
+
+ https://www.teuton.org/~gabriel/stretchplayer/