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 details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
syne-0.0.1-py3-none-any.whl
(6.1 kB
view details)
File details
Details for the file syne-0.0.1.tar.gz.
File metadata
- Download URL: syne-0.0.1.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ec965c6144961452434bf4a79fca9a53ef0fe4c514952812b8e85d453fd54f44
|
|
| MD5 |
d7b7adb726f92ea9b8475ef8deaeab9b
|
|
| BLAKE2b-256 |
0cbe59409534d26b0c7fb49c3e0fac3a79413e00c0802bcb175b0a09d01e4e94
|
File details
Details for the file syne-0.0.1-py3-none-any.whl.
File metadata
- Download URL: syne-0.0.1-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
529f5cdcb6fa2f6fea877f2617026fe6276ebf3d9d2ad81f29721d14f096cc3d
|
|
| MD5 |
e6c9e734050815bab05b6984772aeb78
|
|
| BLAKE2b-256 |
aba8beed4c43f10ce9542c57aa9402b9da54416d3b446b740466f6367fddb358
|