Archive for July, 2007

Yahoo web space - 479Chapter 19Playing Music and VideoFile Extension DescriptionFile Extension

Tuesday, July 31st, 2007

479Chapter 19Playing Music and VideoFile Extension DescriptionFile Extension Descriptionor Pseudonymor Pseudonym.hcomMacintosh HCOM files..maudAmiga format used toproduce sound that is 8-bit linear, 16-bit linear, A-law, and u-law in monoor stereo. .oggOgg Vorbis compressed .ossdspPseudo file, used to open audio, which is best used the OSS /dev/dsp file and for compressing music configure it to use the data and streaming audio.type passed to SoX. Usedto either play or record. .prcPsion record.app format, .sfIRCAM sound files, used newer than the WVE by CSound package and format.MixView sample editor. .sphSpeech audio SPHERE .smpSampleVision files from (Speech Header Resources)Turtle Beach, used to format from NIST (Nationalcommunicate with Institute of Standards anddifferent MIDI samplers. Technology). .sunauPseudo file, used to open .txwYamaha TX-16W from a /dev/audiofile and a Yamaha sampling set it to use the data type keyboard. being passed to SoX. .vmsUsed to compress speech .vocSound Blaster VOC file. audio for voice mail and similar applications. .wavMicrosoft WAV RIFF files. .wve8-bit, a-law, 8 KHz sound This is the native Microsoft files used with Psion Windows sound format.Palmtop computers. .rawRaw files (contain no .ub, .sb, Raw files with set charac- header information, so .uw, .sw, teristics. ub is unsigned sample rate, size, and style .ul, .al, byte; sb is signed byte; must be given)..lu, .la, uw is unsigned word; sw .slis signed word; and ul isu-law. If you are not sure about the format of an audio file, you can add the .autoextensionto the filename. This triggers SoX to guess what kind of audio format is contained inthe file. The .autoextension can only be used for the input file. If SoX can figureout the content of the input file, it translates the contents to the sound type for theoutput file you request.

478Part IVRunning (Web design programs) ApplicationsTools that come with Fedora Core

Tuesday, July 31st, 2007

478Part IVRunning ApplicationsTools that come with Fedora Core for converting and compressing audio filesinclude: .sox(SoX) A general-purpose tool for converting audio files among a varietyof formats. .oggenc A tool for specifically converting music files to Ogg Vorbis format. Converting Audio Files with SoXIf you have a sound file in one format, but you want it to be in another format, Linuxoffers some conversion tools. The SoX utility can translate to and from any of theaudio formats listed in Table 19-1. Type sox -hto see the supported audio types, as well as supported options andeffects. Table 19-1Sound Formats Supported by SoX UtilityFile Extension DescriptionFile Extension Descriptionor Pseudonymor Pseudonym.8svx8SVX Amiga musical instru-.aiffApple IIc/IIgs and SGI AIFF ment description format. files. May require a sepa- rate archiver to work withthese files. .au,.sndSun Microsystems AU .avrAudio Visual Research audio files. This was once aformat, used on the Mac. popular format. The .snd extension is ambiguous because it s also been usedon NeXT format and head- erless Mac/PC format.) .cdrCD-R files used to master .cvsContinuously variable slope compact disks.delta modulation, which isused for voice mail andother speech compression. .datText data files, which con-.gsmLossy Speech Compression tain a text representation (GSM 06.10), used to of sound data.shrink audio data in voice mail and similarapplications. Tip27_

Web hosting billing - 477Chapter 19Playing Music and Video .Select files to

Monday, July 30th, 2007

