Applied manpage patch and started work on autotools stuff. The working Makefile has been renamed to Makefile.backup in the meantime.

This commit is contained in:
grimfang4
2010-04-17 16:13:48 +00:00
parent 631868ca80
commit aade07af15
7 changed files with 287 additions and 0 deletions

10
sfxr/Makefile.am Normal file
View File

@@ -0,0 +1,10 @@
AUTOMAKE_OPTIONS = foreign
CFLAGS = --pedantic -Wall -O2
CXXFLAGS=$(CFLAGS) `sdl-config --cflags` `pkg-config gtk+-2.0 --cflags`
CPPFLAGS=-DDATADIR='$(pkgdatadir)'
LDFLAGS=`sdl-config --libs` `pkg-config gtk+-2.0 --libs`
bin_PROGRAMS = sfxr
sfxr_SOURCES := main.cpp ddrawkit.h sdlkit.h tools.h

43
sfxr/Makefile.backup Normal file
View File

@@ -0,0 +1,43 @@
# Copyright (c) 2007 mjau/GerryJJ
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
CFLAGS=-ggdb
CXXFLAGS=$(CFLAGS) `sdl-config --cflags` `pkg-config gtk+-2.0 --cflags`
LDFLAGS=`sdl-config --libs` `pkg-config gtk+-2.0 --libs`
sfxr: main.cpp tools.h sdlkit.h
$(CXX) $(CXXFLAGS) $(LDFLAGS) $< -o $@
install: sfxr
mkdir -p $(DESTDIR)/usr/bin
mkdir -p $(DESTDIR)/usr/share/sfxr
mkdir -p $(DESTDIR)/usr/share/applications
mkdir -p $(DESTDIR)/usr/share/icons/hicolor/48x48/apps
mkdir -p $(DESTDIR)/usr/share/man/man1
install -m 755 sfxr $(DESTDIR)/usr/bin
install -m 644 -p *.tga *.bmp $(DESTDIR)/usr/share/sfxr
install -p -m 644 sfxr.png \
$(DESTDIR)/usr/share/icons/hicolor/48x48/apps
desktop-file-install --vendor "" \
--dir $(DESTDIR)/usr/share/applications sfxr.desktop
install -m 644 -p sfxr.1 $(DESTDIR)/usr/share/man/man1
clean:
rm -f sfxr

5
sfxr/autogen.sh Executable file
View File

@@ -0,0 +1,5 @@
#! /bin/sh
aclocal \
&& automake --add-missing \
&& autoconf

38
sfxr/configure.ac Normal file
View File

