Go to advanced search

by Fugazi1978
Sun Jan 12, 2014 7:53 pm
Forum: Off topic discussion
Topic: Modified Classic Car Radio...
Replies: 4
Views: 1670

Re: Modified Classic Car Radio...

Oh, the volume has tone controls as well as power!
Radio Volume.jpg
Radio Volume.jpg (58.35 KiB) Viewed 1640 times
Thanks again.
by Fugazi1978
Sun Jan 12, 2014 7:26 pm
Forum: Off topic discussion
Topic: Modified Classic Car Radio...
Replies: 4
Views: 1670

Re: Modified Classic Car Radio...

Have to admit, I'm really off topic here - my Pi is not involved this time, I'm just plugging in random phones and dull stuff.
by Fugazi1978
Sun Jan 12, 2014 6:50 pm
Forum: Off topic discussion
Topic: Modified Classic Car Radio...
Replies: 4
Views: 1670

Modified Classic Car Radio...

I have a Philips 391 car radio that I want to modify with an auxiliary input (headphone jack style). The radio is from 1977 and, as such, is too modern for my modding skills! Can anyone tell from the picture which bit I need to solder my inputs to? Radio (vsmall).jpg Picture of circuit attached; I c...
by Fugazi1978
Sat Jul 07, 2012 12:22 pm
Forum: Python
Topic: Keystroke detection without drawing a window...
Replies: 6
Views: 12280

Re: Keystroke detection without drawing a window...

Curses is brilliant in conjunction with the pygame check for end of track.
by Fugazi1978
Thu Jul 05, 2012 2:26 pm
Forum: Python
Topic: Help - non-GUI python media player...
Replies: 18
Views: 9374

Re: Help - non-GUI python media player...

Also, DON'T LEARN FROM ME, MY SCRIPT SUCKS (though it does work)!
by Fugazi1978
Thu Jul 05, 2012 2:25 pm
Forum: Python
Topic: Help - non-GUI python media player...
Replies: 18
Views: 9374

Re: Help - non-GUI python media player...

PyMedia isn't available from the software manager on Linux Mint so I didn't bother (if it's in the manager it is generally pretty sound). I've heard PyMedia does some bits I wanted but the link to my current code (with key detection and correct playback speed) is: http://www.raspberrypi.org/phpBB3/v...
by Fugazi1978
Thu Jul 05, 2012 1:37 pm
Forum: Python
Topic: A working command line ogg jukebox...
Replies: 2
Views: 2084

Re: A working command line ogg jukebox...

Changes so far involve changing: # create a list C[ ] C = ['this','is','a','list'] # empty C C[:] = [] to: # create an empty list C[ ] C = [] People keep mentioning os.path (and I shall look in a bit) but I like having a file with the list of paths so eventually I can work out how to restart the pla...
by Fugazi1978
Thu Jul 05, 2012 12:55 pm
Forum: Python
Topic: Help - non-GUI python media player...
Replies: 18
Views: 9374

Re: Help - non-GUI python media player...

Some of my oggs were 48000Hz so played slow. I stuck a clumsy rate detector in.
by Fugazi1978
Thu Jul 05, 2012 10:26 am
Forum: Python
Topic: A working command line ogg jukebox...
Replies: 2
Views: 2084

A working command line ogg jukebox...

Firstly, my code is clumsy and cluttered, feel free to edit to streamline and post it back. Secondly, requires pygame and ogginfo to be installed. Thirdly, the controls are "v" = previous track, "b" = pause/unpause track, "n" = next track. Fourthly, music must be in a f...
by Fugazi1978
Thu Jul 05, 2012 10:17 am
Forum: Python
Topic: ogg files playing slowly in pygame...
Replies: 6
Views: 3604

Re: ogg files playing slowly in pygame...

It works. I shall post the program to be poked and probed.
by Fugazi1978
Thu Jul 05, 2012 8:22 am
Forum: Python
Topic: ogg files playing slowly in pygame...
Replies: 6
Views: 3604

Re: ogg files playing slowly in pygame...

I've noticed the ones that sound slow were mp3s of 48000Hz so the oggs are too; I shall put a sample rate detector in and report back.
by Fugazi1978
Wed Jul 04, 2012 9:09 pm
Forum: Python
Topic: ogg files playing slowly in pygame...
Replies: 6
Views: 3604

Re: ogg files playing slowly in pygame...

The pygame.mixer.music.play() is outside the keystroke loop so it plays then enters the keystroke loop until the track ends.
by Fugazi1978
Wed Jul 04, 2012 2:49 pm
Forum: Python
Topic: ogg files playing slowly in pygame...
Replies: 6
Views: 3604

ogg files playing slowly in pygame...

Here's the code for my ogg media player with keystroke detection, unfortunately it plays slowly (anyone any ideas?) (can't get pygame to play mp3s): import os import sys import pygame import curses #pygame.init() loop = 0 esc = 0 os.system('clear') # music files (ogg) must be in a folder, 'music', i...
by Fugazi1978
Wed Jul 04, 2012 2:48 pm
Forum: Python
Topic: Help - non-GUI python media player...
Replies: 18
Views: 9374

Re: Help - non-GUI python media player...

Here's the code for the media player with keystroke detection, unfortunately it plays slowly (anyone any ideas): import os import sys import pygame import curses #pygame.init() loop = 0 esc = 0 os.system('clear') # music files (ogg) must be in a folder, 'music', in same folder as program os.system('...
by Fugazi1978
Wed Jul 04, 2012 2:47 pm
Forum: Python
Topic: Keystroke detection without drawing a window...
Replies: 6
Views: 12280

Re: Keystroke detection without drawing a window...

Here's the code for the media player with keystroke detection, unfortunately it plays slowly (anyone any ideas): [code] import os import sys import pygame import curses #pygame.init() loop = 0 esc = 0 os.system('clear') # music files (ogg) must be in a folder, 'music', in same folder as program os.s...
by Fugazi1978
Tue Jul 03, 2012 10:24 pm
Forum: Python
Topic: Help - non-GUI python media player...
Replies: 18
Views: 9374

Re: Help - non-GUI python media player...

I've gone for ogg files: import os import sys import pygame loop = 0 esc = 0 os.system('clear') os.system('ls -1pR music > files.out') #os.system('egrep -n ".mp3" files.out > mp3s.out') #os.system('egrep -nv ".mp3" files.out > mp3s2.out') #os.system('look "mp3s" files.o...
by Fugazi1978
Tue Jul 03, 2012 9:22 pm
Forum: Python
Topic: Keystroke detection without drawing a window...
Replies: 6
Views: 12280

Keystroke detection without drawing a window...

I'm trying to get keystroke detection without a window (I want a purely command line driven jukebox). My code is poor and I'm trying to code without using def etc: if pygame.event.get(pygame.KEYDOWN) == pygame.K_b: pygame.mixer.music.pause() if event.key == pygame.K_n: pygame.mixer.music.stop() if e...
by Fugazi1978
Mon Jul 02, 2012 5:34 pm
Forum: Python
Topic: Slave process communication...
Replies: 3
Views: 2897

Re: Slave process communication...

import subprocess import time proc = subprocess.Popen(['mplayer', '-slave', 'Raindrops_Keep_Falling_On_My_Head.mp3']) time.sleep(5) This plays the track then waits 5 seconds. It does the same thing with or without "proc = " To kill it I've tried: proc.send_signal(mplayer.quit) proc.send_s...
by Fugazi1978
Mon Jul 02, 2012 1:40 pm
Forum: Python
Topic: Help - non-GUI python media player...
Replies: 18
Views: 9374

Re: Help - non-GUI python media player...

Hi Tim, lots of the functions in pygame look great. Let's just presume I'm slightly thick, just getting back into programming (I played a bit with Fortran 12 years ago and Basic 22 years ago) and thus I'm struggling with every bit of it! How would I make a python/pygame program that played pie.mp3 f...
by Fugazi1978
Mon Jul 02, 2012 12:49 pm
Forum: Python
Topic: Slave process communication...
Replies: 3
Views: 2897

Slave process communication...

I'm trying to communicate with a slave process; I can start a track but I can't get it to stop: import subprocess import time subprocess.Popen(['mplayer', '-slave', 'Raindrops_Keep_Falling_On_My_Head.mp3']) time.sleep(5) subprocess.Popen.send_signal(['quit']) How do I quit mplayer? I get error messa...
by Fugazi1978
Sun Jul 01, 2012 11:47 am
Forum: Python
Topic: Help - non-GUI python media player...
Replies: 18
Views: 9374

Help - non-GUI python media player...

Hi, I've written code to search for mp3s in my mp3s folder (which when used on a Pi will be a memory stick). It looks like this: import os loop = 0 os.system('clear') os.system('ls -1pR mp3s > files.out') f = open('files.out', 'r') A = f.readline() C = ['this','is','a','list'] C[:] = [] if A[-2:-1] ...

Go to advanced search