This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ruler Height | Regions | Markers | Tempo | |
---|---|---|---|---|
66 | 14 | 14 | 11 | |
69 | 15 | 15 | 12 | |
75 | 16 | 16 | 13 | |
80 | 17 | 17 | 14 | |
85 | 18 | 18 | 15 | |
90 | 19 | 19 | 16 | |
96 | 20 | 20 | 17 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Bare-bone REAPER extension | |
// | |
// 1. Grab reaper_plugin.h from https://github.com/justinfrankel/reaper-sdk/raw/main/sdk/reaper_plugin.h | |
// 2. Grab reaper_plugin_functions.h by running the REAPER action "[developer] Write C++ API functions header" | |
// 3. Grab WDL: git clone https://github.com/justinfrankel/WDL.git | |
// 4. Build then copy or link the binary file into <REAPER resource directory>/UserPlugins | |
// | |
// Linux | |
// ===== | |
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Usage: | |
// if(rec->caller_version != REAPER_PLUGIN_VERSION || !loadAPI(rec->GetFunc)) | |
// return 0; | |
// See also (bare-bone REAPER extension): | |
// https://gist.github.com/cfillion/f32b04e75e84e03cc463abb1eda41400 | |
#define REQUIRED_API(name) {(void **)&name, #name, true} | |
#define OPTIONAL_API(name) {(void **)&name, #name, false} | |
static bool loadAPI(void *(*getFunc)(const char *)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- https://forum.cockos.com/showthread.php?t=200086 | |
function solo(trackIndex) | |
local track = reaper.GetTrack(0, trackIndex) | |
if not track then return false end | |
reaper.PreventUIRefresh(1) | |
reaper.SoloAllTracks(0) | |
reaper.SetMediaTrackInfo_Value(track, 'I_SOLO', 1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// c++ -lfontconfig fctest.cpp | |
// ./a.out 'DejaVu Sans Mono' monospace 'Andale Mono' 'Ubuntu Mono' Lato | |
#include <cstdio> | |
#include <fontconfig/fontconfig.h> | |
class FontConfig { | |
public: | |
FontConfig() : m_config(FcInitLoadConfigAndFonts()) {} | |
FontConfig(const FontConfig &) = delete; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- http://www-mmsp.ece.mcgill.ca/Documents/AudioFormats/WAVE/WAVE.html | |
-- usage example at the end | |
local WavReader = {} | |
WavReader.__index = WavReader | |
function WavReader.new(fn) | |
local self = setmetatable({}, WavReader) | |
self.file, err = io.open(fn) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function checkJSAPI(requiredVersion) | |
if reaper.JS_ReaScriptAPI_Version and reaper.JS_ReaScriptAPI_Version() >= requiredVersion then | |
return true | |
end | |
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Demo REAPER extension to intercept keyboard input | |
// https://i.imgur.com/xMSrqRr.gif | |
#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}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <memory> | |
#ifdef _WIN32 | |
# include <windows.h> | |
#else | |
# include <swell/swell.h> | |
# include <wdltypes.h> // GWLP_WNDPROC | |
#endif | |
#define REAPERAPI_IMPLEMENT |