477Chapter 19Playing Music and Video .Select files to play To select from the files in the playlist, use the previoustrack and next track buttons in the main XMMS window. The selected file ishighlighted. Click the Play button to play that file. Alternatively, you can dou- ble-click any file in the playlist to start it playing. .Delete files from the playlist To remove files from the playlist, select the fileor files you want to remove (use the next track and previous track buttons), right-click the playlist window, and click Remove.Selected. The selected filesare removed. .Save the playlist To save the current playlist, hold the right mouse buttondown on the List button and then select Playlist.Save List from the pop-upmenu. Browse to the directory you want, and then type the name you wanttoassign to the playlist and click OK. The filename should end with a .m3uextension, such as monkees_hits.m3u. .Load the playlist To reload a saved playlist, click the List button. Select aplaylist from the directory in which you saved it and click OK. There is also a tiny set of buttons on the bottom of the Playlist Editor screen. Theseare the same buttons as those on the main screen used for selecting different tracksor playing, pausing, stopping, or ejecting the current track. Using MIDI Audio PlayersMIDI (Musical Instrument Digital Interface) files are created from synthesizers andother electronic music devices. They tend to be smaller than other kinds of audiofiles because instead of storing the complete sounds, they contain information aboutthe notes played, tempo and articulation. You can think of a MIDI file as electronicsheet music. The MIDI player reproduces the notes to sound like a huge variety ofMIDI instruments. There are lots of sites on the Internet for downloading MIDI files. Try the Ifni MIDIMusic site (www.ifni.com), for example, which contains songs by the Beatles, LedZeppelin, Nirvana, and others organized by album. Most of the MIDI music is prettysimple, but you can have some fun playing with it. Linux distributions that include the KDE desktop (such as Fedora Core) often comewith the kmid MIDI player. Kmid provides a GUI interface for midi music, includingthe capability to display karaoke lyrics in real time. To start kmid in Fedora, selectSound & Video.KMid (or type kmid &from a Terminal window). Performing Audio File Conversion and CompressionThere are many different formats for storing and compressing speech and musicfiles. Because music files can be large, they are usually stored in a compressed for- mat. While MP3 has been the compression format of choice, Ogg Vorbis is quicklybecoming a favorite for compressing music in the open source community. OggVorbis has the added benefit of not being encumbered by patents as MP3 is.

476Part IVRunning Applications View file information Click (Sri lanka web server) the button in

Monday, July 30th, 2007

476Part IVRunning Applications View file information Click the button in the upper-left corner of thescreen to see the XMMS menu. Then select View File Info. You can oftenfind out a lot of information about the file: title, artist, album, comments, and genre. For an Ogg file, you can see specific information about thefileitself, such as the format, bit rate, sample rate, frames, file size, andmore. You can change or add to the tag information and click Save tokeep it. 8.When you are done playing music, click the Stop button to stop the currentsong. Then click the X in the upper-right corner of the display to close thewindow. Special features of the XMMS audio player let you adjust frequencies using a graphicequalizer and gather and play songs using a Playlist Editor. Click the button markedEQ next to the balance bar on the player to open the Equalizer. Using the EqualizerThe Equalizer lets you use slider bars to set different levels to different frequenciesplayed. Bars on the left adjust lower frequencies, and those on the right adjust higherfrequencies. Click the EQ button to open the Equalizer. Here are tasks you can per- form with the Equalizer: .If you like the settings you have for a particular song, you can save them asaPreset. Set each frequency as you like it and click the Preset button. Thenchoose Save.Preset. Type a name for the preset and click OK. .To reload a preset you created earlier, click the Preset button and select Load.Preset. Select the preset you want and click OK. The small window in the center/top of the Equalizer shows the sound wave formedby your settings. You can adjust the Preamp bar on the left to boost different levelsin the set range. Using the Playlist EditorThe Playlist Editor lets you put together a list of audio files that you want to play. You can add and delete files from this list, save them to a file, and use them againlater. Click the PL button in the XMMS window to open the Playlist Editor. The Playlist Editor enables you to: .Add files to the playlist Click the Add button. The Load Files windowappears. Select the directory containing your audio files (it s useful to keepthem all in one place) from the left column. Then either select a file fromtheright column and click Add Selected Files or click Add All Files in theDirectory. Click OK. The selected file or files appear(s) in the playlist. You canalso add music files by dragging them from the Nautilus file manager onto theplaylist window.

Web hosting resellers - 475Chapter 19Playing Music and VideoFigure 19-5:Play Ogg Vorbis

Sunday, July 29th, 2007

