Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
USAGE:
morphagene_audacity.py -w <inputwavfile> -l <inputlabels> -o <outputfile>'
Used to convert Audacity labels in .txt form on .WAV files into
single 32-bit float .WAV with CUE markers within the file, directly
compatible with the Make Noise Morphagene.
import json
import urllib
import collections
def get_iterable(x):
return (x,) if not isinstance(x, (tuple, list)) else x
# if isinstance(x, collections.Iterable):
# return x
# else:
# return (x,)