Package echonest :: Module selection
[hide private]
[frames] | no frames]

Module selection

source code

Selection filters as utilities for echonest.audio.

For convenience, intended to be imported as:

from audio.selection import *

The functions in this module each return another function that takes one argument, an AudioQuantum, and returns an AudioQuantum or None.

By convention, all of these functions are named to be verb phrases that agree with a plural noun in a restrictive clause introduced by that, as in:

analysis.segments.that(fall_on_the(1))
Functions [hide private]
 
are_contained_by_range(start, end)
Returns a function that tests if its input AudioQuantum lies between the start and end parameters.
source code
 
are_contained_by(aq)
Returns a function that tests if its input AudioQuantum lies within the interval of the parameter aq AudioQuantum,
source code
call graph 
 
overlap_range(start, end)
Returns a function that tests if its input AudioQuantum overlaps in any way the interval between the parameters start and end.
source code
 
overlap(aq)
Returns a function that tests if its input AudioQuantum overlaps in any way the parameter aq AudioQuantum.
source code
call graph 
 
end_during_range(start, end)
Returns a function that tests if its input AudioQuantum's end lies in the interval between the parameters start and end.
source code
 
end_during(aq)
Returns a function that tests if its input AudioQuantum's end lies anywhere during the parameter aq AudioQuantum.
source code
 
start_during_range(start, end)
Returns a function that tests if its input AudioQuantum's start lies in the interval between the parameters start and end.
source code
 
start_during(aq)
Returns a function that tests if its input AudioQuantum's start lies anywhere during the parameter aq AudioQuantum.
source code
 
contain_point(point)
Returns a function that tests if its input AudioQuantum contains the input parameter point, a time offset, in seconds.
source code
 
have_pitch_max(pitchmax)
Returns a function that tests if its input AudioQuantum has a pitch[pitchmax] such that it is greater or equal to all other values in its pitch vector.
source code
 
have_pitches_max(pitchesmax)
Returns a function that tests if its input AudioQuantum has a maximum pitch[p] such that it is greater or equal to all other values in its pitch vector, and p is in List parameter pitchesmax.
source code
 
lie_immediately_before(aq)
Returns a function that tests if its input AudioQuantum lies immediately before the parameter aq AudioQuantum.
source code
 
lie_immediately_after(aq)
Returns a function that tests if its input AudioQuantum lies immediately after the parameter aq AudioQuantum.
source code
 
fall_on_the(beat_number)
Returns a function that tests if its input AudioQuantum has a (one-indexed) ordinality within its group() that is equal to parameter beat_number.
source code
 
overlap_ends_of(aqs)
Returns a function that tests if its input AudioQuantum contains the end of any of the parameter aqs, a List of AudioQuantums.
source code
 
overlap_starts_of(aqs)
Returns a function that tests if its input AudioQuantum contains the start of any of the parameter aqs, a List of AudioQuantums.
source code
 
start_during_any(aqs)
Returns a function that tests if its input AudioQuantum has its start lie in any of the parameter aqs, a List of AudioQuantums.
source code
 
all_of(x, y)
Local helper function.
source code
Function Details [hide private]

lie_immediately_before(aq)

source code 
Returns a function that tests if its input AudioQuantum lies immediately before the parameter aq AudioQuantum. That is, if the tested AudioQuantum's end == aq.start .

lie_immediately_after(aq)

source code 
Returns a function that tests if its input AudioQuantum lies immediately after the parameter aq AudioQuantum. That is, if the tested AudioQuantum's start == aq.end .

all_of(x, y)

source code 
Local helper function. Returns True if everything is true in a reduce(). It's only here because we can't rely on Python 2.5 being present for all().