RGS Docs

Some spotty documentation for the RGS program June 24 1991

HTML: Sept 1998

Introduction:

RGS is a sonic spectrum editor. It allows you to paint a sonogram using specialized 'brushes' and then synthesize the corresponding audio waveform. It is an "evolved" version of my older program DRW/DRWj. The main added features in RGS are that there are now 256 levels of amplitude to choose from and the ability to synthesize while you are drawing in nearly real time, as well as increased user friendliness. How "real" the time is depends on the number of samples per pixel you choose...more on this later. Let's just say that it's like having a wall of 69120 sinewave generators, each with their own amplitude knob(0-255). Note also that the samples created by real-time synthesis are noisier than the results of the "Synth" mode.

The version on this disk is a new version which is considerably more friendly than all the previous ones. More friendliness is added daily. Most of the improvements are :

Read on for more!

Versions later than Sep 23 88 are "cloned" by me at home.(An ugly interlaced version was cloned many moons ago by Phil Burk). The JForth Cloner is a program which cuts all the unneeded JForth code out of a turnkeyed module. It performs a few other optimizations as well. The main difference is that instead of being 270K long, it is under 100K ! You can definitely use this version on a 512K machine!!!

The program presents you with a dark grey area where time is on the x-axis, frequency (actually phase increment) is on the y-axis and color represents the amplitude of the sinewave at that point in time and phase. RGS takes this information and creates a digital sample which corresponds to the spectrum on the screen. Sonograms may be loaded and stored, sound files may be analyzed into sonograms and resulting sounds may be saved as IFF 8SVX files. It allows you to play the sound (both channels) with the mouse controlling frequency and stereo pan. There are two MIDI modes which send chords derived from the sonogram to MIDI sound generators which, when coupled with a properly constructed microtonal scale, may allow your synth to talk or make other sampled noises (with very very low fidelity).

Caution:

Because it is written in Delta Research's JForth, certain operations are slower than they need to be (although I did my best with Synth and BandPass Modes and real-time synth). Filename handling may be unfriendly should you make a typo or two - I suggest you type NIL: if you can't find the right file. There are several other annoying things that I won't mention.

The Screen:

The RGS screen is a low-res, non-interlaced 4-plane screen, (capable of 16 colors). There is usually one window on the RGS screen, but occassionally I switch back to Workbench's screen for data input. To recover the Drag bar and screen depth gadgets, use the F10 key. This is being phased out.. f'rinstance in the help,reset and goodbye windows). RGS has several Modes, which are described below. Which mode RGS is in determines how the mouse movements and keystrokes etc. etc. are interpreted. The current Mode is displayed in the Title bar of the RGS screen.

At the top of the window is the Color Bar. In RGS amplitude is expressed as a color. Since there are 256 amplitudes but only 12 colors, the color bar groups several amplitudes into each color. You select which amplitude you want to draw with by clicking on the color bar - the true amplitude value is written on the end of the bar. The mapping between color and amplitude can be changed with the Zone mode (see below), and the screen is refreshed using the new mapping with the NewScreen mode. There are two palettes I use for the Color bar: one has a radically different color for each block of amplitudes (since this makes it easy to distinguish transitions) and the other has a more-or less continuous shades-of-orange palette, which is easier on the eye (but less accurate for "understanding" the sound). You can swap from one to the other with the \ key (or the new Palette menuitem in Process menu.)

The interesting part of the screen is the 128 by 270 pixel drawing area. The y-axis corresponds to phase (percieved as frequency) and the x-axis corresponds to time. The y-axis units are displayed as "samples per cycle" on the top of the drawing area. The reason that I don't show Hz or some other standard measurement is that the sample that RGS generates can be played back at a great number of speeds, which makes "frequency" very misleading. The 'speed' number is on the far left, which is also known as the Amiga period number. This number is the number of color clocks (an internal timing unit) between output samples. The two numbers work together like this, for example: To get a tone near 440Hz,

 3579546 CC/sec/(440 cycles/sec*16 samples/cycle) = 508.458 cc/sample 
 (with a line drawn on the 16.00 mark on the y-axis...)

so the period should be 508. This kind of calculation is largely irrelevant, since the period can be instantly changed with the mouse so as to retune the sound. Also contributing to the irrelevance factor is the whole purpose of RGS, which is to allow complicated sounds to be created without needing to know what the numbers are.

