Skip to content

Instantly share code, notes, and snippets.

View asus4's full-sized avatar
:octocat:
Working from home

Koki Ibukuro asus4

:octocat:
Working from home
View GitHub Profile
@asus4
asus4 / m_conf.c
Created April 3, 2014 10:07
PD for iOS版にないオブジェクトの追加の仕方。 ref: http://qiita.com/asus4/items/c758aaa560c458d9bbb9
// ....
void d_soundfile_setup(void);
void d_ugen_setup(void);
// こんなかんじで
void your_extended_setup(void);
// ....
@asus4
asus4 / win8_icon_export.zsh
Last active August 29, 2015 14:01
Windows8 icon resize script
#!/bin/zsh
# consts
EXPORT_DIR=Icons
FILE_WIDE=logo_wide.png
FILE_SQUARE=logo_square.png
# input folder
function mkdir_ex() {
# create folder
@asus4
asus4 / sample.m
Last active August 29, 2015 14:02
Create Mac native key events ref: http://qiita.com/asus4/items/a2517aed8dc7e4773c34
- (void) keyEmulate {
CGEventRef keyup, keydown;
keydown = CGEventCreateKeyboardEvent (NULL, (CGKeyCode)40, true);
keyup = CGEventCreateKeyboardEvent (NULL, (CGKeyCode)40, false);
CGEventPost(kCGHIDEventTap, keydown);
CGEventPost(kCGHIDEventTap, keyup);
CFRelease(keydown);
CFRelease(keyup);
}
import Cocoa
class SoundManager {
struct Cache {
static let sound = Dictionary<String, NSSound>()
}
@asus4
asus4 / SOX normalize
Last active August 29, 2015 14:04
soxで全部の音をノーマライズ ref: http://qiita.com/asus4/items/0540445362e7eef3491f
brew install sox
@asus4
asus4 / convertflv.zsh
Created August 2, 2014 12:53
convert all mov files to flv
#!/bin/zsh
# normalize
function toflv() {
ffmpeg -i $1 -acodec copy -vcodec copy ${1%.mov}.flv
}
while [ "$1" != "" ]
do
toflv $1
@asus4
asus4 / angular-audio.coffee
Created August 4, 2014 10:59
Simple sound effect module for AngularJS
# This is Simple Audio Plugin for AngularJS
# service
class AngularAudio
constructor:() ->
@cache = {}
play:(id) ->
audio = null
@asus4
asus4 / wav2caf.sh
Created November 6, 2014 14:38
Convert Wave audio to Caf format
#!/bin/sh
for file in *.wav
do
/usr/bin/afconvert -f caff -d ima4@22050 -c 1 $file ${file%.wav}.caf
done
@asus4
asus4 / PropertyFollow.cs
Created November 18, 2014 16:17
Follow abstruct poroperty.
using UnityEngine;
using System;
using System.Reflection;
public class PropertyFollow : MonoBehaviour {
[Serializable]
public class TargetProp {
public string compName;
public string propName;
}
@asus4
asus4 / Midi2Motor.ino
Created November 22, 2014 11:28
Load midi file from SD card. and Convert to Motor
//
// Midi2Motor.ino
//
// Using Libiraries
//
// Standard MIDI Files (SMF) Processing Library
// GPLv3
// https://arduinocode.codeplex.com/releases/view/115256
//
// SdFat