-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlive.py
64 lines (49 loc) · 2.21 KB
/
live.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
r"""
/\
| |
+----|-|---------------------------------------+----------------
/ | | | +----+----+----+----+ | +----+--
/ |----|/--------------|----|----|----|----|-----|--------|----|--
/ | /| | | | | | | | |
| |--/-|----b----r-----|----|----|----|----|-----|--r-----|----|--
| | | | | | | | | | | |
| |-|-(@)--------------|----|----|----|----|-----|--------|----|--
| | \ |/ | x| | x| | | | x|
| +----|---------------|---------|---------|-----+--------|-------
\ o/ x| x| x| x|
| --- --- --- ---
/ | | | x|
-| -x- -x- -x-
\
|
/
| +---------------|------------------------------+----------------
| | /^\ | bayz |
| |--o |:--------|------------------------------|---|------------
| | / | band | |
| |---/----------o|------------------R-----------|---|------------
\ | / | |
\ |-|-------b------------------------------------|--o|------------
\ | |
+----------------------------------------------+----------------
art by asciiart.eu
To start:
1. execute the first cell to create a server instance and a new Band
2. start the WebAudio client at https://wlt.coffee/cream/bayz
3. type your code in the second cell, and execute to make music!
"""
# <codecell>
from bayz.music import Band
from bayz.server import BayzServer
# start server
server = BayzServer(port=42700)
server.start()
# start band
b = Band(pre_gen=3)
b.connect(server)
# <codecell>
# --- bayz band -o-o-o----------
# Live code here! Uncomment and try the following line
# b.add_player()
# ------------------------------
b.commit()