Part four in this series about building a color mechanical television covers how to implement color systems.
Editor’s Note: This is part of a several part project by Vincent Portet. If you would like to see a specific chapter, refer to the table of contents below.
The next phase of this mechanical television project is implementing the color systems. Whenever Windows or Linux is running on the computer to be used for playing the WAV files, the player application (Audacity, or the provided "playloop-48k" program, or any other) cannot directly send its stream to the sound card. The stream instead flows through an audio mixer so that several applications can produce sound at the same time even if their output audio streams are at different sample rates. This is why the mixer resamples every source at a targeted output sample rate for being able to mix.
When just playing audio or even when sending just black and white NBTV video, the resampling frequency is not critical since it is expected to be equal or higher than the WAV sample rate. However, if a color carrier is part of the signal, some care has to be taken to avoid a totally disappointing behavior of the color decoder:
The mixer re-sampling frequency can be:
- - Equal to 48Kspl/s
- - Equal to the double, so: 96Kspl/s (synchronous resampling)
*It must not be 44.1Kspl/s or any multiple of this frequency. Otherwise, the resampling process will totally flaw the color carrier modulation.
The choice of 48Kspl/s as the source file and mixer sample rates has been made because PC audio hardware often runs by default at this frequency or at least supports it natively in any case. Soundcards usually re-sample any stream which is sent to them if this stream is sampled at a multiple of 44.1Kspl/s (and we absolutely don't want that).
If not sure about your settings, check the following:
Mixer Settings Under Windows (7 and Further)
In the contextual menu of the speaker icon located in the task bar, select the playback devices. Then, edit the properties of the output you plan to use and select the "advanced" tab. The sample rate should be 48000 Hz (16-bit) by default. Otherwise, set it to this value.
Mixer Settings Under Linux
* If running Pulse Audio, edit the following file as a super user:
Then update the following line (while removing the ";" at the beginning, if present):
default-sample-rate = 48000
* If running Alsa, edit the following file as a super user:
Find the following section and update it this way:
rate 96000 (or: rate 48000)
card 0 \
device 0 / Do not modify this section if different
Output Monitoring With an Oscilloscope
This test can be led without any additional hardware, except the cable that you will use anyway to connect to the NBTV television system. Even a cheap and/or very old analog oscilloscope can fit for this test.
Just connect an oscilloscope input to the computer audio channel corresponding to the color carrier. Launch the color pattern file "colorploop-x0.wav" (detailed in the "software tools" chapter) and adjust the time base to see only a few carrier periods. The following must be observed:
For a sound card output rate at 48000Hz: Raw square wave, varying between only a few discrete amplitude levels (because of the simple color bar modulation used).
For a sound card output rate at 96000Hz: The square wave may be slightly distorted but in a stable way. For instance, two-step low / high levels like this:
- d) Avoid any kind of equalization
If your sound card management utility and/or mixer includes an audio equalization feature, don't forget to disable it!
The reasons exposed here above, it is obvious that using an audio CD player (sampling at 44,1KHz and filtering at 22KHz) cannot lead to successful results with the presented color system.
Composite Y/Green Video Characteristics
The hardware expects positive video. This means that synchronization pulses step down at the lowest voltage level (under the video black level) while visible signal varies above the black level.
The color decoding process, courtesy of Camera Tim
WAV files are recorded this way but it is not guaranteed that the computer will not invert signal polarity. (It is designed for audio where polarity has no importance while it is the same on both channels). The color decoder is not sensitive to polarity inversion but the synchronization extractor does. Therefore the oscilloscope must also be used to check if the video signal is inverted or not. If it is inverted, you can easily use the "soft" way: Process the WAV files by using the feature "Invert" in the "Effects" menu of the Audacity sound editor (http://www.audacityteam.org/). You may also add a selectable hardware inverter according to your preferences...
Remark: To help keeping a rock stable synchronization extraction, even in the case of fast brightness changes (very important for a mechanical TV), it has been preferred to apply a black level at 50%, leaving the remaining 50% for the visible signal, while classical video standards define 30% and 70%.