Page 1 of 1

piTeach-Audio???

Posted: Thu Apr 30, 2015 5:50 pm
by piBob
I'm a 7th grade public school teacher. I've recently purchased, a RaspberryPi2B. I would like to use the pi2B, come September in my classes. I have most things working. One issue is the audio for the pi2b.

After the pi2b boots into the GUI, I click.
Menu/Preferences/Audio Jack Control
An app opens called - Jack Audio Connection Kit.
Which has 4 tabs.
Settings-Options-Display-Misc.

I must admit, these are exhausting and scary tabs to look at. Looking at raspberry.org, I don't see where any guidance is given. Is the Pi2b still being developed and not ready to play audio files? Can
it play audio files? What kind of files?

I know I need 2 items.
-an audio file
-help with Audio Jack

Even if it not the best audio sound. If pi2b does play audio. I would like to use it. Could I get help with the Audio Jack app? It is not friendly looking. I beg anyones help. Does pi2b have any audio files in NOOBS?

Before I considered the pi2B. I was preparing to use older PCs. I will be teaching several subjects. Range from 7th - 10th grade.
-linux
-scratch
-HTML,CSS,javaScript,Python.
-wolfram
-sonic audio
-graphics editing
-video camera applications

pi2b though it has sold millions. Pi2b doesn't have the blanket an average pc mother board has. I can easily get many old PCs. Some free. Others for as low as $50 each. However, if I could understand pi2b audio. I would certainly make all efforts with pi2b.

I hope I can find a person to help me. I need to prepare my study plan for September. Any help or advice would be appreciated.

Re: piTeach-Audio???

Posted: Thu Apr 30, 2015 6:16 pm
by fruitoftheloom

Re: piTeach-Audio???

Posted: Thu Apr 30, 2015 6:54 pm
by piBob
Thanks for the links.
First I am trying the ...audio-config.md link.

However, not all questions were answered.
What kind of audio files should I use?
Does pi2B have audio files with its NOOBS install?

New Question.
Once I discover the type of file I can activate.
Do I just click on it to play?

The web page is vague, if I may say. Shouldn't it speak about audio files? The type it can play or can not play. How to activate an audio file.

Please Help

Re: piTeach-Audio???

Posted: Thu Apr 30, 2015 8:46 pm
by Douglas6
PiBob, let's see if I can help. Audio on Linux is not a beautiful thing; it's not the Pi's fault. But as usual, if you take it in steps, it won't take long to get ahold of.

Background: the sound system shipped with the Raspberry Pi is called ALSA, and provides an abstraction layer between software and hardware. You can layer other more sophisticated things like JACK and PulseAudio on top of ALSA, but I would ignore those options as a beginner. I'm going to start with some command-line utilities, I hope you're not too uncomfortable with the command-line (again...Linux). If you're starting with the GUI, open an LXTerminal window.

The most basic ALSA audio command is aplay. This only plays (uncompressed) .wav files, the most basic of audio files. There are a number of short .wav files on the Pi to start with. Entering the following on the command line should produce sound:

Code: Select all

aplay /usr/share/sounds/alsa/Front_Center.wav
You should hear an attractive, American young woman saying "Front, Center" on either the (powered) speakers plugged into the audio jack, or the speakers on the TV/monitor plugged into the HDMI jack. If this is not working, nothing else will, so it's important to get past this step. If you don't hear our well-elocuted friend, use that first link from fruitoftheloom's post to make sure that audio is routed to the proper place (powered speakers or HDMI device). Once it is working, continue on. You can use aplay for other things as well, like listing your audio devices. Consult the man pages (enter 'man aplay') and or Google for lots more information of varying confusability.

Your students will likely be as familiar with .wav files as they are with vinyl records. So let's step up(?) to .mp3 files. A useful mp3 player command is mpg321, and can be easily installed on the Pi with

Code: Select all

sudo apt-get install mpg321
There are a number of short .mp3 files on the Pi in the scratch directory; let's try one:

Code: Select all

mpg321 /usr/share/scratch/Media/Sounds/Human/Scream-male2.mp3
This time you should hear a male of indeterminate ethnic origins who sounds like he too has been struggling with audio on Linux. For longer bits of audio, you'll want to download your own .wav or .mp3 files. From a Windows machine, an SCP client like WinSCP gives a nice drag-and-drop file manager-type thingie.

So, we've seen that the Pi uses the ALSA system to play .wav and .mp3 files with some simple command line utilities. There are GUI options as well. You can associate file types with one or another application, so that you can double click a file on the desktop to launch it, or full-blown GUI music players similar to iTunes or WinAmp. Other file formats (.flac, .ogg, etc.) are supported as well, depending on the software. I don't usually use a GUI, but ask if you have troubles.

Re: piTeach-Audio???

Posted: Thu Apr 30, 2015 8:58 pm
by piBob
Your a HERO,
I will try what you have written. Starting with step one. I will also send a message to your email box.
How can I thank you for your help? Your a wonderful asset to this pi2b community.
Thanks Again.

Re: piTeach-Audio???

Posted: Thu Apr 30, 2015 9:19 pm
by Douglas6
piBob wrote:I'm a 7th grade public school teacher.... How can I thank you for your help?
You already have :)

Re: piTeach-Audio???

Posted: Fri May 01, 2015 10:54 am
by piBob
After I typed in your CMD line into LXTerminal. I would say pi2b tried playing audio.
LXTerminal read as:
Playing Wave ... 48000Hz Mono. I did not hear any sound.

My HDMI monitor does not have speakers. The pi2b has a, "3.5mm 4 pole Jjack Female", type output jack for audio. My PC speakers are all 3 pole Jjack male. I can solve this problem with an adapter. Where I get one will take me some time. I need till probably Monday or Tuesday to get.

I have hope I can get this working now. Just need the proper hardware. I will let you know of my progress.

Always grateful

Re: piTeach-Audio???

Posted: Fri May 01, 2015 1:47 pm
by jojopi
piBob wrote:I did not hear any sound.
My HDMI monitor does not have speakers.
The pi2b has a, "3.5mm 4 pole Jjack Female", type output jack for audio. My PC speakers are all 3 pole Jjack male. I can solve this problem with an adapter.
Presumably you would not have expected to hear anything if no speakers were attached. Therefore I assume you did in fact connect the speakers, and that the cable appeared to fit?

Where did you find out that the Pi 2 had a four pole connector? That is true, but it will also accept a three pole plug. You do not need an adapter unless you want to extract the analogue video signal from the extra sleeve.

If you use HDMI video but want the sound to go out the analogue connector instead, you may need the "-o local" option to omxplayer. This is explained in the official documentation page: https://www.raspberrypi.org/documentati ... /README.md

Re: piTeach-Audio???

Posted: Fri May 01, 2015 5:56 pm
by piBob
I forget the site informing me, the Jjack was called a Jjack. It showed a photo of a 3 pole and 4 pole. It's circiut layout etc. I copied the images. Then searched the info. I did find their info correct. A top notch pi2b web site.

I found a 4 to 3 pole adapter. I guess I didn't need it. I was afraid I would hurt my pi2b. Better to be safe than sorry. So I use it.

Now my pi2b has everything up and running. Each program app. etc. I mean everything it came out of the box with. I have only added scrot. Scrot is a screen capture program.

Now my fun really begins. Wow ... what a wonderful feeling.
Thanks to you folks for helping me get over my final hump.

I bow with warm thanks to Douglas6