9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: John Floren <slawmaster@gmail.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] sound, graphics, tuner
Date: Sat, 15 Jan 2011 11:00:59 -0800	[thread overview]
Message-ID: <AANLkTinqoMQkQjdmwBu0o4eo8iDiJyHaTJfR3Op24p=m@mail.gmail.com> (raw)
In-Reply-To: <AANLkTimp+4Q-5W2Lb5Na3mO2ZT5nMQ0NXZo=YAC3h0u3@mail.gmail.com>

On Sat, Jan 15, 2011 at 10:50 AM, Rudolf Sykora <rudolf.sykora@gmail.com> wrote:
>> Read N PCM samples from the sound card, this is just a read from the
>> audio in file, easy part.
>> The samples you can read from http://plan9.bell-labs.com/magic/man2html/3/audio
>> audio(3) or a similar interfaces provided by usb/audio usb(4).
>
> Ok. To start with, audio(3) seems to support soundblaster-16-compatibles.
> What about others? I guess mine could be AC'97 on one of my notebooks
> (there fortunately seems to be some support for this one elsewhere,
> too), while god knows what on another. Connected to this:
> How do I find from within plan 9 what soundcard/hardware I have?
>
>> This last part, I would use draw
>> http://plan9.bell-labs.com/magic/man2html/2/draw
>> draw(2). You can use control
>> http://plan9.bell-labs.com/magic/man2html/2/control control(2)
>> to add sliders but for what you are doing just drawing rectangles and
>> lines should be fine.
>
> Ok. I ask because some widget sets already have an analog-like gauge
> I'd like to use, e.g. Tk::gauge. (What'd be the situation in Inferno?
> They have some Tk, don't they?)
>
> Thanks
> Ruda
>
>

If you're tuning a wind instrument, you could just print out the
frequency of middle C and then display the calculated frequency coming
into the microphone below it.

For a guitar tuner, just print out more frequencies (EADGBE)... this
is the lazy man's way to do it, but it would be a way to test it at
first, at least.

If I wanted to make it fancy and graphical, I'd have a horizontal
line, bisected in the center by a vertical line representing the
target frequency, then draw another moving vertical line to represent
the current frequency.


John



  reply	other threads:[~2011-01-15 19:00 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-15 10:04 Rudolf Sykora
2011-01-15 10:38 ` lucio
2011-01-15 12:05   ` Gorka Guardiola
2011-01-15 18:50     ` Rudolf Sykora
2011-01-15 19:00       ` John Floren [this message]
2011-01-15 20:30       ` Tristan Plumb
2011-01-16  3:52         ` Venkatesh Srinivas
2011-01-16  4:00           ` Jacob Todd
2011-01-16 19:20           ` [9fans] 9doom Lyndon Nerenberg (VE6BBM/VE7TFX)
2011-01-16 19:24             ` Jacob Todd
2011-01-16 19:27             ` John Floren
2011-01-16 20:29               ` Jacob Todd
2011-01-17  0:52                 ` Joel C. Salomon
2011-01-17  8:11                   ` James Tomaschke
2011-01-17 13:30           ` [9fans] sound, graphics, tuner Pavel Klinkovsky
2011-01-17 14:52             ` Jacob Todd
2011-01-17 16:53               ` Federico G. Benavento

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='AANLkTinqoMQkQjdmwBu0o4eo8iDiJyHaTJfR3Op24p=m@mail.gmail.com' \
    --to=slawmaster@gmail.com \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).