Skip to content

Commit fc11871

Browse files
authored
Update README.md
1 parent 8e6d396 commit fc11871

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

README.md

+18-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,18 @@
1-
# Python-ByteBeat
1+
# Python-ByteBeat
2+
Making your first ByteBeat in Python:
3+
```py
4+
from ByteBeat import *
5+
ByteBeat.Play(
6+
't%0.81*t', # The mathematical input, as a string.
7+
10, # The amount of seconds to play.
8+
8000, # KiloHertz (kHz) for the ByteBeat.
9+
True # Wait until the ByteBeat finished or not.
10+
)
11+
```
12+
Let's say you want to generate the ByteBeat buffering before playing it, i.e playing multiple ByteBeats after each other without needing to wait for the other ones to generate.
13+
```py
14+
beats = []
15+
beats.append(ByteBeat.GenerateBuffer('sin(sin(t/100)-t/((2+(t>>10&t>>12)%9)))*64+128', 5, 8000))
16+
beats.append(ByteBeat.GenerateBuffer('t%0.81*t', 5, 8000))
17+
for beat in beats:
18+
ByteBeat.PlayFromBuffer(beat, 5, 8000, True)```

0 commit comments

Comments
 (0)