Forths, LISPS, and Sound
Here's how I think about sounds in a nutshell. Postfix -> s-expressions. They are an amazing combo.
Computer based sounds are best described as a directional graph. Postfix notation lends itself really well for this.
Here is a 440Hz sine with 0.5 unit amplitude, represented in postfix (forthy) notation:
440 0.5 sine
If I wanted to add 6Hz vibrato to that, I could modulate it with another sine and bias (add) it to the frequency parameter:
6 40 sine 440 + 0.5 sine
I could modulate the modulator with another sine, going +/- 2hz in frequency at a rate of 0.1hz:
0.1 2 sine 6 + 40 sine 440 + 0.5 sine
It's very organic to build up complex structures in this way, but it can also very quickly become confusing to read later! Enter s-expressions, which provide a little bit of structure. It turns out that just about any LISP-y language can be rigged to generate the code above using s-expressions.
So, here's our first sine:
(sine 440 0.5)
Here's our vibrato,
(sine (+ (sine 6 40) 440) 0.5)
And our vibrato modulator:
(sine (+ (sine (+ 6 (sine 0.1 2)) 40) 440) 0.5)
Add some indentation to taste, and you got yourself a more unambiguous layout of structure, which can then be abstracted away inside of another function.
Seems like birdsite is gearing up to #embrace #extend & #extinguish the fediverse: https://mobile.twitter.com/jack/status/1204766078468911106
Imagine instead of wasting 1000$ on a phone and then give away all your metadata to multiple big tech, you buy a 200$ phone, and then donate 200$ top to open source projects.
That will make it 400$ cost (600 less dollars) and you are contributing to your privacy and freedom + contributing to projects that are healthy for us.
We can make it happen.
Companies often reap far more from FOSS than they sow upstream.
A more modern tool I've come to rely on heavily is "ag", aka "the silver searcher". It's basically a faster alternative to grep that searches through files.
Some more classic fun/obscure-ish unix tools:
column: auto-aligns text tables
units: units calculator
figlet: ascii-art fonts
cowsay: make an ascii-art cow say something
eqn/tbl: old-school way for generating mathematical equations and tables. utilies troff/groff. existed before the days of TeX.
fortune: displays a fortune!
Honorable mention: fold, cut, split, csplit, xxd, join, uniq, sort, seq. Unix *knows* text.
Accidentally created the TNG space sound.
The gist: use a big reverb with nearly infinite decay, send any short sample through it, and sample the reverb tail junk many minutes later.
I'm using a FDN reverb (costello reverbsc topology, to be precise), with the feedback at 1 and the cutoff pretty dark (probably around 1kHz or so)
@zensaiyuki on linux, yes, the devices will tend to enumerate themselves like that. And yes, there is an extra layer of challenge there.
I have a monome grid and arc (musical interfaces) that I read HID events from via ttyUSB0 and ttyUSB1. Trouble is, it's never a sure thing which is which, so I end up having to do an id look-up. It's definitely a hack, but it's been way better for me than the alternative.
@zensaiyuki Joystick API on Linux looks like it could work on many gamepads and controllers.
But yeah, generally dicking about is my MO. The software I write is (nearly) always for an audience of one, and that's good enough for me.
@zensaiyuki Well, on Linux, yes. It's called linux/joystick.h, and opening /dev/input/js0 ;)
So, long ago, I learned through trial and error that you can parse a gamecontroller on Linux via reading /dev/input/js0 as a file. What I *didn't* know was that there are special constructs for this in the Linux Kernel. If you don't use this, things may differ from platform to platform.
Haven't tested this, but this gist seems to show how to do this: https://gist.github.com/jasonwhite/c5b2048c15993d285130
This official joystick documentation also looks helpful:
From the Steam HID module inside the Linux kernel:
'This is known as the "lizard mode", because apparently lizards like to use the computer from the coach, without a proper mouse and keyboard.'
@melissasage thank you mickey mouse.
Steam Controller initial thoughts
Some useful links I found for the steam controller.
The steam HID controller in the linux kernel:
user-space steam controller (found via source code): https://github.com/rodrigorc/steamctrl
Steam Controller initial thoughts
Bought a steam controller after it was on sale for 5 dollars. I hadn't even heard of the steam controller until that point, so it really was a true impulse purchase.
So far, I'm very impressed.
Put in the batteries, plugged in the dongle, and the thing worked. The fact that it acts as a mouse with haptics is really cool. Hoping I can somehow program the haptics myself somehow.
Began examining output via cat /dev/input/js0 | xxd -c 8, and the results are quite revealing. Both circle pads seem to have touch pad capabilities of some kind. Also the L + R triggers have some kind of continuous control as well. Lots of ripe potential for musical expression.
@paul I first thought you were talking about typing as in typed programming languages :)
Hometown is adapted from Mastodon, a decentralized social network with no ads, no corporate surveillance, and ethical design.