Esempio n. 1
0
    def __init__(self, wavetype, freq, detune, level):
        cycles_per_sample = freq / 44100.0

        self.freq = freq
        self.detune = detune
        self.incr = cycles_per_sample * wavetable.TABLE_SIZE
        self.level = level
        self.table = wavetable.build(wavetype, freq)
Esempio n. 2
0
    def __init__(self, wavetype, freq, detune, level):
        detune_ratio = pow(2, detune / 1200.0)
        fq = freq * detune_ratio
        cycles_per_sample = fq / 44100.0

        self.freq = fq
        self.incr = cycles_per_sample * wavetable.TABLE_SIZE
        self.level = level
        self.table = wavetable.build(wavetype, freq)