Just in case, note that Middle C (523.3 Hz) is is 428.

The x-axis is also displayed on the top of the screen, expressed as the byte offset from the beginning of the sample.

If you are in Doodle mode, the drawing mode mnemonic comes after the x-axis location number.

RGS actually has two drawing and sound areas: BufA and BufB. The one currently on the screen is noted after the drawing mnemonic.(Not seen until you use buffer B). See 'Buffers' for more info.

To the side of the drawing area is a square box, which I call the Blob. The size of the blob can be changed by clicking in the Blob's box. The Blob is used as a brush or averaging area in the "doodle mode".

Underneath the Blob is a phony prop gadget which provides some ∑fairly constant numbers used in Doodle mode. Clicking in the box provides a number from 1 to 32 which is used in various ways.

Underneath the drawing area are a few lines of status information :

The Volume setting for the synthesis operations (changed with + and - keys). (Aug 28 89) and now also in the Reset window !!!

The settings for time axis in samples per pixel (changed with the Reset and Bandpass Modes).
The state of the real-time synthesis (changed with the G key or menu item). This shows whether the real-time synthesis is on or off and what variant of it is in effect.
The state of the period lock toggle (~), which keeps the period constant for better control during a performance.
The State of the harmonic handle and the phase/time Locks.(up/down arrows and numeric pad).
The Undo Status (on or off) is next. If it's on, undo is quietly recording. After Feb 16, this spot shows the amount of Undo memory in use, or "Off".
( The MIDI info line which used to be below this has been expanded when you go into MIDI or UltraMIDI modes..)

UNDO:

Undo has been added recently - (Feb 89) I am still tweaking it but it seems to work pretty well. Most everything you do which writes a new amplitude value (i.e. color) on the screen is recorded from the time you hit the button until the next time you hit it. If you've made an ugly sound, hit the "/" key and your stuff will be fixed up. Note it is much slower than most paint undos because it can't use the blitter and must undo the generated sound as well as the amplitudes. Large scale operations (like -Cut) turn Undo Off - sorry folks. Undo is limited (arbitrarily) to 64K worth of buffers - roughly 16000 pixels worth.
There are some mysterious menuitems for turning UNDO on and off - Incase it gets turned off and won't go back on, you can use these. I used to think UNDO slowed everything down, but maybe I don't notice it anymore.
I'm still trying to work out a good memory management arrangement. If you run out of contiguous memory, the undo simply stops recording. Stuff up to that point is retained in the undo buffer.

The MODES (and the keyboard):

There are several states into which the program may be put: all of them are accessed via the keyboard buttons. The first letter of each mode puts you in the corresponding mode, and case is ignored. The modes are also available from Menus (the Mode menu, to be specific). When you enter the program, the Help window is displayed as an obnoxious gesture. When you hit the enter key, you will be in "Play" mode.

But wait.. there's more! The arrow keys and keypad buttons also are used under various modes. The MIDI modes use the "F" keys, Escape and Delete, and sprinkled about the board are a few more flags and toggles.

The modes are:


( The syntax "F)oobar" dates from UCSD Pascal : it simply means you need only type the first letter if you don't want to use the menus. )
Help Key gives the screen size, current release Date and my address and credits. Help Now comes up in a window as of the May 22 version. the cancel gadget,close gadget or typing space or return will make the window go away.

P)lay mode


P)lay mode may also be accessed via the space bar, which is handy for stopping a lengthy S)ynth-mode, N)ewscreen, B)andpass, U)ltra and M)idi modes and a few other time consuming operations in the D)oodle mode. The space bar also shuts off the internal audio in case of neighbor's complaints.

For certain operations, when the operation is finished, you will be put in Play Mode , since it is the safest mode to be in.

P)lay plays the sound area. Moving the mouse vertically changes the Amiga audio period (i.e. frequency.) The range of periods can be changed by the up and down arrow keys (up decreases period range, down increases it). "So, how long can that sample be, in seconds?" The longest sample RGS generates is 270*256 bytes = 69120. The new highest period is 6348 (which corresponds to a sample rate of 563.88 Hz). 69120 samples at 563.88 Hz is about 2 minutes and 3 seconds. Keep the frequencies low and you've got a Top 40 hit!!!. Real time (graphic) toggle:

G)raphic synth toggle


