Skip to content

Instantly share code, notes, and snippets.

View gocha's full-sized avatar

gocha gocha

View GitHub Profile
@gocha
gocha / runwin32.cpp
Created January 18, 2018 04:02
Cygwin: cmd.exe launcher (without quoting)
// runwin32.exe dir "\"C:\Program Files\\\""
#include <stdio.h>
#include <stdlib.h>
#include <string>
using std::string;
int main(int argc, char *argv[]) {
string command("cmd /c");
@gocha
gocha / printargs.bat
Created January 17, 2018 09:43
Print command-line arguments (Windows)
@echo off
echo [%%*] %*
echo [%%0] %0
echo [%%1] %1
echo [%%2] %2
echo [%%3] %3
echo [%%4] %4
echo [%%5] %5
echo [%%6] %6
echo [%%7] %7
@gocha
gocha / runwin32.sh
Last active January 30, 2018 07:25
Simple runwin32 launcher for Cygwin+rsh
#!/bin/sh
#
# Note:
# - Environment variables must be set before running. This script doesn't import any user profiles.
# Add Windows system directory paths to the PATH,
# to allow to use cmd.exe and any other standard commands.
export PATH="$(cygpath -S):$(cygpath -W):$PATH"
# Add some common system variables.
@gocha
gocha / vbs-entrypoint.vbs
Created January 5, 2018 07:20
[VBScript] Error Handling (exit with status 1, if a runtime error is raised)
Call EntryPoint
Sub EntryPoint()
On Error Resume Next
Call Main
If Err <> 0 Then
WScript.Echo Err.Source & ": " & Err.Description & " (Error " & Err.Number & ")"
WScript.Quit(1)
End If
End Sub
@gocha
gocha / proxy.fff.h
Created February 6, 2017 09:59
Fake Function Framework: Trick for replacing system functions
#pragma once
#include "fff.h"
#include <stdarg.h>
//#ifdef FFF_GENERATE_FAKE_DEFINES
//#define FFF_EXTERN extern __declspec(dllexport)
//#else
//#define FFF_EXTERN extern __declspec(dllimport)
@gocha
gocha / LuaConsoleWindow.cpp
Last active January 29, 2017 12:31
Lua Console Window on wxWidgets (pcsx2)
/* PCSX2 - PS2 Emulator for PCs
* Copyright (C) 2002-2014 PCSX2 Dev Team
*
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
* of the GNU Lesser General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
@gocha
gocha / trim.c
Last active November 16, 2016 07:57
文字列をトリムする (trim a string)
/// @file
/// 文字列をトリムするサンプル。
/**
* 文字列をトリムする。
* @param pchBuffer トリム後文字列を格納するバッファ
* @param uiBufferSize トリム後文字列バッファのサイズ
* @param pchSource トリム元の文字列
* @param pchTrimChars トリム対象文字集合 (for example " \t\n\v\f\r")
* @return 成功なら1、失敗なら0を返す。
@gocha
gocha / Listening to Compression - iZotope Pro Audio Essentials.md
Created September 10, 2016 12:04
[Transcription] Listening to Compression | iZotope Pro Audio Essentials

In our series of videos will look at some common compression parameters, so you can understand how to optimize your compressor, for whatever thing you're working with.

Well, this is not meant to be an exhaustive list of parameters it does cover. The main parameters found in fully adjustable hardware and software compressors.

It's a good idea to develop some mastery over the individual parameters, so that you can tailor compression to suit your particular music and taste. When you work with compressors you'll understand that in the end, all the parameters interact with each other. So, no single parameter is more important than the others, and adjustment to one will likely have an effect on the behavior of the others.

Remember, it takes time to learn compression effectively, in part because it takes time to learn to hear the effect of compression well. I'll tell you a few examples of the sound a compress

@gocha
gocha / Dynamics, RMS and Peak Levels - iZotope Pro Audio Essentials.md
Created September 10, 2016 11:44
[Transcription] Dynamics, RMS and Peak Levels | iZotope Pro Audio Essentials

There are two ways we describe and measure level, and to help us understand how compression works, we need to understand them. They're called Peak Level and Average Level.

Peak Level is the instantaneous measurement of level. It's important because it lets us know the highest level of the audio, and how close it is to the ceiling, or the maximum allowable level before distortion.

Average Level is a measurement of the average energy that occurs over a window of time. We typically use a window of about 300 milliseconds or one third of a second. This is connected to the way our brain evaluate the level or loudness of a sound.

When you look at the waveform of a recording, you can usually see the peak and the average level pretty clearly. If you zoom out and look at an entire song, you can even navigate the different sections by interpreting the different than average level between the verse and the ch

@gocha
gocha / The Whats and Whys of Compression - iZotope Pro Audio Essentials.md
Last active September 10, 2016 11:44
[Transcription] The Whats and Whys of Compression | iZotope Pro Audio Essentials

Compression is an important tool. When it can be challenging to grasp, it can enhance a recording or ruin it. It has so many uses. It's challenging to know where to begin when describing it. If you have one thing to remember about compression, understand that its main function is to control dynamic range, which is the difference between the loudest and the quietest sounds in a recording.

So what is compression? Well, you can think of it like a tiny engineer who's constantly riding the faders to adjust the level, so that there's consistency across an entire recording. Compression settings determine how active that tiny engineer is well keeping the dynamic range and check. Compression works by reducing the loudest sounds so that they fit into a smaller dynamic range. The result is that there isn't as much contrast between the loudest and the quietest sounds. There's more consistency in the level,