Giter Site home page Giter Site logo

gablab's Introduction

GabLab

GabLab is a python module for computing sparse time-frequency decompositions of audio with support for Gabor-based dictionaries

Example usage:

import gablab as gl
import numpy as np

y = np.random.randn(10000) # test signal
scales = [256,512,1024,2048, 4096]
L = np.ceil(len(y)/float(np.max(scales)))*np.max(scales) 

# pad input to block boundary
y = np.hstack((y,np.zeros(L-len(y)))) 

# Build multi-scale Gabor dictionary
D = gl.DictionaryUnion(*[gl.GaborBlock(L,s) for s in scales])

# Basis pursuit denoising analysis: min ||x||_1 s.t. ||y-Dx||_2<e
x = gl.BPDN(D,y,maxerr=1e-12,maxits=20)

# Resynthesis
ye = np.real(D.dot(x))

# Error
print 'Error is: %2.5f' % np.sum((ye-y)**2)

gablab's People

Contributors

coreyker avatar

Watchers

Leigh Smith avatar  avatar

gablab's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.