The letter G toggles on and off the "graphic synthesis", i.e. the real time synthesis mode. This is also available in the process menu. When G is off, RGS acts a lot like an odd paint program. To get the sound corresponding to your image, you'll need to use X)one or S)ynth modes. When G) is on, all D)oodles are simultaneously synthesized, pixel by pixel. Also, the pan and period information (as under Play mode) is captured and held constant while you draw. There are four synthesis modes(!) which are gotten to by the non-keypad numerals 0,1,2, and 3.

Some things don't work very well with the real time "G" mode. For example, Inc and Dec won't have much effect unless the "prop gadget" is set above 16. This is due to the trick I use to do the synthesis, which is to take the difference between the existing amp and the new amp and add the (scaled) resulting sine to the sample. Trouble is, the scaling chops out lots of subtle changes. (If I go to a 16-bit sample, this will go away). Real-time also overloads faster, and is less accurate in general, since I refuse to sum the entire row, scale and replace it as theory demands. However, for many complicated sounds (or compositions, if you wish) it works well. The biggest kick is drawing something, then erasing parts of it and hearing that harmonic drop out of the mix!

You can improve the fidelity (at the cost of getting closer to clipped levels) by using the "+" key to make new synthesis louder ("-" to make it softer). Doing this also improves the response of the Inc and Dec functions.

Top mode:


T)op Clears the screen to grey ( amplitude 0), then goes directly to D)oodle mode. It also wipes out the sound sample buffer. You can also use the letter K to do this.

Doodle Mode:


D)oodle mode is the main drawing mode. It works with the Left and Right menus to allow the sonogram to be drawn and processed. You set the drawing functions of the left and right buttons by selecting the function from the appropriate menu. When you draw, you use either button to get either of the two drawing functions. The active function is shown as a user-unfriendly 4 letter mnemonic. While you draw, the phase number and the byte offset are continuously updated.

Normally, the drawing goes on where ever the "Pen" is pointing, but you can grid-lock the drawing position by using the keypad buttons. "8" increases the frequency lock interval, while "2" decreases it. (Technically, it constrains the Y-value, and not the phase/frequency). Frequency locking is useful for constant-toned sounds without harmonic movement. "4" and "6" do the same for time locking. You can make nifty rhythms with this feature by using "Blob" "5" resets the grid to 1,1. These locks are nicely reported below the drawing area. The top constraint is 64 in both cases.

The left and right arrows can be used to increment or decrement the drawing amplitude (color) by 1, which is good for fine tuning the amplitude for a -cut operation. Also, the comma button may be used to "pick" the color beneath the pointer (as in a certain famous paint program).

Also Also, the + and - buttons control the scale factor (Volume) for the synthesis section. This is a number which the sum of all the samples per time period is divided by. The smaller this number, the louder the sample, and the greater the chance that it will overload and need to be clipped. However, fidelity is improved by making this a low number.

The up and down arrows control the Harmonic Handle, which is posted above the grid numbers .. read on for more about its uses.

The Doodle mode actions are grouped in a nearly logical fashion.

