The KRec Handbook

The KRec Handbook

The KRec Handbook

Arnold Krille <arnold@arnoldarts.de>


Revision 0.01.00

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".

KRec is a recording frontend for aRts. It can be used to record single files or whole recording sessions. Some dynamic effects are implemented as well as the possibility to play out what you are recording (as long as you are not recording what you are hearing).


Chapter 1. Introduction

Introduction

Chapter 1. Introduction

Why I wrote KRec

After some working with aRts I realized that there is no recording frontend for it except the command-line tool artsrec. I had to record a radio play some friends of mine wanted me to mix and master and I wanted to use Linux® for the recording. So I started writing KRec.

What KRec does

What KRec does

What KRec does

KRec's function is quite simple. It connects to the aRts server and records what is routed to it into a file. At the momente it only writes raw files which are the same as normal Wavefiles but without the wav-header (sox is your friend).

KDE Logo
KDE Logo
Chapter 2. Using KRec

Using KRec

Chapter 2. Using KRec

This chapter describes the usage of KRec. There are several ways of using KRec so I created some “HOWTO” like sections describing this possibilities of usage. Just read the first paragraph of each and decide what you need to read. Or read everything and learn about the fantastic possibilities of KRec.


Here is a screenshot of KRec right after it started.

Recording of a simple file

If you hear something on the radio you want to record (and your radio is plugged into your soundcard) there is a (relatively) fast way to record.

  1. First you have to select the recording source in your soundcard. You need your favorite mixer (KMix), where you should select the source you need for recording. You also need to configure the aRts-server for full-duplex (and your soundcard and drivers should support this too). If you need to restart aRts you should also restart KRec

  2. Then you need to open aRts-Control and its Audio-Manager. It shows two new Items: KRec::In and KRec::Out, the latter is used for playback and play-thru and is irrelevant here. The former needs our attention; it should be connected with the in_soundcard-bus. If you can't select it you probably misconfigured something (no full-duplex or something like this).

  3. If everything worked you now should see something moving inside KRec — the VU-Meter showing how loud your recording is. For good recordings without clipping it should be yellow to orange but not red. The slider right of the VU-Meter controls the volume.

  4. Now you need a file to record to. Use File->New File or the toolbar symbol to create it. After that you need to tell KRec to record to this file. That is done in the context-menu of the file-item.

  5. Now you are able to start recording. Use the big red button in the toolbar or Play Record or simply press R. To stop use the stop button or the entry in the Play menu (or the key S).

Okay, it is not as fast as pressing the record-button on your tapedeck but KRec has some more features than your tapedeck, believe me.

Tip

You may want to record other things. For testing you can take the ouput signal of Noatun: Set KRec::In to the out_soundcard (or any other bus you let Noatun play to). This even works if you don't have a full-duplex enabled aRts.

Recording several files

Recording several files

Recording several files

For this section we assume you want to record several small or bigger pieces into several files. For example, you want to record scenes for a radio play or something like that. (That was the reason I wrote KRec.)

I assume you have worked with aRts before and know a bit about the topic “Audiorecording”. Your mic, or whatever you want to record from, should be plugged into your computer and you should know what to configure (outside KRec) to get the input signal recorded.

This “walk-through” uses a radio play as an example. We have to decide wether we want all the recordings to be named differently or we want to name some or all recordings by the same name, differing only in a number. For the first, follow the instructions in the section called “Recording of a simple file” and keep in mind that you can open several files at the same time and then choose which one to record to. The second is described here...

  1. Before we start be sure you have everything set up correctly, particularly that you are really recording what you want. You can confirm that everything is alright if the VU-Meter in KRec is moving. If you are not recording from out_soundcard you can select Play Play Through to get the recorded signal put through to your soundcard-output, which I would do rather then listening to it via your soundcard-mixer because you can hear if it is too loud or too quiet.

  2. For several files with the same name you need a session. File New Session should do it. Select the path and enter a filename which gets expanded with the number and the postfix of the recording.

  3. You still need files to record to but this time you create them by selecting New File from the context-menu. You can create as many files as you want/need.

  4. The rest is simple: Select the file you want to record to and then record...

Note

A session is not another mime-type, or even a file. It is just an internal thing to organize the numbering. So you can not later re-open a session and continue recording to new files...

KDE Logo
More tips and comments on usage

More tips and comments on usage

More tips and comments on usage

There are some more things to say and some more elements to explain.

Using Play-Through

For those of you who want to hear what they are recording there is a very useful “Play-Through” option. It is found in the menu Play. I advise using it as much as possible especially if you do other things like using the compressor or other effects as well. See the section called “Internals” for details on the connections.

Caution

Be sure to not build a feedback loop while recording from out_soundcard and activating “Play-Through”. Such a loop is to much for poor aRts and it slows your system way, way down! You might kill aRts...

Using the compressor

If you are recording with a microphone you might notice that the level is sometimes almost clipped and sometimes very low espacially when recording speech. To correct this you can use the compressor. It simply reduces all sound that is over the given threshold by the factor given in ratio. As this reduces the loudness there is a output-poti to expand (or reduce) the sound. Attack and Release let you control the time after which the compressor reacts (the time going by after input first exceeds the threshold) and the time the compressor still reacts after sound is below the threshold.

