This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys, random, time | |
class qlist(list): | |
def genseed(self): | |
self.seed = random.randrange(sys.maxsize) | |
def __init__(self, iterable): | |
super().__init__(iterable) | |
self.vis = len(self) <= 16 | |
self.genseed() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local o = { | |
dBmin = -60, -- silence threshold in decibels | |
duration = 1 -- display duration in seconds | |
} | |
(require 'mp.options').read_options(o) | |
local dBmin = o.dBmin | |
local assdraw = require 'mp.assdraw' | |
local color = { | |
font = '3aH00\\3cH000000\\1aH00\\1cHFFFFFF', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local o = { | |
dBmin = -60, -- silence threshold in decibels | |
duration = 1 -- display duration in seconds | |
} | |
(require 'mp.options').read_options(o) | |
local dBmin = o.dBmin | |
local aof = mp.get_property('ao') == 'pulse' and 60 or 20 | |
local sfmax = 60 * math.log(mp.get_property_number('volume-max') / 100, 10) | |
local aomax = 0 |