Dots and Lines:
Dot
A dot of the selected color is continuously dropped on the screen while the left mouse button is depressed.
Line
A continuous line is drawn while the button is down. Note that the line cannot be drawn from right to left.. to encourage 'proper temporal flow'.
CycL
Does a ramp-like colored line, speed of cycle is based on the Prop value.
Blobs:
Blob
The Blob of Blob box fame is deposited. (You can resize the blob by clicking in the blob box.)
Wipe
A Blob-sized Eraser, suitable for putting on the "other" button.
CycB
Draws a Blob while changing the colors, speed is based on the Prop value.
Ramps:
Ramp
A line at this frequency is 'ramped' up to the selected color, then back down again. A ramp is always summed into the current screen background. The rate at which the ramp ramps is controlled by the phony Prop gadget.(Low number == long, slow ramp).
R-Dn
Ramps down from the color under the pointer, using the rate from the Prop gadget.
R-Up
Ramps up (backwards) from the pointer position, like ramp down.
Fill operations:
Fill
Fills this frequency with this color, until it hits a color differing from that under the pointer.
Fil2
Does a ramp-fill up to the pointed-to color from the colors at the edges. Close relative of FilC and Mow. Works well as a fancy Fill.
FilC
Fills like Fil2, except the 'peak' color is the current color, not the replaced color.Great for doodling sounds.This will work on grey areas as well, making little spots of color.
Mow
Fills like Fil2, but ignores 'peaking', just ramps from left color to right color.( Doesn't work on grey areas).
Harmonic operations:
Harm
A dot in the suitable color and rate is summed into the screen at harmonics determined by the current Frequency space settings. The Pointer represents the harmonic specified by the Harmonic Handle (controlled by Up and Down Arrows). It only writes forward, and connects points continuously. Harm can be used to create a harmonic framework for subsequent alterations, using color #1 as the base color. If you are stuck generating a long, ugly harmonic, hit space bar. The yellow line which pops up is a guide which shows the end of this harmonic line's segment (i.e. how much more it has to do before it reads the mouse again).
Xcld
Excludes all but harmonics near this time period. The pointer is on the Harmonic Handle (adjustable with the up and down arrows). Xcld is good for cleaning up Bandpass filtered spectra. Space stops the process as with Harm. If you Xclude on top of a Harmonic spectrum, against the grain of the harmonics, you get comb-filter-esque effects. See "Scan" under the process menu for an interesting variation of Xcld.
Frmt
Draws a portion of the harmonic spectrum (i.e. formant) specified by the setting of the Harmonic Handle, and the prop gadget value. Not as nice as I had hoped.
Averaging and filtering:
Avg
Averages a Blob-sized area around the pointer, then averages the average with the non-0 colors within that area. Note: use skinny horizontal Blob for best results.
Filt
Averages (within the pointed-to blob area) the colors(amplitudes) with the next colors in the same frequency. Blends disparate colors, thus removing some pops and clicks.
The formula is the phase-conserving s=( S(i-1)+2*S(i)+s(I+1)+2 )/4
Increment and decrement:
Inc
Adds "Prop gadget amount" to the spot under the pointer. Length is Blob's length.
Dec
Decrements this spot by the prog gadget amount. Length is Blob's length.
Inc0
Increments if there is a non-0 color in the Blob shaped area under the pointer. For making soft areas louder.
Dec0
Decrement, but not all the way down to 0.(Like Inc0). Because the shape is not erased, it's easy to change amplitudes of formants using Inc0 and Dec0.
Copy operations:
From
sets the 'from' point for Copy . You must click the left button.
To
sets the 'to' spot for a Copy.
Copy
Copies 'pantograph'-style for those of you who remember Images, based on the 'from area' going to the 'to' area. (area is Blob sized). Also, no 0 levels are copied.
CpZn
Copies the current Zone to where the pointer is. The pointer indicates the upper left corner. (see Zone Mode)
CpOz
Copies a blob shaped area from the Other page's zone (i.e."B" when on the "A" page, "A" when on the "B" page)This is like a copy and paste, where the pointer refers to the middle of the blob.
Processes:
In former versions of RGS, some of these "overall" processes were assigned to drawing tools. This seems inappropriate. So a new menu holding these processes has been made. Synth Zone and Xsynth have also been moved here, and may be dropped from the modes menu in the future.
-Cut
removes all amplitudes quieter than the current one from the sonogram. Nice for cleaning BPFs. You can stop the process with the space bar.
Norm
tries to maximize the final sample's signal to noise ratio by finding the 'loudest' column and rescaling all the amplitudes to make that loudest volume be just below clipping (at the current Volume level). DANGER: with 'high' volumes this tends to 'green' up everything if your sample is not too loud. This works best if you are trying to tone down a clipping sound. (You could also re synthesize at a 'higher' Volume number.)
LifeZone,Synth and X-Synth are covered as modes.
The Real-time synthesis switch is also here (G).
The Palette switch is also also here. (\)
You get either 'Rainbow' or 'Orange Spread'. Rainbow is good for discerning the levels, while Orange Spread looks a whole lot better.
The Period lock switch is also also here. (~)
this locks the period number to whichever is in effect so you can change modes without accidentally resetting the period. For instance, without the lock, after "Synthing" a spectrum drawn with G on, it probable is played back at the "wrong" speed because you moved the mouse! As of the May 22 89 version, RGS starts with the frequency locked, not free.
A)lternate Buffer Mode:
Buffers:

To allow primative undos and 'A/B'ing, I now have two buffers, named BufA and BufB. You can swap them with the 'A' key, or the A/B menu item. The swap is instantaneous, but the screen must regen with the new information. If there's nothing in the other buffer, or you are going to do something which regens the screen anyway, just hit the space bar.

