1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-31 10:46:16 +00:00

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.
This commit is contained in:
Diane Bruce 2008-08-17 20:22:21 +00:00
parent 68dd2141d9
commit 4f21024b90
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=218728
10 changed files with 150 additions and 0 deletions

View File

@ -9,6 +9,7 @@
SUBDIR += astk-client
SUBDIR += astk-serveur
SUBDIR += atlc
SUBDIR += basicdsp
SUBDIR += brlcad
SUBDIR += calculix
SUBDIR += cascade

34
cad/basicdsp/Makefile Normal file
View File

@ -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>

3
cad/basicdsp/distinfo Normal file
View File

@ -0,0 +1,3 @@
MD5 (basicdsp-1.0.tgz) = 2d7f0f1c56a3398657b876f20c2a5311
SHA256 (basicdsp-1.0.tgz) = ca2f2c22bd2974fc9dd8bbc1791630bf533f1c739e834926b9aa7e99edb485f7
SIZE (basicdsp-1.0.tgz) = 56542

View File

@ -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

View File

@ -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

View File

@ -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()))
{

View File

@ -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;

View File

@ -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

View File

@ -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))
{

7
cad/basicdsp/pkg-descr Normal file
View File

@ -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/