Esempio n. 1
0
    def __init__(self) -> None:
        debug_prefix = "[AudioProcessing.__init__]"

        # Create some util classes
        self.fourier = Fourier()
        self.datautils = DataUtils()
        self.functions = Functions()
        self.config = None

        # List of full frequencies of notes
        # - 50 to 68 yields freqs of 24.4 Hz up to
        self.piano_keys_frequencies = [
            round(self.get_frequency_of_key(x), 2) for x in range(-50, 68)
        ]
    def __init__(self, depth = LOG_NO_DEPTH) -> None:
        debug_prefix = "[AudioProcessing.__init__]"
        ndepth = depth + LOG_NEXT_DEPTH

        self.fourier = Fourier()
        self.datautils = DataUtils()
        self.functions = Functions()
        self.config = None

        # MMV specific, where we return repeated frequencies from the
        # function process
        self.where_decay_less_than_one = 440
        self.value_at_zero = 5

        # List of full frequencies of notes
        # - 50 to 68 yields freqs of 24.4 Hz up to 
        self.piano_keys_frequencies = [round(self.get_frequency_of_key(x), 2) for x in range(-50, 68)]
        logging.info(f"{depth}{debug_prefix} Whole notes frequencies we'll care: [{self.piano_keys_frequencies}]")
Esempio n. 3
0
    def setup(self) -> None:
        debug_prefix = "[MMVSkiaMain.setup]"

        self.utils = Utils()

        logging.info(f"{debug_prefix} Creating MMVContext() class")
        self.context = MMVContext(mmv_skia_main=self)

        logging.info(f"{debug_prefix} Creating SkiaNoWindowBackend() class")
        self.skia = SkiaNoWindowBackend()

        logging.info(f"{debug_prefix} Creating Functions() class")
        self.functions = Functions()

        logging.info(f"{debug_prefix} Creating Interpolation() class")
        self.interpolation = Interpolation()

        logging.info(f"{debug_prefix} Creating PolarCoordinates() class")
        self.polar_coordinates = PolarCoordinates()

        logging.info(f"{debug_prefix} Creating Canvas() class")
        self.canvas = MMVSkiaImage(mmvskia_main=self)

        logging.info(f"{debug_prefix} Creating Fourier() class")
        self.fourier = Fourier()

        # The user must explicitly set and override this, mostly for compatibility
        # and code cleanup reasons.
        self.pipe_video_to = None

        logging.info(f"{debug_prefix} Creating AudioFile() class")
        self.audio = AudioFile()

        logging.info(f"{debug_prefix} Creating AudioProcessing() class")
        self.audio_processing = AudioProcessing()

        logging.info(f"{debug_prefix} Creating MMVSkiaAnimation() class")
        self.mmv_skia_animation = MMVSkiaAnimation(mmv_skia_main=self)

        logging.info(f"{debug_prefix} Creating MMVSkiaCore() class")
        self.core = MMVSkiaCore(mmvskia_main=self)
    def setup(self) -> None:

        debug_prefix = "[MMVMain.__init__]"

        self.utils = Utils()

        print(debug_prefix, "Creating Context()")
        self.context = Context(self)

        print(debug_prefix, "Creating SkiaNoWindowBackend()")
        self.skia = SkiaNoWindowBackend(self)

        print(debug_prefix, "Creating Functions()")
        self.functions = Functions()

        print(debug_prefix, "Creating Interpolation()")
        self.interpolation = Interpolation()

        print(debug_prefix, "Creating Canvas()")
        self.canvas = MMVImage(self)

        print(debug_prefix, "Creating Fourier()")
        self.fourier = Fourier()

        print(debug_prefix, "Creating FFmpegWrapper()")
        self.ffmpeg = FFmpegWrapper(self)

        print(debug_prefix, "Creating AudioFile()")
        self.audio = AudioFile()

        print(debug_prefix, "Creating AudioProcessing()")
        self.audio_processing = AudioProcessing()

        print(debug_prefix, "Creating MMVAnimation()")
        self.mmv_animation = MMVAnimation(self)
    
        print(debug_prefix, "Creating Core()")
        self.core = Core(self)
 def __init__(self) -> None:
     self.fourier = Fourier()
     self.datautils = DataUtils()
     self.config = None