diff --git a/python_src/advmath.py b/python_src/advmath.py index 0dd4b59..7e157ae 100644 --- a/python_src/advmath.py +++ b/python_src/advmath.py @@ -17,7 +17,7 @@ class Math: """ def __init__(self): """ - Constructor for the Math class. + 🟩 **R** - Constructor for the Math class. """ _initialize(self) @@ -32,21 +32,30 @@ def __init__(self): "pmma.python_src.pyx_alternatives.utility.math_utils") def __del__(self, do_garbage_collection=False): + """ + 🟩 **R** - + """ if self._shut_down is False: del self if do_garbage_collection: _gc__collect() def quit(self, do_garbage_collection=True): + """ + 🟩 **R** - + """ self.__del__(do_garbage_collection=do_garbage_collection) self._shut_down = True def smooth_step(self, value): + """ + 🟩 **R/C** - + """ return _MathIntermediary.math_module.raw_smooth_step(value) def pythag(self, points): """ - **R** - Calculates the pythagorean distance between two points. + 🟩 **R/C** -Calculates the pythagorean distance between two points. Parameters: points (list) - A list containing two tuples, each representing a point in 3D space. @@ -59,22 +68,43 @@ def pythag(self, points): return _MathIntermediary.math_module.raw_pythag(points) def ranger(self, value, old, new): + """ + 🟩 **R/C** - + """ return _MathIntermediary.math_module.raw_ranger(value, old, new) def nparray_ranger(self, value, old, new): + """ + 🟩 **R/C** - + """ return _MathIntermediary.math_module.raw_nparray_ranger(value, old, new) def gl_look_at(self, eye, target, up): + """ + 🟩 **R/C** - + """ return _MathIntermediary.math_module.raw_gl_look_at(eye, target, up) def compute_position(self, pos, target, up): + """ + 🟩 **R/C** - + """ return _MathIntermediary.math_module.raw_compute_position(pos, target, up) def perspective_fov(self, fov, aspect_ratio, near_plane, far_plane): + """ + 🟩 **R/C** - + """ return _MathIntermediary.math_module.raw_perspective_fov(fov, aspect_ratio, near_plane, far_plane) def look_at(self, camera_position, camera_target, up_vector): + """ + 🟩 **R/C** - + """ return _MathIntermediary.math_module.raw_look_at(camera_position, camera_target, up_vector) def multiply(self, a, b): + """ + 🟩 **R/C** - + """ return _MathIntermediary.math_module.raw_multiply(a, b) diff --git a/python_src/advthreading.py b/python_src/advthreading.py index 3f854e4..db6eae5 100644 --- a/python_src/advthreading.py +++ b/python_src/advthreading.py @@ -2,32 +2,53 @@ import threading as _threading class Thread(_threading.Thread): + """ + 🟩 **R** - + """ def __init__(self, *args, **keywords): + """ + 🟩 **R** - + """ _threading.Thread.__init__(self, *args, **keywords) self._killed = False def start(self): + """ + 🟩 **R** - + """ self.__run_backup = self.run self.run = self.__run _threading.Thread.start(self) def __run(self): + """ + 🟩 **R** - + """ _sys.settrace(self.globaltrace) self.__run_backup() self.run = self.__run_backup def globaltrace(self, frame, event, arg): + """ + 🟩 **R** - + """ if event == 'call': return self.localtrace else: return None def localtrace(self, frame, event, arg): + """ + 🟩 **R** - + """ if self._killed: if event == 'line': raise SystemExit() return self.localtrace def kill(self): + """ + 🟩 **R** - + """ self._killed = True \ No newline at end of file diff --git a/python_src/advtkinter.py b/python_src/advtkinter.py index 09e270f..a6e75f2 100644 --- a/python_src/advtkinter.py +++ b/python_src/advtkinter.py @@ -6,20 +6,35 @@ from pmma.python_src.utility.initialization_utils import initialize as _initialize class Tkinter: + """ + 🟩 **R** - + """ def __init__(self): + """ + 🟩 **R** - + """ _initialize(self) def __del__(self, do_garbage_collection=False): + """ + 🟩 **R** - + """ if self._shut_down is False: del self if do_garbage_collection: _gc__collect() def quit(self, do_garbage_collection=True): + """ + 🟩 **R** - + """ self.__del__(do_garbage_collection=do_garbage_collection) self._shut_down = True def style(self, widget): + """ + 🟩 **R** - + """ style = _ttk.Style() style.configure( widget, @@ -35,6 +50,9 @@ def style(self, widget): ("active", "white")]) def get_display_size(self): + """ + 🟩 **R** - + """ try: root = _tk.Tk() @@ -49,6 +67,9 @@ def get_display_size(self): return (0, 0) def set_size(self, x, y, root=None): + """ + 🟩 **R** - + """ if root is None: root = _Registry.root diff --git a/python_src/audio.py b/python_src/audio.py index e6888d4..e5c4ce2 100644 --- a/python_src/audio.py +++ b/python_src/audio.py @@ -38,7 +38,13 @@ from pmma.python_src.utility.initialization_utils import initialize as _initialize class Audio: + """ + 🟩 **R** - + """ def __init__(self): + """ + 🟩 **R** - + """ _initialize(self) self._file = None @@ -69,6 +75,9 @@ def __init__(self): self._audio_playing_start_time = None def __del__(self, do_garbage_collection=False): + """ + 🟩 **R** - + """ if self._shut_down is False: self._stop_signal = True @@ -80,10 +89,16 @@ def __del__(self, do_garbage_collection=False): _gc__collect() def quit(self, do_garbage_collection=True): + """ + 🟩 **R** - + """ self.__del__(do_garbage_collection=do_garbage_collection) self._shut_down = True def load_from_file(self, file_path): + """ + 🟩 **R** - + """ self._file = _sound_file.SoundFile(file_path) self._sample_rate = self._file.samplerate self._channels = self._file.channels @@ -91,24 +106,45 @@ def load_from_file(self, file_path): self._audio_loaded = True def get_sample_rate(self): + """ + 🟩 **R** - + """ return self._sample_rate def get_number_of_channels(self): + """ + 🟩 **R** - + """ return self._channels def set_looping(self, loop): + """ + 🟩 **R** - + """ self._looping = loop def get_looping(self): + """ + 🟩 **R** - + """ return self._looping def set_duration(self, duration): + """ + 🟩 **R** - + """ self._audio_duration = duration def set_silence_at_end_of_track(self, duration): + """ + 🟩 **R** - + """ self._audio_duration += duration def load_from_moviepy(self, audio): + """ + 🟩 **R** - + """ self._audio_data = audio self._sample_rate = audio.fps self._channels = audio.nchannels @@ -126,17 +162,27 @@ def load_from_moviepy(self, audio): break def add_effect(self, effect): + """ + 🟩 **R** - + """ self._effects_list.append(effect) def set_volume(self, volume, format=_Constants.PERCENTAGE): - """Set the volume (0.0 to 1.0)""" + """ + 🟩 **R** - + """ self._volume.set_value(volume, format=format) def set_pan(self, pan, format=_Constants.PERCENTAGE): - """Set the panning (-1.0 to 1.0, where 0 is center)""" + """ + 🟩 **R** - + """ self._pan.set_value(pan, format=format) def play(self, blocking=True, delay=0): + """ + 🟩 **R** - + """ if self._audio_loaded: if self._playing: self._logger.log_development("You have attempted to play audio \ @@ -164,15 +210,24 @@ def play(self, blocking=True, delay=0): return True def _wait_for_chunk_to_play(self): + """ + 🟩 **R** - + """ return self._stop_signal def _start_playback(self): + """ + 🟩 **R** - + """ # Start the audio stream with _sound_device.OutputStream(callback=self._audio_callback, samplerate=self._sample_rate, channels=self._channels, blocksize=2048): # Loop while playback is ongoing and not stopped _waiting.wait(self._wait_for_chunk_to_play) def _audio_generator(self, chunk_size): + """ + 🟩 **R** - + """ buffer = _numpy.empty((0, self._channels), dtype='float32') # Buffer to store leftover samples while self._stop_signal is False: @@ -193,6 +248,9 @@ def _audio_generator(self, chunk_size): break def _audio_callback(self, outdata, frames, time, status): + """ + 🟩 **R** - + """ if self._audio_playing_start_time is None: self._audio_playing_start_time = _time.perf_counter() @@ -244,7 +302,9 @@ def _audio_callback(self, outdata, frames, time, status): self._first_run = False def _apply_volume_and_pan(self, chunk): - """Apply volume and panning to the chunk of audio""" + """ + 🟩 **R** - Apply volume and panning to the chunk of audio + """ chunk = chunk * self._volume.get_value() if self._channels == 2: # Stereo audio @@ -255,47 +315,83 @@ def _apply_volume_and_pan(self, chunk): return chunk def pause(self): + """ + 🟩 **R** - + """ self._paused = True def resume(self): + """ + 🟩 **R** - + """ if self._paused: self._paused = False def stop(self): + """ + 🟩 **R** - + """ self._stop_signal = True if self._playback_thread is not None: # wait until playback actually stops self._playback_thread.join() self._playing = False def get_paused(self): + """ + 🟩 **R** - + """ return self._paused def get_playing(self): + """ + 🟩 **R** - + """ return self._playing class BitCrush(_Bitcrush): + """ + 🟩 **R** - + """ def __init__(self, bit_depth=8): + """ + 🟩 **R** - + """ _initialize(self) super().__init__(bit_depth=bit_depth) def set_bit_depth(self, bit_depth): + """ + 🟩 **R** - + """ self.bit_depth = bit_depth def get_bit_depth(self): + """ + 🟩 **R** - + """ return self.bit_depth def __del__(self, do_garbage_collection=False): + """ + 🟩 **R** - + """ if self._shut_down is False: del self if do_garbage_collection: _gc__collect() def quit(self, do_garbage_collection=True): + """ + 🟩 **R** - + """ self.__del__(do_garbage_collection=do_garbage_collection) self._shut_down = True class Chorus(_Chorus): + """ + 🟩 **R** - + """ def __init__( self, rate=1, @@ -307,6 +403,9 @@ def __init__( depth_format=None, feedback_format=None, mix_format=None): + """ + 🟩 **R** - + """ _initialize(self) @@ -332,77 +431,137 @@ def __init__( mix=self._proportion_adjusted_mix.get_value(format=_Constants.DECIMAL)) def set_rate(self, rate): + """ + 🟩 **R** - + """ self.rate_hz = rate def get_rate(self): + """ + 🟩 **R** - + """ return self.rate_hz def set_depth(self, depth, format=_Constants.PERCENTAGE): + """ + 🟩 **R** - + """ self._proportion_adjusted_depth.set_value(depth, format=format) self.depth = self._proportion_adjusted_depth.get_value(format=_Constants.DECIMAL) def get_depth(self, format=_Constants.PERCENTAGE): + """ + 🟩 **R** - + """ return self._proportion_adjusted_depth.get_value(format=format) def set_center_delay(self, center_delay): + """ + 🟩 **R** - + """ self.centre_delay_ms = center_delay * 1000 def get_center_delay(self): + """ + 🟩 **R** - + """ return self.centre_delay_ms / 1000 def set_feedback(self, feedback, format=_Constants.PERCENTAGE): + """ + 🟩 **R** - + """ self._proportion_adjusted_feedback.set_value(feedback, format=format) self.feedback = self._proportion_adjusted_feedback.get_value(format=_Constants.DECIMAL) def get_feedback(self, format=_Constants.PERCENTAGE): + """ + 🟩 **R** - + """ return self._proportion_adjusted_feedback.get_value(format=format) def set_mix(self, mix, format=_Constants.PERCENTAGE): + """ + 🟩 **R** - + """ self._proportion_adjusted_mix.set_value(mix, format=format) self.mix = self._proportion_adjusted_mix.get_value(format=_Constants.DECIMAL) def get_mix(self, format=_Constants.PERCENTAGE): + """ + 🟩 **R** - + """ return self._proportion_adjusted_mix.get_value(format=format) def __del__(self, do_garbage_collection=False): + """ + 🟩 **R** - + """ if self._shut_down is False: del self if do_garbage_collection: _gc__collect() def quit(self, do_garbage_collection=True): + """ + 🟩 **R** - + """ self.__del__(do_garbage_collection=do_garbage_collection) self._shut_down = True class Clipping(_Clipping): + """ + 🟩 **R** - + """ def __init__(self, threshold=-6): + """ + 🟩 **R** - + """ _initialize(self) super().__init__(threshold_db=threshold) def set_threshold(self, threshold): + """ + 🟩 **R** - + """ self.threshold_db = threshold def get_threshold(self): + """ + 🟩 **R** - + """ return self.threshold_db def __del__(self, do_garbage_collection=False): + """ + 🟩 **R** - + """ if self._shut_down is False: del self if do_garbage_collection: _gc__collect() def quit(self, do_garbage_collection=True): + """ + 🟩 **R** - + """ self.__del__(do_garbage_collection=do_garbage_collection) self._shut_down = True class Compressor(_Compressor): + """ + 🟩 **R** - + """ def __init__( self, threshold=0, ratio=4, attack=0.001, release=0.1): + """ + 🟩 **R** - + """ _initialize(self) @@ -413,40 +572,73 @@ def __init__( release_ms=release * 1000) def set_threshold(self, threshold): + """ + 🟩 **R** - + """ self.threshold_db = threshold def get_threshold(self): + """ + 🟩 **R** - + """ return self.threshold_db def set_ratio(self, ratio): + """ + 🟩 **R** - + """ self.ratio = ratio def get_ratio(self): + """ + 🟩 **R** - + """ return self.ratio def set_attack(self, attack): + """ + 🟩 **R** - + """ self.attack_ms = attack * 1000 def get_attack(self): + """ + 🟩 **R** - + """ return self.attack_ms / 1000 def set_release(self, release): + """ + 🟩 **R** - + """ self.release_ms = release * 1000 def get_release(self): + """ + 🟩 **R** - + """ return self.release_ms / 1000 def __del__(self, do_garbage_collection=False): + """ + 🟩 **R** - + """ if self._shut_down is False: del self if do_garbage_collection: _gc__collect() def quit(self, do_garbage_collection=True): + """ + 🟩 **R** - + """ self.__del__(do_garbage_collection=do_garbage_collection) self._shut_down = True class Convolution(_Convolution): + """ + 🟩 **R** - + """ def __init__( self, impulse_response_filename, @@ -454,6 +646,9 @@ def __init__( sample_rate=None, format=_Constants.PERCENTAGE, mix_format=None): + """ + 🟩 **R** - + """ _initialize(self) @@ -469,35 +664,62 @@ def __init__( sample_rate=sample_rate) def set_impulse_response_filename(self, impulse_response): + """ + 🟩 **R** - + """ self.impulse_response = impulse_response def get_impulse_response_filename(self): + """ + 🟩 **R** - + """ return self.impulse_response def set_mix(self, mix, format=_Constants.PERCENTAGE): + """ + 🟩 **R** - + """ self._proportion_adjusted_mix.set_value(mix, format=format) self.mix = self._proportion_adjusted_mix.get_value(format=_Constants.DECIMAL) def get_mix(self, format=_Constants.PERCENTAGE): + """ + 🟩 **R** - + """ return self._proportion_adjusted_mix.get_value(format=format) def set_sample_rate(self, sample_rate): + """ + 🟩 **R** - + """ self.sample_rate = sample_rate def get_sample_rate(self): + """ + 🟩 **R** - + """ return self.sample_rate def __del__(self, do_garbage_collection=False): + """ + 🟩 **R** - + """ if self._shut_down is False: del self if do_garbage_collection: _gc__collect() def quit(self, do_garbage_collection=True): + """ + 🟩 **R** - + """ self.__del__(do_garbage_collection=do_garbage_collection) self._shut_down = True class Delay(_Delay): + """ + 🟩 **R** - + """ def __init__( self, delay=0.5, @@ -506,7 +728,9 @@ def __init__( format=_Constants.PERCENTAGE, feedback_format=None, mix_format=None): - + """ + 🟩 **R** - + """ _initialize(self) if feedback_format is None: @@ -525,299 +749,544 @@ def __init__( mix=self._proportion_adjusted_mix.get_value(format=_Constants.DECIMAL)) def set_delay(self, delay): + """ + 🟩 **R** - + """ self.delay_seconds = delay def get_delay(self): + """ + 🟩 **R** - + """ return self.delay_seconds def set_feedback(self, feedback, format=_Constants.PERCENTAGE): + """ + 🟩 **R** - + """ self._proportion_adjusted_feedback.set_value(feedback, format=format) self.feedback = self._proportion_adjusted_feedback.get_value(format=_Constants.DECIMAL) def get_feedback(self, format=_Constants.PERCENTAGE): + """ + 🟩 **R** - + """ return self._proportion_adjusted_feedback.get_value(format=format) def set_mix(self, mix, format=_Constants.PERCENTAGE): + """ + 🟩 **R** - + """ self._proportion_adjusted_mix.set_value(mix, format=format) self.mix = self._proportion_adjusted_mix.get_value(format=_Constants.DECIMAL) def get_mix(self): + """ + 🟩 **R** - + """ return self._proportion_adjusted_mix.get_value(format=_Constants.DECIMAL) def __del__(self, do_garbage_collection=False): + """ + 🟩 **R** - + """ if self._shut_down is False: del self if do_garbage_collection: _gc__collect() def quit(self, do_garbage_collection=True): + """ + 🟩 **R** - + """ self.__del__(do_garbage_collection=do_garbage_collection) self._shut_down = True class Distortion(_Distortion): + """ + 🟩 **R** - + """ def __init__(self, drive=10): + """ + 🟩 **R** - + """ _initialize(self) super().__init__(drive_db=drive) def set_drive(self, drive): + """ + 🟩 **R** - + """ self.drive_db = drive def get_drive(self): + """ + 🟩 **R** - + """ return self.drive_db def __del__(self, do_garbage_collection=False): + """ + 🟩 **R** - + """ if self._shut_down is False: del self if do_garbage_collection: _gc__collect() def quit(self, do_garbage_collection=True): + """ + 🟩 **R** - + """ self.__del__(do_garbage_collection=do_garbage_collection) self._shut_down = True class GSMFullRateCompressor(_GSMFullRateCompressor): + """ + 🟩 **R** - + """ def __init__(self): + """ + 🟩 **R** - + """ _initialize(self) super().__init__() def __del__(self, do_garbage_collection=False): + """ + 🟩 **R** - + """ if self._shut_down is False: del self if do_garbage_collection: _gc__collect() def quit(self, do_garbage_collection=True): + """ + 🟩 **R** - + """ self.__del__(do_garbage_collection=do_garbage_collection) self._shut_down = True class Gain(_Gain): + """ + 🟩 **R** - + """ def __init__(self, gain=1): + """ + 🟩 **R** - + """ _initialize(self) super().__init__(gain_db=gain) def set_gain(self, gain): + """ + 🟩 **R** - + """ self.gain_db = gain def get_gain(self): + """ + 🟩 **R** - + """ return self.gain_db def __del__(self, do_garbage_collection=False): + """ + 🟩 **R** - + """ if self._shut_down is False: del self if do_garbage_collection: _gc__collect() def quit(self, do_garbage_collection=True): + """ + 🟩 **R** - + """ self.__del__(do_garbage_collection=do_garbage_collection) self._shut_down = True class HighShelfFilter(_HighShelfFilter): + """ + 🟩 **R** - + """ def __init__(self, cutoff=440, gain=0, q=0.7071067690849304): + """ + 🟩 **R** - + """ _initialize(self) super().__init__(cutoff_hz=cutoff, gain_db=gain, q=q) def set_cutoff(self, cutoff): + """ + 🟩 **R** - + """ self.cutoff_hz = cutoff def get_cutoff(self): + """ + 🟩 **R** - + """ return self.cutoff_hz def set_gain(self, gain): + """ + 🟩 **R** - + """ self.gain_db = gain def get_gain(self): + """ + 🟩 **R** - + """ return self.gain_db def set_q(self, q): + """ + 🟩 **R** - + """ self.q = q def get_q(self): + """ + 🟩 **R** - + """ return self.q def __del__(self, do_garbage_collection=False): + """ + 🟩 **R** - + """ if self._shut_down is False: del self if do_garbage_collection: _gc__collect() def quit(self, do_garbage_collection=True): + """ + 🟩 **R** - + """ self.__del__(do_garbage_collection=do_garbage_collection) self._shut_down = True class HighPassFilter(_HighpassFilter): + """ + 🟩 **R** - + """ def __init__(self, cutoff=50): + """ + 🟩 **R** - + """ _initialize(self) super().__init__(cutoff_hz=cutoff) def set_cutoff(self, cutoff): + """ + 🟩 **R** - + """ self.cutoff_hz = cutoff def get_cutoff(self): + """ + 🟩 **R** - + """ return self.cutoff_hz def __del__(self, do_garbage_collection=False): + """ + 🟩 **R** - + """ if self._shut_down is False: del self if do_garbage_collection: _gc__collect() def quit(self, do_garbage_collection=True): + """ + 🟩 **R** - + """ self.__del__(do_garbage_collection=do_garbage_collection) self._shut_down = True class LadderFilter(_LadderFilter): + """ + 🟩 **R** - + """ def __init__(self, cutoff=200, resonance=0, drive=1): + """ + 🟩 **R** - + """ _initialize(self) super().__init__(cutoff_hz=cutoff, resonance=resonance, drive=drive) def set_cutoff(self, cutoff): + """ + 🟩 **R** - + """ self.cutoff_hz = cutoff def get_cutoff(self): + """ + 🟩 **R** - + """ return self.cutoff_hz def set_resonance(self, resonance): + """ + 🟩 **R** - + """ self.resonance = resonance def get_resonance(self): + """ + 🟩 **R** - + """ return self.resonance def set_drive(self, drive): + """ + 🟩 **R** - + """ self.drive = drive def get_drive(self): + """ + 🟩 **R** - + """ return self.drive def __del__(self, do_garbage_collection=False): + """ + 🟩 **R** - + """ if self._shut_down is False: del self if do_garbage_collection: _gc__collect() def quit(self, do_garbage_collection=True): + """ + 🟩 **R** - + """ self.__del__(do_garbage_collection=do_garbage_collection) self._shut_down = True class Limiter(_Limiter): + """ + 🟩 **R** - + """ def __init__(self, threshold=-10, release=0.1): + """ + 🟩 **R** - + """ _initialize(self) super().__init__(threshold_db=threshold, release_ms=release / 1000) def set_threshold(self, threshold): + """ + 🟩 **R** - + """ self.threshold_db = threshold def get_threshold(self): + """ + 🟩 **R** - + """ return self.threshold_db def set_release(self, release): + """ + 🟩 **R** - + """ self.release_ms = release * 1000 def get_release(self): + """ + 🟩 **R** - + """ return self.release_ms / 1000 def __del__(self, do_garbage_collection=False): + """ + 🟩 **R** - + """ if self._shut_down is False: del self if do_garbage_collection: _gc__collect() def quit(self, do_garbage_collection=True): + """ + 🟩 **R** - + """ self.__del__(do_garbage_collection=do_garbage_collection) self._shut_down = True class LowShelfFilter(_LowShelfFilter): + """ + 🟩 **R** - + """ def __init__(self, cutoff=440, gain=0, q=0.7071067690849304): + """ + 🟩 **R** - + """ _initialize(self) super().__init__(cutoff_hz=cutoff, gain_db=gain, q=q) def set_cutoff(self, cutoff): + """ + 🟩 **R** - + """ self.cutoff_hz = cutoff def get_cutoff(self): + """ + 🟩 **R** - + """ return self.cutoff_hz def set_gain(self, gain): + """ + 🟩 **R** - + """ self.gain_db = gain def get_gain(self): + """ + 🟩 **R** - + """ return self.gain_db def set_q(self, q): + """ + 🟩 **R** - + """ self.q = q def get_q(self): + """ + 🟩 **R** - + """ return self.q def __del__(self, do_garbage_collection=False): + """ + 🟩 **R** - + """ if self._shut_down is False: del self if do_garbage_collection: _gc__collect() def quit(self, do_garbage_collection=True): + """ + 🟩 **R** - + """ self.__del__(do_garbage_collection=do_garbage_collection) self._shut_down = True class LowPassFilter(_LowpassFilter): + """ + 🟩 **R** - + """ def __init__(self, cutoff=50): + """ + 🟩 **R** - + """ _initialize(self) super().__init__(cutoff_hz=cutoff) def set_cutoff(self, cutoff): + """ + 🟩 **R** - + """ self.cutoff_hz = cutoff def get_cutoff(self): + """ + 🟩 **R** - + """ return self.cutoff_hz def __del__(self, do_garbage_collection=False): + """ + 🟩 **R** - + """ if self._shut_down is False: del self if do_garbage_collection: _gc__collect() def quit(self, do_garbage_collection=True): + """ + 🟩 **R** - + """ self.__del__(do_garbage_collection=do_garbage_collection) self._shut_down = True class MP3Compressor(_MP3Compressor): + """ + 🟩 **R** - + """ def __init__(self, vbr_quality=3): + """ + 🟩 **R** - + """ _initialize(self) super().__init__(vbr_quality=vbr_quality) def set_vbr_quality(self, vbr_quality): + """ + 🟩 **R** - + """ self.vbr_quality = vbr_quality def get_vbr_quality(self): + """ + 🟩 **R** - + """ return self.vbr_quality def __del__(self, do_garbage_collection=False): + """ + 🟩 **R** - + """ if self._shut_down is False: del self if do_garbage_collection: _gc__collect() def quit(self, do_garbage_collection=True): + """ + 🟩 **R** - + """ self.__del__(do_garbage_collection=do_garbage_collection) self._shut_down = True class NoiseGate(_NoiseGate): + """ + 🟩 **R** - + """ def __init__( self, threshold=-100, ratio=10, attack=0.001, release=0.1): - + """ + 🟩 **R** - + """ _initialize(self) super().__init__( @@ -827,74 +1296,137 @@ def __init__( release_ms=release * 1000) def set_threshold(self, threshold): + """ + 🟩 **R** - + """ self.threshold_db = threshold def get_threshold(self): + """ + 🟩 **R** - + """ return self.threshold_db def set_ratio(self, ratio): + """ + 🟩 **R** - + """ self.ratio = ratio def get_ratio(self): + """ + 🟩 **R** - + """ return self.ratio def set_attack(self, attack): + """ + 🟩 **R** - + """ self.attack_ms = attack * 1000 def get_attack(self): + """ + 🟩 **R** - + """ return self.attack_ms / 1000 def set_release(self, release): + """ + 🟩 **R** - + """ self.release_ms = release * 1000 def get_release(self): + """ + 🟩 **R** - + """ return self.release_ms / 1000 def __del__(self, do_garbage_collection=False): + """ + 🟩 **R** - + """ if self._shut_down is False: del self if do_garbage_collection: _gc__collect() def quit(self, do_garbage_collection=True): + """ + 🟩 **R** - + """ self.__del__(do_garbage_collection=do_garbage_collection) self._shut_down = True class PeakFilter(_PeakFilter): + """ + 🟩 **R** - + """ def __init__(self, frequency=1000, gain=0, q=0.7071067690849304): + """ + 🟩 **R** - + """ _initialize(self) super().__init__(frequency_hz=frequency, gain_db=gain, q=q) def set_frequency(self, frequency): + """ + 🟩 **R** - + """ self.frequency_hz = frequency def get_frequency(self): + """ + 🟩 **R** - + """ return self.frequency_hz def set_gain(self, gain): + """ + 🟩 **R** - + """ self.gain_db = gain def get_gain(self): + """ + 🟩 **R** - + """ return self.gain_db def set_q(self, q): + """ + 🟩 **R** - + """ self.q = q def get_q(self): + """ + 🟩 **R** - + """ return self.q def __del__(self, do_garbage_collection=False): + """ + 🟩 **R** - + """ if self._shut_down is False: del self if do_garbage_collection: _gc__collect() def quit(self, do_garbage_collection=True): + """ + 🟩 **R** - + """ self.__del__(do_garbage_collection=do_garbage_collection) self._shut_down = True class Phaser(_Phaser): + """ + 🟩 **R** - + """ def __init__( self, rate=1, @@ -906,7 +1438,9 @@ def __init__( depth_format=None, feedback_format=None, mix_format=None): - + """ + 🟩 **R** - + """ _initialize(self) if depth_format is None: @@ -931,93 +1465,168 @@ def __init__( mix=self._proportion_adjusted_mix.get_value(_Constants.DECIMAL)) def set_rate(self, rate): + """ + 🟩 **R** - + """ self.rate_hz = rate def get_rate(self): + """ + 🟩 **R** - + """ return self.rate_hz def set_depth(self, depth, format=_Constants.PERCENTAGE): + """ + 🟩 **R** - + """ self._proportion_adjusted_depth.set_value(depth, format=format) self.depth = self._proportion_adjusted_depth.get_value(_Constants.DECIMAL) def get_depth(self, format=_Constants.PERCENTAGE): + """ + 🟩 **R** - + """ return self._proportion_adjusted_depth.get_value(format=format) def set_center_frequency(self, center_frequency): + """ + 🟩 **R** - + """ self.centre_frequency_hz = center_frequency def get_center_frequency(self): + """ + 🟩 **R** - + """ return self.centre_frequency_hz def set_feedback(self, feedback, format=_Constants.PERCENTAGE): + """ + 🟩 **R** - + """ self._proportion_adjusted_feedback.set_value(feedback, format=format) self.feedback = self._proportion_adjusted_feedback.get_value(_Constants.DECIMAL) def get_feedback(self, format=_Constants.PERCENTAGE): + """ + 🟩 **R** - + """ return self._proportion_adjusted_feedback.get_value(format=format) def set_mix(self, mix, format=_Constants.PERCENTAGE): + """ + 🟩 **R** - + """ self._proportion_adjusted_mix.set_value(mix, format=format) self.mix = self._proportion_adjusted_mix.get_value(_Constants.DECIMAL) def get_mix(self, format=_Constants.PERCENTAGE): + """ + 🟩 **R** - + """ return self._proportion_adjusted_mix.get_value(format=format) def __del__(self, do_garbage_collection=False): + """ + 🟩 **R** - + """ if self._shut_down is False: del self if do_garbage_collection: _gc__collect() def quit(self, do_garbage_collection=True): + """ + 🟩 **R** - + """ self.__del__(do_garbage_collection=do_garbage_collection) self._shut_down = True class PitchShift(_PitchShift): + """ + 🟩 **R** - + """ def __init__(self, semitones=0): + """ + 🟩 **R** - + """ _initialize(self) super().__init__(semitones=semitones) def set_semitones(self, pitch_shift_semitones): + """ + 🟩 **R** - + """ self.pitch_shift_semitones = pitch_shift_semitones def get_semitones(self): + """ + 🟩 **R** - + """ return self.pitch_shift_semitones def __del__(self, do_garbage_collection=False): + """ + 🟩 **R** - + """ if self._shut_down is False: del self if do_garbage_collection: _gc__collect() def quit(self, do_garbage_collection=True): + """ + 🟩 **R** - + """ self.__del__(do_garbage_collection=do_garbage_collection) self._shut_down = True class ReSample(_Resample): + """ + 🟩 **R** - + """ def __init__(self, sample_rate=8000): + """ + 🟩 **R** - + """ _initialize(self) super().__init__(sample_rate=sample_rate) def set_sample_rate(self, sample_rate): + """ + 🟩 **R** - + """ self.sample_rate = sample_rate def get_sample_rate(self): + """ + 🟩 **R** - + """ return self.sample_rate def __del__(self, do_garbage_collection=False): + """ + 🟩 **R** - + """ if self._shut_down is False: del self if do_garbage_collection: _gc__collect() def quit(self, do_garbage_collection=True): + """ + 🟩 **R** - + """ self.__del__(do_garbage_collection=do_garbage_collection) self._shut_down = True class Reverb(_Reverb): + """ + 🟩 **R** - + """ def __init__( self, room_size=100, @@ -1032,7 +1641,9 @@ def __init__( wet_level_format=None, dry_level_format=None, width_format=None): - + """ + 🟩 **R** - + """ _initialize(self) if room_size_format is None: @@ -1066,52 +1677,94 @@ def __init__( freeze_mode=freeze_mode) def set_room_size(self, room_size, format=_Constants.PERCENTAGE): + """ + 🟩 **R** - + """ self._proportion_adjusted_room_size.set_value(room_size, format=format) self.room_size = self._proportion_adjusted_room_size.get_value(_Constants.DECIMAL) def get_room_size(self): + """ + 🟩 **R** - + """ return self._proportion_adjusted_room_size.get_value(_Constants.PERCENTAGE) def set_damping(self, damping, format=_Constants.PERCENTAGE): + """ + 🟩 **R** - + """ self._proportion_adjusted_damping.set_value(damping, format=format) self.damping = self._proportion_adjusted_damping.get_value(_Constants.DECIMAL) def get_damping(self, format=_Constants.PERCENTAGE): + """ + 🟩 **R** - + """ return self._proportion_adjusted_damping.get_value(format=format) def set_wet_level(self, wet_level, format=_Constants.PERCENTAGE): + """ + 🟩 **R** - + """ self._proportion_adjusted_wet_level.set_value(wet_level, format=format) self.wet_level = self._proportion_adjusted_wet_level.get_value(_Constants.DECIMAL) def get_wet_level(self, format=_Constants.PERCENTAGE): + """ + 🟩 **R** - + """ return self._proportion_adjusted_wet_level.get_value(format=format) def set_dry_level(self, dry_level, format=_Constants.PERCENTAGE): + """ + 🟩 **R** - + """ self._proportion_adjusted_dry_level.set_value(dry_level, format=format) self.dry_level = self._proportion_adjusted_dry_level.get_value(_Constants.DECIMAL) def get_dry_level(self, format=_Constants.PERCENTAGE): + """ + 🟩 **R** - + """ return self._proportion_adjusted_dry_level.get_value(format=format) def set_width(self, width, format=_Constants.PERCENTAGE): + """ + 🟩 **R** - + """ self._proportion_adjusted_width.set_value(width, format=format) self.width = self._proportion_adjusted_width.get_value(_Constants.DECIMAL) def get_width(self, format=_Constants.PERCENTAGE): + """ + 🟩 **R** - + """ return self._proportion_adjusted_width.get_value(format=format) def set_freeze_mode(self, freeze_mode): + """ + 🟩 **R** - + """ self.freeze_mode = freeze_mode def get_freeze_mode(self): + """ + 🟩 **R** - + """ return self.freeze_mode def __del__(self, do_garbage_collection=False): + """ + 🟩 **R** - + """ if self._shut_down is False: del self if do_garbage_collection: _gc__collect() def quit(self, do_garbage_collection=True): + """ + 🟩 **R** - + """ self.__del__(do_garbage_collection=do_garbage_collection) self._shut_down = True \ No newline at end of file