@@ -0,0 +1,38 @@
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.64])
AC_INIT([sfxr], [1.2.0], [grimfang4@gmail.com],[sfxr-1.2.0.tar],[http://code.google.com/p/sfxr])
AM_INIT_AUTOMAKE(sfxr, 1.2.0)
AC_CONFIG_SRCDIR([sdlkit.h])
AC_CONFIG_HEADERS([config.h])
# Checks for programs.
AC_PROG_CXX
AC_PROG_CC
AC_PROG_INSTALL
# Checks for libraries.
# Checks for header files.
AC_CHECK_HEADERS([malloc.h stdlib.h string.h])
AC_CHECK_LIB(SDL, SDL_Init, [], [
echo "**Error** libSDL was not found."
exit -1
])
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
# Checks for library functions.
AC_FUNC_ERROR_AT_LINE
AC_FUNC_MALLOC
AC_CHECK_FUNCS([atexit memset pow])
#AC_CONFIG_FILES([Makefile])
AC_OUTPUT(Makefile)

BIN
sfxr/sfxr

Binary file not shown.

191
sfxr/sfxr.1 Normal file
View File

@@ -0,0 +1,191 @@
'\" t
.\" Title: sfxr
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
.\" Date: 04/04/2010
.\" Manual: \ \&
.\" Source: \ \&
.\" Language: English
.\"
.TH "SFXR" "1" "04/04/2010" "\ \&" "\ \&"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
sfxr \- sound effects generator
.SH "DESCRIPTION"
.sp
This is a little tool made in connection with the 10th Ludum Dare competition held in December 2007\&. Its original purpose was to provide a simple means of getting basic sound effects into a game for those people who were working hard to get their entries done within the 48 hours and didn\(cqt have time to spend looking for suitable ways of doing this\&.
.sp
The idea was that they could just hit a few buttons in this application and get some largely randomized effects that were custom in the sense that the user could accept/reject each proposed sound\&.
.SH "BASIC USAGE"
.sp
Start the application, then hit some of the buttons on the left side to generate random sounds matching the button descriptions\&.
.sp
Press "Export \&.WAV" to save the current sound as a WAV audio file\&. Click the buttons below to change WAV format in terms of bits per sample and sample rate\&.
.sp
If you find a sound that is sort of interesting but not quite what you want, you can drag some sliders around until it sounds better\&.
.sp
The Randomize button generates something completely random\&.
.sp
Mutate slightly alters the current parameters to automatically create a variation of the sound\&.
.SH "ADVANCED USAGE"
.sp
Figure out what each slider does and use them to adjust particular aspects of the current sound\&...
.sp
Press the right mouse button on a slider to reset it to a value of zero\&.
.sp
Press Space or Enter to play the current sound\&.
.sp
The Save/Load sound buttons allow saving and loading of program parameters to work on a sound over several sessions\&.
.sp
Volume setting is saved with the sound and exported to WAV\&. If you increase it too much there\(cqs a risk of clipping\&.
.sp
Some parameters influence the sound during playback (particularly when using a non\-zero repeat speed), and dragging these sliders can cause some interesting effects\&. To record this you will need to use an external recording application, for instance Audacity\&. Set the recording source in that application to "Wave", "Stereo Mix", "Mixed Output" or similar\&.
.sp
Using an external sound editor to capture and edit sound can also be used to string several sounds together for more complex results\&.
.SH "SLIDER DESCRIPTIONS"
.PP
\fBSquarewave\fR, \fBSawtooth\fR, \fBSinewave\fR, \fBNoise\fR
.RS 4
Selects the base waveform\&.
.RE
.PP
\fBAttack time\fR
.RS 4
The beginning of the sound, longer attack means a smoother start\&.
.RE
.PP
\fBSustain time\fR
.RS 4
How long the volume is held constant before fading out\&.
.RE
.PP
\fBSustain punch\fR
.RS 4
Cause a popping effect with increased (and falling) volume during the sustain phase\&.
.RE
.PP
\fBDecay time\fR
.RS 4
Fade\-out time\&.
.RE
.PP
\fBStart frequency\fR
.RS 4
Starting frequency of the sample\&. Has a large impact on the overall sound\&.
.RE
.PP
\fBMin frequency\fR
.RS 4
Represents a cutoff that stops all sound if it\(cqs passed during a downward slide\&.
.RE
.PP
\fBSlide\fR
.RS 4
Sets the speed at which the frequency should be swept (up or down)\&.
.RE
.PP
\fBDelta slide\fR
.RS 4
The "slide of slide", or rate of change in the slide speed\&.
.RE
.PP
\fBVibrato depth\fR, \fBVibrato speed\fR
.RS 4
Makes for an oscillating frequency effect at various strengths and rates\&.
.RE
.PP
\fBChange amount\fR
.RS 4
Pitch amount to change (up or down) after a certain delay\&.
.RE
.PP
\fBChange speed\fR
.RS 4
Time to wait before changing the pitch\&.
.RE
.PP
\fBSquare duty\fR
.RS 4
Describes its shape in terms of how large the positive versus negative sections are\&. This option applies to
\fBSquarewave\fR
waveforms only\&.
.RE
.PP
\fBDuty sweep\fR
.RS 4
Sweep amount of the waveform\&. This option applies to
\fBSquarewave\fR
waveforms only\&.
.RE
.PP
\fBRepeat speed\fR
.RS 4
When not zero, this parameter causes the frequency and duty parameters to be reset at regular intervals while the envelope and filter continue unhindered\&. This can make for some interesting pulsating effects\&.
.RE
.PP
\fBPhaser offset\fR
.RS 4
Overlay a delayed copy of the audio stream on top of itself, resulting in a kind of tight reverb or sci\-fi effect\&.
.RE
.PP
\fBPhaser sweep\fR
.RS 4
Sweep amount of the
\fBphaser offset\fR\&.
.RE
.PP
\fBLP filter cutoff\fR
.RS 4
Set the cutoff for the lowpass filter\&.
.RE
.PP
\fBLP filter cutoff sweep\fR
.RS 4
Sweep amount for the
\fBLP filter cutoff\fR\&.
.RE
.PP
\fBLP filter resonance\fR
.RS 4
Set the resonance for the lowpass filter\&.
.RE
.PP
\fBHP filter cutoff\fR
.RS 4
Set the cutoff for the highpass filter\&. It can be used to remove undesired low frequency hum in "light" sounds\&.
.RE
.PP
\fBHP filter cutoff sweep\fR
.RS 4
Sweep amount for the
\fBHP filter cutoff\fR\&.
.RE
.SH "COPYING"
.sp
Copyright (C) 2007 Tomas Pettersson <drpetter@gmail\&.com>\&. Permission is granted to copy, distribute and/or modify the software under the terms of the MIT license\&.
.SH "RESOURCES"
.sp
Main web site: http://code\&.google\&.com/p/sfxr/
.sp
Original author web site: http://www\&.drpetter\&.se/
.SH "AUTHOR"
.sp
This manual page is written by Bart Veldstra <bart\&.veldstra@gmail\&.com>, based on the original \fBreadme\&.txt\fR written by Tomas Pettersson\&. Permission is granted to copy, distribute and/or modify this document under the terms of the MIT license\&.