Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build demo #18

Open
egpbos opened this issue Oct 30, 2017 · 5 comments
Open

Build demo #18

egpbos opened this issue Oct 30, 2017 · 5 comments

Comments

@egpbos
Copy link
Member

egpbos commented Oct 30, 2017

A cling Jupyter notebook showing interactive usage. Something with an image, something with filtering, maybe something with audio. Maybe there are numpy.fft notebooks that we could draw inspiration from as well.

@egpbos
Copy link
Member Author

egpbos commented Nov 14, 2017

Ideas on using audio:

The best and easiest way to read a WAV file is to use libsndfile.
Although many programs have own wav readers, most of them do not fully support the wav format.
The standard C++ code with 'libsndfile' is like the follows:

#include <sndfile.hh>
SndfileHandle sfr("foo.wav");
std::vector<float> wav(sfr.frames());
sfr.readf(wav.data(), sfr.frames());

We can directly load a wav file to a 'xtensor' by passing the first argument of 'readf' with its raw pointer.

@egpbos
Copy link
Member Author

egpbos commented Nov 30, 2017

Waiting for a xeus-cling macOS conda package.

@egpbos
Copy link
Member Author

egpbos commented Dec 7, 2017

Have been experimenting with an edge detection demo. Idea by @maartenbreddels: add a slider with an angle to interactively change the direction of the derivative. Currently, display is not responsive enough for this to work nicely, but we can already build it anyway (like the xtensor-io demo).

@egpbos
Copy link
Member Author

egpbos commented Dec 7, 2017

Added demo in d1bccf1

@egpbos
Copy link
Member Author

egpbos commented Dec 7, 2017

Suggestions by @LourensVeen: use using namespace xt to simplify the notebook code and convert as many types as possible to auto, explaining why they cannot be used where they cannot be used.

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

No branches or pull requests

1 participant