Skip to content

Instantly share code, notes, and snippets.

View skitaoka's full-sized avatar

Shinya Kitaoka skitaoka

View GitHub Profile
@skitaoka
skitaoka / 31EDO.nkp
Last active July 15, 2023 22:21
31平均律に調律する Kontakt スクリプト
on init
{
inp: 0 1 2 3 4 5 6 7 8 9 10 11
0ch: C C# D D# E F F# G G# A A# B
1ch: Ct Db Dt Db Et Ft Gb Gt Ab At Bb Bt
2ch: Cd Ct Dd Dt Dd Fd Ft Gd Gt Ad At Bd
すべて A を基準とした調律となっている。
}
declare %tune_amount_0ch[12] := ( 9677, -12903, 3226, -19355, -3226, 12903, -9677, 6452, -16129, 0, -22581, -6452)
@skitaoka
skitaoka / 31EDO_for_Domino.md
Last active July 23, 2023 20:41
31 平均律に調律する MIDI の System Exclusive Message (Domino [https://takabosoft.com/domino] 用)

31 平均律に調律する MIDI の System Exclusive Message

下記は Domino で利用するための表記になっている。

Non-Real-TIme:

F0H 7EH 7FH 08H 09H 00H 48H 49H 46H 19H 37H 5FH 42H 08H 33H 4FH 3DH 78H 48H 21H 39H 67H 44H 10H 35H 57H 40H 00H 31H 46H 3BH 70H F7H
F0H 7EH 7FH 08H 09H 01H 11H 12H 5EH 7BH 50H 42H 5AH 6BH 4CH 31H 56H 5AH 61H 04H 52H 4AH 5CH 73H 4EH 3AH 58H 63H 4AH 29H 54H 52H F7H
@skitaoka
skitaoka / 31EDO.kbm
Last active July 16, 2023 14:16
31平均律を想定して 3ch で打ち込まれたノートを Pianoteq の Multi-channel MIDI layout [MIDI channel 1] にルーティングする VSTi
! Default
! Size of map:
0
! MIDI range:
0
127
! Middle note:
60
! Reference note (MIDI number and frequency in Hz):
69
@skitaoka
skitaoka / NoteTuner31.cpp
Created July 16, 2023 19:37
31平均律にするため 3ch を束ねて tuning を修正して出力する VSTi
#include <public.sdk/source/main/pluginfactory.h>
#include <public.sdk/source/vst/vstaudioeffect.h>
#include <public.sdk/source/vst/vstguieditor.h>
#include <public.sdk/source/vst/vsteditcontroller.h>
#include <public.sdk/source/vst/vstaudioprocessoralgo.h>
#include <public.sdk/source/vst/vstaudioprocessoralgo.h>
#include <pluginterfaces/base/ibstream.h>
#include <pluginterfaces/base/ustring.h>
@skitaoka
skitaoka / 31EDO+1.js
Created July 16, 2023 22:21
31平均律に調律するための Synthesizer V 用のスクリプト
/**
* 31EDO+1: 基準から 1 ステップ上げた調律。キー 2 のショートカットに登録する。
*/
const SCRIPT_TITLE = "[SK] 31 EDO: +1";
const SCRIPT_CATEGORY = "[SK]";
const SCRIPT_AUTHOR = "Shinya Kitaoka / skitaoka@gmail.com";
const tune_amount = [48.387, 25.806, 41.935, 19.355, 35.484, 51.613, 29.032, 45.161, 22.581, 38.710, 16.129, 32.258]
function getClientInfo() {
@skitaoka
skitaoka / SampleVndf_GGX.cpp
Created July 30, 2023 10:50 — forked from jdupuy/SampleVndf_GGX.cpp
Sampling Visible GGX Normals with Spherical Caps
// Helper function: sample the visible hemisphere from a spherical cap
vec3 SampleVndf_Hemisphere(vec2 u, vec3 wi)
{
// sample a spherical cap in (-wi.z, 1]
float phi = 2.0f * M_PI * u.x;
float z = fma((1.0f - u.y), (1.0f + wi.z), -wi.z);
float sinTheta = sqrt(clamp(1.0f - z * z, 0.0f, 1.0f));
float x = sinTheta * cos(phi);
float y = sinTheta * sin(phi);
vec3 c = vec3(x, y, z);
@skitaoka
skitaoka / TuneTheEDO.qml
Created September 27, 2023 10:10
Tuning Plugin for MuseScore4 (12-EDO, 19-EDO, 31-EDO, 43-EDO, 53-EDO)
import QtQuick 2.1
import QtQuick.Controls 1.3
import QtQuick.Controls.Styles 1.3
import MuseScore 3.0
MuseScore {
version: "1.0"
title: "TuneTheEDO"
description: "12-EDO, 19-EDO, 31-EDO, 43-EDO and 53-EDO"
menuPath: "Plugins.Tune.TheEDO"