msaf/algorithms/fmc2d/utils_2dfmc.py
def json_to_beats(beats_json_file):
    """Extracts the beats from the beats_json_file and puts them into
        an np array."""
    f = open(beats_json_file, "r")
    beats_json = json.load(f)
    beats = []
    for beat in beats_json["beats"]:
        beats.append(beat["start"])
    f.close()
    return np.asarray(beats)
def json_to_beats(beats_json_file):
    f = open(beats_json_file, "r")
    beats_json = json.load(f)
    beats = []
    for beat in beats_json["beats"]:
        beats.append(beat["start"])
    f.close()
    return np.asarray(beats)
def json_to_beats ( beats_json_file ) : f = open ( beats_json_file , "r" ) beats_json = json . load ( f ) beats = [ ] for beat in beats_json [ "beats" ] : beats . append ( beat [ "start" ] ) f . close ( ) return np . asarray ( beats )
Extracts the beats from the beats_json_file and puts them into
        an np array.
Extracts the beats from the beats_json_file and puts them into an np array .