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

notebook examples. #27

Open
GabrieleBattaglia opened this issue Jul 4, 2024 · 6 comments
Open

notebook examples. #27

GabrieleBattaglia opened this issue Jul 4, 2024 · 6 comments

Comments

@GabrieleBattaglia
Copy link

Hi. In the docs I read: "Here, we explain some of the example sonfications included in the examples/ directory of the Strauss repo. These are all in Python Notebook (.ipynb) format."
I guess this tool could be particularly useful to the blind people. Well, I'm blind and I can't use Notebook due to its lack of accessibility.
I wonder just why you choose this format to give examples, or, at least, why this format only???
I couldn't play these examples and I have not so many other stuff to study on.
So my request is to give a copy of examples also in a very simple and nice .py format, please.
Thanks.

@james-trayford
Copy link
Owner

Hi, @GabrieleBattaglia Thanks for your interest in strauss. We're aware of the accessibility limitations of python notebooks, so we do indeed now provide all the examples in accompanying .py files, here: https://github.com/james-trayford/strauss/tree/main/examples. The documentation should reflect that, so needs to be updated, thanks for bringing it to our attention!

These examples are not interactive in the same way, but it should be easier to parse the code. This uses the sounddevice library that connects directly to your sound device so you can code and play sonifications from the command-line.

We've had mixed feedback about the accessibility of notebooks, but know the screen reader experience can be poor. Notebooks allow us to provide more interactive examples and use the media playback capabilities that can help us reduce barriers to entry for less technical users, but of course are inaccessible in other aspects. Ultimately we hope notebooks are made an accessible format, though it's not clear when this will happen. If you're interested there are some collaborations thinking about this, see e.g. https://github.com/iota-school/notebooks-for-all

@james-trayford
Copy link
Owner

The 1D data series sonification may be a good place to start: https://github.com/james-trayford/strauss/blob/main/examples/SonifyingData1D.py

Keen to hear about your experience and any more questions/issues you have as a blind user, so please let us know!

@GabrieleBattaglia
Copy link
Author

Trying the .py examples I have this traceback. Could you please help me to understand what's wrong?
Traceback (most recent call last):
File "E:\git\Others\strauss\examples\SonifyingData1D.py", line 64, in
generator = Synthesizer()
^^^^^^^^^^^^^
File "C:\Users\Utente\AppData\Local\Programs\Python\Python311\Lib\site-packages\strauss\generator.py", line 381, in init
self.preset = getattr(presets, self.gtype).load_preset()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Utente\AppData\Local\Programs\Python\Python311\Lib\site-packages\strauss\presets\synth_init_.py", line 25, in load_preset
return read_yaml(filename)
^^^^^^^^^^^^^^^^^^^
File "C:\Users\Utente\AppData\Local\Programs\Python\Python311\Lib\site-packages\strauss\presets\synth_init_.py", line 7, in read_yaml
with open(filename, 'r') as fdata:
^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/default.yml'

e:\git\Others\strauss\examples>

I'm under Win11, Python 3.11

@james-trayford
Copy link
Owner

Hi @GabrieleBattaglia - it looks like there are some windows-specific problems that are causing the error. I think we've isolated the issue so thanks for sending that through, and I'll let you know when that's fixed

@GabrieleBattaglia
Copy link
Author

Thank you.

@james-trayford
Copy link
Owner

james-trayford commented Aug 9, 2024

Hi @GabrieleBattaglia, this should hopefully work for you in the latest strauss v0.2.0 - You can update with pip pip install strauss -U and/or update the repository with git pull origin main- please let us know if you have any issues - we are not native windows users but have tested that the examples are working in a local windows setup.

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

No branches or pull requests

2 participants