Live data from Hacker News

Terpstra Keyboard

terpstrakeyboard.com

1–10 of 82 posts

Re: Terpstra Keyboard

#5
Fun fact, anyone with a surname that ends with the -stra or -sma suffix has their origins in Frisia [0], a region in current-day Netherlands and Germany that retained their independence in the Roman era. Terpstra specifically refers to someone living on a terp, an artificial hill (because there's no hills in the Netherlands lololol) that people would live on or retreat to with the intermittent floodings.

This in turn is why the Netherlands is so big when it comes to dairy and cheese; grass was one of the few things that would grow consistently and survive the floods, cows eat grass, cheese and butter can be preserved to last through winter, etc.

[0] https://en.wikipedia.org/wiki/Frisia

Re: Terpstra Keyboard

#6
post #5

Fun fact, anyone with a surname that ends with the -stra or -sma suffix has their origins in Frisia [0], a region in current-day Netherlands and Germany that retained their independence in the Roman era. Terpstra specifically refers to someone living on a terp, an artificial hill (because there's no hills in the Netherlands lololol) that people would live on or retreat to with the intermittent floodings. This in turn…

Very interesting. The only Terpstra I knew of before this link was Niki Terpstra, one of only three Dutch winners of both Paris-Roubaix and the Tour of Flanders.

Re: Terpstra Keyboard

#7
post #4

This is cool! I want to try to build a hardware midi keyboard using mechanical hall effect switches like this: https://mechanicalkeyboards.com/products/wuque-studio-dash-5... There's a few physical keyboards out there but many are super super expensive.

I've kind of done this, just without the actual "build" part—I instead use a Wooting computer keyboard (which has the hall effect switches you're referring to), and I've written some program to emit MIDI based on key velocity.

I've been using it very frequently for a few years, and can confirm it's quite fun to use, though I don't have much experience playing other keyboard instruments and haven't tried to learn it seriously enough to make proper use of chords etc.

Demo of me playing here, though try not to mind the messy desk and bad recording setup (one-hand, MIDI going through phone due to lack of speakers): https://drive.google.com/file/d/1qZuFlK9GybX5aP5tGi54AvTTFKd...

The layout I use is not a regular piano layout, but a B-griff layout, as used on a bayan (Russian accordion). I made a demo site for playing with the layout (keyboard or touchscreen), but without velocity sensitivity: https://maxdamantus.gitlab.io/bayan/

The B-griff/C-griff layouts naturally fit computer keyboards, and I'd argue they're better in general than piano layouts for various reasons. There's also this cool video of someone using two Commodores for similar effect: https://youtube.com/watch?v=EBCYvoC4muc

EDIT: turns out the Terpstra keyboard is also able to work using B-griff: http://terpstrakeyboard.com/web-app/keys.htm?fundamental=261...

Re: Terpstra Keyboard

#8
I'm impressed how responsive the keys are! Will definitely be checking out on desktop if I can see how the audio rendering code works (unless someone here already knows). I presume the audio synthesis API and ontouchstart but maybe there's something clever in addition like prerendering the audio samples rather than synthesising them on press

Maybe it also helps that I've got a headphone jack plugged in instead of the Bluetooth I'm used to from listening to things during the day, but even so, my touchscreen just doesn't feel this responsive normally, including in games. It's on my list of things to check the delay of, but since my phone's 960 fps camera is the equipment I use to check that, it is a bit tricky

Edit: ontouchstart calls noteOn method https://github.com/wcgbg/terpstrakeyboard/blob/03d526a0ed5c7...

This eventually calls into audio api start with 0 delay https://github.com/wcgbg/terpstrakeyboard/blob/03d526a0ed5c7...

The data to play was retrieved from the server (based on the instrument you selected) and parsed ahead of time https://github.com/wcgbg/terpstrakeyboard/blob/03d526a0ed5c7...

It loads samples at four frequencies and plays the nearest one at the appropriate rate (proportional to the target frequency) https://github.com/wcgbg/terpstrakeyboard/blob/03d526a0ed5c7...

The settings.audioContext variable is simply an instance of the web audio API as expected (with a fallback to support Safari/webkit) https://github.com/wcgbg/terpstrakeyboard/blob/03d526a0ed5c7...

This gainNode it's connecting is just about playback volume it seems https://developer.mozilla.org/en-US/docs/Web/API/BaseAudioCo... and "audioContext.destination", MDN says, you can think of as a speaker device

So nothing too special here: of course preloading server data but then simply creating a new sound source during ontouchstart is enough. I guess delay in other software comes from the extra cruft they have such as big libraries (and Bluetooth, in the cases where I use that), not from any actual delay in touchscreen or audio rendering

Re: Terpstra Keyboard

#9
post #5

Fun fact, anyone with a surname that ends with the -stra or -sma suffix has their origins in Frisia [0], a region in current-day Netherlands and Germany that retained their independence in the Roman era. Terpstra specifically refers to someone living on a terp, an artificial hill (because there's no hills in the Netherlands lololol) that people would live on or retreat to with the intermittent floodings. This in turn…

Dijkstra!
Post reply on HN