Data AcQuisition And Real-Time AnalysisScope - Spectrum - Spectrogram - Signal Generator
Software for Windows
Science with your Sound Card!
Contact us about
Sound Card Stream Modulation
Daqarta Generator modulators such as AM, FM, and Phase/Width/Slope allow a selection of modulation sources. This ability is also provided for individual Burst duration parameters, as well as for Timing Quant, Bias, and Shift.
For example, in the AM dialog hitting the AM Source button pops up a list of the available sources. Although the default is a sine wave with adjustable frequency and phase, you can select another stream output or combination of streams as the Source.
The number in parentheses next to each Stream option is its overall stream number. This is a single digit (0-6) that can be used to toggle it via hot-key instead of a mouse click. To select Sine, toggle all Streams off.
On Left Stream 0, Sine is the only option. On Stream 1, you also have the option of selecting Stream 0 as the source. Higher-numbered streams allow all lower-numbered streams, plus all combinations. The Right channel streams are all numbered higher than the Left, so any Right stream can use any and all Left streams.
When more than one stream is selected as the source for a particular modulator, the selected streams are summed together to get the overall modulation. In this case, you should insure that the total of the respective stream Levels does not exceed 100%.
When you select another stream as a Source, the Stream On control at the top of its Stream Dialog changes to Stream Mod, indicating it is in use as a modulator source only and does not go directly to either output in normal stereo mode. That condition remains as long as that stream is selected as a Source by any modulator on any stream, even if that other modulator or stream is inactive.
However, in Multi-Channel Outputs mode, modulator sources may be selected for any output channel. This allows, for example, a dedicated output channel for a modulator signal, which can be used for triggering external devices.
A stream that has been selected as a source may be toggled off and on at any time. The Stream Mod (formerly Stream On) control will still say 'Stream Mod', but it will be shown depressed if the stream is active as a modulator. When the stream is off, it provides a "zero modulation" source to the modulator. This allows you to quickly select from among multiple sources, or lets you see the effects with and without modulation.
When a stream is selected as a modulator source, it can be shared by other modulators of any type, on the same or other available streams.
The Mod Freq and Phase controls are disabled in the current modulator when the Source is no longer set to Sine. Instead, you use the main Tone Frequency and Phase of the selected Source stream or streams. The Depth or FM deviation control on the modulated stream works normally. The Level control on the Source stream works in tandem with this to provide the total modulation amount. When you combine two or more streams together to serve as a source for a single modulator, the source Level controls allow you to set the relative proportions of each stream, and the depth control on the modulated stream sets the overall amount.
Even though a modulator waveform is not displayed directly, it can still be used as a trigger source to synchronize the display to the modulator. For example, suppose you are using Frequency Modulation (FM) to modulate a 1000 Hz sine with a 100 Hz sine, with the deviation set to +/-500 Hz. You can't get a stable waveform with Normal or either of the Auto Trigger modes, which look only at the Slope and threshold Level of the final waveform. But if you use Gen Sync mode you can see a perfectly stable waveform that clearly shows the compression and elongation cycles.
Note that the total waveform will only be completely stable if the modulated frequency is an integer multiple of the modulator, as in the 10:1 above example, or if both frequencies have an integer number of cycles in the 1024-sample display frame. (You can enforce that by setting the Frequency Entry Step Mode to Lines before setting the two frequencies.) Otherwise, the compression and elongation cycles of the modulator will be in stable positions, but the modulated wave will "roll" through them.
If you do this using the default Sine modulator source in the FM dialog, you'd select FM Sync (near the top of the dialog) to tell Gen Sync what to sync to. Now suppose you want to use a square wave modulator (or some other wave shape) instead of a sine. You'll set that wave type on a lower-numbered stream and set that stream's Tone Freq to the desired modulator frequency (100 Hz here). However, you now must tell Gen Sync to use that stream as the sync source. To do that, click on the Tone Freq dialog button (above the control) and then click the Tone Sync button at the top.
You can use a stream from the Left channel to modulate another Left stream as well as a Right stream, to provide perfect tracking between otherwise-independent output modulators. This approach is used in the EngineSim.GEN setup employed by the Engine_Sim Crank and Cam Sensor Simulator mini-app when SIMULATION Mode is active. Since in a real engine the crank and cam must maintain perfect sync, Left Stream 2 provides a slow (0.1 Hz default) sine wave that is used as the FM Source modulating the Crank Arb waveform on Left Stream 3, as well as the Cam Arb on Right Stream 3.
Besides providing perfect synchrony, this approach allows you to change the entire simulated engine speed schedule just by replacing the Left Stream 2 source with something else, such as a triangle, ramp, or even a custom Arb that describes the schedule. (Engine_Sim does the latter when Arbitrary Schedule Cycle is active, using a simple schedule created by the Arb_From_List macro mini-app.)
You can cascade modulators together, such that L.0 Stream controls a modulator on L.1 Stream, and the output of 1 is the source for a modulator on L.2 Stream, and that output is the source for a L.3 Stream modulator.
This is an extremely powerful and flexible option. You can use it to create noise bands with FM or Sweep (which are not allowed directly). You can use Arb or Play files as sources and step through them slowly to act as test controllers. You can use a random source to select from among a particular range of values (phases) in an Arb file to get a random selection of known values instead of just random values.
Suppose, for example, you want to create a frequency sweep that goes up and back down again repeatedly. (The standard Sweep modulator ramps up, then snaps abruptly back to the start.) You can use a Triangle wave as the FM modulator Source, if you want the up-sweep and down-sweep to have equal durations, or the Ramp source if you want them to differ.
Now suppose you want an exponential bi-directional sweep. To do this, load the Expnote.DAT Arb file and select it as the Wave for L.1 Stream. This file contains, besides several musical scales, an exponential curve extending from a phase of 144 to 360 degrees. Use a Triangle or Ramp on L.0 Stream as the source for the Phase modulator on L.1 Stream. Set the L.1 Stream main Freq to 0, and the Phase to 251.5 degrees (near the center of the exponential portion). Now the L.1 Stream output will be a level exponentially related to the instantaneous L.0 Stream ramp output.
Set the L.1 Stream Phase Modulation Depth to 50%, and the main L.0 Stream Level to about 60%. This will cause the L.1 Stream phase to run over the entire exponential range. To insure you have the proper Depth, Level, and Phase values, set the L.0 Stream Freq to about 100 Hz and monitor the L.1 Stream output. You should see a U-shaped wave that goes down almost to zero and up almost to positive full-scale. If you set any of the adjustments too far off, you will run into another part of the Expnote.DAT tables and see a spike at either extreme of the waveform.
Now set the L.0 Stream Freq to the actual sweep cycle rate you want. Set L.2 Stream main Freq to slightly less than the lower end of the desired sweep range (since the exponential curve doesn't go quite down to zero), set the FM Source to L.1 Stream, and set the FM Deviation +/-F to the upper limit of the desired sweep. Note that although this is shown as plus and minus, since the modulator is only positive you are only using that half of the range.
Or, you can create a custom Arb that includes a single cycle of any sweep shape, and use it to drive the FM modulator directly. Or a Play file with a whole series of different sweeps to act as a test scheduler.
TIP: If you don't need all four streams of a stereo channel for your modulation setup, make stream 3 the final (actual output) stream and leave the streams starting with stream 0 unused. That way, if you later want to add another modulator, you can use the lower-numbered streams to modulate higher streams... but not the other way around. (You can of course also use Left streams to modulate Right.)
Note: Since any Left stream can modulate any Right stream, it is possible to have only modulation sources on the Left channel, with no active Left output stream. However, the Left output enable must still be active so that the modulator streams will be updated properly. The waveform display will show a flat Left waveform at zero; you can toggle off the L.Out display button at the lower left of the display area.
Both Left and Right output enables are always active for Multi-Channel Output operation. However, in this case you can choose to display modulator channels as separate display traces.
Whenever you are trying to figure out how to set up a really complex signal or test, chances are that Stream Modulation can provide the solution.
The Composer.GEN setup is a good example of several stream modulation techniques.
See also Waveform Stream Controls.
Questions? Comments? Contact us!We respond to ALL inquiries, typically within 24 hrs.
Over 35 Years of Innovative Instrumentation
© Copyright 2007 - 2023 by Interstellar Research
All rights reserved