<filename>examples/ex_noise.py
'''
Created on 16 Feb 2015

@author: <NAME> (<EMAIL>)
@copyright: (c) 2015 <NAME>
@license: MIT
'''

# standard library
import logging

# custom libraries
from zignal.audio import Noise, Audio

if __name__ == '__main__':
    logging.basicConfig(format='%(levelname)-7s: %(module)s.%(funcName)-15s %(message)s',
                        level='DEBUG')

    fs  = 96000
    dur = 1.0

    nw  = Noise(fs=fs, duration=dur, gaindb=-6, colour='white')
    np  = Noise(fs=fs, duration=dur, gaindb=-6, colour='pink')
    x   = Audio(fs=fs)
    x.append(nw, np)

    print(nw)
    print(np)
    print(x)
    x.plot_fft()
