Skip to content

Instantly share code, notes, and snippets.

@rerrahkr
rerrahkr / opn_opna_chiptune_tools.md
Created September 18, 2022 06:07
OPN/OPNA チップチューン向けツールの雑なまとめ
@rerrahkr
rerrahkr / ntの個人的使い方.md
Created September 18, 2022 03:04
初音ミクNT

だいたいを形作る

パラメータ 用途
音符 発音・大体の音程(発音優先)
Consonant Rate 子音の長さ
Note Gain 発音を滑らかに接続するための音量調節・(抑揚)
E.V.E.C 音符先頭のアタックの強さなど
Attack Rate 音量アタックの速さ(勝手に調節されてる)
ピッチ ピッチカーブ(音符の音高より優先)
transcribed from https://github.com/takamichih/fmplayer/blob/df38031f493c0cdb35218fda566077103ee1a68e/fmdriver/fmdriver_fmp.c
# Header
0x00 uint16 offset to footer
## version <= 0x29
0x02 uint16 offset to FM1
0x04 uint16 offset to FM2
0x06 uint16 offset to FM3
0x08 uint16 offset to SSG1
@rerrahkr
rerrahkr / sat_sudoku.sh
Created September 13, 2019 07:51
数独をSATソルバを用いて解く
#!/bin/bash -e
type sat13 > /dev/null
if [[ $# -eq 2 && $1 = "-x" ]]; then
scala -nc SudokuEncode $2
sat13 < tmp.sat | tr ' ' '\n' | grep -v '^~' | sort -n | sed "/^$/d" > ans.sat
scala -nc SudokuShow
rm tmp.sat ans.sat
else
@rerrahkr
rerrahkr / .emacs
Created June 18, 2019 15:14
Emacsの設定
(setq load-path (cons "~/.emacs.d/elisp" load-path))
(setq load-path (cons "~/.emacs.d/elisp/mml-major-mode" load-path))
; メニュー画面非表示
(setq inhibit-startup-message t)
; scratchの記述を非表示
(setq initial-scratch-message nil)
; スクロールは1行ずつ
@rerrahkr
rerrahkr / m3l.m
Created May 14, 2018 10:37
MATLABでMMLもどき
function song = m3l(isPlay, Fs)
% Matlab pseudo-MML (M3L)
% [input]
% isPlay: true - play song after create song data, false - not play
% Fs: sampling frequency
% [output]
% song: raw song data
initParams(Fs);
@rerrahkr
rerrahkr / my_favorite_hvsc_sid_tunes.md
Last active August 5, 2022 09:57
My HVSC playlist
Title [Subtune name] Author HVSC
(R)evolution Stefan Konarkowski (Alien) MUSICIANS/A/Alien_WOW/R_evolution.sid
2nd Reality (part 2) Tammo Hinrichs (KB) MUSICIANS/K/KB/2nd_Reality_part_2.sid
64 Forever Sascha Zeidler (Linus) MUSICIANS/L/Linus/64_Forever.sid
90s Still Within Kamil Wolnikowski (Jammer) MUSICIANS/J/Jammer/90s_Still_Within.sid
912 Stell
@rerrahkr
rerrahkr / memo_git.md
Last active November 21, 2021 12:51
git関連のメモ
  • 作業完全取り消しは
    $ git reflog  # 履歴表示してコミット番号コピー
    $ git reset --hard 戻す位置のコミット番号
  • 現在修正中の変更をすべて取り消して最後のコミット状態に戻すときは
    $ git checkout .
    $ git clean -df .   # 新規ファイルを削除
@rerrahkr
rerrahkr / ncurses_animation.c
Created October 21, 2017 08:53
ncursesを使った遊び(文字でアニメーション)
#include <stdio.h>
#include <math.h>
#include <ncurses.h>
#define MOJI ">>WAIT>-> >"
#define YOKOHABA 73
#define HAYASA 0.015
#define SA 2
int main()