File: usage.sh

package info (click to toggle)
faust 2.30.5~ds0-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 279,348 kB
  • sloc: cpp: 239,368; javascript: 32,310; ansic: 17,442; sh: 11,925; java: 5,903; objc: 3,879; makefile: 3,030; cs: 1,139; python: 987; ruby: 951; xml: 693; yacc: 537; lex: 239; lisp: 201; awk: 110
file content (56 lines) | stat: -rwxr-xr-x 1,678 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/usr/bin/env bash

function usage() {
	name=$1
	shift
	args=$*
	echo "Usage: $name $args"
}

function platform() {
	echo "Target platform: $*"
}

function require() {
	echo "Require: $*"
}

function options() {
	while [ "$1" ]
	do
		option $1
		shift
	done
}

function option() {
	if [ $# -ne 0 ] 
	then
		option=$1
		shift
		doc=$*
		if [ -z "$doc" ]
		then
			case $option in
				"-httpd") doc="activates HTTP control";;
				"-osc") doc="activates OSC control";;
				"-midi") doc="activates MIDI control";;
				"-qrcode") doc="activates QR code generation";;
				"-poly") doc="produces a polyphonic DSP, ready to be used with MIDI events";;
				"-nvoices <num>") doc="produces a polyphonic DSP with <num> voices, ready to be used with MIDI events";;
				"-us <factor>") doc="upsample the DSP by a factor";;
				"-ds <factor>") doc="downsample the DSP by a factor";;
				"-filter <filter>") doc="use a filter for upsampling or downsampling [0..4]";;
				"-source") doc="to only create the source folder";;
				"-soundfile") doc="when compiling a DSP using the 'soundfile' primitive, add required resources";;
				"-nodeploy") doc="skip self-contained application generation (using 'macdeployqt')";;
       			"-effect <effect.dsp>") doc="generates a polyphonic DSP connected to a global output effect, ready to be used with MIDI or OSC";;
        		"-effect auto") doc="generates a polyphonic DSP connected to a global output effect defined as 'effect' in <file.dsp>, ready to be used with MIDI or OSC";;
				"Faust options") doc="any option (e.g. -vec -vs 8...). See the Faust compiler documentation.";;
			esac
		fi
		echo "   $option : $doc"
	else
		echo "Options:"
	fi
}