cool-retro-term icon indicating copy to clipboard operation
cool-retro-term copied to clipboard

No old sounds

Open Yanpas opened this issue 9 years ago • 20 comments

There are no sounds of old keyboard or old computer beeps, noises or antything else. It would be cool if terminal emitted some "Tube sound" :)

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/3410587-no-old-sounds?utm_campaign=plugin&utm_content=tracker%2F479407&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F479407&utm_medium=issues&utm_source=github).

Yanpas avatar Jul 30 '14 20:07 Yanpas

Ok, this is probably one of the most requested features. This should not be hard (keyboards and static background noises in particular) but we need some high quality samples (with the right license). If someone finds them I will be extremely happy to write the code.

Swordfish90 avatar Jul 30 '14 21:07 Swordfish90

I suggest implementing this as an external project that this project utilises.

maandree avatar Aug 03 '14 23:08 maandree

Would these sounds maybe work? https://www.dropbox.com/home/Public/cool-retro-term-keypresses

Recorded by myself using an older generic model keyboard, FLStudio to edit and ensure they're clean. My Dad's got some older, more clicky keyboards that I can try and record too.

Available for whatever license you need. Just let me know how/if I can help.

R3V1Z3 avatar Jul 05 '15 08:07 R3V1Z3

Hi @Ugotsta . Than you very much for your work, but sadly, the link you provided seems broken. Could you please re-share them?

Swordfish90 avatar Jul 06 '15 08:07 Swordfish90

Hey @Swordfish90, I'm terribly sorry if you had trouble accessing the files. I'm not sure what happened there, I can still access them over here. But I've re-posted to Google Drive and they should be accessible using this link:

https://drive.google.com/folderview?id=0B7bdY1zZi8JefkZxdkNRS3dOZDB4V1VCaHZUSlFVemxpcWFoRHkyNkdVbmk3OXRLSW85cGc&usp=sharing

If it's easier too, I can email them. I'd really love to see an audio feature like this. It'd go great with a little project I'm working on using Cool Retro Term. :)

R3V1Z3 avatar Jul 07 '15 05:07 R3V1Z3

I would love it if I could add my own sounds when things happen, e.g startup and the like.

Just the option, as I have a group of sounds I'd love to add, but they are copywrited, so having the option of select them would be the best.

LOLLeela avatar Aug 18 '15 13:08 LOLLeela

Maybe something like this? https://www.youtube.com/watch?v=GBXnMkNcJ_0

glitcha avatar Sep 17 '15 16:09 glitcha

I have another suggestion for sounds: https://www.youtube.com/watch?v=KEkrWRHCDQU

Jotschi avatar Oct 06 '15 09:10 Jotschi

@Jotschi, probably we can ask David Sandberg about the sources of the sounds.

a-andreyev avatar Oct 06 '15 22:10 a-andreyev

The Unix principle says "do one thing and do it well". Thus, it'd be better to use an external project, like bucklespring.

apt-get install bucklespring

For those of you who have a sound set for a keyboard distinct enough from Model M, I think you'd better contribute it there.

kilobyte avatar Oct 13 '16 22:10 kilobyte

Also, various sounds for emitting BEL.

  • A physical bell.
  • The VT52 sounds special: https://soundcloud.com/drovak/vt52bel
  • IBM PC (8088 model).
  • etc

larsbrinkhoff avatar Nov 22 '16 19:11 larsbrinkhoff

Maybe Casey Muratori can provide the sounds produced in https://www.youtube.com/watch?v=A2dxjOjWHxQ

mardukbp avatar Jan 20 '17 21:01 mardukbp

Some old school keyboard sounds would have been nice indeed.

Update: Thanks for the hint with bucklespring, by the way. Opening and closing it together with cool-retro-term works like this:

#!/bin/sh
buckle &
pid=$!
cool-retro-term
ret=$?
kill $pid
exit $ret

darealshinji avatar Apr 29 '20 18:04 darealshinji

Another issue is that the keyboard is global, terminal local. Ie, you can have tens of terminals open at once, but your keys sit at only a single keyboard at a time.

kilobyte avatar Apr 29 '20 21:04 kilobyte

No ability to add sounds to this is really hurting the experience. I'd be happy to contribute a few dollars to provide incentive for this.

https://www.youtube.com/watch?v=qb43-hn_-_c This cathode app (as seen in the youtube video) is basically what I'd want. The maker has seemingly identified the required hooks to implement to make C-R-T feel feature complete.

Laz88 avatar May 25 '20 14:05 Laz88

I would absolutely love if this implemented some of the computer carriage control sounds that older computers had.

Cathode does a great job with that atmosphere of old whirring fans and clickety clack noises. It has a bunch of different profiles for old computers which all have different sounds.

