start Namespace Reference

Data Structures

class  ServerExample
 

Functions

def pitchshifting5 (input_filename, output_filename)
 
def pitchshifting12 (input_filename, output_filename)
 
def url_call (url)
 
def download_file (file_url, file_name)
 
def get_trackid_from_text_search (title, artistname='')
 
def get_preview_from_trackid (trackid)
 
def getProcessPids (port, kill=False)
 
def main (argv=None)
 

Variables

 ECHO_NEST_API_KEY
 
string apikey = '8496dd1c715c69a74ef9fcde1716cf4a'
 
string DIGITAL7_API_KEY = '7dbpa63h3y3d'
 
string usage
 
 op = optparse.OptionParser()
 
 action
 
 dest
 
 default
 
 type
 
 options
 
 args
 
string CONFIG_FILE = "%(USER)s.cfg"
 

Function Documentation

def start.download_file (   file_url,
  file_name 
)

Definition at line 204 of file start.py.

Referenced by start.ServerExample.receiveinput().

def start.get_preview_from_trackid (   trackid)
    ***This method is from get_preview_url.py by Thierry Bertin-Mahieux***
    Ask for the preview to a particular track, get the XML answer
    After calling the API with a given track id,
    we get an XML response that looks like:
    
    <response status="ok" version="1.2" xsi:noNamespaceSchemaLocation="http://api.7digital.com/1.2/static/7digitalAPI.xsd">
    <url>
    http://previews.7digital.com/clips/34/6804688.clip.mp3
    </url>
    </response>
    
    We parse it for the URL that we return, or '' if a problem

Definition at line 242 of file start.py.

Referenced by start.ServerExample.receiveinput().

def start.get_trackid_from_text_search (   title,
  artistname = '' 
)
    ***This method is from get_preview_url.py by Thierry Bertin-Mahieux***
    Search for an artist + title using 7digital search API
    Return None if there is a problem, or tuple (title,trackid)

Definition at line 216 of file start.py.

Referenced by start.ServerExample.receiveinput().

def start.getProcessPids (   port,
  kill = False 
)
Get the pid of the offending Python process given a port after an unsuccessful restart.

Definition at line 273 of file start.py.

Referenced by main().

def start.main (   argv = None)

Definition at line 329 of file start.py.

def start.pitchshifting12 (   input_filename,
  output_filename 
)

Definition at line 174 of file start.py.

Referenced by start.ServerExample.receiveinput().

def start.pitchshifting5 (   input_filename,
  output_filename 
)

Definition at line 157 of file start.py.

Referenced by start.ServerExample.receiveinput().

def start.url_call (   url)
***This method is from get_preview_url.py by Thierry Bertin-Mahieux***
Do a simple request to the 7digital API
We assume we don't do intense querying, this function is not robust
Return the answer as na xml document

Definition at line 191 of file start.py.

Referenced by get_preview_from_trackid(), and get_trackid_from_text_search().

Variable Documentation

start.action

Definition at line 60 of file start.py.

string start.apikey = '8496dd1c715c69a74ef9fcde1716cf4a'

Definition at line 42 of file start.py.

start.args

Definition at line 61 of file start.py.

string start.CONFIG_FILE = "%(USER)s.cfg"

Definition at line 62 of file start.py.

start.default

Definition at line 60 of file start.py.

string start.DIGITAL7_API_KEY = '7dbpa63h3y3d'

Definition at line 46 of file start.py.

start.ECHO_NEST_API_KEY

Definition at line 39 of file start.py.

start.op = optparse.OptionParser()

Definition at line 59 of file start.py.

start.type

Definition at line 60 of file start.py.

string start.usage
Initial value:
1 = """
2 Usage:
3  python beatshift.py <input_filename> <output_filename>
4 Exampel:
5  python beatshift.py CryMeARiver.mp3 CryMeAShifty.mp3
6 """

Definition at line 49 of file start.py.