One more trick involving A/B is only available from the menu: you can copy a 'zone area' from the 'other' screen to this one. For example, you can keep a copy of a spectrogram in 'B' and work on pieces of it in 'A', splicing etc. etc. Impress your friends: draw a sonogram in BufA, swap to empty BufB, Zone the entire space, turn on the Real-time synth, and select copy A/B. The sound in the other buffer will be generated from the high frequencies down as it copies! I may trash this and make a real UNDO or "Copy,Cut&Paste" out of the other buffer some day.

Scan:
Scan is a nearly intelligent way to clean up spectra which have strong harmonics in them. It is basically an "Xcld" excluding operation performed under computer control. First, Zone on a section of the spectrum which has the loudest harmonics present. Try to insure that one of the harmonics in the zone corresponds to the current Harmonic Handle by using the up and down arrows in Doodle mode. Now activate Scan through the menu. Scan will try to find the Y value which produces the loudest result at the harmonics it would pick based on that y and the Harmonic Handle. Having found that Y, it does an Xcld on the entire column of the spectrum . It then moves on to the next time period in the Zone.
Zone Mode:
This mode sets up a "Zone" which operates with the "Life" function and also with the XoneSynth funtion and CpZn. Click on one corner of the area of interest, draw out the rectangular Zone and release. You are now in Doodle Mode.
You can also rescale the color-to-amplitude mapping by clicking first on the new "low limit" in the color bar, and then dragging to the higher limit. All new drawing will be using that palette. You may recreate the screen in the new mapping, using the N)ewScreen mode or erase the screen with T)op Mode.
Newscreen Mode:
This mode erases the screen and redraws the spectrum in the new colors. This allows you to see spectral details which may be too subtle to show up otherwise. For example, the B)andpass filter creates a very accurate analysis, so you can zoom in on those low amplitude levels.
Synth Mode:
S)ynth erases the sound area and then creates the waveform by additive synthesis. You may cut the sound short by hitting the space bar to go directly to play mode. This mode may be slow at times, but it depends on the current sample/pixel settings. All grey areas are skipped (their amplitude is zero) so thinly populated sonograms generate faster. Technicians will note that I am using fixed point arithmetic and a custom sine-lookup table to make this calculation, which is merely the scaled sum of the (scaled) amplitudes at each frequency times the properly phased sine at that frequency. Simple, eh? The real-time synth's method is to add a single frequency's properly phased sine wave to the existing sample, which means that numerous low-order bits must be discarded, resulting in poorer quality.
X)onesynth Mode:
This is a mode where the synthesis is confined to the zoned area: (see Zone Mode). This is the ultimate bandpass filter!. It loops only the synthesized portion , just like Synth, unless you are using 'synth mode #3', which is designed not to loop, for precisely this reason .
-- Requester-aided modes:
The following modes require some names and numbers from the keyboard. I hope to eliminate this primative stuff soon. There are some hints in these windows as to what the numbers should be , but no 'Cancel' buttons. Sorry - when they become requesters, they'll be more fun.

Reset Mode:
R)eset resets the frequency and time spaces. As of the May 22 89 version, the reset menu has been modernized into an interactive, user-friendly gadgeted window! Here is a schematic of that window:
  Samples Per Pixel: xx  xx Sec
  Sample Period : xx XX Hz
  Top Phase:    xx Hz xx S/sec
  Bottom Phase: xx Hz xx S/sec
  MIDI Limit:   xx
  Harmonic Handle: xx
  Freq Lock:    xx
  Time Lock:    xx
  VOlume divider: xx
  (OK)  (CANCEL)
The long gadgets all have the property that you click on them and drag the mouse, the numbers change (and the mouse pointer as well). In fact, you can't type a number into the gadget at all! Which is just as well: some of the gadgets have two representations of their values. When you change the sample period, you can see the "samples per pixel/ seconds" change as well as the phase frequencies. Now, the details:

