• Stars
    star
    1,417
  • Rank 33,205 (Top 0.7 %)
  • Language
    C
  • License
    GNU General Publi...
  • Created almost 9 years ago
  • Updated 6 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Nostalgia bucklespring keyboard sound

Nostalgia bucklespring keyboard sound

Copyright 2016 Ico Doornekamp

This project emulates the sound of my old faithful IBM Model-M space saver bucklespring keyboard while typing on my notebook, mainly for the purpose of annoying the hell out of my coworkers.

Model M Buckle

Bucklespring runs as a background process and plays back the sound of each key pressed and released on your keyboard, just as if you were using an IBM Model-M. The sound of each key has carefully been sampled, and is played back while simulating the proper distance and direction for a realistic 3D sound palette of pure nostalgic bliss.

To temporarily silence bucklespring, for example to enter secrets, press ScrollLock twice (but be aware that those ScrollLock events are delivered to the application); same to unmute. The keycode for muting can be changed with the -m option. Use keycode 0 to disable the mute function.

Installation

Packaging status

Debian

Bucklespring is available in the latest Debian and Ubuntu dev-releases, so you can install with

$ sudo apt-get install bucklespring

VoidLinux

Bucklespring is available in the VoidLinux repositories, so you can install with

$ sudo xbps-install -S bucklespring

FreeBSD

Bucklespring can be installed via package:

$ pkg install bucklespring

or built via port:

$ cd /usr/ports/games/bucklespring
$ make install clean

Linux, building from source

To compile on debian-based linux distributions, first make sure the require libraries and header files are installed, then simply run make:

Dependencies on Debian

$ sudo apt-get install libopenal-dev libalure-dev libxtst-dev

Dependencies on Arch Linux

$ sudo pacman -S openal alure libxtst

Dependencies on Fedora Linux

$ sudo dnf install gcc openal-soft-devel alure-devel libX11-devel libXtst-devel

Building

$ make
$ ./buckle

The default Linux build requires X11 for grabbing events. If you want to use Bucklespring on the linux console or Wayland display server, you can configure buckle to read events from the raw input devices in /dev/input. This will require special permissions for buckle to open the devices, though. Build with

$ make libinput=1

Using snap on Ubuntu (since 16.04) and other distros

$ sudo snap install bucklespring
$ bucklespring.buckle

The snap includes the OpenAL configuration tweaks mentioned in this README. See http://snapcraft.io/ for more info about Snap packages

MacOS

I've heard rumours that bucklespring also runs on MacOS. I've been told that the following should do:

$ brew install alure pkg-config
$ git clone https://github.com/zevv/bucklespring.git && cd bucklespring
$ sed -i '' 's/-Wall -Werror/-Wall/' Makefile
$ make
$ ./buckle

Note that you need superuser privileges to create the event tap on Mac OS X. Also give your terminal Accessibility rights: system preferences -> security -> privacy -> accessibility

If you want to use buckle while doing normal work, add an & behind the command.

$ sudo ./buckle &

Windows

I think the windows build is currently broken, it seems that switching from Freelut to Alure broke windows, I might fix this one day.

I suspect there is something wrong with alureCreateBufferFromFile() getting called from another thread in the key capture callback, but my knowledge of the win32 platform is so poor I'm not even able to run a debugger to see what is happening. Help from an expert is much appreciated.

Usage

usage: ./buckle [options]

options:

  -d DEVICE use OpenAL audio device DEVICE
  -f        use a fallback sound for unknown keys
  -g GAIN   set playback gain [0..100]
  -m CODE   use CODE as mute key (default 0x46 for scroll lock)
  -M        start the program muted
  -h        show help
  -l        list available openAL audio devices
  -p PATH   load .wav files from directory PATH
  -s WIDTH  set stereo width [0..100]
  -v        increase verbosity / debugging

OpenAL notes

Bucklespring uses the OpenAL library for mixing samples and providing a realistic 3D audio playback. This section contains some tips and tricks for properly tuning OpenAL for bucklespring.

  • The default OpenAL settings can cause a slight delay in playback. Edit or create the OpenAL configuration file ~/.alsoftrc and add the following options:
period_size = 32
periods = 4
  • If you are using headphones, enabling the head-related-transfer functions in OpenAL for a better 3D sound:
hrtf = true
  • When starting an OpenAL application, the internal sound card is selected for output, and you might not be able to change the device using pavucontrol. The option to select an alternate device is present, but choosing the device has no effect. To solve this, add the following option to the OpenAL configuration file:
allow-moves = true

More Repositories

1

lsofgraph

lsof to graphviz
Lua
1,017
star
2

duc

Dude, where are my bytes: Duc, a library and suite of tools for inspecting disk usage
C
586
star
3

zForth

zForth: tiny, embeddable, flexible, compact Forth scripting language for embedded systems
C
349
star
4

npeg

PEGs for Nim, another take
Nim
332
star
5

worp

Live scriptable sound/music/DSP engine
C
91
star
6

with

with macro for Nim
Nim
88
star
7

nim-memory

CSS
62
star
8

nim-arduino

Trying to get Nim integrated into arduino IDE
Nim
55
star
9

libuilua

Lua binding for libui, a simple and portable native UI library for unix, macos and windows
C
49
star
10

nmqtt

Native Nim MQTT client library
Nim
48
star
11

xpeg

Experimental PEG library for Elixir
Elixir
30
star
12

actors

Nim
29
star
13

nimz3

Nim binding for the Z3 theorem prover
HTML
25
star
14

cpsdoc

23
star
15

memgraph

Nim
23
star
16

termtekst

NOS teletekst client for linux console
Python
22
star
17

bitline

Event / signal visualization
Nim
18
star
18

nim-kernel-module

Example to run Nim code in linux kernel context
C++
17
star
19

nimcoro

Nim coroutine based async "from scratch"
Nim
16
star
20

aoc2020

Nim
12
star
21

pd-i2c

Simple i2c/smbus module for pure data
C
10
star
22

luaman

Quick and dirty script to convert lua manual to man pages.
Perl
9
star
23

cpstut

8
star
24

mathpipe

Nim
7
star
25

cpstest

Nim
7
star
26

nim-apksign

Nim
5
star
27

nimcmaes

Nim CMA-ES library
C
5
star
28

bambucli

Nim
5
star
29

aoc2021

Elixir
4
star
30

nimpat

A pure nim regexp / pattern matching library based on Lua patterns
Nim
4
star
31

fixedpoint

Fixed point math library
Nim
4
star
32

janetttls

C
3
star
33

nimip

Nim
2
star
34

aoc2019

Nim
2
star
35

zBasic

More old skool stuff for tiny embedded environments
C
2
star
36

nimsynth

Nim software synth stuff
Nim
2
star
37

m2-to-usb

2
star
38

corrie

audio localization through correlation demo
Nim
2
star
39

mininim

Shell
1
star
40

fwlocator

Fireworks locator
Java
1
star
41

bip

C
1
star
42

modular

Electronic design and firmware for analogue/digital hybrid modular synthesizer
C
1
star
43

nim-async-issue

1
star
44

lescan

Nim
1
star
45

buftabs

vim plugin for showing buffers in tabs
Vim Script
1
star
46

glbl

C++
1
star
47

nim-linux-kernel

Nim in kernel space test
Batchfile
1
star
48

cps-baremetal

Nim
1
star
49

memvis

Lua memory visualisation tool
C
1
star