View ear_training.html
This file contains 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
<!DOCTYPE html> | |
<html lang="ja"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Ear Training</title> | |
<script> | |
const WHITE_KEYS = [0, 2, 4, 5, 7, 9, 11]; | |
const BLACK_KEYS = [1, 3, 6, 8, 10]; |
View index.html
This file contains 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
<!DOCTYPE html> | |
<html lang="ja"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>WebAudio & WebMIDI</title> | |
<script> | |
let canvas = null; | |
let g = null; |
View transcript_utf8.txt
This file contains 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
VOICEACTRESS100_001:ま[た、と[おじの/よ]おに、ご[だい/みょ[おお]おと/よ[ばれる、しゅ[よおな/みょ[おお]おの/ちゅ[うお]おに/は[いされること]も/お[お]い | |
VOICEACTRESS100_002:にゅ[ういんぐらんど/ふ[う]わ、ぎゅ[うにゅうお/べ]えスとシた、し[ろ]い/く[りいむ/す]うぷであり、ぼ[すとん/く[らむちゃ]うだあとも/よ[ばれ]る | |
VOICEACTRESS100_003:こ[んぴゅうた/げ]えむの/め]えかあや、ぎょ[おかいだ]んたいなどに/か[んれんする/じ]んぶつの/か[て]ごり | |
VOICEACTRESS100_004:さ[あびす/ま[ねえじゃ]あ/ど[おにゅう]えきのため、お[おいまち/え]キから、え[んかクか]んり/シ[てい]る | |
VOICEACTRESS100_005:し[るばあ/さ[あふぁ]あ/しゅ[うげきじ]けんまでに、り]ちゃあずわ、ち[いむ]めえと/と[もに、こ[クさいてきに/す[うぱあひ]いろお、お]よび、ゆ[うめ]えじんとシて、に]んチ/さ[れてい]る | |
VOICEACTRESS100_006:ちゅ[れんはる]とりょおわ、びゅ[るてんべるく]りょおに/へ[んにゅうされた | |
VOICEACTRESS100_007:じ[かん/りょ]おいキと、く[うかんりょ]おいきで/きょ[おつうする/しょ[りしゅ]ほおわ、ふぃ[るたりんぐによる、にゅ[うりょク/し]んごおの/きょ]おかで/あ]る | |
VOICEACTRESS100_008:しゃ[んちいの/せ[んぎょお]ぷろわ、ち]いむから/シ[はら]われる/きゅ]うりょおと、た[いきょく]ひお、お]もな/しゅ[うにゅうと/シ[て/い[る | |
VOICEACTRESS100_009:ま[た/ね[じめし]わ、ちゅ[うざ]んおおの/お[さめ]る、りゅ[うきゅうお]おこクとの/こ[おえきに]も/さんかシた | |
VOICEACTRESS100_010:す[まあと]ふぉんから、ふぃ[いちゃあ]ふぉんまで、ま[るちでば]いすに/たいおお |
View realness.py
This file contains 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
""" | |
RealnessGAN のロス | |
""" | |
import numpy | |
import torch | |
positive_skew: float = +1.0 | |
negative_skew: float = -1.0 | |
num_outcomes: int = 20 |
View neutrino_to_midi.py
This file contains 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
""" | |
NEUTRINO の中間ファイル (lab, f0, mgc, bap) から MIDI を作る。 | |
""" | |
def main(args): | |
import pretty_midi | |
midi = pretty_midi.PrettyMIDI(initial_tempo=args.tempo) | |
midi.instruments.append(pretty_midi.Instrument(program=71, name='neutrino')) | |
instrument = midi.instruments[-1] |
View f0_to_midi.py
This file contains 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
""" | |
`*.f0` を元になった `*.mid` ファイルのピッチベンドに適用する | |
(ピッチベンドセンシティビティは12)。 | |
""" | |
def get_note(notes, time): | |
nearest_note = None | |
nearest_distance = float('inf') | |
for note in notes: |
View mondrian_process.py
This file contains 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
""" | |
The Mondrian Process https://papers.nips.cc/paper/3622-the-mondrian-process | |
""" | |
import numpy as np | |
import cv2 | |
from PIL import Image, ImagePalette | |
def mondorian_process(lam=4, x=None, depth=16): | |
x = (0, 0, 1, 1) if x is None else x |
View adabound.py
This file contains 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
# coding: utf-8 | |
""" | |
Based on Luo et al. (2019). Adaptive Gradient Methods with Dynamic Bound of Learning Rate. In Proc. of ICLR 2019. | |
""" | |
from tensorflow import keras | |
class AdaBound(keras.optimizers.Optimizer): | |
def __init__(self, lr=0.001, beta1=0.9, beta2=0.999, final_lr=0.1, gamma=1e-3, epsilon=None, weight_decay=0, amsbound=False, **kwargs): | |
super(AdaBound, self).__init__(**kwargs) | |
with keras.backend.name_scope(self.__class__.__name__): |
View convert.py
This file contains 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
# coding: utf-8 | |
""" | |
- Real-time neural style transfer for videos | |
cf. http://www.ee.columbia.edu/~wliu/CVPR17_NeuralStyle.pdf | |
- High-resolution multi-scale neural texture synthesis | |
cf. https://wxs.ca/research/multiscale-neural-synthesis/ | |
""" | |
from pathlib import Path | |
from tensorflow import keras |
View aa.py
This file contains 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
# coding: utf-8 | |
""" | |
ImageNet Labels https://gist.github.com/yrevar/942d3a0ac09ec9e5eb3a | |
cf. https://medium.com/artists-and-machine-intelligence/perception-engines-8a46bc598d57 | |
""" | |
from progressbar import ProgressBar | |
import numpy as np | |
import cv2 |
NewerOlder