Samples Per Pixel:
This number is the number of samples each pixel on the x-axis represents (1-255). The total time in seconds of a sample played at the current sample period is also displayed.
Sample Period:
This is the same period which can be changed in Play Mode - if the period is freed (~). This is the real internal Amiga period - which I convert into Hz so you can get an idea of the fidelity. Now that I lock the period, you can be sure of the accuracy of all period-related stuff.
Top Phase and Bottom Phase:
these two numbers define the "phase space" - which are really the frequencies of the top and bottom lines on the drawing area. You can now see their values in Hz as well as in my hokey measure, "100*samples/cycle". If a sine-wave takes two samples per cycle, it has reached the Nyquist limit. Anyway, you can zoom in on a frequency range, so for instance you can make the whole screen represent a fraction of an octave. It's a good idea, if you do change the bottom phase, to make it have a lower frequency then the top phase - this is not enforced by RGS so you can make an inverted spectrum. There is a limit to the phase resolution - but since i dont give the real internal representation of the phase, you can't tell what it is. It's pretty small, though.
Harmonic Handle:
I've placed this here so mouse lovers can alter it without touching the keyboard. This is the harmonic which is "attached" to the pointer when in Harmonic, Formant, Fractal, Ultra Midi and Scan operations.
Time and Frequency Locks:
again, they are here for musophiles. (normally set by keypad's 8,2,4,5, and 6 keys). They put a grid on the screen so regular spacing can be achieved with interesting results.
MIDI Limit:
Which is the maximum number of MIDI note events the MIDI modes should transmit. DX7s can have 16, while TX81Zs can only handle 8. Setting this to a low number in Ultra mode may overload your synth's MIDI buffer and cause you to lose your lease.
Volume Divider:
As mentioned somewhere else in this doc file, The sample is generated by summing sines. Well, if you sum enough sines, the sound will overflow and clip ( actually, I wrap the amplitude around so it can be un-wrapped by UNDO). To combat the overload, I divide the finished sample sum by this number, which is normally set to 8. If you set this number to 1, you'll overload very quickly, but the realtime sound quality will improve.Making this number very high is probably foolish. As it is, if you take a normalized sum of 128 signed waves , each wave gets 1/128th of its amplitude used - 1 bit's worth. Actually, this number is clipped to 64.

CANCEL really does cancel without affecting anything, while OK effects the changes. Space bar and return also Cancel you out.

These settings apply to both buffers, but may not in the future.

Write Mode:
W)rite writes the sound area to an IFF 8SVX sample file, for use by such programs as may use IFF samples. A filename is prompted for, the instrument name, your favorite "Period" number for tuning purposes - you can use 0 to mean the one used now in play mode - and a number of octaves (which merely decimates the sample). Remember: it's best to keep IFF files short since a lot of programs can't handle more than 24K. RGS can make a 64K sample, and therefore a 128K IFF file! It's a good idea to give the IFF file a suffix which your playback program expects, so I don't put one on.

Bandpass Mode:
B)andpass is the heterodyne filter. A name of a sound file is prompted for, then a starting offset within the file (so you may skip to an interesting section). The end offset for the file is prompted for, and the sample size is computed from these two numbers. You can enter 0 to mean the end of the file. The frequency limits are next, exactly as they are in Reset mode. The record 'K' is asked for, which is the record size log to base 2 (i.e. 5=32, 10=1024 ...) Under 7 is pretty speedy, but decent usable work appears at about 9 or 10. Lastly, the phase and sample skip numbers are prompted for: this lets you scoot over the sample to get an overview before commiting yourself to an 8-hour bandpass analysis. You may stop the process by hitting the space bar.

This is not an FFT because it is more geared to the parametric nature of the program. Technically, it is a sonogram where color represents amplitude. Again, it uses fixed point arithmetic. No hokey suffix is required for this sound data file, and in fact, any format soundfile (except compressed or inverted-byte) will be read, since I ignore the fileheaders! RGS has a more accurate Bandpass filter than DRWj, because RGS can hold a wider and more complete range of amplitudes. The quality of the filter results is dependent on the ratio of the record length to 2^K . Obviously, trying to analyze a wave longer than 1 record is futile. On the other hand, detail is lost if the record covers too many cycles. In theory, I shouldn't even attempt to analyze sounds with wavelengths greater than half the sampling frequency, but eh! sometimes interesting stuff shows up in there.
"You canna change the laws o'physics!" - Mr. Scott.
A sneaky way to audition a sample that you may want to analyze is to read it with Bandpass mode, give it a low "K" and hit the space bar when it starts. "Play" mode will let you play it now. In fact, you can write on it in G) mode, thus combining high-quality samples with low quality synthesis! In double fact, you can go directly to W)ritemode and turn it into an IFF sound!

