Exemplo n.º 1
0
	def _getSdo(self, name, max_samples, labelCombos):
		sdo = SoundDataObject(name)
		for i in range(min(max_samples, len(labelCombos))):
			#use sound syns to get label and signal
			labels = [label for label in labelCombos[i]]
			syns = SoundSyns()
			for key in labels:
				syns.add_key(key)
			#get buckets
			decomp = SoundDecomposer(name)
			decomp.readSignal(SoundSyns.rate, syns.signal)
			#add buckets to sdo
			sdo.addDataSingle(Sample(decomp.freqBuckets, labels))
		return sdo
Exemplo n.º 2
0
from sound_decomp import SoundDecomposer

c_major = SoundDecomposer("C Major")
c_major.read("c_major.wav")