Skip to content

Instantly share code, notes, and snippets.

@totetmatt
totetmatt / README.md
Last active December 16, 2023 23:08
Bonzomatic MIDI configration for Apak APCMini
#!/bin/sh
import os
from pathlib import Path
import argparse
import subprocess
def _gif_this(source_file, output, start_time, end_time, duration, fps, scale):
"""
http://blog.pkh.me/p/21-high-quality-gif-with-ffmpeg.html
@totetmatt
totetmatt / gist:de39f9cce1afc6e65c144b1fbcc28461
Created August 13, 2021 17:19
Tonight 21:00 UTC to your local date
==| 2021-08-13 @ 10:00 |==
Pacific/Midway
Pacific/Niue
Pacific/Pago_Pago
Pacific/Samoa
US/Samoa
==| 2021-08-13 @ 11:00 |==
Pacific/Honolulu
Pacific/Johnston
Pacific/Rarotonga
#version 410 core
uniform float fGlobalTime; // in seconds
uniform vec2 v2Resolution; // viewport resolution (in pixels)
uniform float fFrameTime; // duration of the last frame, in seconds
uniform sampler1D texFFT; // towards 0.0 is bass / lower freq, towards 1.0 is higher / treble freq
uniform sampler1D texFFTSmoothed; // this one has longer falloff and less harsh transients
uniform sampler1D texFFTIntegrated; // this is continually increasing
uniform sampler2D texPreviousFrame; // screenshot of the previous frame
@totetmatt
totetmatt / generate_texture_from_image.sh
Created January 16, 2021 21:59
Idea Bonzo Shader Royale
# Create a texture that concat profile
mogrify -resize 512x512! *.png ; montage -mode concatenate -tile x1 *.png ../tex1.jpg
#!/bin/sh
set -x
#Download media + metadata
youtube-dl --write-info-json -x --audio-format mp3 -o "tmp_out.%(ext)s" $1
# Maybe a way to get the file name from previous function
INFO="tmp_out.info.json"
AUDIO="tmp_out.mp3"
echo :: $INFO $AUDIO ::
@totetmatt
totetmatt / kata-starwars.sh
Last active June 20, 2020 08:53
kata-starwars.sh
## Generation of files ##
cat > movies.txt <<EOL
A New Hope (1977)
The Empire Strikes Back (1980)
Return of the Jedi (1983)
The Phantom Menace (1999)
Attack of the Clones (2002)
Revenge of the Sith (2005)
The Force Awakens (2015)
@totetmatt
totetmatt / demo.shader
Created February 20, 2020 12:35
Kodelife shader program
#version 150
in VertexData
{
vec4 v_position;
vec3 v_normal;
vec2 v_texcoord;
} inData;
out vec4 fragColor;
# crontab -l
59 09 * * 1-5 export DISPLAY=:0.0 && /usr/bin/play.sh
# ^---------- better to wrap the command to a script
# ^------make it launchable without display / terminal
#
# /usr/bin/play.sh
#!/bin/bash
/usr/bin/mplayer -vo null -vc dummy -really-quiet -volume 75 -loop 2 "$(ls /home/totetmatt/Music/JRMelody/* | shuf | head -n 1)" > /dev/null 2>&1
#version 150
in VertexData
{
vec4 v_position;
vec3 v_normal;
vec2 v_texcoord;
} inData;
out vec4 fragColor;