Git Product home page Git Product logo

Comments (8)

marksteward avatar marksteward commented on August 19, 2024

Sounds like a plan. We should maybe also limit the length of tracks (15s or so).

from doorbot.

Jonty avatar Jonty commented on August 19, 2024

I was actually going to do two things in addition to this:

  • 5s sound limit (Because really, we want to encourage short-and-snappy noises. Videogame sounds etc.)
  • Speakers being moved into the lobby room (so the person hearing it is the person who tapped in), and the external speaker outside the back door (same reason)

That should stop it being irritating for people in the main room, and people in the rest of the space.

from doorbot.

marksteward avatar marksteward commented on August 19, 2024

Perhaps we should just rate limit sounds by length? A coin ding would fine for every entrance, a 1-up every hour and a 15s theme tune twice a day? That'll encourage people to use shorter sounds without breaking everything.

from doorbot.

Jonty avatar Jonty commented on August 19, 2024

That is a good plan. I like that plan. Some kind of scaled timeout based on sound length that kicks in over 5s?

from doorbot.

benjojo avatar benjojo commented on August 19, 2024

So I did a find *.wav | xargs soxi -D in the /home/glados/wavefiles/members to figure out what was the avg length of the files in there

Percentile Length (Sec)
1th 0.225
5th 0.397
25th (LQ) 0.605
50th (Median) 1.01
75th (UQ) 6.12
90th 13.5

from doorbot.

marksteward avatar marksteward commented on August 19, 2024

Possible solution from Cadmus:

import subprocess

# Working Sox Pipe
# time sox /media/library/Music/The_Terrible_Secret_Of_Space.mp3 -t wav - trim 0 00:05 | --norm sox -t wav - -t wav - | aplay

trunc_p = subprocess.Popen(["sox", "/media/library/Music/The_Terrible_Secret_Of_Space.mp3", "-t", "wav", "-", "trim", "0", "00:05"], stdout=subprocess.PIPE)
norm_p = subprocess.Popen(["sox", "--norm", "-t", "wav", "-", "-t", "wav", "-"], stdin=trunc_p.stdout, stdout=subprocess.PIPE)
play_p = subprocess.Popen(["aplay"], stdin=norm_p.stdout)

play_p.wait()

from doorbot.

marksteward avatar marksteward commented on August 19, 2024

Also apparently just a single sox command works: "sox --norm file.foo -t wav - trim 0 00:05 | mplay".

And you can do sox -qd to play it.

from doorbot.

marksteward avatar marksteward commented on August 19, 2024

Looks like we also need remote volume control, as the required volume varies a lot between a Tuesday evening and a quiet afternoon.

from doorbot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.