Skip to content

Instantly share code, notes, and snippets.

@hhyyg
hhyyg / Controller.cs
Created May 2, 2022 06:43
CRI ADX2, Unity で再生時間(GetTimeSyncedWithAudio)を取得する。
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class BgmController : MonoBehaviour
{
//private CriAtomSource criAtomSource;
private CriAtomExPlayback playback;
private CriAtomExPlayer criAtomExPlayer;
@hhyyg
hhyyg / index.html
Created December 2, 2021 02:31
Web Audio API. This code works in Chrome 96 but not in Safari 15.1
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset=utf-8>
<title></title>
</head>
<body>
<button id="start-button">start</button>
@hhyyg
hhyyg / rxjs-tips.md
Created November 17, 2021 07:23
RxJS Tips
@hhyyg
hhyyg / test.ts
Created August 8, 2021 09:39
Jasmine tests
const somethingPromise = (ms) =>
new Promise((resolve) => setTimeout(resolve, ms));
const somethingErrorPromise = (ms) =>
new Promise((resolve) => {
throw new Error();
});
describe("test", () => {
it("test", async (done) => {
@hhyyg
hhyyg / okusuritecho.json
Last active April 30, 2021 13:41
https://www.jahis.jp/standard/detail/id=665 の一部の仕様を JSON で表したものですが、必ずしも仕様に準拠したものではありません。
{
"1": {
"0": {
"title": "患者情報レコード"
},
"1": {
"title": "患者氏名"
},
"2": {
"title": "患者性別"
@hhyyg
hhyyg / circle-drum.md
Last active May 2, 2019 02:22
ORCΛ Parts
.....................
............4C4......
..........1.404TFFFD.
..U..E...E..:02F.....
.......1D4...........
...N.51X...H.........
...........S.........
...........j.........
.....................

A add: Outputs the sum of inputs.

aAb
 z
z = a + b
@hhyyg
hhyyg / note.orca
Created April 21, 2019 06:32
orca1
...................
.1D4.C.......C5....
....A62......1.....
..:18A.......J.....
.............1.....
..........C4.J.....
..........2Y21.....
............JJ.....
...........F21.....
............:11Aa..
@hhyyg
hhyyg / magical.js
Created March 30, 2019 03:23
magical.js
const synth = new Tone.Synth().toMaster();
const polySynth = new Tone.PolySynth(6, Tone.Synth).toMaster();
polySynth.volume.value = -5;
Tone.Transport.bpm.value = 90;
const chordAb = ["Ab3", "Cb4", "Eb4", "Gb4"];
const chordDb = ["Ab3", "Cb4", "Db4", "F4"];
const chordEb = ["Gb3", "Bb3", "Db4"];
@hhyyg
hhyyg / spread-operator.ts
Last active February 15, 2019 05:25
TypeScript: Spread Operator(Object spread, Destructuring)
interface PersonA {
name: string,
group: string,
item1: string,
item2: string,
}
interface PersonB {
name: string,