Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dave Griffiths
jellyfish
Commits
698d9dce
Commit
698d9dce
authored
Feb 08, 2015
by
Dave Griffiths
Browse files
autoconfing
parent
ba57097c
Changes
7
Hide whitespace changes
Inline
Side-by-side
assets/fluxa.scm
View file @
698d9dce
;; [ Copyright (C) 2015 Dave Griffiths : GPLv2 see LICENCE ]
; an experimental non-determinsistic synth
(
define
op_terminal
0
)
(
define
op_sine
1
)
(
define
op_saw
2
)
(
define
op_tri
3
)
(
define
op_squ
4
)
(
define
op_white
5
)
(
define
op_pink
6
)
(
define
op_adsr
7
)
(
define
op_add
8
)
(
define
op_sub
9
)
(
define
op_mul
10
)
(
define
op_div
11
)
(
define
op_pow
12
)
(
define
op_mooglp
13
)
(
define
op_moogbp
14
)
...
...
@@ -5,6 +9,9 @@
(
define
op_distort
19
)
(
define
op_clip
20
)
(
define
op_echo
21
)
(
define
op_ks
22
)
(
define
op_xfade
23
)
(
define
op_sampnhold
24
)
(
define
op_tracknhold
25
)
(
define
op_pad
26
)
(
define
op_cryptodistort
27
)
;;---------------------------------------------------------------
;; language - building graph construction commands from syntax
(
define
current-id
0
)
(
define
(
new-id
)
...
...
@@ -42,6 +49,9 @@
(
define
(
play-now
node
pan
)
(
synth-play
0
(
node-id
node
)
pan
))
;;---------------------------------------------------------------
;; operators
(
define
(
sine
a
)
(
operator
op_sine
(
list
a
)))
(
define
(
saw
a
)
(
operator
op_saw
(
list
a
)))
(
define
(
tri
a
)
(
operator
op_tri
(
list
a
)))
...
...
@@ -71,3 +81,30 @@
(
define
(
s&h
sig
cv
)
(
operator
op_sampnhold
(
list
sig
cv
)))
(
define
(
t&h
sig
cv
)
(
operator
op_tracknhold
(
list
sig
cv
)))
(
define
(
pad
a
g
c
r
)
(
operator
op_pad
(
list
a
g
c
r
)))
;;---------------------------------------------------------------
;; tuning
(
define
(
set-scale
s
)
(
set!
flx-scale
s
))
(
define
flx-scale
'
(
1
1
1
1
1
1
1
1
1
1
1
))
;; just intonation (erm I think...)
(
define
scale-lut
(
list
58.2705
61.7354
65.4064
69.2957
73.4162
77.7817
82.4069
87.3071
92.4986
97.9989
103.826
110
116.541
123.471
130.813
138.591
146.832
155.563
164.814
174.614
184.997
195.998
207.652
220
233.082
246.942
261.626
277.183
293.665
311.127
329.628
349.228
369.994
391.995
415.305
440
466.164
493.883
523.251
554.365
587.33
622.254
659.255
698.456
739.989
783.991
830.609
880
932.328
987.767
1046.5
1108.73
1174.66
1244.51
1318.51
1396.91
1479.98
1567.98
1661.22
1760
1864.66
1975.53
2093
2217.46
2349.32
2489.02
2637.02
2793.83
2959.96
3135.96
3322.44
3520
3729.31
3951.07
4186.01
4434.92
4698.64
4978.03
5274.04
5587.65
5919.91
6271.93
6644.88
7040
7458.62
7902.13
8372.02
8869.84
9397.27
9956.06
10548.1
11175.3
11839.8
12543.9
13289.8
14080
14917.2
15804.3
16744
17739.7
18794.5
19912.1
21096.2
22350.6
23679.6
25087.7
26579.5
28160
29834.5
31608.5
33488.1
35479.4
37589.1
39824.3
42192.3
44701.2
47359.3
50175.4
53159
56320
))
(
define
(
note
n
)
(
list-ref
scale-lut
(
modulo
(
inter
flx-scale
(
abs
(
inexact->exact
(
round
n
))))
(
length
scale-lut
))))
;;---------------------------------------------------------------
configure
View file @
698d9dce
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.68 for
myconfig
version-0.1.
# Generated by GNU Autoconf 2.68 for
jellyfish
version-0.1.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
...
...
@@ -555,10 +555,10 @@ MFLAGS=
MAKEFLAGS
=
# Identity of this package.
PACKAGE_NAME
=
'
myconfig
'
PACKAGE_TARNAME
=
'
myconfig
'
PACKAGE_NAME
=
'
jellyfish
'
PACKAGE_TARNAME
=
'
jellyfish
'
PACKAGE_VERSION
=
'version-0.1'
PACKAGE_STRING
=
'
myconfig
version-0.1'
PACKAGE_STRING
=
'
jellyfish
version-0.1'
PACKAGE_BUGREPORT
=
''
PACKAGE_URL
=
''
...
...
@@ -1209,7 +1209,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat
<<
_ACEOF
\`
configure' configures
myconfig
version-0.1 to adapt to many kinds of systems.
\`
configure' configures
jellyfish
version-0.1 to adapt to many kinds of systems.
Usage:
$0
[OPTION]... [VAR=VALUE]...
...
...
@@ -1257,7 +1257,7 @@ Fine tuning of the installation directories:
--infodir=DIR info documentation [DATAROOTDIR/info]
--localedir=DIR locale-dependent data [DATAROOTDIR/locale]
--mandir=DIR man documentation [DATAROOTDIR/man]
--docdir=DIR documentation root [DATAROOTDIR/doc/
myconfig
]
--docdir=DIR documentation root [DATAROOTDIR/doc/
jellyfish
]
--htmldir=DIR html documentation [DOCDIR]
--dvidir=DIR dvi documentation [DOCDIR]
--pdfdir=DIR pdf documentation [DOCDIR]
...
...
@@ -1270,7 +1270,7 @@ fi
if
test
-n
"
$ac_init_help
"
;
then
case
$ac_init_help
in
short
|
recursive
)
echo
"Configuration of
myconfig
version-0.1:"
;;
short
|
recursive
)
echo
"Configuration of
jellyfish
version-0.1:"
;;
esac
cat
<<
\
_ACEOF
...
...
@@ -1352,7 +1352,7 @@ fi
test
-n
"
$ac_init_help
"
&&
exit
$ac_status
if
$ac_init_version
;
then
cat
<<
\
_ACEOF
myconfig
configure version-0.1
jellyfish
configure version-0.1
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
...
...
@@ -1688,7 +1688,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by
myconfig
$as_me
version-0.1, which was
It was created by
jellyfish
$as_me
version-0.1, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0
$@
...
...
@@ -3815,6 +3815,45 @@ _ACEOF
fi
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: checking for main in -lasound"
>
&5
$as_echo_n
"checking for main in -lasound... "
>
&6
;
}
if
${
ac_cv_lib_asound_main
+
:
}
false
;
then
:
$as_echo_n
"(cached) "
>
&6
else
ac_check_lib_save_LIBS
=
$LIBS
LIBS
=
"-lasound
$LIBS
"
cat
confdefs.h -
<<
_ACEOF
>conftest.
$ac_ext
/* end confdefs.h. */
int
main ()
{
return main ();
;
return 0;
}
_ACEOF
if
ac_fn_cxx_try_link
"
$LINENO
"
;
then
:
ac_cv_lib_asound_main
=
yes
else
ac_cv_lib_asound_main
=
no
fi
rm
-f
core conftest.err conftest.
$ac_objext
\
conftest
$ac_exeext
conftest.
$ac_ext
LIBS
=
$ac_check_lib_save_LIBS
fi
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: result:
$ac_cv_lib_asound_main
"
>
&5
$as_echo
"
$ac_cv_lib_asound_main
"
>
&6
;
}
if
test
"x
$ac_cv_lib_asound_main
"
=
xyes
;
then
:
cat
>>
confdefs.h
<<
_ACEOF
#define HAVE_LIBASOUND 1
_ACEOF
LIBS
=
"-lasound
$LIBS
"
fi
echo
" Are we on Raspberry Pi?"
for
ac_header
in
/opt/vc/include/bcm_host.h
...
...
@@ -3829,6 +3868,7 @@ fi
done
ac_config_headers
=
"
$ac_config_headers
src/config.h"
ac_config_files
=
"
$ac_config_files
Makefile"
...
...
@@ -3922,43 +3962,7 @@ test "x$prefix" = xNONE && prefix=$ac_default_prefix
# Let make expand exec_prefix.
test
"x
$exec_prefix
"
=
xNONE
&&
exec_prefix
=
'${prefix}'
# Transform confdefs.h into DEFS.
# Protect against shell expansion while executing Makefile rules.
# Protect against Makefile macro expansion.
#
# If the first sed substitution is executed (which looks for macros that
# take arguments), then branch to the quote section. Otherwise,
# look for a macro that doesn't take arguments.
ac_script
=
'
:mline
/\\$/{
N
s,\\\n,,
b mline
}
t clear
:clear
s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g
t quote
s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g
t quote
b any
:quote
s/[ `~#$^&*(){}\\|;'
\'
'"<>?]/\\&/g
s/\[/\\&/g
s/\]/\\&/g
s/\$/$$/g
H
:any
${
g
s/^\n//
s/\n/ /g
p
}
'
DEFS
=
`
sed
-n
"
$ac_script
"
confdefs.h
`
DEFS
=
-DHAVE_CONFIG_H
ac_libobjs
=
ac_ltlibobjs
=
...
...
@@ -4386,7 +4390,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by
myconfig
$as_me
version-0.1, which was
This file was extended by
jellyfish
$as_me
version-0.1, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES =
$CONFIG_FILES
...
...
@@ -4404,11 +4408,15 @@ case $ac_config_files in *"
"
*
)
set
x
$ac_config_files
;
shift
;
ac_config_files
=
$*
;;
esac
case
$ac_config_headers
in
*
"
"
*
)
set
x
$ac_config_headers
;
shift
;
ac_config_headers
=
$*
;;
esac
cat
>>
$CONFIG_STATUS
<<
_ACEOF
|| ac_write_fail=1
# Files that config.status was made for.
config_files="
$ac_config_files
"
config_headers="
$ac_config_headers
"
_ACEOF
...
...
@@ -4429,17 +4437,22 @@ Usage: $0 [OPTION]... [TAG]...
--recheck update
$as_me
by reconfiguring in the same conditions
--file=FILE[:TEMPLATE]
instantiate the configuration file FILE
--header=FILE[:TEMPLATE]
instantiate the configuration header FILE
Configuration files:
$config_files
Configuration headers:
$config_headers
Report bugs to the package provider."
_ACEOF
cat
>>
$CONFIG_STATUS
<<
_ACEOF
|| ac_write_fail=1
ac_cs_config="`
$as_echo
"
$ac_configure_args
" | sed 's/^ //; s/[
\\
""
\`\$
]/
\\\\
&/g'`"
ac_cs_version="
\\
myconfig
config.status version-0.1
jellyfish
config.status version-0.1
configured by
$0
, generated by GNU Autoconf 2.68,
with options
\\
"
\$
ac_cs_config
\\
"
...
...
@@ -4493,7 +4506,18 @@ do
esac
as_fn_append CONFIG_FILES " '
$ac_optarg
'"
ac_need_defaults=false;;
--he | --h | --help | --hel | -h )
--header | --heade | --head | --hea )
$ac_shift
case
$ac_optarg
in
*
\'
*) ac_optarg=`
$as_echo
"
$ac_optarg
" | sed "s/'/'
\\\\\\\\
''/g"` ;;
esac
as_fn_append CONFIG_HEADERS " '
$ac_optarg
'"
ac_need_defaults=false;;
--he | --h)
# Conflict between --help and --header
as_fn_error
$?
"ambiguous option:
\`
$1
'
Try
\`
$0
--help' for more information.";;
--help | --hel | -h )
$as_echo
"
$ac_cs_usage
"; exit ;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q
\
| -silent | --silent | --silen | --sile | --sil | --si | --s)
...
...
@@ -4549,6 +4573,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
for ac_config_target in
$ac_config_targets
do
case
$ac_config_target
in
"src/config.h") CONFIG_HEADERS="
$CONFIG_HEADERS
src/config.h" ;;
"Makefile") CONFIG_FILES="
$CONFIG_FILES
Makefile" ;;
*) as_fn_error
$?
"invalid argument:
\`
$ac_config_target
'" "
$LINENO
" 5;;
...
...
@@ -4562,6 +4587,7 @@ done
# bizarre bug on SunOS 4.1.3.
if
$ac_need_defaults
; then
test "
${
CONFIG_FILES
+set
}
" = set || CONFIG_FILES=
$config_files
test "
${
CONFIG_HEADERS
+set
}
" = set || CONFIG_HEADERS=
$config_headers
fi
# Have a temporary directory for convenience. Make it in the build tree
...
...
@@ -4749,8 +4775,116 @@ fi
cat
>>
$CONFIG_STATUS
<<
\
_ACEOF
|| ac_write_fail=1
fi # test -n "
$CONFIG_FILES
"
# Set up the scripts for CONFIG_HEADERS section.
# No need to generate them if there are no CONFIG_HEADERS.
# This happens for instance with `./config.status Makefile'.
if test -n "
$CONFIG_HEADERS
"; then
cat >"
$ac_tmp
/defines.awk" <<
\_
ACAWK ||
BEGIN {
_ACEOF
# Transform confdefs.h into an awk script `defines.awk', embedded as
# here-document in config.status, that substitutes the proper values into
# config.h.in to produce config.h.
# Create a delimiter string that does not exist in confdefs.h, to ease
# handling of long lines.
ac_delim
=
'%!_!# '
for
ac_last_try
in
false false
:
;
do
ac_tt
=
`
sed
-n
"/
$ac_delim
/p"
confdefs.h
`
if
test
-z
"
$ac_tt
"
;
then
break
elif
$ac_last_try
;
then
as_fn_error
$?
"could not make
$CONFIG_HEADERS
"
"
$LINENO
"
5
else
ac_delim
=
"
$ac_delim
!
$ac_delim
_
$ac_delim
!! "
fi
done
# For the awk script, D is an array of macro values keyed by name,
# likewise P contains macro parameters if any. Preserve backslash
# newline sequences.
ac_word_re
=[
_
$as_cr_Letters
][
_
$as_cr_alnum
]
*
sed
-n
'
s/.\{148\}/&'
"
$ac_delim
"
'/g
t rset
:rset
s/^[ ]*#[ ]*define[ ][ ]*/ /
t def
d
:def
s/\\$//
t bsnl
s/["\\]/\\&/g
s/^ \('
"
$ac_word_re
"
'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
D["\1"]=" \3"/p
s/^ \('
"
$ac_word_re
"
'\)[ ]*\(.*\)/D["\1"]=" \2"/p
d
:bsnl
s/["\\]/\\&/g
s/^ \('
"
$ac_word_re
"
'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
D["\1"]=" \3\\\\\\n"\\/p
t cont
s/^ \('
"
$ac_word_re
"
'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
t cont
d
:cont
n
s/.\{148\}/&'
"
$ac_delim
"
'/g
t clear
:clear
s/\\$//
t bsnlc
s/["\\]/\\&/g; s/^/"/; s/$/"/p
d
:bsnlc
s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
b cont
'
<confdefs.h |
sed
'
s/'
"
$ac_delim
"
'/"\\\
"/g'
>>
$CONFIG_STATUS
||
ac_write_fail
=
1
cat
>>
$CONFIG_STATUS
<<
_ACEOF
|| ac_write_fail=1
for (key in D) D_is_set[key] = 1
FS = ""
}
/^[
\t
]*#[
\t
]*(define|undef)[
\t
]+
$ac_word_re
([
\t
(]|
\$
)/ {
line =
\$
0
split(line, arg, " ")
if (arg[1] == "#") {
defundef = arg[2]
mac1 = arg[3]
} else {
defundef = substr(arg[1], 2)
mac1 = arg[2]
}
split(mac1, mac2, "(") #)
macro = mac2[1]
prefix = substr(line, 1, index(line, defundef) - 1)
if (D_is_set[macro]) {
# Preserve the white space surrounding the "#".
print prefix "define", macro P[macro] D[macro]
next
} else {
# Replace #undef with comments. This is necessary, for example,
# in the case of _POSIX_SOURCE, which is predefined and required
# on some systems where configure will not decide to define it.
if (defundef == "undef") {
print "/*", prefix defundef, macro, "*/"
next
}
}
}
{ print }
_ACAWK
_ACEOF
cat
>>
$CONFIG_STATUS
<<
\
_ACEOF
|| ac_write_fail=1
as_fn_error
$?
"could not setup config headers machinery" "
$LINENO
" 5
fi # test -n "
$CONFIG_HEADERS
"
eval set X " :F
$CONFIG_FILES
"
eval set X " :F
$CONFIG_FILES
:H
$CONFIG_HEADERS
"
shift
for ac_tag
do
...
...
@@ -4958,7 +5092,30 @@ which seems to be undefined. Please make sure it is defined" >&2;}
esac
\
|| as_fn_error
$?
"could not create
$ac_file
" "
$LINENO
" 5
;;
:H)
#
# CONFIG_HEADER
#
if test x"
$ac_file
" != x-; then
{
$as_echo
"/*
$configure_input
*/"
\
&& eval '
$AWK
-f "
$ac_tmp
/defines.awk"' "
$ac_file_inputs
"
} >"
$ac_tmp
/config.h"
\
|| as_fn_error
$?
"could not create
$ac_file
" "
$LINENO
" 5
if diff "
$ac_file
" "
$ac_tmp
/config.h" >/dev/null 2>&1; then
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
:
$ac_file
is unchanged" >&5
$as_echo
"
$as_me
:
$ac_file
is unchanged" >&6;}
else
rm -f "
$ac_file
"
mv "
$ac_tmp
/config.h" "
$ac_file
"
\
|| as_fn_error
$?
"could not create
$ac_file
" "
$LINENO
" 5
fi
else
$as_echo
"/*
$configure_input
*/"
\
&& eval '
$AWK
-f "
$ac_tmp
/defines.awk"' "
$ac_file_inputs
"
\
|| as_fn_error
$?
"could not create -" "
$LINENO
" 5
fi
;;
esac
...
...
configure.ac
View file @
698d9dce
AC_INIT(
myconfig
, version-0.1)
AC_INIT(
jellyfish
, version-0.1)
echo " Testing for a C compiler"
AC_PROG_CC
echo " Testing for a C++ compiler"
...
...
@@ -13,8 +13,9 @@ AC_CHECK_LIB(pthread, main)
AC_CHECK_LIB(dl, main)
AC_CHECK_LIB(lo, main)
AC_CHECK_LIB(jpeg, main)
AC_CHECK_LIB(asound, main)
echo " Are we on Raspberry Pi?"
AC_CHECK_HEADERS(/opt/vc/include/bcm_host.h)
AC_CONFIG_HEADER(src/config.h)
AC_OUTPUT(Makefile)
dist.sh
0 → 100755
View file @
698d9dce
# clean up
make distclean
# build src/config.h from configure.ac
autoheader
# build configure
autoconf configure.ac
>
configure
src/core/pixels.cpp
View file @
698d9dce
...
...
@@ -113,7 +113,7 @@ unsigned char* LoadPNG(const string filename,long &width, long &height)
return
data
;
}
#ifdef
USE_JPGLIB
#ifdef
HAVE_LIBJPEG
int
WriteJPG
(
GLubyte
*
image
,
const
char
*
filename
,
const
char
*
description
,
int
x
,
int
y
,
int
width
,
int
height
,
int
quality
,
int
super
)
{
...
...
src/core/pixels.h
View file @
698d9dce
#include <png.h>
#include "engine/importgl.h"
#ifdef
USE_JPGLIB
#ifdef
HAVE_LIBJPEG
extern
"C"
{
#include <jpeglib.h>
...
...
@@ -10,6 +10,6 @@ extern "C"
GLubyte
*
GetScreenBuffer
(
int
x
,
int
y
,
unsigned
int
width
,
unsigned
int
height
,
int
super
);
unsigned
char
*
LoadPNG
(
const
string
filename
,
long
&
width
,
long
&
height
);
#ifdef
USE_JPGLIB
#ifdef
HAVE_LIBJPEG
int
WriteJPG
(
GLubyte
*
image
,
const
char
*
filename
,
const
char
*
description
,
int
x
,
int
y
,
int
width
,
int
height
,
int
quality
,
int
super
);
#endif
src/core/types.h
View file @
698d9dce
...
...
@@ -15,12 +15,18 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "fixed.h"
#include "config.h"
#ifndef FLX_TYPES
#define FLX_TYPES
#include <math.h>
// autoconf can tell us if we are on Pi
#ifdef HAVE__OPT_VC_INCLUDE_BCM_HOST_H
#define FLX_RPI
#endif
#ifndef _EE
typedef
unsigned
char
u8
;
typedef
char
s8
;
...
...
@@ -38,7 +44,8 @@ typedef Fixed x32;
using
namespace
bb
;
#ifdef FLX_LINUX
//-Linux--------------------------------
//-Linux/RPI---------------------------
// use the fixed point version here
#define flx_real x32
#else
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment