Skip to content

Aluriak/syne

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Syne

Bring concepts of synesthesia in development.

This package is totally not complete, stable, mature nor definitive.

soundpoints

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.

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.

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 !

Watch your collections (non-implemented)

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'])

Listen to your collections (non-implemented)

A mix of soundpoints and collection coloration.

Coloring of sources to detect defects (non-implemented)

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

Requirements

  • musthe, for music theory (see soundpoint)
  • PyAudio, access to audio
  • numpy to implement some computation operations

To install these, make install_deps.

Other requirements:

Future requirements, to investigate:

  • midi
  • music21, for music theory (alternative to midi and musthe ?)
  • pyglet, for colored view of collections

FAQ

Why syne ?

Syne is an apocope of synesthesia, the ability to use a sense to feel another. And its short, else no one would use it.

Inspiration sources