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
| ;; before running emacs | |
| ;; $ dub fetch dcd | |
| ;; $ dub build dcd --build=release --config=server | |
| ;; $ dub build dcd --build=release --config=client | |
| ;; M-x package install company-dcd | |
| (add-hook 'd-mode-hook 'company-dcd-mode) | |
| (add-hook 'd-mode-hook 'flycheck-mode) | |
| (add-hook 'd-mode-hook 'flycheck-dmd-dub-set-variables) | |
| (setq dcd-bin |
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 collections import namedtuple | |
| # data type for encoder output | |
| EncoderOutput = namedtuple('EncoderOutput', ('output', 'memory_length', 'state')) | |
| # interface for Decoder, CTC, RNNLM, etc | |
| class ScoringBase(object): | |
| def score(self, token, enc_output, state): | |
| pass |
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
| override void processAudio(const(float*)[] inputs, float*[]outputs, int frames, TimeInfo info) | |
| { | |
| // 処理するmidiイベント(msg)を受け取る | |
| foreach(msg; getNextMidiMessages(frames)) | |
| { | |
| if (msg.isNoteOn()) | |
| { | |
| _voiceStatus.markNoteOn(msg.noteNumber()); | |
| _sampleIndex[msg.noteNumber()] = 0; |
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
| module gui; | |
| import dplug.pbrwidgets; | |
| /** module dplug.pbrwidgets.pbrbackgroundgui に定義 | |
| class PBRBackgroundGUI(string baseColorPath, // 一番下にでてくるRGB背景画像(png/jpg) | |
| string emissivePath, // 光の強さを指定するグレー画像 | |
| string materialPath, // 金属っぽさを指定するグレー画像 | |
| string physicalPath, // 物理レンダリングの強さを指定するグレー画像 | |
| string depthPath, // 3Dっぽい質感を出すための深さを指定するグレー画像 |
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
| override void reset(double sampleRate, int maxFrames, int numInputs, int numOutputs) nothrow @nogc | |
| { | |
| // DAW側でsampleRateが変更されたときに呼ばれる? | |
| if (this._sampleRate != sampleRate) | |
| { | |
| // 処理用のsampleRateを変更 | |
| this._sampleRate = sampleRate; | |
| // RingBufferのサイズも変更 | |
| this._buffer[0] = RingBuffer!float(this.maxDelayTimeFrame); | |
| this._buffer[1] = RingBuffer!float(this.maxDelayTimeFrame); |
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
| # powershell | |
| set-item env:VST2_SDK C:\Users\skarita\Downloads\vstsdk3610_11_06_2018_build_37\VST_SDK\VST2_SDK |
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
| (add-to-list 'auto-mode-alist '("\\.org$" . org-mode)) | |
| (setq org-latex-classes '(("ltjsarticle" | |
| "\\documentclass{ltjsarticle} | |
| \\usepackage{url} | |
| \\usepackage{amsmath} | |
| \\usepackage{newtxtext,newtxmath} | |
| \\usepackage{graphicx} | |
| \\usepackage{luatexja} | |
| \\usepackage[unicode]{hyperref} |
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
| /** | |
| based on https://github.com/zick/OCamLisp/blob/master/ocamlisp.ml | |
| */ | |
| enum Obj<'a> { | |
| Nil, | |
| Num(i32), | |
| Sym(&'a str), | |
| Error(&'a str), |
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
| /// based on https://github.com/openai/gym-http-api/blob/master/binding-rust/src/lib.rs | |
| module gym; | |
| import std.exception : enforce; | |
| import std.json : JSONValue, parseJSON; | |
| import std.conv : to; | |
| import std.stdio : writeln; | |
| enum bool isSpace(T) = is(typeof({ T.from(JSONValue.init); })); |
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
| // origin https://gist.githubusercontent.com/belltailjp/4653695/raw/1cf8b5cbb6c3b4d4f9374b8b1ccae702867543ef/simd.cpp | |
| #include <iostream> | |
| #include <random> | |
| #include <algorithm> | |
| #include <xmmintrin.h> | |
| #include <immintrin.h> |