Import Amiga applications and desktop tools
This commit is contained in:
commit
1c144c9a3c
347 files changed
+423483
No files matched your search
@@ -0,0 +1,13 @@
|
||||
from pathlib import Path
|
||||
import math
|
||||
# 140 ms soft sine chime, raised-cosine attack/release, signed 8-bit Paula PCM.
|
||||
rate=11025;n=1544
|
||||
samples=[]
|
||||
for i in range(n):
|
||||
t=i/rate
|
||||
attack=min(1,t/.008)
|
||||
release=min(1,(n-1-i)/rate/.100)
|
||||
envelope=(.5-.5*math.cos(math.pi*attack))*(.5-.5*math.cos(math.pi*release))
|
||||
wave=math.sin(2*math.pi*740*t)+.10*math.sin(2*math.pi*1480*t)
|
||||
samples.append(int(100*envelope*wave)&255)
|
||||
(Path(__file__).parent/'assets/bell.raw').write_bytes(bytes(samples))
|
||||
Reference in new issue
Block a user