Exemple #1
0
 def test_create_pulsar(self):
     osc = Pulsar('sine',
                  window='sine',
                  pulsewidth=dsp.wt('tri', 0, 1),
                  freq=200.0,
                  amp=0.2)
     length = 10
     out = osc.play(length)
     out.write('tests/renders/osc_pulsar.wav')
     self.assertEqual(len(out), int(length * out.samplerate))
Exemple #2
0
 def test_pulsar_burst_and_mask(self):
     osc = Pulsar('sine',
                  window='sine',
                  pulsewidth=dsp.wt('tri', 0, 1),
                  mask=dsp.randline(30, 0, 1),
                  burst=(3, 2),
                  freq=200.0,
                  amp=0.2)
     length = 10
     out = osc.play(length)
     out.write('tests/renders/osc_pulsar_burst_and_mask.wav')
     self.assertEqual(len(out), int(length * out.samplerate))
Exemple #3
0
 def test_create_pulsar(self):
     osc = Pulsar(
             'sine', 
             window='sine', 
             pulsewidth=dsp.wt('tri', 0, 1), 
             freq=200.0, 
             amp=0.2
         )
     length = 10
     out = osc.play(length)
     out.write('tests/renders/osc_pulsar.wav')
     self.assertEqual(len(out), int(length * out.samplerate))
Exemple #4
0
 def test_pulsar_burst_and_mask(self):
     osc = Pulsar(
             'sine', 
             window='sine', 
             pulsewidth=dsp.wt('tri', 0, 1), 
             mask=dsp.randline(30, 0, 1), 
             burst=(3,2),
             freq=200.0, 
             amp=0.2
         )
     length = 10
     out = osc.play(length)
     out.write('tests/renders/osc_pulsar_burst_and_mask.wav')
     self.assertEqual(len(out), int(length * out.samplerate))
Exemple #5
0
    def test_create_pulsar(self):
        osc = Pulsar(
                'sine', 
                window='sine', 
                pulsewidth=dsp.wt('tri', 0, 1), 
                freq=200.0, 
                amp=0.2
            )
        length = 10
        out = osc.play(length)
        out.write('tests/renders/osc_pulsar.wav')

        osc = Pulsar(
                'sine', 
                window='sine', 
                pulsewidth=dsp.wt('tri', 0, 1), 
                freq=[200.0, 210, 220, 300, 310, 320]*4, 
                freq_interpolator='trunc',
                amp=0.2
            )
        length = 10
        out = osc.play(length)
        out.write('tests/renders/osc_pulsar_trunc.wav')