Tip

Test it while you are speaking into your microphone with “Play Through” enabled and you will hear the difference.

Switching between several files

Like you can open several files for recording, you also can switch between them. This can be done not only after you stop recording, but also while you are recording. Note that some data-packets can be lost while doing this. How much sound information this is depends on the size of your Audio Buffer configured in the KControl for aRts. It shouldn't be that much but if you play the files directly one after the other (for example with artscat file*.raw) you can hear some small “jumps”.

KDE Logo
Internals

Internals

Internals

Let me say something about the sound-connection in KRec.

There are some items needed for recording with aRts: a synth_AMAN_RECORD, a AudioToByteStream-converter and a ByteStreamReceiver. The first two are build inside the aRts-server. The latter is inside the application. But that's only the basics. If you want to listen to the files you nedd a ByteStreamSender inside your application and a ByteStreamToAudio-converter and a synth_AMAN_PLAY inside the server.

What about the effects? Between the AMAN_RECORD and the AutioToByteStream I plugged a StereoEffectStack into which I put the compressor (synth_STEREO_COMPRESSOR) and a volume-control (StereoVolumeControl).

If you enable “Play Through” the effects stack also gets connected with the AMAN_PLAY. So this is all inside the aRts server...

KDE Logo
KDE Logo
Chapter 3. Command Reference

Command Reference

Chapter 3. Command Reference

The main KRec window

The File Menu

File->New File (N)

Creates a new single file for recording into one file

File->New Session (Ctrl+N)

Creates a new session for multiple recordings

File->Quit (Ctrl+Q)

Quits KRec

The Play Menu

Play->Play (P)

Plays the file selected for playback.

Play->Record (R)

Starts the recording into the selected file.

Play->Stop (S)

Stops the recording.

Play->Play thru (Ctrl+P)

Connects the input with the output to let you hear what you are recording. (KRec::In and KRec::Out in the audio manager of aRts-control)

Caution

Never use this while recording what you hear (from out_soundcard). This gives feedback which aRts is not able to handle. (It does not ieck because aRts is faster then feedback from your box to the microphone.)

The Settings Menu

Settings->Show Startup-Window

Toggles whether the startup window with the quick tutorial is shown.

The Help Menu

Help->KRec Handbook (F1)

Invokes the KDE Help system starting at the KRec help pages. (this document).

Help->What's This? (Shift+F1)

Changes the mouse cursor to a combination arrow and question mark. Clicking on items within KRec will open a help window (if one exists for the particular item) explaining the item's function.

Help->Report Bug...

Opens the Bug report dialog where you can report a bug or request a “wishlist” feature.

Help->About KRec

This will display version and author information.

Help->About KDE

This displays the KDE version and other basic information.

The startup-window

The startup-window

The startup-window

This startup window is almost the same as the KTip-dialog.

KDE Logo
KDE Logo
Chapter 4. Questions and Answers

Questions and Answers

Chapter 4. Questions and Answers

4.1. I recorded some files with KRec, but I can not play the files with my favorite player?
4.1.

I recorded some files with KRec, but I can not play the files with my favorite player?

KRec (currently) records only into raw files, not real wav files. For converting you can use sox, for example:

Example 4.1. Converting raw-files to real Wave-file with sox

To convert a raw file recorded with KRec use the following command-line inside a console (Konsole), assuming sox is installed. In the example, the file is called test.raw and wants to be converted to test.wav. Use your own filenames for that.

%sox -r 44100 -c 2 -s -w test.raw 
test.wav

The options -r 44100 -c 2 -s -w tell sox that you recorded with 44100kHz samlping-rate, two channels (stereo), encoded signed linear and 16bit words. You may have to use other options for your setup - look at the man page of sox.

KDE Logo
Chapter 5. Credits and License

Credits and License

Chapter 5. Credits and License

KRec

Program copyright 2002 Arnold Krille<arnold@arnoldarts.de>

Documentation copyright 2002 Arnold Krille <arnold@arnoldarts.de>

This documentation is licensed under the terms of the GNU Free Documentation License.

This program is licensed under the terms of the GNU General Public License.

KDE Logo
Appendix A. Installation

Installation

Appendix A. Installation

How to obtain KRec

KRec is part of the KDE project http://www.kde.org/.

KRec can be found in the kdemultimedia package on ftp://ftp.kde.org/pub/kde/, the main FTP site of the KDE project.

Requirements

Requirements

Requirements

In order to successfully use KRec, you need KDE 3.1.

KRec should be within your kdemultimedia-package. As this package needs a running KDE and aRts everything should be fine.

KDE Logo
Compilation and Installation

Compilation and Installation

Compilation and Installation

In order to compile and install KRec on your system, type the following in the base directory of the KRec distribution:

% ./configure
% make
% make install

Since KRec uses autoconf and automake you should have no trouble compiling it. Should you run into problems please report them to the KDE mailing lists.

KDE Logo
KDE Logo
KDE Logo