Skip to content

Instantly share code, notes, and snippets.

View hz37's full-sized avatar
💭
Writing for JWG Universum

Hens Zimmerman Audio hz37

💭
Writing for JWG Universum
  • Hens Zimmerman Audio
  • Bilthoven, the Netherlands
View GitHub Profile
@hz37
hz37 / Pie Chart Demo.py
Created April 29, 2018 20:00
Pie Chart Demo.py
# coding: utf-8
'''
Demo of a basic pie chart plus a few additional features.
In addition to the basic pie chart, this demo shows a few optional features:
* slice labels
* auto-labeling the percentage
* offsetting a slice with "explode"
* custom start angle
@hz37
hz37 / draaimolen.cpp
Created October 14, 2018 11:25
Arduino Uno using asynchronous music playing in the background while handling button presses using Adafruit shield
// *********************************************************************
// Merry-go-round using Arduino Uno en Adafruit VS1053 shield.
// H.Zimmerman, 13-10-2018, Weesp.
// Code based on Adafruit examples:
// https://github.com/adafruit/Adafruit_VS1053_Library
// *********************************************************************
#include <SPI.h>
#include <Adafruit_VS1053.h>
#include <SD.h>
// *********************************************************************
// Manju koffer met Arduino Uno en Adafruit VS1053 shield.
// H.Zimmerman, 20-11-2018, Bilthoven.
// *********************************************************************
#include <SPI.h>
#include <Adafruit_VS1053.h>
#include <SD.h>
// *********************************************************************
@hz37
hz37 / ffmpeg.txt
Last active January 20, 2024 17:49
ffmpeg examples Hens Zimmerman
# MacOS shell script om alle wav bestanden in een dir te checken op EBU loudness in LUFS. Don't forget to chmod +x
#!/bin/bash
for f in *.wav
do
echo "$f"
ffmpeg -i "$f" -af ebur128=framelog=verbose -f null - 2>&1 | awk '/I:/{print $2}'
done
@hz37
hz37 / gist:224921e323350edebb4a28323a8054ac
Created January 17, 2020 22:16
mp3 to audio cd in MacOS
#!/bin/bash
for f in *.mp3
do
echo $f
afconvert --data LEI16@44100 --channels 2 "$f" "$f.wav"
done
# Windows 10
certutil -hashfile COMING_BACK_DNXHD120_NL_HZA_4CH_R128_11022020.MXF MD5
# MacOS
md5 COMING_BACK_DNXHD120_NL_HZA_4CH_R128_11022020.MXF
#!/bin/bash
for f in *.*
do
name=$(echo "$f" | cut -f 1 -d '.')
echo "$name.mp3"
# Or whatever sample rate or bit rate you require of course:
ffmpeg -i "$f" -codec:a libmp3lame -b:a 192K -ar 44100 "$name.mp3"
done
@hz37
hz37 / gist:ac1df2d74b82b77417bd731cce0efaf3
Created September 15, 2020 18:41
Compare MD5 of local and remote ftp file after a troublesome transfer
; poll server via Server - Enter Custom Command... (FileZilla)
FEAT
; result something like:
Command: FEAT
Response: 211-Extensions supported
Response: UTF8
@hz37
hz37 / gist:75e9cd06c63c3a78715a4bcbbd3445f2
Created March 4, 2021 14:31
Automator /bin/bash shell script for MacOS file conversion Finder Quick Action
for f in "$@"
do
echo "$f"
/usr/local/bin/ffmpeg -y -i "$f" -c:v dnxhd -s 1920x1080 -r 25 -an -b:v 75M -pix_fmt yuv422p "$f".mxf
done
@hz37
hz37 / ableton max midi.rb
Created July 31, 2021 10:16
Sonic Pi receives MIDI from Max "from Max 1"
# Sonic Pi receives MIDI from Max "from Max 1".
# Ableton Live sends MIDI to "to Max 1".
# H.Zimmerman, 31-07-2021.
#
#----------begin_max5_patcher----------
#393.3ocyT91SCBCDF+0vmBReMtPoi+neULKlNVyrKiVRoLwrru6VtBp35DVz
#E8MqoOb6dteGb2QeOzZYKqFE7PviAddG887.oNAu96dnRZawdZMDFRvdQtdG
#Jz9HMqUakkZlrQOny2.plHuKePSzTxE6YZHOjdwJpt3YtX6SJVg1VGIDxhnv
#.RJFNxfawwKhBV8QlLdMjpnNwS99c+DNSJJY00zsryv.6.fLm.DeY.xxhfRN
#Iu6.SRm..bupUR+ZEylGDJX0uHaI4NfK4ZgK4dx+R3V5.Nx0B2Rb5eIbeyrE