synesthesia-based debugging
Project description
## Watch your collections
```python
from syne import pprint
linear = 1, 2, 3, 4, 5
double_dim = (
(1, 2, 3, 4, 5),
(1, 3, 2, 4, 5),
(1, 2, 1, 4, 7),
)
map = {
'a': 2,
3: 'b',
4: 'c',
5: 'e',
7: 'c',
}
pprint(linear)
pprint(double_dim)
pprint(map)
```
## Listen to your collections
TODO
## Coloring of sources to detect defects
TODO
A parenthesis is missing ? A syntax error is raised ?
Invoke syne on your source file, and get the syntax errors highlighted :
python -m syne check-source myfile.py
## soundpoints
```python
from syne import soundpoint
def func():
soundpoint()
soundpoint(duration=.5)
soundpoint()
func()
func()
```
Will play two times the three sounds associated to function func, with a longer middle sound.
The sounds are chosen following a note scale, and based on the stacktrace,
meaning that each calls in function `a` will sound differently between them
and will be the same for second call.
You can change the scale with the options:
```python
from syne import soundpoint
soundpoint.setopt(scale='C2 major')
```
See [examples](examples/soundpoint.py) for more.
### soundpoints as an extension of synepoints
In fact, soundpoints are implemented following the standard interface of Synepoint metaclass,
allowing one to define its own way to work on breakpoints.
# Inspiration sources
- The J language, as described [here](https://prog21.dadgum.com/28.html).
- the expression «a signal, it's musical»
- [the new matplotlib colormap justification](https://www.youtube.com/watch?v=xAoljeRJ3lU)
- [the story of the sound-based dial server debugging]()
# Requirements
- [magwitch](https://github.com/aluriak/magwitch)
- [musthe](https://github.com/gciruelos/musthe), for music theory (see soundpoint)
- [midi](https://github.com/vishnubob/python-midi)
- [music21](http://web.mit.edu/music21/), for music theory (alternative to previous two ?)
- [PyAudio](http://people.csail.mit.edu/hubert/pyaudio/), access to audio
- [pyglet](https://bitbucket.org/pyglet/pyglet/wiki/Home), for colored view of collections
- [numpy]() to implement some computation operations
- [pytest](https://pytest.org) for testing
To install them all, `pip install -r requirements.txt`.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
syne-0.0.1.tar.gz
(5.1 kB
view hashes)
Built Distribution
syne-0.0.1-py3-none-any.whl
(6.1 kB
view hashes)