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 Aug 20, 2018

(pipe file to paste buffer

cat test.cc | xclip -selection c

)

//////////////////////////////////////////////////////////////////////////////////
// This is the translated version of script "test.tao".
//
// It contains automatically generated definitions for the following functions
// which are required by the Tao library in order to produce a complete
// executable:
//
//   int    taoAudioRate()	- returns the audio sampling rate in Hz.
//   float  taoScoreDuration()	- returns the duration of the score
//				  in seconds.
//   void   taoInit()		- this function is called just before execution
//				  of the score and contains user specified code
//				  for initialising variable values, devices,
//				  instruments and connections.
//   void   taoScore()		- this function is called once on every tick of
//				  the synthesis engine and contains all the code
//				  representing the user's time-domain inter-
//				  actions with the instruments and devices.
//
// The `main()' function defined at the end of this generated file registers
// the functions described above with the top level object `tao' (an instance
// of class `Tao'), and then invokes the member function `tao.main()'. This
// function enters the main synthesis engine loop which calculates the number
// of ticks specified by the score duration, and updates the graphics window
// (if graphics mode is on). It only exits if the graphics window is closed, if
// the ESC key is pressed whilst the graphics window has the mouse focus, if
// CTRL-C is pressed in the shell window from which Tao was invoked, or the
// `performance' reaches its natural conclusion.
//////////////////////////////////////////////////////////////////////////////////

#include "taodefs.h" 
#include <cmath>
#include <iostream>

Tao tao;


// Audio rate: <sample_rate> ;

int taoAudioRate() {return 44100;}



// Declarations

TaoCircle
    c("c", TaoPitch(800.000f, TaoPitch::frq), 20.0000f);

TaoString
    strings[4]=
        {
        TaoString("strings[0]", TaoPitch(800.000f, TaoPitch::frq), 20.0000f),
        TaoString("strings[1]", TaoPitch(810.000f, TaoPitch::frq), 20.0000f),
        TaoString("strings[2]", TaoPitch(820.000f, TaoPitch::frq), 20.0000f),
        TaoString("strings[3]", TaoPitch(830.000f, TaoPitch::frq), 20.0000f)
        };

TaoRectangle
    r("r", TaoPitch(800.000f, TaoPitch::frq), TaoPitch(900.000f, TaoPitch::frq), 20.0000f);

TaoTriangle
    t("t", TaoPitch(800.000f, TaoPitch::frq), TaoPitch(900.000f, TaoPitch::frq), 20.0000f);


TaoConnector conn1("conn1") , conn2("conn2") , conn3("conn3") , conn4("conn4");
#line 14 "test.tao"
int s;

// Init: <statements> ...

void taoInit()
    {
#line 17 "test.tao"
    for(s=0;s<=3;s++)
        {
#line 18 "test.tao"
        strings [ s ] . lockEnds ( );
        }

#line 21 "test.tao"
    c . lockPerimeter ( );
#line 22 "test.tao"
    r . lockCorners ( );
#line 23 "test.tao"
    t . lockLeft ( ) . lockRight ( );
#line 25 "test.tao"
    conn1(strings [ 0 ] ( 0.100000f ), strings [ 1 ] ( 0.100000f ));
#line 26 "test.tao"
    conn2(strings [ 1 ] ( 0.900000f ), strings [ 2 ] ( 0.900000f ));
#line 27 "test.tao"
    conn3(strings [ 2 ] ( 0.100000f ), strings [ 3 ] ( 0.100000f ));
#line 29 "test.tao"
    conn4(r ( 0.600000f , 0.200000f ), 0.00000f);
#line 31 "test.tao"
    r . placeRightOf ( c , 20 );
#line 32 "test.tao"
    t . placeAbove ( r );
    }

// Score <duration> : <statements> ...

float taoScoreDuration() {return 20.0000f;}

void taoScore()
    {
    tao.initStartAndEnd();

    if(Tick<=(long)((tao.newEnd=tao.start*
1.00000+0.000100000f)*
     tao.synthesisEngine.modelSampleRate) &&
     Tick>=(long)((tao.newStart=tao.start)*
     tao.synthesisEngine.modelSampleRate))
        {
        tao.pushStartAndEnd1();
#line 37 "test.tao"
        strings [ 0 ] ( 0.100000f ) . applyForce ( 1.00000f );
#line 38 "test.tao"
        strings [ 1 ] ( 0.100000f ) . applyForce ( 1.00000f );
#line 39 "test.tao"
        strings [ 2 ] ( 0.100000f ) . applyForce ( 1.00000f );
#line 40 "test.tao"
        strings [ 3 ] ( 0.100000f ) . applyForce ( 1.00000f );
#line 42 "test.tao"
        c ( 0.100000f , 0.500000f ) . applyForce ( 10.0000f );
#line 43 "test.tao"
        r ( 0.700000f , 0.800000f ) . applyForce ( 10.0000f );
#line 44 "test.tao"
        t ( 0.800000f , 0.600000f ) . applyForce ( 10.0000f );
        tao.popStartAndEnd();
        }


    tao.popStartAndEnd();
    }