475Chapter 19Playing Music and VideoFigure 19-5:Play Ogg Vorbis and other audio files from the XMMS playlist. If XMMS is not able to find a configured sound card, it redirects its output to theDisk Writer plug-in. This causes the files you play to be written to hard disk as WAVfiles. You can get many more audio plug-ins from www.xmms.org. The XMMS audio playercan be used in the following way: 1.Obtain music files by ripping songs from a CD or copying them from the Webso that they are in an accessible directory, or by inserting a music CD in yourCD-ROM drive. (XMMS expects the CD to be accessible from /dev/cdrom.) 2.From the red hat menu, select Sound & Video.Audio Player. The X MultimediaSystem player appears. 3.Click the Eject button. The Load files window appears. 4.If you have inserted a CD, the contents of /mnt/cdromappear in the Filespane. Select the files you want to add to your Playlist and click the AddSelected Files or the Add All Files in Directory button to add all songs fromthe current directory. To add audio files from your file system, browse yourfiles and directories and click the same buttons to add the audio files youwant. Select Close. 5.Click the Play List button (the tiny button marked PL) on the console. APlaylist Editor window appears. 6.Double-click the music file, and it starts to play. 7.With a file selected and playing, here are a few actions you can take: Control play Buttons for controlling play are what you would expectto see on a standalone CD player. From left to right, the buttons letyougo to a previous track, play, pause, stop, go to the next track, andeject the CD. The eject button opens a window, enabling you to load thenext file. Adjust sound Use the left slider bar to adjust the volume. Use the rightslider bar to change the right-to-left balance. Display time Click in the elapsed time area to toggle between elapsedtime and time remaining. Note27_

Web site hosting - 474Part IVRunning ApplicationsFigure 19-4:Rhythmbox playing Internet radio. The

Sunday, July 29th, 2007

474Part IVRunning ApplicationsFigure 19-4:Rhythmbox playing Internet radio. The site www.di.fmlists a number of free Internet radio channels. Playing Music with XMMS Multimedia PlayerThe XMMS (X Multimedia System) multimedia player provides a graphical interfacefor playing music files in MP3, Ogg Vorbis, WAV, and other audio formats. XMMS hassome nice extras too, including an equalizer, a playlist editor, and the capability toadd more audio plug-ins. One of its greatest attributes is that XMMS is easy to use. If the player looks familiar to you, that s because it is styled after the WindowsWinamp program. Red Hat removed all software that does MP3 encoding or decoding because ofpatent concerns related to MP3 format. Although the XMMS player was designed toplay MP3 files, the XMMS plug-in required to actually decode MP3 is not included. To add MP3 support back into your Red Hat/Fedora Core distribution, you can getand install an MP3 plug-in. One place to get RPM packages that support MP3decoding is http://rpm.livna.org. They are also available from other sources, including www.xmms.organd www.gurulabs.com/downloads.html. Thisissue does not necessarily apply to other Red Hat derived distributions, such asMandrake 10.0. Start the XMMS audio player by selecting Sound & Video.Audio Player or by typ- ing xmmsfrom a Terminal window. Figure 19-5 shows the XMMS audio player withthe associated equalizer (below) and the Playlist Editor (to the right). As noted earlier, you can play several audio file formats. Supported formats include: .MP3 (with added plug-in) .Ogg Vorbis .WAV .AU .CD Audio .CIN MoviesNoteTip27_

473Chapter 19Playing Music and VideoFigure (Top web site) 19-2:Defining where you

Sunday, July 29th, 2007

473Chapter 19Playing Music and VideoFigure 19-2:Defining where you store your music. Figure 19-3:Viewing a music library with Rhythmbox. In addition to playing music files, Rhythmbox can launch Sound Juicer to rip CDs(see the Ripping CDs with Grip section later in the chapter for more on ripping CDaudio). Rhythmbox can also play Internet radio stations. The easiest way to do thisis to find a streaming radio station (you want to look for Shoutcast PLS files, usuallywith a .plsextension). Save the PLS file, and then double-click the file in the Nautilusfile browser. Nautilus comes configured to launch Rhythmbox for playing audio. Figure 19-4 shows Rhythmbox with three Internet radio stations.

472Part IVRunning Applications5 Replay Current (Web and email hosting) Track4 Previous Track3 Forward 15 Seconds2 Quit

Saturday, July 28th, 2007

472Part IVRunning Applications5 Replay Current Track4 Previous Track3 Forward 15 Seconds2 Quit (Stop Music, Exit, and Eject) 1 Back 15 Seconds0 Exit (Continue Music and Exit) . Help (Press the period key) The cdp display also lets you enter the names of the artist, CD, and each song. Because this information is saved, you can see it each time you play the CD. Typethese commands while the cdp display is showing to edit information about the CDcurrently playing: a Edit the Artist Name and press Enter. c Edit the CD Name and press Enter. Enter Edit the title of the current song and press Enter again. If you try to edit a song name and cdp crashes, type ejectto stop the CD fromplaying. Editing the song name seems to work better if you pause the song first. The arrow keys are also pretty handy for controlling CDs in cdp. The up arrow is forpause/play, and the left arrow is to go back a track. The right arrow is to go forwarda track, and the down arrow is to eject. Playing Music with Rhythmbox Audio PlayerRhythmbox provides the GNOME music player that lets you do everything, at leastaccording to the Rhythmbox documentation. You can play music files, import musicfrom CDs, and play Internet radio stations, all from one interface. The first time you run Rhythmbox, the program displays a setup wizard (see Figure19-2). You can tell Rhythmbox where you store your music files, and Rhythmboxwill index, sort, and help you maintain a music library. After you ve gone through the setup wizard, you ll see the main music library inter- face (see Figure 19-3). Rhythmbox makes it easy to organize even large collectionsof music files. If your distribution does not include support for MP3 playback with Rhythmbox, fear not there is hope! You can download updates for Rhythmbox atwww.gstreamer.net. You want the package gstreamer-plugins-mp3. NoteCaution27_

471Chapter 19Playing Music and VideoFigure 19-1:Play CDs and (Web hosting domains)

Saturday, July 28th, 2007

471Chapter 19Playing Music and VideoFigure 19-1:Play CDs and store artist, title, and track information with gnome-cd. Playing CDs with CdpIf you are working from a dumb terminal or just don t have your X desktop running, you can run the cdp utility to play CDs. Cdp is available in most Linux distributionsbut is a free to distribute and copyrighted piece of software and may not show upin all distributions. I don t suggest running this utility from a Terminal window; itdoesn t display properly. Insert the music CD you want to play, and then at a shell prompt type: $ cdpYou should see a blue screen containing the cdp display. To start the CD on a trackother than 1, include the track number with the play command. Here s an exampleof starting a CD on track 5: $ cdp play 5When cdp starts, you can see all the tracks, how long each track plays, and totalplay time. To control the play of the CD, use the following controls (turn on NumLock to use these numbers from the numeric keypad): 9 Play8 Pause/Resume7 Stop6 Next Track27_

Web hosting isp - 470Part IVRunning ApplicationsYou can change the behavior of

Friday, July 27th, 2007

470Part IVRunning ApplicationsYou can change the behavior of magicdev for the GNOME desktop in the CD andDVD preferences window. To do so: 1.On the main menu, choose Preferences.CD and DVD. The CD and DVD pref- erences window appears. 2.For data CDs, select from the following options: Mount discs when inserted If this is selected, an inserted data CD isautomatically mounted in a subdirectory of /mnt. This option is on bydefault. Start autorun program on newly mounted discs If this is selected, after a data CD is mounted, the user is asked to choose whether to runan autorun program from the CD. This option is on by default if the firstoption is checked. 3.For Audio CDs, you can select the Run Command When Audio CD Is Insertedcheck box to have the CD start playing automatically after it s inserted. Thecommand shown in the box labeled Command is used to play the CD. Bydefault, the option is on, and the gnome-cd player is chosen for you. 4.For blank CDs, the nautilus window opens with burn:///as the location. Withthis feature enabled, you can drag-and-drop files on the nautilus window togather the files you want to write to CD. Click Write to CD to burn the selectedfiles to the CD. 5.For DVDs, click the check box next to Run Command When DVD (Video) IsInserted to have the DVD play automatically (using the vlccommand) whenyou insert a DVD. 6.Click Close. Playing CDs with gnome-cdLike most graphical CD players, the gnome-cd player has controls that look similarto what you would see on a physical CD player. If you are using the GNOME desk- top, from the main menu select Sound & Video.CD Player, or from a Terminal win- dow, type: $ gnome-cd & If your computer is connected to the Internet, then for most CDs you ll see the titleand artist information. Even obscure artists are represented in the free onlinedatabases. If the information isn t available, you can enter it yourself. The interface for adding information about the CD and its tracks is very nice. Clickthe Open Track Editor button. You can add Artist and Title information about theCD. Then you can select each track to type in the track name. To add the name ofthe artist and the disk title, click in the appropriate text box, and type in that infor- mation. Figure 19-1 shows the CD Player and the CDDB Track Editor.