maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   Flashing Keyboard lights as patterns (https://talk.maemo.org/showthread.php?t=52239)

MohammadAG 2010-11-28 01:10

Re: Flashing Keyboard lights as patterns
 
I've started (and almost finished) with a VU-like app, it reads mic levels.
Mic levels are output at a range of 0-100, so it divides 100 by 6, so for 16.67, first LED will turn on, 16.67x2, second LED, etc.
It's quite fast tbh, I expected it to be a lot slower since it read output from arecord.

xperto 2010-11-28 18:54

Re: Flashing Keyboard lights as patterns
 
Quote:

Originally Posted by MohammadAG (Post 884726)
I've started (and almost finished) with a VU-like app, it reads mic levels.
Mic levels are output at a range of 0-100, so it divides 100 by 6, so for 16.67, first LED will turn on, 16.67x2, second LED, etc.
It's quite fast tbh, I expected it to be a lot slower since it read output from arecord.

And when can we test it ? :D

MohammadAG 2010-11-28 18:57

Re: Flashing Keyboard lights as patterns
 
I've switched to brightness instead of using the 6 LEDs, brightness gives me a range of 0-255 instead of 0-6 :)
http://mohammadag.xceleo.org/VU if you want a quick test I suppose
Code:

root
wget http://mohammadag.xceleo.org/VU
chmod +x VU
#open the keyboard, and just after you press enter on the next command, lock the screen using the lockswitch for best performance (working on it!)
./VU


xperto 2010-11-28 19:13

Re: Flashing Keyboard lights as patterns
 
Quote:

Originally Posted by MohammadAG (Post 885151)
I've switched to brightness instead of using the 6 LEDs, brightness gives me a range of 0-255 instead of 0-6 :)
http://mohammadag.xceleo.org/VU if you want a quick test I suppose
Code:

root
wget http://mohammadag.xceleo.org/VU
chmod +x VU
#open the keyboard, and just after you press enter on the next command, lock the screen using the lockswitch for best performance (working on it!)
./VU


Thanks MohammadAG it works.. the lights are very dim.. and they blink very quickly :)
Thanks for your efforts
waiting for the final app :D

MohammadAG 2010-11-28 19:39

Re: Flashing Keyboard lights as patterns
 
Quote:

Originally Posted by xperto (Post 885159)
Thanks MohammadAG it works.. the lights are very dim.. and they blink very quickly :)
Thanks for your efforts
waiting for the final app :D

Shout ;)
You're welcome :)

xperto 2010-11-28 22:12

Re: Flashing Keyboard lights as patterns
 
Quote:

Originally Posted by MohammadAG (Post 885151)
I've switched to brightness instead of using the 6 LEDs, brightness gives me a range of 0-255 instead of 0-6 :)
http://mohammadag.xceleo.org/VU if you want a quick test I suppose
Code:

root
wget http://mohammadag.xceleo.org/VU
chmod +x VU
#open the keyboard, and just after you press enter on the next command, lock the screen using the lockswitch for best performance (working on it!)
./VU


After i play this in my xterm and i close the app and xterm.. my xterm doesn't load again until i reboot my device. any help ? :)

Keneraali 2010-12-01 15:34

Re: Flashing Keyboard lights as patterns
 
Same problem here. And is it normal that gnome-pty-helper uses ~97% of the cpu because of this script?

MohammadAG 2010-12-01 15:37

Re: Flashing Keyboard lights as patterns
 
Weird, it's causing gnome-pty-helper to go nuts, and it doesn't have anything to do with it.
killall gnome-pty-helper (from a desktop widget or whatever) and a terminal window will open, looking into it

RiD 2010-12-09 23:29

Re: Flashing Keyboard lights as patterns
 
opened symfonie and started playing a music. then i did the last step ( ./VU ) and fastly switched off the screen as you said. kind of tricky specially when you're playing a music, but got it synced at 3rd time. gives an interesting effect, it follows the music beat.

here's an idea:
low sound triggers the left led, and as more louder the sound is it keeps filling, where the 6th led means 100% of "sound". this is just like the music channels bar.
or another one, if you could monitor the phone's output without using the mic (can't properly explain) you could do this (sort of equalizer effect): the 3 left leds are the left audio channel.The last 3 leds are the right audio channel.
the 2 most centered leds are the low volume's led, each for it's channel side. maximum audio fills the whole keyboard.
if a music is more louder on the left side, the 3 left leads would be more filled (let's say 2 are filled) and only 1 right led is filled. I dont know, just had this little idea and maybe you can actually make something similar / better.
and sorry for my english, i know its kinda sucky but i'm half-asleep :/

MohammadAG 2010-12-09 23:42

Re: Flashing Keyboard lights as patterns
 
That was what I was doing when I started working on it.
As for the second one, it would need to plug into pulseaudio, and I have no idea how to do that, plus, I'm on too many projects :/


All times are GMT. The time now is 01:29.

vBulletin® Version 3.8.8