20 lines
343 B
Python
20 lines
343 B
Python
import math
|
|
|
|
from ..soundnode import SoundNode
|
|
|
|
class SineNode(SoundNode):
|
|
|
|
def __init__(self, freq, room):
|
|
|
|
super().__init__("sine", room)
|
|
self.freq = freq
|
|
self.active = False
|
|
self.volume = 1
|
|
|
|
def calc_r_amps(self, t):
|
|
|
|
if not self.active:
|
|
self.r_amps[t] = dict()
|
|
return
|
|
|
|
self.r_amps[t] = {self.freq: self.volume}
|