aboutsummaryrefslogtreecommitdiff
path: root/cad/basicdsp
diff options
context:
space:
mode:
authorDiane Bruce <db@FreeBSD.org>2008-08-17 20:22:21 +0000
committerDiane Bruce <db@FreeBSD.org>2008-08-17 20:22:21 +0000
commit4f21024b902b0ffa72685a164a5ef4d27e0a49b2 (patch)
tree13e97d3d3f30f64a4f5a938e4ed7224b57050e68 /cad/basicdsp
parent68dd2141d9591067683e0674564de91bcbc221d5 (diff)
downloadports-4f21024b902b0ffa72685a164a5ef4d27e0a49b2.tar.gz
ports-4f21024b902b0ffa72685a164a5ef4d27e0a49b2.zip
Notes
Diffstat (limited to 'cad/basicdsp')
-rw-r--r--cad/basicdsp/Makefile34
-rw-r--r--cad/basicdsp/distinfo3
-rw-r--r--cad/basicdsp/files/basicdsp.141
-rw-r--r--cad/basicdsp/files/patch-Makefile17
-rw-r--r--cad/basicdsp/files/patch-aboutdialog.cpp11
-rw-r--r--cad/basicdsp/files/patch-book.cpp14
-rw-r--r--cad/basicdsp/files/patch-book.h10
-rw-r--r--cad/basicdsp/files/patch-gui.cpp12
-rw-r--r--cad/basicdsp/pkg-descr7
9 files changed, 149 insertions, 0 deletions
diff --git a/cad/basicdsp/Makefile b/cad/basicdsp/Makefile
new file mode 100644
index 000000000000..acf4d05224ca
--- /dev/null
+++ b/cad/basicdsp/Makefile
@@ -0,0 +1,34 @@
+# New ports collection makefile for: basicdsp
+# Date created: 4 August 2008
+# Whom: Diane Bruce <db@db.net>
+#
+# $FreeBSD$
+#
+
+PORTNAME= basicdsp
+PORTVERSION= 1.0
+CATEGORIES= cad hamradio
+MASTER_SITES= http://wwwhome.cs.utwente.nl/~ptdeboer/ham/basicdsp/ \
+ ${MASTER_SITE_LOCAL}
+MASTER_SITE_SUBDIR= db
+EXTRACT_SUFX= .tgz
+
+MAINTAINER= db@FreeBSD.org
+COMMENT= A program for experimenting with simple audio DSP algorithms
+
+USE_DOS2UNIX= yes
+USE_WX= 2.6+
+WX_UNICODE= yes
+WX_COMPS= wx wx:build wx:run
+
+PLIST_FILES= bin/basicdsp
+MAN1= basicdsp.1
+
+post-patch:
+ @${REINPLACE_CMD} -e 's|%%WX_CONFIG%%|${WX_CONFIG}|g' ${WRKSRC}/Makefile
+
+do-install:
+ ${INSTALL_MAN} ${FILESDIR}/basicdsp.1 ${MANPREFIX}/man/man1/basicdsp.1
+ ${INSTALL_PROGRAM} ${WRKSRC}/basicdsp ${PREFIX}/bin/
+
+.include <bsd.port.mk>
diff --git a/cad/basicdsp/distinfo b/cad/basicdsp/distinfo
new file mode 100644
index 000000000000..ca0b1a9153ce
--- /dev/null
+++ b/cad/basicdsp/distinfo
@@ -0,0 +1,3 @@
+MD5 (basicdsp-1.0.tgz) = 2d7f0f1c56a3398657b876f20c2a5311
+SHA256 (basicdsp-1.0.tgz) = ca2f2c22bd2974fc9dd8bbc1791630bf533f1c739e834926b9aa7e99edb485f7
+SIZE (basicdsp-1.0.tgz) = 56542
diff --git a/cad/basicdsp/files/basicdsp.1 b/cad/basicdsp/files/basicdsp.1
new file mode 100644
index 000000000000..2bd112485a5e
--- /dev/null
+++ b/cad/basicdsp/files/basicdsp.1
@@ -0,0 +1,41 @@
+.Dd June 16, 2008
+.Os Unix
+.Dt basicdsp 1
+.Sh NAME
+.Nm basicdsp
+.Nd DSP demonstration program
+.Sh SYNOPSIS
+A program for experimenting with simple audio DSP algorithms.
+.Sh DESCRIPTION
+.Pp
+BasicDSP is a program to apply simple Digital Signal Processing algorithms
+to audio signals. The input can either be taken from the sound card, or
+be a locally generated sine wave, white noise or impulse signal. The output
+is fed to the sound card, as well as to a virtual oscilloscope and spectrum
+analyzer.
+.Pp
+The DSP algorithm itself is specified in a very straightforward programming
+language which has only assignment statements (and on unix a print statement).
+Each line contains one statement, and all lines are executed once for each
+incoming sample. The input sample is available in variables named 'in',
+'inl' (left channel) and 'inr' (right channel). The program should write the
+output into variables named 'out', 'outl' and/or 'outr'.
+Here's a simple example program:
+
+ a = a + slider1 * (in - a)
+ outl = a
+ outr = fir(in, 0.1, 0.3, 0.3, 0.1)
+.Pp
+This illustrates defining new variables ('a' in the example), the use of
+the sliders, and the use of a built-in function like fir().
+The help-menu gives access to a complete list of built-in variables and
+functions.
+.Pp
+Note: the program was originally written to accompany a series of articles
+on Software-Defined Radio appearing in the Dutch amateur radio journal
+\'Electron\'. Another tutorial appeared in the December 2007 issue of SPRAT.
+.Sh PROJECT WEBSITE, DOCUMENTATION
+http://wwwhome.cs.utwente.nl/~ptdeboer/ham/basicdsp/
+.Pp
+.Sh AUTHORS
+Pieter-Tjerk de Boer, Niels A. Moseley
diff --git a/cad/basicdsp/files/patch-Makefile b/cad/basicdsp/files/patch-Makefile
new file mode 100644
index 000000000000..ef61085c2c97
--- /dev/null
+++ b/cad/basicdsp/files/patch-Makefile
@@ -0,0 +1,17 @@
+--- Makefile.orig 2007-12-02 17:18:59.000000000 -0500
++++ Makefile 2008-08-14 10:13:05.000000000 -0400
+@@ -1,5 +1,5 @@
+-CXXFLAGS = -O9 -g -Wall `wx-config --cxxflags` -g -Wall -pg
+-LDFLAGS = `wx-config --libs` -lm -g -pg
++CXXFLAGS += -Wall `%%WX_CONFIG%% --cxxflags --unicode=yes`
++LDFLAGS = `%%WX_CONFIG%% --libs --unicode=yes` -lm
+
+ OBJS = aboutdialog.o book.o core.o displayslider.o graphframe.o gui.o linux.o vu_meter.o spectrumplot.o fft4g.o wav_streamer.o
+
+@@ -11,5 +11,5 @@
+ ./mkhelp > help.h
+
+ basicdsp: help.h $(OBJS)
+- g++ $(LDFLAGS) $(OBJS) -o basicdsp
++ ${CXX} $(LDFLAGS) $(OBJS) -o basicdsp
+
diff --git a/cad/basicdsp/files/patch-aboutdialog.cpp b/cad/basicdsp/files/patch-aboutdialog.cpp
new file mode 100644
index 000000000000..733a17d2aae8
--- /dev/null
+++ b/cad/basicdsp/files/patch-aboutdialog.cpp
@@ -0,0 +1,11 @@
+--- aboutdialog.cpp.orig 2008-08-16 23:33:09.000000000 -0400
++++ aboutdialog.cpp 2008-08-16 23:34:13.000000000 -0400
+@@ -29,7 +29,7 @@
+ // to clean this up would mean patching wxWidgets :(
+ splash_xpm = new wxImage(basicdsp_splash_xpm);
+ if (splash_xpm != NULL)
+- splash_bitmap = new wxBitmap(splash_xpm);
++ splash_bitmap = new wxBitmap((const wxImage&)splash_xpm);
+
+ if ((splash_bitmap!=NULL) && (splash_bitmap->Ok()))
+ {
diff --git a/cad/basicdsp/files/patch-book.cpp b/cad/basicdsp/files/patch-book.cpp
new file mode 100644
index 000000000000..d3e6d985c2f5
--- /dev/null
+++ b/cad/basicdsp/files/patch-book.cpp
@@ -0,0 +1,14 @@
+--- book.cpp.orig 2008-08-16 23:28:51.000000000 -0400
++++ book.cpp 2008-08-16 23:31:02.000000000 -0400
+@@ -30,6 +30,11 @@
+ {
+ }
+
++int wxBook::ChangeSelection(size_t n)
++{
++ return n;
++}
++
+ int wxBook::SetSelection(size_t n)
+ {
+ int old_selected = m_selected;
diff --git a/cad/basicdsp/files/patch-book.h b/cad/basicdsp/files/patch-book.h
new file mode 100644
index 000000000000..0295be8e622a
--- /dev/null
+++ b/cad/basicdsp/files/patch-book.h
@@ -0,0 +1,10 @@
+--- book.h.orig 2008-08-16 23:28:06.000000000 -0400
++++ book.h 2008-08-16 23:29:07.000000000 -0400
+@@ -27,6 +27,7 @@
+ virtual int GetSelection() const { return m_selected;};
+ virtual wxSize CalcSizeFromPage(const wxSize& sizePage) const;
+
++ virtual int ChangeSelection(size_t n);
+ virtual int SetSelection(size_t n);
+
+ // the same as AddPage(), but adds the page at the specified position
diff --git a/cad/basicdsp/files/patch-gui.cpp b/cad/basicdsp/files/patch-gui.cpp
new file mode 100644
index 000000000000..7b78e79cc934
--- /dev/null
+++ b/cad/basicdsp/files/patch-gui.cpp
@@ -0,0 +1,12 @@
+--- gui.cpp.orig 2008-08-16 23:38:20.000000000 -0400
++++ gui.cpp 2008-08-16 23:38:29.000000000 -0400
+@@ -631,6 +631,9 @@
+ #endif
+ }
+
++#ifndef wxHIDE_READONLY
++#define wxHIDE_READONLY 0
++#endif
+
+ void MyFrame::OnOpen(wxCommandEvent& WXUNUSED(event))
+ {
diff --git a/cad/basicdsp/pkg-descr b/cad/basicdsp/pkg-descr
new file mode 100644
index 000000000000..52e9cdbca222
--- /dev/null
+++ b/cad/basicdsp/pkg-descr
@@ -0,0 +1,7 @@
+BasicDSP is an educational tool that makes it easy to experiment with simple
+Digital Signal Processing algorithms for audio signals. The input can either
+be taken from the sound card, or be a locally generated sine wave, white noise
+or impulse signal. The output is fed to the sound card, as well as to a virtual
+oscilloscope and spectrum analyzer.
+
+WWW: http://wwwhome.cs.utwente.nl/~ptdeboer/ham/basicdsp/