Assuming you get all this going...
You get:
./laserboy
./display
./project
The first application, ./laserboy is the development environment.
The next one, ./display shows LaserBoy wave files on the display.
Use it by calling it followed by the path to the wave file.
There is a set of [optional] binary switches that may follow the file path like this:
[root]# ./display waves/zippy.wav 1 1 1 0 0 1
Notice, there are spaces between the digits!
This set of switches would result in the program starting with these settings:
show_points : yes
show_blanks : yes
real_time : yes
inverted : no
no_blank : no
no_ezfb_buffer : yes
You can experiment with what each of these features does.
Also, note at the top of the scroll, when you issue this command. There is a header of information printed into the console about the wave file you just opened.
num_samples : 2756457
sample_rate : 48000
ez_wave_mode : positive signal
end of frame marks
unique frame marks
unique point marks
num_channels : 6
bits_per_sample : 16
playing time : 57.4262 seconds
offset[0] : 0
offset[1] : 0
offset[2] : 0
offset[3] : 0
offset[4] : 0
offset[5] : 0
This information comes from the header of a LaserBoy generated wave file. The standard wave file format allows for additional chunks of information to be stored there.
I added a structure of information to the wave header for LaserBoy. It contains the time shift in samples between the individual tracks. This is what makes it possible to do scanner to color-mod time synchronization. It also contains information about subcode marks.
LaserBoy makes waves with 0 time shift.
The next program, ./project is what reads the wave file, imposes a time shift (if necessary) and (if possible) pushes it out the sound card. It doesn't really matter if your Linux system doesn't know how to write to a sound device. It will still complete the process and leave you with a shifted wave.
[root]# ./project waves/zippy.wav 0 0 -5 -5 -5 -5
This call asks for a difference of 5 samples between channels {1, 2} and {3, 4, 5, 6}. Thus the X and Y information in track 1 and 2 would arive 5 samples before the R, G, B and I signals that control the color, in tracks 3, 4, 5 and 6. The entire wave file is ripped through and re-written with this shift imposed on the data. Since this shift information is stored in the header of the file it can be undone and re-done. Once it is done, it's in the file and therefore can be played from any wave player in any OS.
The program ./display knows how to read and un-shift a LaserBoy wave on-the-fly for proper viewing. The program ./laserboy knows how to read, unshift and re-frame LaserBoy wave files. Subcode information is stored in the least significant bits of the color tracks so that LaserBoy waves can be completely reversed back into 2D point stripped, optimized laser vector art.
James.