Пример #1
0
def test_saw():
    
    synth = Synth(44100)
    
    synth.setParameter(SynthParameters.OSC_1_WAVEFORM, Waveform.SAW)
    synth.setParameter(SynthParameters.OSC_2_WAVEFORM, Waveform.SAW)
    synth.setParameter(SynthParameters.OSC_3_WAVEFORM, Waveform.SAW)

    synth.noteOn(10)

    out = []
        
    for i in range(44100):
        out.append(synth.getSample())
        
    synth.noteOff(10)
Пример #2
0
def test_whiteNoise():
    
    synth = Synth(44100)
    
    synth.setParameter(SynthParameters.OSC_1_WAVEFORM, Waveform.WHITE_NOISE)
    synth.setParameter(SynthParameters.OSC_2_WAVEFORM, Waveform.WHITE_NOISE)
    synth.setParameter(SynthParameters.OSC_3_WAVEFORM, Waveform.WHITE_NOISE)

    synth.noteOn(60)

    out = []
        
    for i in range(44100):
        out.append(synth.getSample())
        
    synth.noteOff(60)