Skip to content

Instantly share code, notes, and snippets.

@lucasw
Last active October 2, 2018 13:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lucasw/574e325be0c4ccf7112e3d8f68caa954 to your computer and use it in GitHub Desktop.
Save lucasw/574e325be0c4ccf7112e3d8f68caa954 to your computer and use it in GitHub Desktop.

Inspiration:

Doom 2016 Music:

https://www.youtube.com/watch?v=U4FNBMZsqrY

https://www.youtube.com/watch?v=Jm932Sqwf5E&t=4516s

Physical Sound

Tao stringed instrument simulation

http://taopm.sourceforge.net/examples/sounds.html

(uploaded to github https://github.com/MindBuffer/tao - did they import version history? It doesn't look like it.)

Could convert to CMake.

sudo apt install libaudiofile-dev
cd tao
make distclean  # build artifacts were checked into source
cd ..
mkdir build_tao
cd build_tao
../tao/configure --prefix=$HOME/other/install
make
../../tao/libtao/Tao.cc: In member function 'void Tao::main(int, char**)':
../../tao/libtao/Tao.cc:156:14: error: 'EOF' was not declared in this scope
  if (option==EOF) break;

-> https://github.com/lucasw/tao build_ubuntu branch makes it build, but can't get examples to work:

Syntax error: Bad fd number

The contents of include didn't get installed, copy them to $HOME/other/install/include/tao manually

mkdir $HOME/other/install/include/tao
cp include/*.h /home/lucasw/other/install/include/tao

taoparse looks to have worked fine and generates a .cc file, just need to compile it. The tao script could easily be replaced.

taoparse test.tao > test.cc
g++ -O2 -I$HOME/other/install/include/tao -L$HOME/other/install/lib -DSCRIPTNAME=test.cc -o test.exe test.cc -ltao -lX11 -lXmu -lXi -lGL -lGLU -lpthread -lglut -lm

Lambda FDTD

https://github.com/gesellkammer/lambda

Python

Play sound in python.

Other

Din is Noise

Ardour?

@lucasw
Copy link
Author

lucasw commented Sep 29, 2018

Some of the branches on the official github are much more recent.

Probably should try 3.0 (most recently updated) or 3.1.

3.0 build with qmake but takes 100% cpu doing nothing but drawing the ui.

Tried to run simulation:

sh: 1: OpenPSTD-cli.exe: not found
Floating point exception (core dumped)

@lucasw
Copy link
Author

lucasw commented Sep 30, 2018

OpenPSTD 2.0 master branch

Same as the screenshot above.

Most attempts to change from default room then simulate result in crash:

=Viewer2D:: this->layers[4]->PaintGL
1281: invalid value
OpenPSTD-gui: /home/lucasw/own/github/sound/build_openPSTD/eigen/eigen/Eigen/src/Core/CwiseNullaryOp.h:63: Eigen::CwiseNullaryOp<NullaryOp, MatrixType>::CwiseNullaryOp(Eigen::CwiseNullaryOp<NullaryOp, MatrixType>::Index, Eigen::CwiseNullaryOp<NullaryOp, MatrixType>::Index, const NullaryOp&) [with NullaryOp = Eigen::internal::scalar_constant_op<float>; PlainObjectType = Eigen::Array<float, -1, -1>; Eigen::CwiseNullaryOp<NullaryOp, MatrixType>::Index = long int]: Assertion `nbRows >= 0 && (RowsAtCompileTime == Dynamic || RowsAtCompileTime == nbRows) && nbCols >= 0 && (ColsAtCompileTime == Dynamic || ColsAtCompileTime == nbCols)' failed.
Aborted (core dumped)

Try the openDG fork.

@lucasw
Copy link
Author

lucasw commented Sep 30, 2018

OpenDG (OpenPSTD 2.0 fork)

$ cmake ../openPSTD/ -DEIGEN_INCLUDE=/usr/include/eigen3 -DHDF5_INCLUDE=/usr/include/hdf5/serial -DHDF5_LIBRARY=/usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.so -DHDF5_HL_LIBRARY=/usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5_hl.so  -DFFTWF_LIBRARY=/usr/lib/x86_64-linux-gnu/libfftw3f.so

The eigen error is fixed there either, so use eigen 3.2.6

cmake ../openDG/ -DEIGEN_INCLUDE=../eigen -DHDF5_INCLUDE=/usr/include/hdf5/serial -DHDF5_LIBRARY=/usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.so -DHDF5_HL_LIBRARY=/usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5_hl.so  -DFFTWF_LIBRARY=/usr/lib/x86_64-linux-gnu/libfftw3f.s

It also crashes if any domains are added to the room.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment