Skip to content

Instantly share code, notes, and snippets.

Christian Fillion cfillion

Block or report user

Report or block cfillion

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
cfillion / orignal-poster.user.js
Last active Apr 25, 2019
Show an indicator beside an original poster's post on the REAPER forums
View orignal-poster.user.js
// ==UserScript==
// @name Original poster indicator
// @namespace
// @version 1.1
// @author cfillion
// @include*
// ==/UserScript==
function getPosters(doc)
cfillion / reascript_vararg.hpp
Last active Apr 22, 2019
Compile-time ReaScript API vararg wrapper generator for REAPER extensions (C++17)
View reascript_vararg.hpp
// Extracted from ReaPack's source code (LGPL v3)
/* Usage example:
static int HelloWorld(int foo, int bar) { return foo * bar; }
REAPER_PLUGIN_HINSTANCE instance, reaper_plugin_info_t *rec)
// ...
// API_HelloWorld and APIdef_HelloWorld must also be registered as usual
cfillion / reaper_square.cpp
Last active Mar 18, 2019
A REAPER extension that draws a red square on the arrange view.
View reaper_square.cpp
#include <memory>
#ifdef _WIN32
# include <windows.h>
# include <swell/swell.h>
# include <wdltypes.h> // GWLP_WNDPROC
View reaper-keyboard-intercept.cpp
// Demo REAPER extension to intercept keyboard input
#include <cstdio>
#include <reaper_plugin.h>
static int (*plugin_register)(const char *name, void *infostruct);
static int HandleKey(MSG *, accelerator_register_t *);
static accelerator_register_t g_accel{HandleKey, true};
View Check whether js_ReascriptAPI is installed.lua
function checkJSAPI(requiredVersion)
if reaper.JS_ReaScriptAPI_Version and reaper.JS_ReaScriptAPI_Version() >= requiredVersion then
return true
local button = reaper.MB(string.format([[
This script requires js_ReaScriptAPI %s or newer. Do you want to install it now?
Choose [Yes] to open ReaPack's package browser.
]], requiredVersion), "js_ReaScriptAPI not found", 4)
cfillion / wav-parser.lua
Last active Oct 17, 2018
Lua WAV file reader (chunk parser)
View wav-parser.lua
-- usage example at the end
local WavReader = {}
WavReader.__index = WavReader
local self = setmetatable({}, WavReader)
self.file, err =
cfillion / fctest.cpp
Last active Aug 16, 2018
Font family matching with FontConfig demo
View fctest.cpp
// c++ -lfontconfig fctest.cpp
// ./a.out 'DejaVu Sans Mono' monospace 'Andale Mono' 'Ubuntu Mono' Lato
#include <cstdio>
#include <fontconfig/fontconfig.h>
class FontConfig {
FontConfig() : m_config(FcInitLoadConfigAndFonts()) {}
FontConfig(const FontConfig &) = delete;
View github-releases-file-dl-shares.rb
require 'json'
files = {}
d = "test", &JSON.method(:load)
d.each {|r|
r['assets'].each {|a|
files[a['name']] ||= 0
files[a['name']] += a['download_count']
View cfillion_Compare tracks 1 and 2 for 20 seconds.lua
function solo(trackIndex)
local track = reaper.GetTrack(0, trackIndex)
if not track then return false end
reaper.SetMediaTrackInfo_Value(track, 'I_SOLO', 1)
cfillion / load-reaper-api.cpp
Last active Aug 28, 2018
Loader for the REAPER C++ API
View load-reaper-api.cpp
// Usage:
// if(rec->caller_version != REAPER_PLUGIN_VERSION || !loadAPI(rec->GetFunc))
// return 0;
// See also (bare-bone REAPER extension):
#define REQUIRED_API(name) {(void **)&name, #name, true}
#define OPTIONAL_API(name) {(void **)&name, #name, false}
static bool loadAPI(void *(*getFunc)(const char *))
You can’t perform that action at this time.