Commits

Adam Lindsay committed ebb6313

Converted the basic examples to one-liners

Comments (0)

Files changed (2)

   _: the last-defined AudioRenderable
   analysis: container for all the other analysis products in the file
   
-  libraries:
+  libraries (i.e., the namespace you have to work with):
     from echonest.audio import *
     from echonest.audio import AudioQuantumList as aql
     from echonest.audio import AudioQuantum as aq
 # the following one-liners will hopefully get you started
 
+# one/one.py
+beats.that(fall_on_the(1))
+
+# selection/tonic.py
+beats.that(overlap_ends_of(segments.that(have_pitch_max(analysis.key['value'])).that(overlap_starts_of(beats))))
+
+# reverse/reverse.py
+reversed(beats)
+
+# summary/summary.py
+tatums.that(fall_on_the(1))
+
+# limp/lopside.py
+[aql(a.children()[:-1] + a.children()[-1].children()[:len(a.children()[-1].children())/2]) for a in bars] 
+
+
+# occasionally interesting walk through the timbre vector
+[aql(segments.ordered_by(timbre_value(a),descending=1)[:16]*2) for a in range(12)]
+
+# drill baby, drill
 [aql([aq(a+b/40.,b*pow(c/40.0,2),source=segments.source) for a,b,c in zip([bars[d].start]*18,[bars[d].duration]*18,range(18))]) for d,e in enumerate(bars)]
-
-[aql(segments.ordered_by(timbre_value(a),descending=1)[:16]*2) for a in range(12)]