O)utput
writes the sonogram to a disk file. I)nput reads it from a disk file. The R)eset parameters are also saved. I generally give these files a .RGS suffix, to distinguish them from sample and IFF files. No suffix is automatically appended, though. RGS outputs a more accurate file than DRWj, even though it is the same size (73728 bytes). Future: compression. The official name of this new expanded format is the Poop format. I can read older formats from DRW and DRWj , RGSI, RGSH and other variants of the program with I)nput mode. This is why I prompt for "Compress or Corner" . Corner gives the lower left corner of the sample (in case the file is bigger than the screen). Compress will take a larger file and skip rows and columns until it fits on the screen. The period and phase numbers are adjusted to take the compression into account.

MIDI Mode:
MIDI mode first runs through each line and picks the loudest "MIDILevel" amplitudes at all horizontal times. Then, you enter a performance mode where RGS sends up to 16 notes to the synthesizer, based on which record the mouse points at and the MIDI Level parm (see R)eset). Color becomes velocity (0-99). Holding the left button down increments the sample pointer at a steady pace. The time between transmissions depends on the "y" co-ordinate of the mouse. Note! the screen is re-written to show you who the winning frequencies are, but the actual data is unchanged. After doing a MidiMode, you may want to regen the screen (N). Setting the MIDI Limit to something low like 6 can cause the data to spit out much faster! The synth will appreciate not having to keep track of 16 notes, too!
Even though I use "running status", your synth may block up. If you have a microtonal synth which can be programmed to a pure scale of harmonics for all 128 notes with 16-note polyphony, you can get the synth to simulate the same harmonic space that RGS provides (although only an 8th as powerful). I have done this on a Dx7/E!gen.2 and a TX81Z. You should (canonically) use a linear velocity sensitive sinewave as the patch to play. Obviously, other patches and scales cause other effects. Whoop-de-doo! With the aid of the BPF function and some good samples, the DX can talk!
U)ltraMIDI
This MIDI play algorithm doesn't do any preprocessing, it just takes the pointed-to time slice, finds the harmonics (based on the harmonic handle) and outputs up to 16 to MIDI. In short, the screen is a formant guide. Holding the mouse button down sends an advancing MIDI stream to the synth. This is like an swarm of MIDI bees. A line with little crosses in it shows up in your picture to indicate which MIDI notes are playing.
In both of these MIDI Modes, the F Keys send certain useful real-time MIDI messages, incrementing or decrementing the number (mod 128 of course):
 -    +
--------
 F1 - F2 :  Patch numbers
 F3 - F4 :  Pitch Bend
 F5 - F6 :  Controller number (default:1=mod wheel, 2=BC, 3=DX AT, 7=VOL)
 F7 - F8 :  Controller value  ( default: 0)
 F9 - F10:  After Touch
also, Escape sends All Notes Off and resets the control parameters without retransmitting them. Just toggle the Fkeys of the controls you wish to reset.

The MIDI Channel can be incremented with the Delete key.

All the MIDI parameters are displayed below the draw space in a spanking new status display, legible to human beings for a change. Note that the Harmonic handle, is also displayed because of the role it plays in UltraMidi.
Note that swapping channels may leave notes ringing, and if the machine doesn't respond to "ALL NOTES OFF," you are in BIG NOISY trouble. Why not leave a little blank space to park the mouse while you change the channel?

Q)uit Mode:
Q)uit gives you a chance to play Marble Madness or F-18 Interceptor. Luck you - I put up an insurance requester! - you can eiter use the gadgets to confirm or deny your quit, or use space and return to stay, "Q" to quit.

The Future:

RGS is an obvious relative of my other programs DRWj and DRW. It is written in Delta Research's Jforth. The new Cloner/compressor will make future versions easier to put out. It works great... much better and easier than I had feared. This is why the program is less than 100K long! Immediate improvements will be the elimination of the workbench questions, perhaps a real file requester (gasp!) and some way to specify frequency/ time limits with the mouse and not a calculator. I may also put a real FFT in , just to see if there's a big accuracy difference. I've been thinking of translating the spectrogram into a MIDIFile, for the purpose of uploading to a score writing program, in case someone wants to make an orchestra talk. Also, the I)nput mode may read IFF ILBM files (pictures to you) to answer stupid questions like, "what does it sound like when you load this picture in?" Also probable in the future: the ability to replace the sinewave with any other wave (created by RGS, naturally) for both analysis and re-synthesis. This would approximate various granular synthesis methods (one of the things I always intended to do with this program...). And, continue to work on the real-time aspects for better performances.

