diff options
author | B. Watson <yalhcru@gmail.com> | 2021-11-29 13:25:52 -0500 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2021-12-04 10:09:05 +0700 |
commit | 2ff1ca3bd954e9434aaf70a145cc6bdcf062fbca (patch) | |
tree | 9fee615fca6a08bc5eedce76fedfdbb9acdfea3d /audio | |
parent | c48c8434acdf7d393638e52aa9e636fd3efbe1b0 (diff) |
audio/klick: Fix -current build.
Signed-off-by: B. Watson <yalhcru@gmail.com>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'audio')
-rw-r--r-- | audio/klick/Makefile | 53 | ||||
-rw-r--r-- | audio/klick/README | 4 | ||||
-rw-r--r-- | audio/klick/klick.SlackBuild | 45 | ||||
-rw-r--r-- | audio/klick/klick.info | 6 | ||||
-rw-r--r-- | audio/klick/klick.pod | 500 | ||||
-rw-r--r-- | audio/klick/slack-desc | 2 |
6 files changed, 588 insertions, 22 deletions
diff --git a/audio/klick/Makefile b/audio/klick/Makefile new file mode 100644 index 0000000000000..e752e85f6ea8f --- /dev/null +++ b/audio/klick/Makefile @@ -0,0 +1,53 @@ +# Makefile for klick, by B. Watson (yalhcru@gmail.com). Part of +# SlackBuilds.org build for klick. + +# Wrote this because the SConstruct for klick no longer works in +# modern scons, and I'm way better at Makefiles than I am at scons. + +# This is the bare minimum needed to build klick. There are no clean +# or install targets, and there's no dependency info for headers. + +PROJ=klick +VERSION=0.12.2 + +TERMINAL=yes +OSC=no +RUBBERBAND=no +SLKCFLAGS= +PREFIX=/usr +SHARE=$(PREFIX)/share/$(PROJ) + +SRCS=src/main.cc src/klick.cc src/options.cc src/audio_interface.cc src/audio_interface_jack.cc src/audio_interface_sndfile.cc src/audio_chunk.cc src/tempomap.cc src/metronome.cc src/metronome_simple.cc src/metronome_map.cc src/metronome_jack.cc src/position.cc src/util/util.cc + +LIBS:=$(shell pkg-config --libs jack samplerate sndfile) +FLAGS:=$(shell pkg-config --cflags jack samplerate sndfile) + +ifeq ($(TERMINAL),yes) +SRCS+=src/terminal_handler.cc +DEFS+= -DENABLE_TERMINAL +endif + +ifeq ($(OSC),yes) +SRCS+=src/osc_interface.cc src/osc_handler.cc +LIBS+= $(shell pkg-config --libs liblo) +FLAGS+= $(shell pkg-config --cflags liblo) +DEFS+= -DENABLE_OSC +endif + +ifeq ($(RUBBERBAND),yes) +LIBS+= $(shell pkg-config --libs rubberband) +FLAGS+= $(shell pkg-config --cflags rubberband) +DEFS+= -DENABLE_RUBBERBAND +endif + +DEFS+= -DHAVE_SNDFILE_OGG -DNDEBUG -DDATA_DIR='"$(SHARE)"' -DVERSION='"$(VERSION)"' +CXXFLAGS=-fpermissive $(SLKCFLAGS) $(DEFS) $(FLAGS) + +OBJS=$(SRCS:.cc=.o) + +all: $(PROJ) + +$(PROJ): $(OBJS) + $(CXX) -o $(PROJ) $(OBJS) $(LDFLAGS) $(LIBS) + +$(OBJS): $(SRCS) diff --git a/audio/klick/README b/audio/klick/README index 9c45a9fa111bd..cff6659b7f619 100644 --- a/audio/klick/README +++ b/audio/klick/README @@ -11,8 +11,8 @@ requires klick built with liblo support. Optional dependencies: rubberband - uses the RubberBand library for pitch adjustment, which -results in slightly higher audio quality. Disabled by default; enable -with RUBBERBAND=yes in the script's environment. +results in slightly higher audio quality. Autodetected; disable with +RUBBERBAND=no in the script's environment. This package uses POSIX filesystem capabilities to execute with elevated privileges (required for realtime audio processing). This diff --git a/audio/klick/klick.SlackBuild b/audio/klick/klick.SlackBuild index 6840ca76e3085..74ec5c4222e5b 100644 --- a/audio/klick/klick.SlackBuild +++ b/audio/klick/klick.SlackBuild @@ -6,13 +6,21 @@ # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. +# 20211129 bkw: BUILD=2 +# - fix build on -current. see Makefile. +# - autodetect rubberband and liblo. +# - enable terminal support. +# - add missing klick.pod (source for the man page). +# - dynamic slack-desc. +# - include klick2ardour.py, in case someone has a use for it. + # 20170620 bkw: add -fpermissive to cflags, for -current's gcc7. cd $(dirname $0) ; CWD=$(pwd) PRGNAM=klick VERSION=${VERSION:-0.12.2} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -24,9 +32,6 @@ if [ -z "$ARCH" ]; then esac fi -# If the variable PRINT_PACKAGE_NAME is set, then this script will report what -# the name of the created package would be, and then exit. This information -# could be useful to other scripts. if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" exit 0 @@ -59,21 +64,22 @@ rm -rf $PRGNAM-$VERSION tar xvf $CWD/$PRGNAM-$VERSION.tar.gz cd $PRGNAM-$VERSION chown -R root:root . -find -L . \ - \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ - -o -perm 511 \) -exec chmod 755 {} \; -o \ - \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ - -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \ + \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+ -OPTS="RUBBERBAND=${RUBBERBAND:-no} OSC=${LIBLO:-yes}" +RUBBERBAND=${RUBBERBAND:-yes} +LIBLO=${LIBLO:-yes} +pkg-config --exists rubberband || RUBBERBAND="no" +pkg-config --exists liblo || LIBLO="no" -# hate scons. This mess forces CFLAGS. -SCONSCFLAGS=$( echo "$SLKCFLAGS -fpermissive" | sed "s/\([^ ]\+\)/'\1', /g" ) -sed -i "s/'-O2', /$SCONSCFLAGS/" SConstruct +# 20211129 bkw: wrote a Makefile because the SConstruct is too old +# for scons-4.0.1 and I hate scons anyway. +make -f $CWD/Makefile RUBBERBAND=$RUBBERBAND OSC=$LIBLO SLKCFLAGS="$SLKCFLAGS" -scons $OPTS PREFIX=/usr -scons $OPTS PREFIX=/usr DESTDIR=$PKG install -strip $PKG/usr/bin/$PRGNAM +mkdir -p $PKG/usr/bin $PKG/usr/share/$PRGNAM/samples +install -oroot -groot -s -m0755 $PRGNAM $PKG/usr/bin +install -oroot -groot -m0755 $CWD/klick2ardour.py $PKG/usr/bin +install -oroot -groot -m0644 samples/* $PKG/usr/share/$PRGNAM/samples # man page written for this SlackBuild (from --help output) mkdir -p $PKG/usr/man/man1 @@ -83,8 +89,13 @@ mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a COPYING NEWS README doc/manual.html $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +L=no; R=no +objdump -p $PKG/usr/bin/$PRGNAM > otmp +grep -q 'NEEDED.*liblo' otmp && L=yes +grep -q 'NEEDED.*librubberband' otmp && R=yes + mkdir -p $PKG/install -cat $CWD/slack-desc > $PKG/install/slack-desc +sed -e "s,@L@,$L," -e "s,@R@,$R," $CWD/slack-desc > $PKG/install/slack-desc # Only add capability stuff if not disabled: if [ "${SETCAP:-yes}" = "yes" ]; then diff --git a/audio/klick/klick.info b/audio/klick/klick.info index 12c51a564ade1..28042efc4c6dc 100644 --- a/audio/klick/klick.info +++ b/audio/klick/klick.info @@ -1,8 +1,10 @@ PRGNAM="klick" VERSION="0.12.2" HOMEPAGE="http://das.nasophon.de/klick/" -DOWNLOAD="http://das.nasophon.de/download/klick-0.12.2.tar.gz" -MD5SUM="90bc69db650c6edaa08be47df0cfe424" +DOWNLOAD="http://das.nasophon.de/download/klick-0.12.2.tar.gz \ + http://das.nasophon.de/download/klick2ardour.py" +MD5SUM="90bc69db650c6edaa08be47df0cfe424 \ + affc28d8e97577b1cb6bb705d65c8c3a" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="jack liblo" diff --git a/audio/klick/klick.pod b/audio/klick/klick.pod new file mode 100644 index 0000000000000..a3c71856048f8 --- /dev/null +++ b/audio/klick/klick.pod @@ -0,0 +1,500 @@ +# pod source for klick man page +# pod2man -s1 -r0.12.2 --stderr -nKLICK -cSlackBuilds.org < klick.pod > klick.1 + +=head1 NAME + +klick - an advanced metronome for JACK + +=head1 SYNOPSIS + +klick [options] [bars] [meter] tempo[-tempo2/accel] [pattern] + +klick [options] -f filename + +klick [options] -i + +klick [options] -j + +=head1 DESCRIPTION + + klick [options] [bars] [meter] tempo[-tempo2/accel] [pattern] + +Plays a simple metronome with the given meter and tempo. To play a 3/4 beat at 120 bpm: + + klick 3/4 120 + +You can also specify a "target" tempo and acceleration rate, to use klick +as a speed trainer. To play a 4/4 beat starting at 80 bpm, gradually +increasing the tempo by 1 bpm every 10 measures until reaching 120 bpm: + + klick 80-120/10 + +Once the final tempo is reached, klick will continue playing at a constant tempo. + + klick [options] -f filename + +Loads a tempo map from a file. This allows for more complex setups +including meter and tempo changes etc. See B<Tempo Map File Format>. + + klick [options] -i + +Runs klick in interactive mode, allowing you to change tempo and meter +while klick is running. The keyboard commands available in this mode +are described in Interactive Mode. + + klick [options] -j + +In this mode, klick gets all tempo information from JACK. Just run +a sequencer as JACK transport master, and klick will play a simple +metronome pattern in sync with JACK transport. + +=head1 OPTIONS + +=over + +=item -f filename + +load tempo map from file + +=item -j + +no tempo map, just follow jack transport + +=item -n name + +set jack client name + +=item -p port,.. + +jack port(s) to connect to + +=item -P + +automatically connect to hardware ports + +=item -o port + +OSC port to listen on. Only available when compiled with liblo support. + +=item -i + +interactive mode + +=item -W filename + +export click track to audio file + +=item -r samplerate + +sample rate of export (default: 48000) + +=item -s number + +use built-in sounds: + +=over + +=item 0 + +square wave (default) + +=item 1 + +sine wave + +=item 2 + +noise + +=item 3 + +acoustic bell/click + +=back + +=item -S file[,file] + +load sounds from file(s) + +=item -e + +no emphasized beats + +=item -E + +emphasized beats only + +=item -v mult[,mult] + +adjust playback volume (default: 1.0) + +=item -w mult[,mult] + +adjust playback pitch (default: 1.0) + +=item -t + +enable jack transport + +=item -T + +become transport master (implies -t) + +=item -d seconds + +delay before starting playback + +=item -c bars + +pre-roll. use -c 0 for 2 beats + +=item -l label + +start playback at the given label + +=item -x multiplier + +multiply tempo by the given factor + +=item -h + +show this help + +=back + +=head1 INTERACTIVE MODE + +The following keyboard commands are available in interactive mode: + +=over + +=item Arrow up/down + +increase/reduce tempo by 10 bpm + +=item Arrow right/left + +increase/reduce tempo by 1 bpm + +=item 0-9 + +set beats per bar (0/1: all beats are even) + +=item q/w/e/r + +set beat type (whole, half, quarter, eighth note) + +=item +/=, - + +increase/reduce volume + +=item Space + +start/stop metronome + +=item Escape + +exit klick + +=back + +=head1 TEMPO MAP FILE FORMAT + +A tempo map is a plain text file, consisting of an arbitrary number of lines +which will be played sequentially. Each line must have the following format: + + [label:] bars [meter] tempo [pattern] [volume] + +Everything in brackets is optional, and can be omitted to use the default. '#' +indicates the start of a comment, empty lines are ignored. + +=over + +=item label + +An optional name that can be used to refer to this line, and start +playback at this position. + +=item bars + +The number of bars for this tempo map entry. + +=item meter + +The meter, written as beats/denominator. This is optional, the default +is 4/4. The tempo in beats per minute, with a "beat" always referring +to quarter notes, no matter what the meter actually is. + +=item tempo + +=over + +=item tempo + +Sets the tempo for the duration of the whole tempo map entry. + +=item tempo1-tempo2 + +Specifies the tempo for the start and the end of this +entry, with a gradual tempo change in between. + +=item tempo1,tempo2,... + +Sets a different tempo for each beat. The +number of +tempo values must be the same as the total number of +beats for this entry (bars * beats). + +=back + +=item pattern + +This can be used to alter the pattern of accented/normal beats. Use 'X' +(upper case) for accented beats, 'x' (lower case) for normal beats, and +'.' for silence. So for example, given a 6/8 measure, and you only want +the 1st and 4th beat to be played, you could use the pattern 'X..x..'; +the default is 'Xxxxxx'. + +=item volume + +Allows you to set a different volume for each part, default is 1.0. + +=back + +=head2 Example Tempo Map + + intro: 8 120 # play 8 measures at 120 bpm (4/4) + verse1: 12 120 X.x. # 12 measures at 120 bpm, playing only the 1st and 3rd beat + 4 120-140 X.x. # gradually increase tempo to 140 bpm + chorus1: 16 140 + bridge: 8 3/4 140 0.5 # change to 3/4 time, reduce volume + 8 3/4 140 # normal volume again + verse2: 12 120 # back to 4/4 (implied) + chorus2: 16 140 # jump to 140 bpm + outro: 6 140 + 2 140-80 # ritardando over the last 2 bars + +=head1 CLICK TRACK EXPORT + +By default, klick connects to JACK for audio output. To export a click track to +an audio file instead, use the -W parameter to specify an output filename. The +file type is determined by extension, supported formats are WAV, AIFF, FLAC, Ogg +Vorbis (with libsndfile >= 1.0.18). +The -r parameter can be used to set the sample rate of the exported audio, +default is 48000 Hz. + +=head1 OSC MESSAGES + +klick must be compiled with lilbo support to use OSC. + +klick understands the following OSC messages: + +=head2 General + +=over + +=item /klick/ping + +=item /klick/ping ,s <return_address> + +responds: /klick/pong + +=item /klick/register_client + +=item /klick/register_client ,s <address> + +registers a client to receive notifications when any parameter changes + +=item /klick/unregister_client + +=item /klick/unregister_client ,s <address> + +unregisters a client + +=item /klick/query + +=item /klick/query ,s <return_address> + +reports current state (same as /klick/*/query) + +=item /klick/quit + +terminates klick + +=back + +=head2 Configuration + +=over + +=item /klick/config/set_sound ,i <number> + +sets the sound to one of the built-in ones + +=item /klick/config/set_sound ,ss <filename> <filename> + +loads the sound from two audio files + +=item /klick/config/set_sound_volume ,ff <emphasis> <normal> + +changes the volume individually for both samples + +=item /klick/config/set_sound_pitch ,ff <emphasis> <normal> + +changes the pitch individually for both samples + +=item /klick/config/set_volume ,f <volume> + +sets the overall output volume + +=item /klick/config/autoconnect + +connects klick's output port to the first two hardware ports + +=item /klick/config/connect ,s... <port> ... + +connects klick's output port to the specified JACK ports + +=item /klick/config/disconnect_all + +disconnects all connections from klick's output port + +=item /klick/config/get_available_ports + +=item /klick/config/get_available_ports ,s <return_address> + +returns a list of all JACK input ports: + + /klick/config/available_ports ,s... <port> ... + +=item /klick/config/query + +=item /klick/config/query ,s <return_address> + +reports current state: + + /klick/config/sound ,i + /klick/config/sound ,ss + /klick/config/sound_volume ,ff + /klick/config/sound_pitch ,ff + /klick/config/volume ,f + +=back + +=head2 Generic Metronome Functions + +=over + +=item /klick/metro/set_type ,s <type> + +sets the metronome type, one of 'simple', 'map', 'jack' + +=item /klick/metro/start + +starts the metronome + +=item /klick/metro/stop + +stops the metronome + +=item /klick/metro/query + +=item /klick/metro/query ,s <return_address> + +reports current state: + + /klick/metro/type ,s + /klick/metro/active ,i + +=back + +=head2 Simple (Dynamic) Metronome + +=over + +=item /klick/simple/set_tempo ,f <tempo> + +sets the metronome's tempo + +=item /klick/simple/set_tempo_increment ,f <increment> + +sets the tempo increment per bar + +=item /klick/simple/set_tempo_start ,f <start> + +sets the start tempo + +=item /klick/simple/set_tempo_limit ,f <limit> + +sets the maximum tempo + +=item /klick/simple/set_meter ,ii <beats> <denom> + +sets the metronome's meter + +=item /klick/simple/set_pattern ,s <pattern> + +sets the beat pattern + +=item /klick/simple/tap + +tap tempo + +=item /klick/simple/query + +=item /klick/simple/query ,s <return_address> + +reports current state: + + /klick/simple/tempo ,f + /klick/simple/tempo_increment ,f + /klick/simple/tempo_limit ,f + /klick/simple/current_tempo ,f + /klick/simple/meter ,ii + /klick/simple/pattern ,s + +=back + +=head2 Tempo Map Metronome + +=over + +=item /klick/map/load_file ,s <filename> + +loads a tempo map from a file + +=item /klick/map/set_preroll ,i <bars> + +sets the preroll before the start of the tempo map + +=item /klick/map/set_tempo_multiplier ,f <mult> + +sets the tempo multiplier + +=item /klick/map/query + +=item /klick/map/query ,s <return_address> + +reports current state: + + /klick/map/filename ,s + /klick/map/preroll ,i + /klick/map/tempo_multiplier ,f + +=back + +=head2 JACK Transport Metronome + +=over + +=item /klick/jack/query + +=item /klick/jack/query ,s <return_address> + +currently does nothing + +=back + +=head1 AUTHOR + +klick is opyright (C) 2007-2009 Dominic Sacre <dominic.sacre@gmx.de> diff --git a/audio/klick/slack-desc b/audio/klick/slack-desc index c7a464d8cc610..3392df06cc035 100644 --- a/audio/klick/slack-desc +++ b/audio/klick/slack-desc @@ -11,7 +11,7 @@ klick: klick: klick is an advanced command-line based metronome for JACK. It allows klick: you to define complex tempo maps for entire songs or performances. klick: -klick: +klick: Build options: rubberband=@R@, liblo=@L@ klick: klick: klick: |