I’ve got an old Speaker Phat, and a Raspberry Zero
An audio add-on board for Raspberry ( same size as the Zero )
Connections
My initial idea was to have the “High Voltage Sid Collection” (Downloaded the 55000 pack) On a mini device, battery operated and with a little keypad.
On the keypad i can select the Sidtune to play, or pressing A and a number the Sids from a certain artist.
The display gives you information about the tune being played. ( The display has an I2C hat to convert 8bits to I2C )
See pinout phat above. I’ve got three choices for I2C connection (green/blue to the Phat)
Direct connect and use different addresses
Use a I2C hub and different addresses
Define a secondary I2C on the raspberry
So I made the first test setup …
Underrun occurred .. So back to the drawingboard. I probably need a better Audio Hat. First to try .. Zero fast enough for sidplay2? Maybe audio over hdmi works??
I’ve replaced strings before so that’s no problem. Starting all over again.
Our Folk Band Harp player wants to due some duets. So lets get playin’
http://pinnerstringquartet.com/
UPDATE: 20230119 Replaced the 4 strings yesterday, not fully tuned yet. Gave the string some time to rest. Looking at the harp this morning. G4 was broken .. d*mn
UPDATE: 20230126 Replaced also the G4, all done. Tuning this kind of Harp. (Salvi Lever harp) You have to put all levers down, and tune them from lowest note to highest. The A B and E strings have to be tuned flat! So by using the levers you can play in all kinds of different keys.
Only cards worth mentioning. I will add more information to this page
Graphics:
Hercules ???? – Did a lot of machinecode on this one. (Which?) CGA/EGA Card ??? – Machinecode hacking VGA .. first card also machine code hacking Matrox Some cards i knew a lot about, i did some manipulations using assembly that were very interesting, but only worked on that specific brand.
The Catweasel is a family of enhanced floppy-disk controllers from German company Individual Computers. These controllers are designed to allow more recent computers, such as PCs, to access a wide variety of older or non-native disk formats using standard floppy drives.
You could connect joysticks and there is a socket for a SID chip on the card.
I like creating Art, painting, drawing, sculpting but also computer generated. Most of the things i create are for adults. So i can’t post my best work.
Below are some of the programs i’ve used, these are NOT the generic drawing programs like Gimp, Photoshop or alike. Ony programs that generate (photorealistic) graphics. I tried to start with the oldest ending with Blender. There is an overlap and sometimes i’m not sure when I used these programs.
BMRT
Blue Moon Rendering Tools, or BMRT, was one of the most famous RenderMan-compliant photorealistic rendering systems.
Could not find examples?
3DS4
3D Studio, not to be confused with the later “3d Studio Max” product, is a DOS-based tool from Autodesk for creating 3d models and animations.
Website for female student society Woodstock For our computer magazine (with Martin)Just a logoLogo for a work thingyAlso work relatedSome examples, i did some animations also
Vivid
This is the Vivid raytracer. It will only run in a dos environment. http://paulbourke.net/dataformats/vivid/
Povray
The Persistence of Vision Ray Tracer, most commonly acronymed as POV-Ray, is a cross-platform ray-tracing program that generates images from a text-based scene description.
Poser (Pro) is a 3D computer graphics program optimized for the 3D modeling of human figures.
MonsterOne cell of a comic i made using PoserTuyet Study
Blender
Blender is a free and open-source 3D computer graphics software tool set used for creating animated films, visual effects, art, 3D-printed models, motion graphics, interactive 3D applications, virtual reality, and, formerly, video games. Blender’s features include 3D modelling, UV mapping, texturing, digital drawing, raster graphics editing, rigging and skinning, fluid and smoke simulation, particle simulation, soft body simulation, sculpting, animation, match moving, rendering, motion graphics, video editing, and compositing. (Dutch developers started it in 1994) https://en.wikipedia.org/wiki/Blender_(software)
DonutNeon effect testSee rest blog for more blender examples (VR/Tracking/Animated/Mqtt-control)
Below here not really for art but graphical generators .
I love movies, but somethings bug the hell out of me.
I often see movie mistakes, but when those mistakes are not too obvious, i can live with it.
Glasses being flat
Reflection makes it worseThere is no need for a modern movie to do this!
They could have used glasses which are a little curved, so it isn’t too obviously flat.
But a better solution is :
Dustin Hoffman had to wear contact lenses so that he could see correctly through the thick glasses he had to wear.
The Wilhelm scream
I know it’s a running gag, but it’s not funny anymore. https://en.wikipedia.org/wiki/Wilhelm_scream
People not really tied up, or pinned down
I hate seeing people tied up badly in movies, so easy to escape. Sometimes the actor has to hold the rope in place to keep it from falling off. Rope, zipties and chains. (I will add some examples) In some older movies you can see straining on wrists or neck. So it was really secure and tight! (real)
Bad example i know, but first one i found
Update 20230808 .. Oh no! I can’t escape!
Oh no, i can’t get my hand out of thisLet’s use some big padding in those arm shacklesO no, my feet!
Hover foot
American unrealistic events
Not talking about sci-fi or adventure movies. Over the top movies. That’s why i like murder mysteries from Iceland, Scandinavia more than American. There are many movies, in which the main character is the average joe, but he can fall off buildings, hit by cars, and run all day without getting tired. And escapes after that in the most improbable way.
Same category as Wilhelm Scream, the squeaky gate/door
We’ve been using the same sound in our student place 25 years ago. I even recorded new and better examples for people to use.
Xfiles, sparatacus blood & sand, Supernatural, Shawshank Redemption, Reign of Fire, Final Destination, Quantum Leap, Fringe, etc etc
UPDATE: 20230716 The sound ..
My recording
One of my recordings (Scotland 2022)
Not consulting an expert
Movies about science, computers or even general laws of physics are more believable when asking an expert for advice to portray something.
Lights in diving masks/space helmets
When doing this the diver can’t see sh*t
Spaceships are alway the same orientation, on the same plane, when they meet.
There is no up / down whatever in space. Directors are always thinking of one plane. Therefore you need to have at least 4 to be “surrounded” in space. 🙂
Not finishing drinks
Maybe i’m cheap. I won’t leave a glass untouched.
Hanging up on phone calls without saying anything like goodbye
Just rude.
People driving looking for minutes at the passenger, not looking at the road
Even worse, moving the steering wheel left right left .. even on a straight road.
Every 555 number has been used 100’s of times
All persons have a number in the range 555-0100 till 555-9999
Rain only being in the place of the actor.
The houses up the street are dry and in the sun
Generic stuff
Daylight when needed is in full swing in 2 minutes.
Hero’s are still looking at the end-battle scene when officials arrive
Bomb are always in the last 10 seconds defused.
Hero has to fight lots of people before ending up at the boss, who is stronger than all his minions!
People destroying their phone to avoid tracking. Take out simcard and destroy, take out battery and destroy then stamp on the phone and throw in the sea. Take out the battery if possible, dunk in water else
Bombs falling using the wrong sound. People on the ground would hear the pitch increasing as it falls, not decreasing, due to the Doppler effect.
The script below helps me to copy located files to a temporary directory. (Which is excluded in al kinds of other find tools)
It will remove the slashes in a path, but keeps the rest.
You can pipe to this script
All files in 1 directory, but NO overwrite of files (keeps path). This allows for easy browsing with a picture viewer.
Want to know original path, look at the filename .. think of where the slashes should go
Example:
Lets find all jpg’s which linux in its name
# this will list all found files
locate -i linux | grep -i jpg$
output example (see below) (With slashes and spaces)
/tank/WorkDirectory/TMP/UITZOEKEN/cds uitzoeken/div/141/31/cd3/done/gfx/linux-from-scratch.jpg
cplocatescript
#!/bin/bash
mkdir -p /mnt/private/TEMP/$$
cat - | while read line ; do cp "$line" /mnt/private/TEMP/$$/$(echo "$line" | tr -cd 'A-Za-z0-9._-' ; echo "" ) ;done
#!/bin/bash # Set shebang .. interpreter (sh/python/bash)
#set -x # debug flag, shows all output and variables
set -e # exit when an error occurs, Dont use this when sourcing a scriptor using bash ./scriptnaam gebruikt.
set -u # exit when a variable isn't defined
set -o pipefail # exit when a pipe command fails
# Add comments to your scripts!
PIPEFAIL Example
grep string /nonexistenddir/file | sort # Does NOT give an error, sort works!
So echo $? gives 0
When set -o pipefail is set, above example will print 1 or 2
Bash options example
#!/bin/bash
usage ()
{
echo >&2 "usage: $0 <list-of-options>"
}
main ()
{
[ $# -lt 1 ] && usage
INSTALL_DIR=`dirname $0`
for i in $@; do
echo "$INSTALL_DIR $i"
done
}
main $@
Execute output from a script.
Sometimes i write scripts which print the command I want to have executed. Most of the times to check the generated commandline. simple example
ls | grep 2000 | while read ; do echo rm -f "$REPLY" ;done
Above only prints the lines rm -f <filename with 2000> rm -f <other filename with 2000>
Instead of removing the echo command, you can add a | bash , to have it executed.
ls | grep 2000 | while read ; do echo rm -f "$REPLY" ;done | bash
Or even shorter ( Use !! for previous command )
!! | bash
History
Search with CTRL-R in your command history, and use !<number> to execute this command again.
touch file1 file2 file3 file4
chmod 664 !* # will chmod only the files
When you used typed systemctl stop httpd and want to start again use replace ^stop^start This will take previous command containing stop and places stop with start and executes this.
Toggle history on/off with “set -o history”, depending on your setup you can use “<space>command to be executed”
History log original username per date when sudo is being used (creates .history.20230103.fash in /root/ )
HISTFILE=~/.history.$(date +%y%b%d).$(who am i | awk '{ print $1 }')
Skip first 2 lines and join 2 lines
#skip 2 lines
tail -n +3
#join 2 lines
sed 'N;s/\n/,/'
#3rd line from a file
sed "3q;d" /etc/hosts
#join on line line using comma's
paste -sd "," -
Find Tricks
#Remove empty directories
find ??? -empty -type d -delete
#Find multiple extentions
find archieven/ \( -name "*.png" -o -name "*.xml" \)
-print0 to handle filenames with spaces
Remove huge directory structures FAST
mkdir /tmp/empty ; rsync -a --delete /tmp/empty /path/blah
Check program installed and in path
which zenity >/dev/null 2>/tmp/err || ( echo "zenity not found, please install" ; exit 1 )
Change directory to location script for relative path usage
cd $(dirname $0)
ls relativesubdir/
IFS (Internal Field Separator)
IFS=$' ' # internal field separator, strings split here
for f in $(cat /etc/hosts) ; do echo $f ;done
#outputs 127.0.0.1
# localhost
IFS=$'\n\t' # internal field separator, split end of line
for f in $(cat /etc/hosts) ; do echo $f ;done
# Outputs 127.0.0.1 localhost
Difference for and while read example
echo "This will print every word" > text # Places text in file
echo "second line" >> text # Append text
for f in $(cat text) ; do echo $f ;done # for example
This
will
print
every
word
second
line
cat text | while read f ; do echo $f ; done # Read example
This will print every word
second line
Correct way to make a tempfile
tempfile=$(mktemp -d -t /tmp/log.$$) # Temp file, with unique name $$ is the process number
Usage in script :
ls > $tempfile
Cleanup:
rm -f "/tmp/$tempfile" # Remove
Direcory empty test
[ "$(ls -A /tmp)" ] && echo "Not empty" || echo "Empty" # test directory Empty/filled
test -d /tmp/1 && rmdir /tmp/1 # Removes a directory when it exists, will give an error when NOT empty
Using Expand
On directories archive30_tmp till archive35_tmp setting recursive chmod 2775
find achief{30..35}_tmp -type d -exec chmod 2775 {} \;
or
mkdir tmp{1..3} # will create tmp1 tmp2 tmp3
echo pr{ut,utser}s # Outputs "pruts prutsers"
Test root user
if [ $USER == "root" ] ; then … ; fi # execute only when root
if $USER is empty, this will give an error.
if [ w$USER == "wroot" ] works
qouting $USER also, but qouting a number using less/greater test could be problematic
Mount test
grep -qs /media /proc/mounts && echo "/media is mounted"
Date tricks
datum=$(date +%Y%m%d) # datum is yyyymmdd 20230103
today=$(date +%F)
tomorrow=$(date --date="next day" +%F)
p3=$(date --date="$p2" +%F)
dater=$p3
#now=$(date +%s --date="1 days ago")
now=$(date -d $(date --date="1 days ago" +%F) +%s)
p3epoch=$(date --date="$p3" +%s)
dater=$(date -d "$p3 1 year" +%F)
date -d @<UNIX timestamp> # Timestamp to date
Size test in directory
if [ "$(df /tmp |grep -v Available | awk {' print $4 }')" -lt 1000000 ] ; then echo "not enough free in /tmp" ;fi
Parallel Tasks
4 parallel jobs
find jpg -type f -name \*.jpg -print0 | xargs -0 -n1 -P4 ./convert.sh
Cluster ssh trick
Using Clusterssh at work
## clusterssh trick
Only needed to do stuff on server having a certain directory
clusterssh storageservers # ssh to 24 storage servers
sudo su -
cd /bricks/*/backup2 # change directory to this if exists
cd /alternatedir/brick0*/backup2 # change to this alternate directory if it exists
# directories not found? then you are still in /root
pwd | grep testdir || logout # no testdir in found subdirs? (there are non in /root so you will be logged out)
id | grep myuser && logout # if mortal user? then logout again .. you will be disconnected from servers not containing the backup2 directories
Do your work as root
Forgot to sudo?
systemctl restart httpd (wont work as user)
sudo !!
(this will do "sudo systemctl restart httpd")
Top 5 homedir users
du -hsx /home/* | sort -rh | head -5
Removing a huge file takes a long time .. lets truncate it
: > hugefile
rm hugefile
Check memory banks using dmidecode
sudo dmidecode| grep -i -B1 "Form Factor" (B1 means BEFORE 1 line, A is AFTER)
Size: 8192 MB
Form Factor: DIMM
--
Size: 8192 MB
Form Factor: DIMM
--
Size: No Module Installed
Form Factor: DIMM
--
sudo dmidecode -t memory | grep -i size
Size: 4096 MB
--
sudo lshw -short -C memory
H/W path Device Class Description
==========================================================
/0/0 memory 96KiB BIOS
/0/1000 memory 4GiB System Memory
/0/1000/0 memory 4GiB DIMM RAM
cat file | grep -o 'skip_reason.*' # till end
cat file | grep -o 'skip_reason.*tillhere'
Remove space filename
mv *\ * a
rm *\ *
Upper to lower case
tr '[:upper:]' '[:lower:]'
Whole directories to lowercase
#!/bin/bash
#print usage
if [ -z $1 ];then
echo "Usage :$(basename $0) parent-directory"
exit 1
fi
#process all subdirectories and files in parent directory
all="$(find $1 -depth)"
for name in ${all}; do
#set new name in lower case for files and directories
new_name="$(dirname "${name}")/$(basename "${name}" | tr '[A-Z]' '[a-z]')"
#check if new name already exists
if [ "${name}" != "${new_name}" ]; then
[ ! -e "${new_name}" ] && mv -T "${name}" "${new_name}"; echo "${name} was renamed to ${new_name}" || echo "${name} wasn't renamed!"
fi
done
echo
echo
#list directories and file new names in lowercase
echo "Directories and files with new names in lowercase letters"
find $(echo $1 | tr 'A-Z' 'a-z') -depth
exit 0