# Path: msaf/exceptions.py
# class WrongFeaturesFormatError(MSAFError):
#     '''Exception class for worngly formatted features files'''
#     pass
# 
# class NoFeaturesFileError(MSAFError):
#     '''Exception class for missing features file'''
#     pass
# 
# class FeaturesNotFound(MSAFError):
#     '''Exception class for missing specific features in a file'''
#     pass
# 
# class FeatureTypeNotFound(MSAFError):
#     '''Exception class for feature type missing'''
#     pass
# 
# class FeatureParamsError(MSAFError):
#     '''Exception class for feature parameters missing'''
#     pass
# 
# class NoAudioFileError(MSAFError):
#     '''Exception class for audio file not found'''
#     pass


import collections
import datetime
import librosa
import logging
import jams
import json
import numpy as np
import os
import six
import msaf
from enum import Enum
from msaf.exceptions import WrongFeaturesFormatError, NoFeaturesFileError,\
    FeaturesNotFound, FeatureTypeNotFound, FeatureParamsError, NoAudioFileError
        feat_type = self.feat_type
        self.feat_type = FeatureTypes.framesync
        self._framesync_features = self.compute_features()
        self.feat_type = feat_type

        # Compute framesync times
        self._compute_framesync_times()

        # Compute/Read beats
        self._est_beats_times, self._est_beats_frames = self.estimate_beats()
        self._ann_beats_times, self._ann_beats_frames = self.read_ann_beats()

        # Beat-Synchronize
        pad = True  # Always append to the end of the features
        self._est_beatsync_features, self._est_beatsync_times = \
            self.compute_beat_sync_features(self._est_beats_frames,
                                            self._est_beats_times, pad)
        self._ann_beatsync_features, self._ann_beatsync_times = \
            self.compute_beat_sync_features(self._ann_beats_frames,
                                            self._ann_beats_times, pad)

    @property
    def frame_times(self):
        """This getter returns the frame times, for the corresponding type of
        features."""
        frame_times = None
        # Make sure we have already computed the features
        self.features
        if self.feat_type is FeatureTypes.framesync:
            self._compute_framesync_times()

# Path: msaf/exceptions.py
# class WrongFeaturesFormatError(MSAFError):
#     '''Exception class for worngly formatted features files'''
#     pass
# 
# class NoFeaturesFileError(MSAFError):
#     '''Exception class for missing features file'''
#     pass
# 
# class FeaturesNotFound(MSAFError):
#     '''Exception class for missing specific features in a file'''
#     pass
# 
# class FeatureTypeNotFound(MSAFError):
#     '''Exception class for feature type missing'''
#     pass
# 
# class FeatureParamsError(MSAFError):
#     '''Exception class for feature parameters missing'''
#     pass
# 
# class NoAudioFileError(MSAFError):
#     '''Exception class for audio file not found'''
#     pass


# Path: msaf/base.py
import collections
import datetime
import librosa
import logging
import jams
import json
import numpy as np
import os
import six
import msaf
from enum import Enum
from msaf.exceptions import WrongFeaturesFormatError, NoFeaturesFileError,\
    FeaturesNotFound, FeatureTypeNotFound, FeatureParamsError, NoAudioFileError

        feat_type = self.feat_type
        self.feat_type = FeatureTypes.framesync
        self._framesync_features = self.compute_features()
        self.feat_type = feat_type

        # Compute framesync times
        self._compute_framesync_times()

        # Compute/Read beats
        self._est_beats_times, self._est_beats_frames = self.estimate_beats()
        self._ann_beats_times, self._ann_beats_frames = self.read_ann_beats()

        # Beat-Synchronize
        pad = True  # Always append to the end of the features
        self._est_beatsync_features, self._est_beatsync_times = \
            self.compute_beat_sync_features(self._est_beats_frames,
                                            self._est_beats_times, pad)
        self._ann_beatsync_features, self._ann_beatsync_times = \
            self.compute_beat_sync_features(self._ann_beats_frames,
                                            self._ann_beats_times, pad)

    @property
    def frame_times(self):
        """This getter returns the frame times, for the corresponding type of
        features."""
        frame_times = None
        # Make sure we have already computed the features
        self.features
        if self.feat_type is FeatureTypes.framesync:
            self._compute_framesync_times()

            frame_times = self._framesync_times