Skip to content

Instantly share code, notes, and snippets.

@r4dian
r4dian / rename-wav-with-pitch.py
Last active July 3, 2022 12:13 — forked from kroger/convert.py
Rename wav files using frequency and pitch detection
#!/usr/bin/env python2
import subprocess, os, glob, math
## /!\ Python 2.x /!\
## requires [Aubio](https://aubio.org)
## Rename wav files using frequency and pitch detection:
## GTR_08.wav ---> automated pitch detection & file renaming ---> GTR_08 - C3 (+0cents) - 130.81Hz.wav
<html>
<head>
<title>REAPER ACTIONS</title>
<style type="text/css">
body {
background-color: #fff;
color: #424242;
font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
}
@r4dian
r4dian / gist:02c693cabaca7a211769feafdf29a2ff
Last active May 4, 2017 11:13 — forked from tommorris/gist:284380
map/filter an array: spot the odd one out (I had to edit the python one to use map/filter, it was bothering me)
[1, 2, 3, 4, 5].map {|i| i * 2 }.find_all {|i| i > 5 }
# I have started monkey-patching `alias_method :filter, :find_all` in Array.
@r4dian
r4dian / bash_prompt.sh
Last active March 28, 2017 14:48 — forked from bradsokol/bash_prompt.sh
Set colour bash prompt according to active virtualenv, Git, Mercurial or Subversion branch and return status of last command.
#!/bin/bash
#
# DESCRIPTION:
#
# Set the bash prompt according to:
# * the active virtualenv
# * the branch/status of the current Git, Mercurial or Subversion repository
# * the return value of the previous command
# * the fact you just came from Windows and are used to having newlines in
# your prompts. [Are you!? - r4dian]
@r4dian
r4dian / mattermost-monokai.txt
Last active August 4, 2016 11:25 — forked from ojdon/mattermost-monokai.txt
A rough Monokai theme for Mattermost.
#333333,#fefefe,#f92672,#FFFFFF,#fff,#f92672,#66d9ef,#FFFFFF,#a6e22e,#f92672,#bfcde8,#272822,#444444,#fefefe,#66d9ef,#66d9ef,#272822,#f92672,#FEFEFE,#000000,monokai
@r4dian
r4dian / music.c
Last active August 29, 2015 14:24 — forked from scazon/music.c
/* Here's a look at how I created a quick music player for use with GBDK.
It basically defines how to play a note, and then stores an array of notes
to be played as a timer interates through the beats */
//Define note names
typedef enum {
C3, Cd3, D3, Dd3, E3, F3, Fd3, G3, Gd3, A3, Ad3, B3,
C4, Cd4, D4, Dd4, E4, F4, Fd4, G4, Gd4, A4, Ad4, B4,
C5, Cd5, D5, Dd5, E5, F5, Fd5, G5, Gd5, A5, Ad5, B5,
C6, Cd6, D6, Dd6, E6, F6, Fd6, G6, Gd6, A6, Ad6, B6,
@r4dian
r4dian / config-highlight.cfg
Last active August 29, 2015 14:12 — forked from jaimergp/config-highlight.cfg
Monokai for idle
# Place this file inside your .idlerc folder
# or paste its contents inside config-highlight.def
# Use 'locate' to find their locations
# Adapted from SublimeText's Monokai
[monokai]
normal-foreground= #F8F8F2
normal-background= #272822
keyword-foreground= #F92672
keyword-background= #272822