Skip to content

Instantly share code, notes, and snippets.

@tinpark
tinpark / p2b.sh
Last active March 26, 2020 21:38
p2b.sh push your file to blot, with citations rendered correctly
#!/bin/sh
# p2b.sh
# requires rsync
#
# Created by PARKER Martin on 22/05/2019.
# Modified 26/3/2020 by PARKER Martin
# This takes your markdown document, renders it to HTML and publishes it straight to blot.im
# dependencies:
# pandoc http://www.pandoc.org/
@tinpark
tinpark / metaInject.sh
Created November 19, 2018 18:49
Batch inject meta data into BWF files using the command line
#!/bin/sh
# metaInject.sh
#
#
# Created by PARKER Martin on 16/11/2018.
#
# Dependencies
# this script requires a full install of the FFMPEG
@tinpark
tinpark / analyseExtractFade.sh
Created October 15, 2018 11:10
Batch extract audio files from a single audio file based on segmentation using Ben Hackbarth's audioguide.
#!/bin/sh
# analyseExtractFade.sh or aef.sh for short
#
#
# Created by PARKER Martin on 11/10/2018.
#
# arguments are path of the audio file you want to segment, file format of the files you want to break things up into, fade parameters (fade in time fade out time and fade type and ultimately a text file from which to inject Metadata into the asstes you've generated.
# e.g. bash analyseExtractFade.sh ~/Dropbox/sounds/magicSound.wav aif 100s 560s q (this will analyse the audio file with agSegementSf.py and dump all of the slices it detects into a directory named magicSound. The slices will have fade ins of 100 samples fade outs of 560 samples using a quadratic fade function.
@tinpark
tinpark / makeSpectrogram.sh
Last active July 10, 2018 13:53 — forked from hrywlms/generate sox spectrograms.sh
A quick way to generate spectrograms for a bunch of audio files
### Generate PNG spectrograms using SoX
### Use the input file name as the title within the image as well as the output file name
### Set the width to 2000 (seems to output a ~2140px wide image)
### Generate for five arguments,
### arg 1 = file type to make spectrograms from, e.g. .wav,
### arg 2 = width of the spectrogram
### arg 3 = hight of the spectrogram
### arg 4 = the dB level of sounds to pick out, ignoring sounds below that threshold
### arg 5 = the frequencies to hone in on e.g. 4k will give you a spectrogram that draws sounds up to 2k