Bring concepts of synesthesia in development.
This package is totally not complete, stable, mature nor definitive.
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:
from syne import soundpoint
soundpoint.setopt(scale='C2 major')
See examples for more.
In fact, soundpoints are implemented following the standard interface of Synepoint metaclass, allowing one to define its own way to work on breakpoints.
So, do you have a programmable smell dispenser ? Robot masseur ? Arduino wired to your radiator ? Or maybe your desktop is in an acceleration simulator ?
Use synepoints to make them work with syne and use them for debugging !
With syne, you can take a look at your collections with colors instead of values. General rules :
- same objects get the same color
- close objects get close colors
from syne import syne
syne([1, 2, 3, 4])
syne(['abcd', 'abcd', 'abcde', 'ABCD'])
A mix of soundpoints and collection coloration.
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
- musthe, for music theory (see soundpoint)
- PyAudio, access to audio
- numpy to implement some computation operations
To install these, make install_deps
.
Other requirements:
- pytest for testing
Future requirements, to investigate:
- midi
- music21, for music theory (alternative to midi and musthe ?)
- pyglet, for colored view of collections
Syne is an apocope of synesthesia, the ability to use a sense to feel another. And its short, else no one would use it.
- The J language, as described here.
- the expression «a signal, it's musical»
- the new matplotlib colormap justification
- the story of the sound-based dial server debugging