@Swordfish90 The best idea here could be to just lay the groundwork for sound output in cool-retro-term, and then rely on the community to get together and make sound packs.

Perhaps implement a way to define a soundpack as a JSON file which can associate various data such as special characters or newline characters etc, with custom sounds. That way, it would be pretty easy for people to create soundpacks for lots of old computers. :)

Arcitec avatar Dec 15 '21 03:12 Arcitec

A simpler approach would be to use the file system: specify a directory for sound profile directories containing sound files with specific names (ignore anything in the file names from the first dot, that way the file can be named according to their format). The their could be an ini-style profile file (profile.conf) that can specify for example the profiles name. Symlinks could be used to reuse sound from other profiles.

maandree avatar Dec 15 '21 14:12 maandree

@maandree Hmm, at first thought my reaction was "that's actually a really great idea".

But there's issues with that.

  • How do we deal with the fact that most of the characters, or character sequences, are illegal characters (not allowed in filenames).
  • How would we implement a "universal sound that plays on every character" (i.e. a generic "beeping/printing" sound that some old computers had in Cathode).
  • Re-using sounds via symlinks is a bit annoying.
  • Hard to implement metadata such as "Play this particular sound at 80% volume, play that other sound at 20%", or even metadata such as "play 2 sounds when we get this character".
  • Would be hard to clearly label the sound files since they need to be prefixed with the special characters used by the sound.

So I was initially gonna agree but now I'm back to JSON being the best solution.

JSON could look something like this:

{
  "name": "1980s IBM",
  "sounds": {
    "output": {
      "mode": "random",
      "set": [
        "print1.wav",
        "print2.wav",
        {
          "file": "print3.wav",
          "volume": 50
        }
      ]
    },
    "input": {
      "mode": "random",
      "set": [
        {
          "file": "keyboard1.wav",
          "volume": 75
        },
        "keyboard2.wav",
        "keyboard3.wav"
      ]
    },
    "output-07": {
      "mode": "multi",
      "set": [
        {
          "file": "bell1.wav",
          "volume": 80
        },
        {
          "file": "bell2.wav",
          "delay": 0.5
        }
      ]
    },
    "output-00": {
      "mode": "single",
      "set": [
        {
          "file": "null.wav",
          "volume": 90,
          "delay": 0.25
        }
      ]
    }
  }
}

A JSON format would ensure that the community can create really awesome, detailed/organic soundpacks.

The idea above is that every character/event is specified as follows:

  • "output": Special case which plays for every output/rendering event, which wasn't already matched by a specific output-XX character.
  • "input": Special case for everything the user types, which wasn't already matched by a specific input-XX character.
  • "output-XX": Plays whenever character with hex code XX is rendered/output.
  • "input-XX": Same thing but for when the user types.
  • This could also easily support multi-character sequences, like "output-XXYY" for triggering on a two-byte sequence. It would just have to be written to search for "longest match first", to look for multi-byte matches ("XXYY") first, and then try just "XX", and finally fall back to the catch-all "output/input" if nothing matched.

Each input/output definition is an object, with "mode" and a sound "set".

Mode can be one of the following:

  • "random": Play a random sound from the set. This is great for organic variation and making things sound more realistic.
  • "multi": Play ALL sounds from the set. This is super useful for mixing sounds together, creating delays, etc, such as a "click... clack" sound that consists of two separate files with a delay between them (see the "output-07" example above, where one file is specified to play immediately and the other is set to play after a short delay).
  • "single": Play the first sound of the set; maybe it should have a simplified syntax which doesn't even use the "set" variable... But having to define a set for even for "single" sounds is nice and consistent and makes it trivial to expand single sounds into random/organic sets later.

It would also be very important to ensure that every sound file definition can be specified as either a simple string or as an object with optional volume and delay settings. That's why I gave some examples of sets where some sounds are just strings (use 100% volume and 0.0 delay), and some specifying more advanced settings (letting the soundpack author specify a volume and/or delay).

This JSON format, or a variation of it, would be pretty trivial to parse from JSON into a memory representation that consists of input/output character sequences and their associated sounds, each sound's per-sound settings (volume and delay) and the event's playback mode (single, multi or random).

The only really hard part is the audio mixing engine but there's tons of open source, lightweight mixing engines.

Another part that may be difficult is how to hook the input/output character sequence detection into VTE, but hopefully that library has event hooks for that.

Arcitec avatar Dec 16 '21 00:12 Arcitec

Controlling the baud rate in cathode was important to having authentic sound playback.

aronahl avatar Apr 29 '22 03:04 aronahl

hello any one got that sound of beep whe you hit a key like this https://www.youtube.com/watch?v=iG6M-vt-4JY

alavaelian avatar Jun 07 '23 03:06 alavaelian