Skip to content

Instantly share code, notes, and snippets.

View keijiro's full-sized avatar

Keijiro Takahashi keijiro

View GitHub Profile
@keijiro
keijiro / hdrp10.md
Last active December 16, 2020 12:52
hdrp10.md

HDRP10

HDRP10 is a video format converter for Unity HDRP that allows HDR video output via Windows HD Color.

comparison

*Left: Standard dynamic range. Right: HDR enabled. You can see banding in the dark area of the left photo. I used Dell U2720QM HDR monitor and took these

using UnityEngine;
class TimeCodeToPosition : MonoBehaviour
{
public Klinker.FrameReceiver receiver;
void Update()
{
var p = transform.localPosition;
p.x = (float)receiver.timecodeSeconds;
@keijiro
keijiro / BoltOscJack.md
Last active January 14, 2021 16:52
Bolt OSC Jack

Bolt OSC Jack

gif

Bolt OSC Jack is an add-on for Unity's Bolt visual scripting system that adds custom units for handling [OSC (Open Sound Control)] messages.

@keijiro
keijiro / BoltMinis.md
Last active November 6, 2020 01:39
BoltMinis.md

BoltMinis

BoltMinis is an add-on for Unity's Bolt visual scripting system that adds custom units for handling MIDI input.

It uses [Minis] as a backend. If you're interested in using MIDI without visual

BurstFFT

BurstFFT is an FFT (Fast Fourier Transform) implementation in high-performance C# with Unity's Burst compiler.

This repository contains the following three variants of Fourier transform implementation.

  • NaiveDFT: Unoptimized naive C# implementation of DFT

LASP

LASP is a Unity plugin providing low-latency audio input features that are useful to create audio-reactive visuals.

Demos

gif

[Unity.Burst.BurstCompile(CompileSynchronously = true)]
struct DftJob : IJobParallelFor
{
[ReadOnly] public NativeArray<float4> input;
[ReadOnly] public NativeArray<float4> coeffsR;
[ReadOnly] public NativeArray<float4> coeffsI;
[WriteOnly] public NativeArray<float> output;
public void Execute(int i)
{
@keijiro
keijiro / avi2hevc.sh
Last active February 15, 2020 12:11
Transcode all the AVI files in the current directory using the ProRes 422 HQ codec with ffmpeg
for file in *.avi; do ffmpeg -i $file -c:v prores_ks -profile:v 3 -an "$(basename "$file" .avi)".mov; done
@keijiro
keijiro / cmake_wsl_mingw.sh
Last active September 22, 2020 08:01
Invoke CMake in WSL for Win32 cross compilation
sudo apt install mingw-w64 cmake
cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-x86_64-w64-mingw32.cmake ..
@keijiro
keijiro / recover_windows_boot_manager.md
Last active January 25, 2020 09:42
How I recovered Windows Boot Manager removed by the Ubuntu installer.

What happened

I upgraded Ubuntu 18.04 to 19.10 on my main PC. After installation, Windows Boot Manager disappeared from the GRUB boot menu. I found the EFI partition was missing the /EFI/Microsoft directory. It seemed that the Ubuntu installer mistakenly removed the boot manager from EFI.

How I recovered it

  • Create a Windows installation media (USB stick) using Windows Media Creation