main(int argc, char *argv[])
    {
    tao.initStartAndEnd();
    tao.audioRateFunc(taoAudioRate);
    tao.initFunc(taoInit);
    tao.scoreDurationFunc(taoScoreDuration);
    tao.scoreFunc(taoScore);
    tao.main(argc, argv);
    }


// End of C++ program generated from script "test.tao"

Running this doesn't open a gui though, just prints

Sample rate=44100 Hz
Score duration=5 seconds
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
...
4.4
4.5
4.6
4.7
4.8
4.9
5

The manual says a graphical window should open.
Did it not configure correctly?

configure was failing on the conftest.c test.
Need stdlib.h

Also choke me?

No it is working, use -g for graphics.

@lucasw
Copy link
Author

lucasw commented Aug 20, 2018

It's actually in ubuntu repo as taopm, didn't need to compile initially (but I am going to make changes).

sudo apt install taopm

Just delete $HOME/other/install/bin/tao for now and use /usr/bin/tao for convenience.

It works more properly (but don't see any output files)- no Bad fd.
Maybe should have started from sourceforge version, of figure out which version is getting built for ubuntu.

@lucasw
Copy link
Author

lucasw commented Aug 20, 2018

Speeding up the visualization results in the same numbers as no visualization in stdout, but no output files for conversion to a wav.

taopm

@lucasw
Copy link
Author

lucasw commented Aug 20, 2018

Only bow.tao, accesspoint2.tao, outputarray.tao, and outputs.tao output dat files (all of them ought to).

bow outputs 5 dat files bow_outputs_0.dat through bow_outputs_4.dat - but the sounds in the waves converted from them don't sound very interesting.
Probably all of them together make the sound.

It seems like the simulation can run real time- the time to generate the dat files was not very long given the length of the output wav files
(but more complex and interesting instruments probably are slower than real time).

Tried the other examples and only hear synthetic tones.

The main example page has one tao files:

http://taopm.sourceforge.net/examples/40strings.tao

Ran it and it sounds similar to the mp3 on that page.

There are screenshots of other examples but no links to .tao files for them.
Are there others on the internet?

Running 40strings.exe takes 50 seconds for 30 seconds of output, so could be live at half speed.
It is taking 100% of one cpu core, maybe multi-threading is possible but likely very non-trivial.

@lucasw
Copy link
Author

lucasw commented Aug 20, 2018

Writing in the .tao format just adds a compilation steps that seems unnecessary, instead work directly with C++ files.

@lucasw
Copy link
Author

lucasw commented Sep 22, 2018

Going to try out lambda (what is it with the impossible to google names?), also look at http://www.openpstd.org/
https://github.com/openPSTD/openPSTD .

lambda

cd lambda/src
/usr/lib/qt5/bin/qmake lambda.pro
make
...
lambda.h:25:10: fatal error: QApplication: No such file or directory
 #include <QApplication>

Add /usr/include/x86_64-linux-gnu/qt5/QtWidgets to lambda.pro include dirs.

Next

g++ -Wl,-O1 -o Lambda lambda.o main.o moc_lambda.o   -L. -lrevel -lxvidcore -lX11 -L/opt/X11/lib -L/opt/local/lib -lQt5Gui -lQt5Core -lGL -lpthread 
/usr/bin/x86_64-linux-gnu-ld: cannot find -lrevel
/usr/bin/x86_64-linux-gnu-ld: cannot find -lxvidcore
collect2: error: ld returned 1 exit status
sudo apt install libxvidcore-dev

revel

Need to go into dependencies and build revel 1.2.0.

Many of the build files in revel-1.2.0 are symlinks, probably locations on the harddrive of whoever pushed this.

Try deleting them and replacing them with copies from revel-1.1.0 tree.

$ make
CDPATH="${ZSH_VERSION+.}:" && cd . && aclocal-1.14 
/bin/bash: aclocal-1.14: command not found
Makefile:345: recipe for target 'aclocal.m4' failed
make: *** [aclocal.m4] Error 127

Change 1.14 to 1.15 in configure.

CDPATH="${ZSH_VERSION+.}:" && cd . && aclocal-1.15 
configure.ac:27: warning: macro 'AM_PATH_XVID' not found in library
 cd . && automake-1.15 --gnu
configure.ac:3: warning: AM_INIT_AUTOMAKE: two- and three-arguments forms are deprecated.  For more info, see:
configure.ac:3: http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_005fINIT_005fAUTOMAKE-invocation
configure.ac:5: error: required file './compile' not found
configure.ac:5:   'automake --add-missing' can install 'compile'
Makefile.am: error: required file './INSTALL' not found
Makefile.am:   'automake --add-missing' can install 'INSTALL'

Maybe can just comment out usage of this library?
No need for integrate video encoding.

Need Qt5Widgets library.

@lucasw
Copy link
Author

lucasw commented Sep 22, 2018

lambda_synth

Ran a simulation but don't see anything happening- do sound signals get injected separately?

Ran example.sim and there is a source in the middle, but no walls, it ends before any edges are reached.

Need to set the iterations to 0, which is infinite.

@lucasw
Copy link
Author

lucasw commented Sep 22, 2018

https://github.com/lucasw/lambda/tree/ubuntu_1804

Install:

cp Lambda ~/other/install/bin/

Next try https://github.com/gesellkammer/lambdasim

Adapting lambda

There is one big lambda.cpp file with everything in it, could extract just the necessary functions:

  • adaptfilter()
  • adaptreflexionfactor()
  • processSim() - there is a lot of special case code for various signal sources, probably want to eliminate that and only support samples unless there is something better about the special case sine wave vs. a sampled one.
  • initSimulation() - a lot of the arrays and dynamic memory ought to be updated.
  • loadSimulation() - this needs the most adapting, want everything it does to be done differently.
  • defineSource()
  • set() some parts of this may be needed
  • resetAll()
  • initVariables()

@lucasw
Copy link
Author

lucasw commented Sep 29, 2018

OpenPSTD

Ubuntu 18.04

fatal error: Eigen/Core: No such file or directory
 #include <Eigen/Core>

It's in /usr/include/eigen3/Eigen/Core so it isn't getting found properly.

build_openpstd$ cmake ../openPSTD/ -DEIGEN_INCLUDE=/usr/include/eigen3
openPSTD/kernel/DG/Jacobi.h:152:26: error: ‘vector’ is not a member of ‘std’

openPSTD/openPSTD#130

@lucasw
Copy link
Author

lucasw commented Sep 29, 2018

[ 16%] Building CXX object CMakeFiles/OpenPSTD.dir/kernel/DG/LEE.cpp.o
In file included from /usr/include/eigen3/Eigen/Core:347:0,
                 from /usr/include/eigen3/Eigen/Dense:1,
                 from /home/lucasw/own/github/sound/openPSTD/kernel/DG/LEE.h:35,
                 from /home/lucasw/own/github/sound/openPSTD/kernel/DG/LEE.cpp:32:
/usr/include/eigen3/Eigen/src/Core/AssignEvaluator.h: In instantiation of ‘void Eigen::internal::call_assignment_no_alias(Dst&, const Src&, const Func&) [with Dst = Eigen::Matrix<float, -1, 1>; Src = Eigen::CwiseUnaryOp<OpenPSTD::Kernel::DG::LinearizedEulerEquationsDE<SimpleType>::Initialize(std::shared_ptr<OpenPSTD::Kernel::DG::Element1D<SimpleType> >) [with SimpleType = float]::<lambda(float)>, const Eigen::Matrix<float, -1, 1> >; Func = Eigen::internal::assign_op<float, double>]’:
/usr/include/eigen3/Eigen/src/Core/AssignEvaluator.h:804:27:   required from ‘void Eigen::internal::call_assignment(Dst&, const Src&, const Func&, typename Eigen::internal::enable_if<(! Eigen::internal::evaluator_assume_aliasing<Src>::value), void*>::type) [with Dst = Eigen::Matrix<float, -1, 1>; Src = Eigen::CwiseUnaryOp<OpenPSTD::Kernel::DG::LinearizedEulerEquationsDE<SimpleType>::Initialize(std::shared_ptr<OpenPSTD::Kernel::DG::Element1D<SimpleType> >) [with SimpleType = float]::<lambda(float)>, const Eigen::Matrix<float, -1, 1> >; Func = Eigen::internal::assign_op<float, double>; typename Eigen::internal::enable_if<(! Eigen::internal::evaluator_assume_aliasing<Src>::value), void*>::type = void*]’
/usr/include/eigen3/Eigen/src/Core/AssignEvaluator.h:782:18:   required from ‘void Eigen::internal::call_assignment(Dst&, const Src&) [with Dst = Eigen::Matrix<float, -1, 1>; Src = Eigen::CwiseUnaryOp<OpenPSTD::Kernel::DG::LinearizedEulerEquationsDE<SimpleType>::Initialize(std::shared_ptr<OpenPSTD::Kernel::DG::Element1D<SimpleType> >) [with SimpleType = float]::<lambda(float)>, const Eigen::Matrix<float, -1, 1> >]’
/usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h:710:32:   required from ‘Derived& Eigen::PlainObjectBase<Derived>::_set(const Eigen::DenseBase<OtherDerived>&) [with OtherDerived = Eigen::CwiseUnaryOp<OpenPSTD::Kernel::DG::LinearizedEulerEquationsDE<SimpleType>::Initialize(std::shared_ptr<OpenPSTD::Kernel::DG::Element1D<SimpleType> >) [with SimpleType = float]::<lambda(float)>, const Eigen::Matrix<float, -1, 1> >; Derived = Eigen::Matrix<float, -1, 1>]’
/usr/include/eigen3/Eigen/src/Core/Matrix.h:225:24:   required from ‘Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>& Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>::operator=(const Eigen::DenseBase<OtherDerived>&) [with OtherDerived = Eigen::CwiseUnaryOp<OpenPSTD::Kernel::DG::LinearizedEulerEquationsDE<SimpleType>::Initialize(std::shared_ptr<OpenPSTD::Kernel::DG::Element1D<SimpleType> >) [with SimpleType = float]::<lambda(float)>, const Eigen::Matrix<float, -1, 1> >; _Scalar = float; int _Rows = -1; int _Cols = 1; int _Options = 0; int _MaxRows = -1; int _MaxCols = 1]’
/home/lucasw/own/github/sound/openPSTD/kernel/DG/LEE.h:147:40:   required from ‘void OpenPSTD::Kernel::DG::LinearizedEulerEquationsDE<SimpleType>::Initialize(std::shared_ptr<OpenPSTD::Kernel::DG::Element1D<SimpleType> >) [with SimpleType = float]’
/home/lucasw/own/github/sound/openPSTD/kernel/DG/LEE.cpp:36:16:   required from here
/usr/include/eigen3/Eigen/src/Core/util/StaticAssert.h:32:40: error: static assertion failed: YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY
     #define EIGEN_STATIC_ASSERT(X,MSG) static_assert(X,#MSG);
                                        ^
/usr/include/eigen3/Eigen/src/Core/util/XprHelper.h:816:3: note: in expansion of macro ‘EIGEN_STATIC_ASSERT’
   EIGEN_STATIC_ASSERT((Eigen::internal::has_ReturnType<ScalarBinaryOpTraits<LHS, RHS,BINOP> >::value), \
   ^~~~~~~~~~~~~~~~~~~
/usr/include/eigen3/Eigen/src/Core/AssignEvaluator.h:834:3: note: in expansion of macro ‘EIGEN_CHECK_BINARY_COMPATIBILIY’
   EIGEN_CHECK_BINARY_COMPATIBILIY(Func,typename ActualDstTypeCleaned::Scalar,typename Src::Scalar);
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CMakeFiles/OpenPSTD.dir/build.make:542: recipe for target 'CMakeFiles/OpenPSTD.dir/kernel/DG/LEE.cpp.o' failed

Commenting out all the templates that cause this- they all seem to be <float> types that aren't used anywhere in the code (but maybe other code uses them within a library?).

@lucasw
Copy link
Author

lucasw commented Sep 29, 2018

hdf5.h isn't found, so:

cmake ../openPSTD/ -DEIGEN_INCLUDE=/usr/include/eigen3 -DHDF5_INCLUDE=/usr/include/hdf5/openmpi
In file included from /usr/include/hdf5/openmpi/hdf5.h:24:0,
                 from /home/lucasw/own/github/sound/openPSTD/shared/export/HDF5Export.cpp:8:
/usr/include/hdf5/openmpi/H5public.h:61:13: fatal error: mpi.h: No such file or directory
 #   include <mpi.h>

There is also a hdf5/serial directory with hdf5.h in it.

cmake ../openPSTD/ -DEIGEN_INCLUDE=/usr/include/eigen3 -DHDF5_INCLUDE=/usr/include/hdf5/serial
[ 30%] Linking CXX executable OpenPSTD-cli
libOpenPSTD.so: undefined reference to `fftwf_destroy_plan'
libOpenPSTD-shared.so: undefined reference to `H5Fcreate'
libOpenPSTD.so: undefined reference to `fftwf_free'
libOpenPSTD.so: undefined reference to `Eigen::Matrix<float, -1, 1, 0, -1, 1> OpenPSTD::Kernel::DG::Simplex2DP<float>(Eigen::Array<float, -1, -1, 0, -1, -1>, int, int)'
libOpenPSTD-shared.so: undefined reference to `H5check_version'
libOpenPSTD.so: undefined reference to `fftwf_plan_many_dft_r2c'
libOpenPSTD.so: undefined reference to `OpenPSTD::Kernel::DG::GradSimplex2DPResult<float> OpenPSTD::Kernel::DG::GradSimplex2DP<float>(Eigen::Array<float, -1, -1, 0, -1, -1>, int, int)'
libOpenPSTD.so: undefined reference to `fftwf_execute_dft_r2c'
libOpenPSTD-shared.so: undefined reference to `H5open'
libOpenPSTD-shared.so: undefined reference to `H5T_NATIVE_FLOAT_g'
libOpenPSTD.so: undefined reference to `fftwf_execute_dft_c2r'
libOpenPSTD-shared.so: undefined reference to `H5Fclose'
libOpenPSTD-shared.so: undefined reference to `H5Gclose'
libOpenPSTD-shared.so: undefined reference to `H5Gcreate2'
libOpenPSTD.so: undefined reference to `Eigen::Array<float, -1, 1, 0, -1, 1> OpenPSTD::Kernel::DG::WarpFactor<float>(int, Eigen::Matrix<float, -1, 1, 0, -1, 1>)'
libOpenPSTD.so: undefined reference to `fftwf_malloc'
libOpenPSTD.so: undefined reference to `fftwf_plan_many_dft_c2r'
libOpenPSTD-shared.so: undefined reference to `H5LTmake_dataset'
collect2: error: ld returned 1 exit status

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 -DFFTWF_LIBRARY=/usr/lib/x86_64-linux-gnu/libfftw3f.so

But now the consequences of removing the eigen matrices is seen:

libOpenPSTD.so: undefined reference to `Eigen::Matrix<float, -1, 1, 0, -1, 1> OpenPSTD::Kernel::DG::Simplex2DP<float>(Eigen::Array<float, -1, -1, 0, -1, -1>, int, int)'
libOpenPSTD.so: undefined reference to `OpenPSTD::Kernel::DG::GradSimplex2DPResult<float> OpenPSTD::Kernel::DG::GradSimplex2DP<float>(Eigen::Array<float, -1, -1, 0, -1, -1>, int, int)'
libOpenPSTD.so: undefined reference to `Eigen::Array<float, -1, 1, 0, -1, 1> OpenPSTD::Kernel::DG::WarpFactor<float>(int, Eigen::Matrix<float, -1, 1, 0, -1, 1>)'
libOpenPSTD-shared.so: undefined reference to `H5LTmake_dataset'

Also H5LTmake_dataset?

$ 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

@lucasw
Copy link
Author

lucasw commented Sep 29, 2018

https://github.com/micfort/openDG is many commits ahead (and renamed, has own issues)- possibly all related to a 'DG' kernel.
https://github.com/Louisvh/openPSTD is 18 commits ahead - these look all related to the build system, travis.

@lucasw
Copy link
Author

lucasw commented Sep 29, 2018

18.04 is using eigen 3.3.4-4, while pstd wants 3.2.6.
Download and use that version.

Now it builds successfully.

Ran ./openPSTD-gui, made new scene, ran simulation.
The view doesn't update to show latest frame, need to keep scrolling to right.

Seems slower that the FTDT application but maybe is more accurate, can do diagonal walls or walls with various physical properties better?

screenshot from 2018-09-29 13-15-01

@lucasw
Copy link
Author

lucasw commented Sep 29, 2018

Export frames doesn't prepend zeros, so test-1.jpg test-2.jpg .. test-20.jpg so they don't sort properly.

Don't see anything in exported images.

@lucasw
Copy link
Author

lucasw commented Sep 29, 2018

How to get microphone output out?

@lucasw
Copy link
Author

lucasw commented Sep 29, 2018

The pstd saved files does save all the rendered frames. 600 frames -> 32 MB.

@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