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 numpy as np | |
| # CONSTANTS | |
| WT_SIZE = 2048 | |
| PLAYBACK_FREQ = 440 | |
| MAX_HARMONIC = 20000 | |
| # saw WT, -1 - 1.0 | |
| SAW = np.arange(-1.0, 1.0, 2 / WT_SIZE) | |
| # usually this would be cached so we can keep | |
| # reading the partials any time we need to generate | |
| # a new WT |
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
| #!/bin/bash | |
| # Author: Trémus | |
| # Simply loops through the files in the directory you call this script | |
| # that will normalise the 'integrated loudness' of your music files to | |
| # settings similar to the default Platinum Notes settings. | |
| # Results are saved in ./output. | |
| # Change the bitrate from 128k if you need a higher one, this was intended | |
| # to be used in conjuction with SoundCloud rips, and SC streams at 128kbps. |
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
| #!/bin/bash | |
| # Author: Trémus | |
| # Description: Downloads mp3s from YouTube & Soundcloud, adds metadata incl. BPM and album art | |
| # Originally made for OSX. May fail on linux (probably 'sed' commands) | |
| # Dependencies: | |
| # - python | |
| # - pip packages: | |
| # - youtube-dl (downloads music) | |
| # - aubio (calculates bpm) |
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 re | |
| from html.parser import HTMLParser | |
| # https://docs.python.org/3.6/library/html.parser.html#module-html.parser | |
| SELF_CLOSING_TAGS = { | |
| 'area', | |
| 'base', | |
| 'br', | |
| 'col', | |
| 'embed', |
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
| from time import sleep | |
| import socket | |
| def internet_connection(host="8.8.8.8", port=53, timeout=3): | |
| """ | |
| Host: 8.8.8.8 (google-public-dns-a.google.com) | |
| OpenPort: 53/tcp | |
| Service: domain (DNS/TCP) | |
| Source: https://stackoverflow.com/questions/3764291/checking-network-connection |