The next related step, if any, will probably be a vector based system written in assembler. It should also have sound double-buffering and Bigger than the screen bitmaps and perhaps 16-bit sound (calculated, anyway). There will need to be a way to store samples larger than floppies and play samples larger than memory holds (!). If prodded, I will make the "IFF 8SVX to Mirage" transporter program, since I have a Mirage rackmount synth to test it on.

(May 22 89) as you can see, work is proceeding apace on making real requester style parameter input. When I finish the file requester, there will be no need for the workbench window any more.

(aug 28 89) Sorry - I've been working on harmonizers and Vapor Paint, but have noticed a bug due to the "lock per" feature coming on at the start. If you have run a program which legitimately used the Audio Device, the device was probably shut off with 0 volumes. RGS, because of the locked periods and pans(!) didn't set up the volume. Thus, if you have 1.3 and the speaker device has been mounted, RGS won't start!!! The work around is to go to Play Mode, hit the tilde (~) or use the menuitem for it, and wiggle the mouse. That will set up the volume. And speaking of volume, this version has added volume to the Reset window. RGS is almost totally mousable!. Also, I now start up with non-zero volume and with the Ramp tool on the left button instead of the Blob. I've been ignoring the file requester work - it's really tough and even using ARP's has caused severe trouble (i.e. mashed VD0:). I'll get to it one day. This doc file was mashed in an unfortunate disk accident, but resurrected by disksalv. Good job, Mr. Haynie! Looks OK to me though! BTW the aforementiond Vapor Paint may have a double life as the vector based synthesizer mentiones a few paragraphs ago. When I Render, I can interpret the "vectors in many ways, including musically. But - this is the usual vapor!

(june 24 91) This doc relates to the December 1990 version. Well, some stuff has been upgraded in the last few years- Since this source for this version got eaten, I've been thinking of doing a real rewrite in assembler, possibly to use 68030 code or the beta unlimited 16 bit board , or other features. Just a possibility! CpBl (copy blob) is replaced here by CpOz , Copy Other Zone, and some speed has also been added to the sine routines.

Ye Olde Copyright Notice:

This is MINE ALL MINE HA HA AHA AH AHA HAHAHAHAHAHAHAHA!!

Remember: Software kills! Use this tool wisely!

Like most shareware, you are free to copy this as long as you don't charge for the copies that you give away. As a matter of fact, I tell people that they MUST copy the program if they wish to be a fully licensed user (whatever that may be.) In lieu of money, which I'm not interested in, consider calling your local educational institutes and show their music department this program. You are free to include this program in your thesis bibliography.

If you use this program in performance (and some of the modes are now quite suitable for it) I would like to hear about it. If you are a developer making your own Amiga music program and would like to steal some of my ideas - I stole 'em first! but call me, and you can steal some more. Part of the idea is to make sure that commercial programs similar to this are a lot more powerful and friendly.

I am in no way associated with Intelligent Music - don't expect them to answer any questions about this program. I'm just taking up their generous offer to piggyback RGS on the M Instruments disk. My name is not now, nor has it ever been "Howard" - this is the perverted fantasy of some so-called Intelligent Music minion - supposedly corrected by now. You may want to use RGS to make 8SVX samples for M to play. I suggest you go for all 5 octaves. M also likes to have an .info file for the samples with "FILETYPE=8SVX" in it, which RGS does not provide. Use the "see all filenames" option to find an RGS sound, or copy an existing .info file. These samples are also useful in any other 8SVX IFF Music program.

I am after activism as a shareware concept. Money I don't need. And, it won't buy you a single thing.. there are no guarantees implied in this or any software. Neither can I say when or if the improved versions will appear. If you send a kitchy postcard to me with your name and address, the chance that you will be informed of improvements to RGS will increase. For your information, I collect "C.T. Art - Colortone" sunsets and beach scenes from previous decades. Hey folks, come on! USA postcards are still pretty cheap to send, and you know how to write, don't you??? It is an interesting reflection on the state of literacy in the USA that all my software fan mail comes from Europe and Australia!!

You can get to me here:

          J Henry H Lowengard
          324 Wall St
          Kingston NY 12401

          jhhl-at-panix.com