Posts

Showing posts from 2019

Converting pdf files to black and white

I recently downloaded a book from archive.org, and it was off-color and not easily printable (they used to provide black/white pdf files for books, but apparently they stopped doing so). I needed to convert it to a monochrome file so I could print it. This lead me down a number of dead-ends, and so I want to explain the best way I found to do this. First, convert each page to a separate PNG file. Here is the command I used: pdftoppm Hutchings.pdf file_prefix -png Note that you can make the file_prefix anything you would like. Next, you will need to determine the "threshold" at which point these pictures become black and white. Play around with it using this command: convert file_prefix-1.png -threshold 35% testing-1.png When you have determined the threshold, now it is time to batch processes all your PNG files (any files that need a different threshold can be individually adjusted using the above convert command. I use mogrify to do this, and I also make sure to...

Quick MIDI Synth Guide

Plug your MIDI controller into a USB port. Run aconnect -o , and look for your MIDI controller in the output: 1 2 3 4 5 $ aconnect -o client 14: 'Midi Through' [ type = kernel ] 0 'Midi Through Port-0' client 20: 'AKM322' [ type = kernel ] 0 'AKM322 MIDI 1 ' The controller’s client number here is: 20 Run aseqdump -p 20 (replace 20 with the client number) to verify it is working Then: 1 2 3 $ sudo apt-get update $ sudo apt-get install fluidsynth fluid-soundfont-gm $ aplay /usr/share/sounds/alsa/Noise.wav This last command should make a noise through your speakers. Then, for my computer, the following setup seems to run best: $ fluidsynth --audio-driver=alsa --gain 3 -r=22050 -c=16 -z=64 /usr/share/sounds/sf2/FluidR3_GM.sf2 In a second terminal, run: 1 2 3 4 5 6 7 8 $ aconnect -o client 14: 'Midi Through' [ type = kernel ] 0 'Midi Through Port-0' clie...