home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 564a.lha / rgs_II / Rgs.doc.pp / Rgs.doc
Text File  |  1991-11-06  |  43KB  |  872 lines

  1.  
  2.  
  3.  
  4.      Some spotty documentation for the RGS program June 24 1991
  5.  
  6.  
  7. Introduction:
  8.  
  9.    RGS is a sonic spectrum editor. It allows you to paint a sonogram using
  10. specialized 'brushes' and then synthesize the corresponding  audio
  11. waveform. It is an "evolved" version of my older program DRW/DRWj. The
  12. main added features in RGS are that there are now 256 levels of amplitude
  13. to choose from and the ability to synthesize while you are drawing in
  14. nearly real time, as well as increased user friendliness. How "real" the
  15. time is depends on the number of samples per pixel you choose...more on
  16. this later. Let's just say that it's like having a wall of 69120 sinewave
  17. generators, each with their own amplitude knob(0-255).  Note also that the
  18. samples created by real-time synthesis are  noisier than the results of
  19. the "Synth" mode. 
  20.  The version on this disk is a new version which is considerably more
  21. friendly than all the previous ones. More friendliness is added daily.
  22. Most of the improvements are :
  23.   the removal of the control comb after all these years...
  24.   the removal of the ill-concieved "flying window"
  25.   the reversion back to a low-res/non-interlaced screen.(speed reasons)
  26.   a set of (gasp) menus to replace the control comb functions..
  27.   cosmetic re-arrangement of the screen (still in progress)
  28.   ability to read old DRW, DRWJ and RGS screen formats.
  29.   and (Gasp Gasp Gasp) the beginnings of the removal of the 
  30.   Workbench reset,input,output,bandpass,and write interface.
  31.   Read on for more!
  32.  
  33. Versions older than Sep 23 88 are "cloned" by me at home.(An ugly
  34. interlaced version was cloned many moons ago by Phil Burk). The JForth
  35. Cloner is a program which cuts all the unneeded JForth code out of a
  36. turnkeyed module. It performs a few other optimizations as well. The
  37. main difference is that instead of being 270K long, it is under 100K !
  38. You can definitely use this version on a 512K machine!!!
  39.  
  40.  The program presents you with a dark grey area where time is on the
  41. x-axis, frequency (actually phase increment) is on the y-axis and color
  42. represents the amplitude of the sinewave at that point in time and phase.
  43. RGS takes this  information and creates a digital sample which corresponds
  44. to the spectrum on the screen.  Sonograms may be loaded and stored, sound
  45. files may be analyzed into sonograms and resulting sounds may be saved as 
  46. IFF 8SVX files. It allows you to play the sound (both channels) with the
  47. mouse controlling frequency and stereo pan. There are two MIDI modes which
  48. send chords derived from the sonogram to MIDI sound generators  which,
  49. when  coupled with a properly constructed microtonal scale, may allow your
  50. synth to  talk or make other sampled noises (with very very low fidelity).
  51.  
  52. Caution:
  53.  Because it is written in Delta Research's JForth, certain operations are
  54. slower than they need to be (although I did my best with Synth and
  55. BandPass Modes and real-time synth). Filename handling may be unfriendly
  56. should you make a typo or two - I suggest you type NIL: if you can't find
  57. the right file. There are several other annoying things  that I won't
  58. mention.
  59.  
  60.   The Screen:
  61. The RGS screen is a low-res, non-interlaced 4-plane screen, (capable of 16
  62. colors).  There is usually one window on the RGS screen, but occassionally
  63. I switch back to Workbench's screen for data input. To recover the 
  64. Drag bar and screen depth gadgets, use the F10 key.  This is being phased
  65. out..  f'rinstance in the help,reset and goodbye windows).  RGS has several
  66. Modes, which are described below.  Which mode RGS is in determines how the
  67. mouse movements and keystrokes etc.  etc.  are interpreted.  The current
  68. Mode is displayed in the Title bar of the RGS screen.
  69.  
  70. At the top of the window is the Color Bar. In RGS amplitude is expressed
  71. as a color. Since there are 256 amplitudes but only 12 colors, the color
  72. bar groups several amplitudes into each color. You select which amplitude
  73. you  want to draw with by clicking on the color bar - the true amplitude
  74. value is written on the end of the bar. The mapping between color and
  75. amplitude can be  changed with the Zone mode (see below), and the screen
  76. is refreshed using the  new mapping with the NewScreen mode. There are two
  77. palettes I use for the Color bar: one has a radically different color for
  78. each block of amplitudes (since this makes it easy to distinguish
  79. transitions) and the other has a more-or less continuous shades-of-orange
  80. palette, which is easier on the eye (but less accurate for "understanding"
  81. the sound). You can swap from one to the other with the \ key (or the new
  82. Palette menuitem  in Process menu.)
  83.  
  84. The  interesting part of the screen is the 128 by 270 pixel drawing area. 
  85. The y-axis corresponds to phase (percieved as frequency) and the x-axis
  86. corresponds to time. The y-axis units are displayed as "samples per cycle"
  87. on the top of the drawing area. The reason that I don't show Hz or some 
  88. other standard measurement is that the sample that RGS generates can be
  89. played back at a great number of speeds, which makes "frequency" very
  90. misleading.  The 'speed' number is on the far left, which is also known as
  91. the Amiga period number. This number is the number of color clocks (an
  92. internal timing unit) between output samples. The two numbers work
  93. together like this, for example:   To get a tone near 440Hz, 
  94.  
  95.  3579546 CC/sec/(440 cycles/sec*16 samples/cycle) = 508.458 cc/sample 
  96.  (with a line drawn on the 16.00 mark on the y-axis...)
  97.  
  98. so the period should be 508. This kind of calculation is largely
  99. irrelevant, since the period can be instantly changed with the mouse so
  100. as to retune the sound. Also contributing to the irrelevance factor is
  101. the whole purpose of RGS, which is to allow complicated sounds to be
  102. created without needing to know what the numbers are.
  103. Just in case, note that Middle C (523.3 Hz) is is 428. 
  104.  
  105.  The x-axis is also displayed on the top of the screen, expressed
  106. as the byte offset from the beginning of the sample.
  107.  
  108. If you are in Doodle mode, the drawing mode mnemonic comes after the
  109. x-axis location number. 
  110.  
  111. RGS actually has two drawing and sound areas: BufA and BufB. The one
  112. currently on the screen is noted after the drawing mnemonic.(Not seen 
  113. until you use buffer B). See 'Buffers' for more info. 
  114.  
  115.  
  116. To the side of the drawing area is a square box, which I call the Blob.
  117. The size of the blob can be changed by clicking in the Blob's box. The
  118. Blob is used as a brush or averaging area in the "doodle mode". 
  119.  
  120. Underneath the Blob is a phony prop gadget which provides some fairly
  121. constant numbers used in Doodle mode. Clicking in the box provides a
  122. number from 1 to 32 which is used in various ways.
  123.  
  124. Underneath the drawing area are a few lines of status information :
  125.  
  126. The Volume setting for the synthesis operations (changed with + and -
  127. keys). (Aug 28 89) and now also in the Reset window !!!
  128.  
  129.  The settings for time axis in samples per pixel (changed with the 
  130. Reset
  131. and Bandpass Modes).
  132.  The state of the real-time synthesis (changed with the G key or menu
  133. item). This shows whether the real-time synthesis is on or off and what
  134. variant of it is in effect.
  135.  The state of the period lock toggle (~), which keeps the period constant
  136. for better control during a performance.
  137.  The State of the harmonic handle and the phase/time Locks.(up/down arrows
  138. and numeric pad).
  139.  The Undo Status (on or off) is next. If it's on, undo is quietly
  140. recording. After Feb 16, this spot shows the amount of Undo memory
  141. in use, or "Off". 
  142. ( The MIDI info line which used to be below this has been expanded when
  143. you go into MIDI or UltraMIDI modes..)
  144.  
  145.  
  146. UNDO:
  147. Undo has been added recently - (Feb 89) I am still tweaking it but it seems
  148. to work pretty well.  Most everything you do which writes a new amplitude
  149. value (i.e.  color) on the screen is recorded from the time you hit the
  150. button until the next time you hit it.  If you've made an ugly sound, hit
  151. the "/" key and your stuff will be fixed up.  Note it is much slower than
  152. most paint undos because it can't use the blitter and must undo the
  153. generated sound as well as the amplitudes.  Large scale operations (like
  154. -Cut) turn Undo Off - sorry folks.  Undo is limited (arbitrarily) to 64K
  155. worth of buffers - roughly 16000 pixels worth.
  156. There are some mysterious menuitems for turning UNDO on and off - 
  157. Incase it gets turned off and won't go back on, you can use these.
  158. I used to think UNDO slowed everything down, but maybe I don't notice it
  159. anymore.
  160.  I'm still trying to work out a good memory management arrangement.  If you
  161. run out of contiguous memory, the undo simply stops recording.  Stuff up to
  162. that point is retained in the undo buffer.
  163.  
  164.  
  165.  
  166.   The MODES (and the keyboard):
  167.  
  168. There are several states into which the program may be put: all of them
  169. are accessed via the keyboard buttons. The first letter of each mode puts
  170. you in the corresponding mode, and case is ignored. The modes are also
  171. available from Menus (the Mode menu, to be specific). When you enter the
  172. program, the Help window is displayed as an obnoxious gesture. When you
  173. hit the enter key, you will be in "Play" mode.
  174.  
  175. But wait.. there's more! The arrow keys and keypad buttons also are used
  176. under various modes. The MIDI modes use the "F" keys, Escape and Delete,
  177. and sprinkled about the board are a few more  flags and toggles.
  178.  
  179.  
  180.  
  181. The modes are:
  182.  
  183.  T)op D)oodle S)ynth P)lay R)eset  W)rite B)andpass I)input O)utput Q)uit
  184.  M)idi U)ltraMIDI Z)oneSet X)onedSynth N)ewscreen A)lternateBuffer
  185.  
  186. ( The syntax "F)oobar" dates from UCSD Pascal : it simply means you 
  187.   need only type the first letter if you don't want to use the menus.  )
  188.  
  189.  Help Key gives the screen size, current release Date
  190.           and my address and credits. Help Now comes up in a window as
  191.           of the May 22 version. the cancel gadget,close gadget or 
  192.           typing space or return will make the window go away.
  193.  
  194. P)lay mode may also be accessed via the space bar, which is handy for 
  195. stopping a lengthy S)ynth-mode, N)ewscreen, B)andpass, U)ltra and M)idi
  196. modes and a few other time consuming operations in the D)oodle mode. The
  197. space bar also shuts off the internal audio in case of neighbor's
  198. complaints.
  199.  
  200. For certain operations, when the operation is finished, you will be put in
  201. Play Mode , since it is the safest mode to be in. 
  202.  
  203. Real time (graphic) toggle:
  204.  
  205. The letter G toggles on and off the "graphic synthesis", i.e. the real
  206. time synthesis mode. This is also available in the process menu.
  207.  When G is off, RGS acts a lot like an odd paint program. To get the sound
  208. corresponding to your image, you'll need to use X)one or S)ynth modes.
  209. When G) is on, all D)oodles  are simultaneously synthesized, pixel by
  210. pixel. Also, the pan and period information (as under Play mode) is
  211. captured and held constant while you draw. There are four synthesis
  212. modes(!) which are gotten to by the non-keypad numerals 0,1,2, and 3.
  213.  
  214.   "0" means the entire sample is played in a loop (but Zoned synthesis is
  215. played in its own loop which is the size of the Zone) .
  216.  
  217.  "1" splits the screen into left and right halves (conveniently divided if
  218. you do a T)op mode), each panned and tuned as with G)'s mode 0. The two
  219. halves play in synch.
  220.  
  221.  "2" again plays the whole sample, but one channel is made slightly faster
  222. than the other. This causes some groovy phasing effects and chorusing,
  223. beating, etc. etc.
  224.  
  225.   "3" acts like "0" except that zoned synthesis does not affect  the  size
  226. of the sample being played. This lets you draw an interesting spectrum and
  227. zone-synth sections of the screen , which are instantly mixed into the
  228. sample.
  229.  
  230.  Some things don't work very well with the real time "G"  mode. For
  231. example, Inc and Dec won't have much effect unless the "prop gadget" is
  232. set above 16. This is due to the trick I use to do the synthesis, which is
  233. to take the difference between the existing amp and the new amp and add
  234. the (scaled) resulting sine to the sample. Trouble is, the scaling chops
  235. out lots of subtle changes. (If I go to a 16-bit sample, this will go
  236. away). Real-time also overloads faster, and is less accurate in general,
  237. since I refuse to sum the entire row, scale and replace it as theory
  238. demands. However, for many complicated sounds (or compositions, if you
  239. wish) it works well. The biggest kick is drawing something, then erasing
  240. parts of it and hearing that harmonic drop out of the mix!
  241.    You can improve the fidelity (at the cost of getting closer to clipped
  242. levels) by using the  "+" key to make new synthesis louder ("-" to make it
  243. softer). Doing this also improves the response of the Inc and Dec
  244. functions.
  245.  
  246.  Top mode:
  247.  
  248.   T)op Clears the screen to grey ( amplitude 0), then goes directly to    
  249.   D)oodle mode. It also wipes out the sound sample buffer. You can also
  250.   use the letter K to do this. 
  251.  
  252.  
  253.  Doodle Mode:
  254.  
  255.  D)oodle mode is the main drawing mode. It works with the Left and Right
  256. menus to allow the sonogram to be drawn and processed.  You set the
  257. drawing functions of the left and right buttons by selecting the function
  258. from the  appropriate menu.  When you draw, you use either button to get
  259. either of the two drawing functions. The active function is shown as a
  260. user-unfriendly 4 letter  mnemonic. While you draw, the phase number and
  261. the byte offset are continuously updated.
  262.  
  263. Normally, the drawing goes on where ever the "Pen" is pointing, but
  264. you can grid-lock the drawing position by using the keypad buttons. 
  265. "8" increases the frequency lock interval, while "2" decreases it.
  266. (Technically, it constrains the Y-value, and not the phase/frequency).
  267. Frequency locking is useful for constant-toned sounds without harmonic
  268. movement. "4" and "6" do the same for time locking. You can make nifty
  269. rhythms with this feature by using "Blob" "5" resets the grid to
  270. 1,1.  These locks are nicely reported below the drawing area.  The
  271. top constraint is 64 in both cases.
  272.  
  273. The left and right arrows can be used to increment or decrement the
  274. drawing amplitude (color) by 1, which is good for fine tuning the
  275. amplitude for a -cut operation. Also, the comma button may be used to
  276. "pick" the color beneath the pointer (as in a certain famous paint
  277. program).
  278.  
  279. Also Also, the + and - buttons control the scale factor (Volume)  for 
  280. the synthesis section. This is a number which the sum of all the
  281. samples per time period is divided by. The smaller this number, the
  282. louder the sample, and the greater the chance that it will overload
  283. and need to be clipped. However, fidelity is improved by making this a
  284. low number. 
  285.  
  286. The up and down arrows control the Harmonic Handle, which is posted above
  287. the grid numbers .. read on for more about its uses.
  288.  
  289. The Doodle mode actions are grouped in a nearly logical fashion.
  290.  
  291. Dos and Lines:
  292.  
  293.  Dot  A dot of the selected color is continuously dropped on
  294.         the screen  while the left mouse button is depressed.
  295.  
  296.  Line A continuous line is drawn while the button is down. Note that
  297.         the line cannot be drawn from right to left.. to encourage
  298.         'proper temporal flow'.
  299.  
  300.  CycL Does a ramp-like colored line, speed of cycle is based
  301.          on the Prop value.
  302.  
  303. Blobs:
  304.  
  305.  Blob The Blob of Blob box fame is deposited. (You can resize the blob
  306.         by clicking in the blob box.)
  307.  
  308.  Wipe A Blob-sized Eraser, suitable for putting on the "other" button.
  309.  
  310.  CycB Draws a Blob  while changing the colors, speed is based on
  311.          the Prop value.
  312.  
  313. Ramps:
  314.  
  315.  Ramp A line at this frequency is 'ramped' up to the selected color,
  316.         then back down again. A ramp is always summed into the current
  317.         screen background. The rate at which the ramp ramps is
  318.         controlled by the phony Prop gadget.(Low number == long, slow
  319.         ramp).
  320.  
  321.  R-Dn Ramps down from the color under the pointer, using the rate from
  322.         the Prop gadget.
  323.  
  324.  R-Up Ramps up (backwards) from the pointer position, like ramp down.
  325.  
  326. Fill operations:
  327.  
  328.  Fill Fills this frequency with this color, until it hits a color
  329.          differing from that under the pointer.
  330.  
  331.  Fil2 Does a ramp-fill up to the pointed-to color from the colors
  332.          at the edges. Close relative of FilC and Mow. Works well
  333.          as a fancy Fill.
  334.  
  335.  FilC Fills like Fil2, except the 'peak' color is the current color,
  336.          not the replaced color.Great for doodling sounds.This will work
  337.          on grey areas as well, making little spots of color.
  338.  
  339.  Mow  Fills like Fil2, but ignores 'peaking', just ramps from 
  340.          left color to right color.( Doesn't work on grey areas).
  341.  
  342.  
  343.  
  344. Harmonic operations:
  345.  Harm   A dot in the suitable color and rate is summed into the screen
  346.         at harmonics determined by the current Frequency space settings.
  347.         The Pointer represents the harmonic specified by the Harmonic
  348.         Handle (controlled by Up and Down Arrows). It only writes forward, 
  349.         and connects points continuously. Harm can be used to create a
  350.         harmonic framework for subsequent  alterations, using color #1 as
  351.         the base color. If you are stuck generating  a long, ugly harmonic, 
  352.         hit space bar. The yellow line which pops up is a guide which
  353.         shows the end of this harmonic line's segment (i.e. how much
  354.         more it has to do before it reads the mouse again).
  355.  
  356.  
  357.  Xcld Excludes all but harmonics near this time period. The pointer
  358.          is on the Harmonic Handle (adjustable with the up and down
  359.          arrows). Xcld is good for cleaning up Bandpass filtered spectra. 
  360.          Space stops the process as with Harm. If you Xclude on top
  361.          of a Harmonic spectrum, against the grain of the harmonics, 
  362.          you get comb-filter-esque effects. See "Scan" under the process
  363.          menu for an interesting variation of Xcld.
  364.  
  365.  
  366.  Frmt Draws a portion of the harmonic spectrum (i.e. formant) specified
  367.         by the setting of the Harmonic Handle, and the prop gadget
  368.         value. Not as nice as I had hoped.
  369.           
  370. Averaging and filtering:
  371.  
  372.  Avg  Averages a Blob-sized area around the pointer, then averages the 
  373.         average with the non-0 colors within that area. Note: use skinny 
  374.         horizontal Blob for best results.
  375.  
  376.  Filt Averages (within the pointed-to  blob area) the colors(amplitudes)
  377.         with the next colors in the same frequency. Blends disparate colors,
  378.        thus removing some pops and clicks. 
  379.       The formula is the phase-conserving s=( S(i-1)+2*S(i)+s(I+1)+2 )/4  
  380.  
  381. Increment and decrement:
  382.  
  383.  Inc Adds "Prop gadget amount" to the spot under the pointer.
  384.          Length is Blob's length. 
  385.  
  386.  Dec Decrements this spot by the prog gadget amount.
  387.          Length is Blob's length.
  388.  
  389.  Inc0 Increments if there is a non-0 color in the Blob
  390.          shaped area under the pointer. For making soft areas louder. 
  391.  
  392.  Dec0 Decrement, but not all the way down to 0.(Like Inc0). Because
  393.          the shape is not erased, it's easy to change amplitudes of
  394.          formants using Inc0 and Dec0. 
  395.  
  396. Copy operations:
  397.  
  398.  From sets the 'from' point for  Copy 
  399.          You must click the left button.
  400.  
  401.  To   sets the 'to' spot for a Copy.
  402.  
  403.  Copy Copies 'pantograph'-style for those of you who remember Images,
  404.          based on the 'from area' going to the 'to' area. (area is
  405.          Blob sized). Also, no 0 levels are copied. 
  406.  CpZn Copies the current Zone to where the pointer is. The pointer 
  407.          indicates the upper left corner. (see Zone Mode)
  408.  
  409.  CpOz Copies a blob shaped area from the Other page's zone (i.e."B"
  410.          when on the "A" page, "A" when on the "B" page)This is like 
  411.          a copy and paste, where the pointer refers to the middle of
  412.          the blob.
  413.  
  414. Processes:
  415.  In former versions of RGS, some of these "overall" processes were
  416. assigned to drawing tools. This seems inappropriate. So a new menu holding
  417. these processes has been made. Synth Zone and Xsynth have also been moved
  418. here, and may be dropped from the modes menu in the future. 
  419.  
  420.  -Cut removes all amplitudes quieter than the current one from the 
  421.          sonogram. Nice for cleaning BPFs.  You can stop the
  422.          process with the space bar. 
  423.  
  424.  Norm    tries to maximize the final sample's  signal to noise ratio
  425.          by finding the 'loudest' column and rescaling all the amplitudes
  426.          to make that loudest volume be just below clipping (at the 
  427.          current Volume level). DANGER: with 'high' volumes this
  428.          tends to 'green' up everything if your sample is not too loud.
  429.          This works best if you are trying to tone down a clipping 
  430.          sound. (You could also re synthesize at a 'higher' Volume
  431.          number.)
  432.  
  433.  Life performs an automaton-like transformation of the sound in
  434.          the current Zone. I change the algorithm a lot, but it
  435.          has something to do with the average of the amplitudes
  436.          at certain just intervals from the current one. Hitting space bar
  437.          will stop the process. Since it generally lowers amplitudes,
  438.          stick "Inc0" on the other button to pep it up. 
  439.  
  440. Zone,Synth and X-Synth are covered as modes.
  441.  
  442. The Real-time synthesis switch is also here (G).
  443.  
  444. The Palette switch is also also here. (\) You get either 'Rainbow' or
  445. 'Orange Spread'. Rainbow is good for discerning the levels, while
  446. Orange Spread looks a whole lot better.
  447.  
  448. The Period lock switch is also also here. (~) this locks the period number
  449. to whichever is in effect so you can change modes without accidentally
  450. resetting the period. For instance, without the lock, after "Synthing"
  451. a spectrum drawn with G on, it probable is played back at the "wrong"
  452. speed because you moved the mouse! As of the May 22 89 version, RGS
  453. starts with the frequency locked, not free. 
  454.  
  455. A)lternate Buffer Mode:
  456. Buffers:
  457.  
  458. To allow primative undos and 'A/B'ing, I now have two buffers, named 
  459. BufA and BufB. You can swap them with the 'A' key, or the A/B menu item.
  460. The swap is instantaneous, but the screen must regen with the new
  461. information. If there's nothing in the other buffer, or you are going to
  462. do something which regens the screen anyway, just hit the space bar. 
  463.  
  464. One more trick involving A/B is only available from the menu:
  465. you can copy a 'zone area' from the 'other' screen to this one. For
  466. example, you can keep a copy of a spectrogram in 'B' and work on
  467. pieces of it in 'A', splicing etc. etc. Impress your friends:
  468. draw a sonogram in BufA, swap to empty BufB, Zone the entire space,
  469. turn on the Real-time synth, and select copy A/B. The sound in the other
  470. buffer will be generated from the high frequencies down as it copies!
  471. I may trash this and make a real UNDO or "Copy,Cut&Paste" out of the 
  472. other buffer some day.
  473.  
  474. Scan:
  475.  Scan is a nearly intelligent way to clean up spectra which have
  476. strong harmonics in them. It is basically an "Xcld" excluding operation
  477. performed under computer control. First, Zone on a section of the
  478. spectrum which has the loudest harmonics present. Try to insure that
  479. one of the harmonics in the zone corresponds to the current Harmonic
  480. Handle by using the up and down arrows in Doodle mode. Now activate
  481. Scan through the menu. Scan will try to find the Y value which produces
  482. the loudest result at the harmonics it would pick based on that y and 
  483. the Harmonic Handle. Having found that Y, it does an Xcld on the entire
  484. column of the spectrum . It then moves on to the next time period 
  485. in the Zone.
  486.  
  487.  Zone Mode:
  488.  
  489.  This mode sets up a "Zone" which operates with the "Life" function
  490. and also with the XoneSynth funtion and CpZn. Click on one corner of the 
  491. area of interest, draw out the rectangular Zone and release. You
  492. are now in Doodle Mode.
  493.   You can also rescale the color-to-amplitude mapping by clicking 
  494. first on the new "low limit" in the color bar, and then dragging
  495. to the higher limit. All new drawing will be using that palette.
  496. You may  recreate the screen in the new mapping, using the
  497. N)ewScreen mode or erase the screen with T)op Mode.
  498.  
  499.  Newscreen Mode:
  500. This mode erases the screen and redraws the spectrum in the new colors.
  501. This allows you to see spectral details which may be too subtle
  502. to show up otherwise. For example, the B)andpass filter creates a very
  503. accurate analysis, so you can  zoom in on those low amplitude levels.
  504.  
  505.  Synth Mode:
  506.  
  507.  S)ynth erases the sound area and then creates the waveform by additive
  508. synthesis. You may cut the sound short by hitting the space bar to go
  509. directly to play mode. This mode  may be slow at times, but it depends on
  510. the current sample/pixel settings. All grey areas are skipped (their
  511. amplitude is zero) so thinly populated sonograms generate faster.
  512. Technicians will note that I am using fixed point arithmetic and a  custom
  513. sine-lookup table to make this calculation, which is merely the scaled sum
  514. of the (scaled) amplitudes at each frequency times the properly phased
  515. sine at that frequency. Simple, eh? The real-time synth's method is to add
  516. a single frequency's properly phased sine wave to the existing sample,
  517. which means that  numerous low-order bits must be  discarded, resulting in
  518. poorer quality.
  519.  
  520.  X)onesynth Mode:
  521.  
  522. This is a mode where the synthesis is confined to the zoned area:
  523. (see Zone Mode). This is the ultimate bandpass filter!. It loops only the
  524. synthesized portion , just like Synth, unless you are using 'synth mode
  525. #3', which is designed not to loop, for precisely this reason .
  526.  
  527.  
  528.  Play Mode:
  529.  
  530.  P)lay plays the sound area. Moving the mouse vertically changes the Amiga
  531. audio period (i.e. frequency.) The range of periods can be changed by the up
  532. and down arrow keys (up decreases period range, down increases it). "So,
  533. how long can that sample be, in seconds?" The longest sample RGS generates
  534. is 270*256 bytes = 69120. The new highest period is 6348 (which 
  535. corresponds to a sample rate of 563.88 Hz). 69120 samples at 563.88 Hz is
  536. about 2 minutes and 3 seconds. Keep the frequencies low and you've got a
  537. Top 40 hit!!!. 
  538.  
  539. The following modes require some names and numbers from the keyboard.
  540. I hope to eliminate this primative stuff soon. There are some hints in
  541. these windows as to what the numbers should be , but no 'Cancel' buttons.
  542. Sorry - when they become requesters, they'll be more fun.
  543.  
  544.  Reset Mode:
  545.  
  546. R)eset resets the frequency and time spaces.  As of the May 22 89 version,
  547. the reset menu has been modernized into an interactive, user-friendly
  548. gadgeted window!  Here is a schematic of that window:
  549.  
  550.   Samples Per Pixel: xx  xx Sec
  551.   Sample Period : xx XX Hz
  552.   Top Phase:    xx Hz xx S/sec
  553.   Bottom Phase: xx Hz xx S/sec
  554.   MIDI Limit:   xx
  555.   Harmonic Handle: xx
  556.   Freq Lock:    xx
  557.   Time Lock:    xx
  558.   VOlume divider: xx
  559.   (OK)  (CANCEL)
  560.  
  561. The long gadgets all have the property that you click on them and drag the
  562. mouse, the numbers change (and the mouse pointer as well). In fact, you 
  563. can't type a number into the gadget at all! Which is just as well: some
  564. of the gadgets have two representations of their values. When you change
  565. the sample period, you can see the "samples per pixel/ seconds" change
  566. as well as the phase frequencies. Now, the details:
  567.  
  568. Samples Per Pixel:  This number is the number of samples each pixel on the
  569. x-axis represents (1-255). The total time in seconds of a sample played at
  570. the current sample period is also displayed.
  571.  
  572. Sample Period: This is the same period which can be changed in Play Mode -
  573. if the period is freed (~). This is the real internal Amiga period 
  574. - which I convert into Hz so you can get an idea of the fidelity. Now
  575. that I lock the period, you can be sure of the accuracy of all
  576. period-related stuff.
  577.  
  578. Top Phase and Bottom Phase: these two numbers define the "phase space" -
  579. which are really the frequencies of the top and bottom lines on the drawing
  580. area. You can now see their values in Hz as well as in my hokey measure,
  581. "100*samples/cycle". If a sine-wave takes two samples per cycle, it has
  582. reached the Nyquist limit. Anyway, you can zoom in on a frequency range,
  583. so for instance you can make the whole screen represent a fraction of an
  584. octave.  It's a good idea, if you do change the bottom phase, to make it
  585. have a lower frequency then the top phase - this is not enforced by RGS so
  586. you can make an inverted spectrum.  There is a limit to the phase
  587. resolution - but since i dont give the real internal representation
  588. of the phase, you can't tell what it is. It's pretty small, though.
  589.  
  590. Harmonic Handle: I've placed this here so mouse lovers can alter it
  591. without touching the keyboard. This is the harmonic which is "attached"
  592. to the pointer when in Harmonic, Formant, Fractal, Ultra Midi and Scan
  593. operations. 
  594.  
  595. Time and Frequency Locks:  again, they are here for musophiles.  (normally
  596. set by keypad's 8,2,4,5, and 6 keys). They put a grid on the screen 
  597. so regular spacing can be achieved with interesting results.
  598.  
  599.  
  600. MIDI Limit:  Which is the maximum number of MIDI note events the MIDI modes
  601. should transmit.  DX7s can have 16, while TX81Zs can only handle 8.
  602. Setting this to a low number in Ultra mode may overload your synth's MIDI
  603. buffer and cause you to lose your lease.
  604.  
  605. Volume Divider: As mentioned somewhere else in this doc file, 
  606. The sample is generated by summing sines. Well, if you sum enough sines, 
  607. the sound will overflow and clip ( actually, I wrap the amplitude
  608. around so it can be un-wrapped by UNDO). To combat the overload, I 
  609. divide the finished sample sum by this number, which is normally set to 8.
  610. If you set this number to 1, you'll overload very quickly, but the
  611. realtime sound quality will improve.Making this number very high is
  612. probably foolish. As it is, if you take a normalized sum of 128 signed
  613. waves , each wave gets 1/128th of its amplitude used - 1 bit's worth.
  614. Actually, this number is clipped to 64. 
  615.  
  616.  
  617. CANCEL really does cancel witout affecting anything, while OK effects the
  618. changes. Space bar and return also Cancel you out. 
  619.  
  620.  
  621. These settings apply to both buffers, but may not in the future.
  622.  
  623.  
  624. Write Mode:
  625.  
  626. W)rite writes the sound area to an IFF 8SVX sample file, for use by such
  627. programs as may use IFF samples. A filename is prompted for, the
  628. instrument name, your favorite "Period" number for tuning purposes - you
  629. can use 0 to mean the one used now in play mode -  and a number of octaves
  630. (which merely decimates the sample). Remember: it's best to keep IFF files
  631. short since a lot of programs can't handle  more than 24K. RGS can make a
  632. 64K sample, and therefore a 128K IFF file!  It's a good idea to give the
  633. IFF file a suffix which your playback program  expects, so I don't put one
  634. on.
  635.  
  636. Bandpass Mode:
  637.  
  638. B)andpass is the heterodyne filter. A name of a sound file is prompted
  639. for, then a starting offset within the file (so you may skip to an
  640. interesting section). The end offset for the file is prompted for, and 
  641. the sample size is computed from these two numbers. You can enter 0 to
  642. mean the end of the file. The frequency limits are next, exactly as they
  643. are in Reset mode. The record 'K' is asked for, which is the record size
  644. log to base 2 (i.e. 5=32, 10=1024 ...) Under 7 is pretty speedy, but
  645. decent usable work appears at about 9 or 10. Lastly, the phase and sample
  646. skip numbers are prompted for: this lets you scoot over the sample to get
  647. an overview before commiting yourself to an 8-hour bandpass analysis. You
  648. may stop the process by hitting the space bar.
  649.  This is not  an FFT because it is more geared  to the parametric nature
  650. of the program. Technically, it is a sonogram where color represents
  651. amplitude. Again, it uses fixed point arithmetic. No hokey suffix is
  652. required for this sound data file, and in fact,  any format soundfile
  653. (except compressed or inverted-byte) will be read, since I ignore the
  654. fileheaders! RGS has a more accurate Bandpass filter than DRWj, because
  655. RGS can hold a wider and more complete range of amplitudes. The quality of
  656. the filter results is dependent on the ratio of the record length to 2^K .
  657. Obviously, trying to analyze a wave longer than 1 record is futile. On the
  658. other hand, detail is lost if the record covers too many cycles. In
  659. theory, I shouldn't even attempt to analyze sounds with wavelengths
  660. greater than half the sampling frequency, but eh! sometimes interesting
  661. stuff shows up in there.
  662.  
  663.  "You canna change the laws o'physics!" - Mr. Scott.
  664.  
  665. A sneaky way to audition a sample that you may want to analyze is to  read
  666. it with Bandpass mode, give it a low "K" and hit the space bar when it
  667. starts. "Play" mode will let you play it now. In fact, you can write on it
  668. in  G) mode, thus combining high-quality samples with low quality
  669. synthesis! In double fact, you can go directly to W)ritemode and turn it
  670. into an IFF sound!
  671.  
  672.  
  673. FFTMode  is in the works .... commented out until I figure out what's
  674. wrong with it. It should make some kinds of analysis quicker.  
  675.  
  676.  
  677. O)utput  writes the sonogram to a disk file.  I)nput  reads it from  a
  678. disk file.  The R)eset parameters are also saved. I generally give these
  679. files a .RGS  suffix, to distinguish them from sample and IFF files. No
  680. suffix is automatically appended, though. RGS outputs a more accurate file
  681. than DRWj, even though it is the same size (73728 bytes). Future:
  682. compression. The official name of this new expanded format is the Poop
  683. format. I can read older formats from DRW and DRWj , RGSI, RGSH and other
  684. variants of the program with I)nput mode. This is why I prompt for
  685. "Compress or Corner" . Corner gives the lower left corner of the sample
  686. (in case the file is bigger than the screen). Compress will take a larger
  687. file and skip rows and columns until it fits on the screen. The period and
  688. phase numbers are adjusted to  take the compression into account.
  689.  
  690.  
  691.   MIDI Mode:
  692.  
  693. MIDI mode first runs through each line and picks the loudest "MIDILevel"
  694. amplitudes at all horizontal times. Then, you enter a performance mode
  695. where RGS sends up to 16 notes to the synthesizer, based on which record
  696. the mouse points at and the MIDI Level parm (see R)eset). Color becomes
  697. velocity (0-99). Holding the left button down increments the sample
  698. pointer at a steady pace. The time between transmissions depends on the
  699. "y" co-ordinate of the mouse. Note! the screen is re-written to show you
  700. who the winning frequencies  are, but the actual data is unchanged. After
  701. doing a MidiMode, you may want to  regen the screen (N). Setting the 
  702. MIDI Limit to something low like 6 can cause the data to spit out
  703. much faster! The synth will appreciate not having to keep track of
  704. 16 notes, too!
  705.  
  706.  Even though I use "running status", your synth may  block up. If you have
  707. a microtonal synth which can be programmed to a pure scale of harmonics
  708. for all 128 notes with 16-note polyphony, you can get the synth to
  709. simulate the same harmonic space that RGS provides (although only an 8th
  710. as powerful). I have done this on  a Dx7/E!gen.2 and a TX81Z. You should
  711. (canonically) use a linear velocity sensitive sinewave as the patch to
  712. play. Obviously, other patches and scales cause other effects.
  713. Whoop-de-doo! With the aid of the BPF function and some good samples, the
  714. DX can talk!
  715.  
  716. U)ltraMIDI
  717.  
  718. This MIDI play algorithm doesn't do any preprocessing, it just takes  the
  719. pointed-to time slice, finds the harmonics (based on the  harmonic handle)
  720. and outputs up to 16 to MIDI. In short, the screen is a formant guide.
  721. Holding the mouse button down sends an advancing MIDI stream to the synth.
  722. This is like an swarm of MIDI bees. A line with little crosses in it 
  723. shows up in your picture to indicate which MIDI notes are playing.
  724.  
  725. In both of these MIDI Modes, the F Keys send certain useful real-time MIDI
  726. messages, incrementing or decrementing the number (mod 128 of course):
  727.  
  728.  -    +
  729. --------
  730.  F1 - F2 :  Patch numbers
  731.  F3 - F4 :  Pitch Bend
  732.  F5 - F6 :  Controller number (default:1=mod wheel, 2=BC, 3=DX AT, 7=VOL)
  733.  F7 - F8 :  Controller value  ( default: 0)
  734.  F9 - F10:  After Touch
  735.  
  736. also, Escape sends All Notes Off and resets the control parameters 
  737. without retransmitting them. Just toggle the Fkeys of the controls
  738. you wish to reset. 
  739.  
  740. The MIDI Channel can be incremented with the Delete key. 
  741.  
  742. All the MIDI parameters are displayed below the draw space in a spanking new
  743. status display, legible to human beings for a change. Note that
  744. the Harmonic handle, is also displayed because of the role it plays
  745. in UltraMidi.
  746.  
  747.  
  748.  
  749. Note that swapping channels may leave notes ringing, and if the machine
  750. doesn't respond to "ALL NOTES OFF," you are in BIG NOISY trouble. Why not
  751. leave a little blank space to park the mouse while you change the channel? 
  752.  
  753. Quit Mode:
  754.  
  755. Q)uit gives you a chance to play Marble Madness or F-18 Interceptor.  Luck
  756. you - I put up an insurance requester!  - you can eiter use the gadgets to
  757. confirm or deny your quit, or use space and return to stay, "Q" to quit.
  758.  
  759.  
  760. The Future:
  761.  RGS is an obvious relative of my other programs DRWj and DRW. It is
  762. written in Delta Research's Jforth. The new Cloner/compressor will make
  763. future versions easier to put out. It works great... much better and
  764. easier than I had feared. This is why the program is less than 100K long!
  765. Immediate improvements will be the elimination of the workbench
  766. questions, perhaps a real file requester (gasp!) and some way to specify
  767. frequency/ time limits with the mouse and not a calculator. I may also
  768. put a real FFT in , just to see if there's a big accuracy difference.
  769. I've been thinking of translating the spectrogram into a MIDIFile, for
  770. the purpose of uploading to a score writing program, in case someone
  771. wants to make an orchestra talk. Also, the I)nput mode may read IFF ILBM
  772. files (pictures to you) to answer stupids questions like, "what does it
  773. sound like when you load this picture in?" Also probable in the future:
  774. the ability to replace the sinewave with any other wave (created by
  775. RGS, naturally) for both analysis and re-synthesis. This would approximate
  776. various granular synthesis methods (one of the things I always intended
  777. to do with this program...). And, continue to work on the real-time aspects
  778. for better performances.
  779.  
  780. The next related  step, if any, will probably be a vector based system
  781. written in assembler. It should also have sound double-buffering and
  782. Bigger than the screen bitmaps and perhaps 16-bit sound (calculated,
  783. anyway). There will  need to be a way to store samples larger than
  784. floppies and play samples larger than memory holds (!). If prodded, I will
  785. make the "IFF 8SVX to Mirage" transporter program, since I have a Mirage
  786. rackmount synth to test it on.
  787.  
  788. (May 22 89) as you can see, work is proceeding apace on making real
  789. requester style parameter input. When I finish the file requester,
  790. there will be no need for the workbench window any more.
  791.  
  792. (aug 28 89) Sorry - I've been working on harmonizers and Vapor Paint,
  793. but have noticed a bug due to the "lock per" feature coming on at the
  794. start. If you have run a program which legitimately used the Audio Device,
  795. the device was probably shut off with 0 volumes. RGS, because of the locked
  796. periods and pans(!) didn't set up the volume. Thus, if you have 1.3 and the
  797. speaker device has been mounted, RGS won't start!!! The work around is
  798. to go to Play Mode, hit the tilde (~) or use the menuitem for it, and
  799. wiggle the mouse. That will set up the  volume. And speaking of volume,
  800. this version has added volume to the Reset window. RGS is almost totally
  801. mousable!. Also, I now start up with non-zero volume and with the
  802. Ramp tool on the left button instead of the Blob. I've been ignoring
  803. the file requester work - it's really tough and even using ARP's has
  804. caused severe trouble (i.e. mashed VD0:). I'll get to it one day. 
  805. This doc file was mashed in an unfortunate disk accident, but resurrected
  806. by disksalv. Good job, Mr. Haynie! Looks OK to me though!
  807. BTW the aforementiond Vapor Paint may have a double life as the
  808. vector based synthesizer mentiones a few paragraphs ago. When I 
  809. Render, I can interpret the "vectors in many ways, including musically.
  810. But - this is the usual vapor!
  811.  
  812. (june 24 91) This doc relates to the December 1990 version.
  813.  Well, some stuff has been upgraded in the last few years-
  814. Since this source for this version got eaten, I've been thinking of
  815. doing a real rewrite in assembler, possibly to use 68030 code or
  816. the beta unlimited 16 bit board , or other features. Just a possibility!
  817. CpBl (copy blob) is replaced here by CpOz , Copy Other Zone, and
  818. some speed has also been added to the sine routines. 
  819.  
  820. Ye Olde Copyright Notice:
  821.  
  822. This is MINE ALL MINE HA HA AHA AH AHA HAHAHAHAHAHAHAHA!!
  823.  
  824. Remember: Software kills! Use this tool wisely!
  825.  
  826. Like most shareware, you are free to copy this as long as you don't charge
  827. for the copies that you give away. As a matter of fact, I tell people that
  828. they MUST copy the program if they wish to be a fully licensed user
  829. (whatever that may be.) In lieu of money, which I'm not interested in,
  830. consider calling your local educational institutes and show their music
  831. department this program. You are free to include this program in your
  832. thesis bibliography. 
  833.  If you use this program in performance (and some of the modes are now
  834. quite suitable for it) I would like to hear about it. If you are a 
  835. developer making your own Amiga music program and would like to steal some
  836. of my ideas - I stole 'em first! but call me, and you can steal some more.
  837. Part of the idea is to make sure that commercial programs similar to this
  838. are a lot more powerful and friendly.
  839.  I am in no way associated with Intelligent Music - don't expect them to
  840. answer any questions about this program. I'm just taking up their generous
  841. offer to piggyback RGS on the M Instruments disk. My name is not now,
  842. nor has it ever been "Howard" - this is the perverted fantasy of
  843. some so-called Intelligent Music minion - supposedly corrected by
  844. now.  You may want to use RGS to make 8SVX samples for M to play.
  845. I suggest you go for all 5 octaves.  M also likes to have an .info
  846. file for the samples with "FILETYPE=8SVX"
  847.  in it, which RGS does not provide. Use the "see all filenames"
  848. option to find an RGS sound, or copy an existing .info file. These samples
  849. are also useful in any other 8SVX IFF Music program.
  850.  
  851.  I am after activism as a shareware concept. Money I don't need. And, it
  852. won't buy you a single thing.. there are no guarantees implied in this or
  853. any software. Neither can I say when or if the improved versions will
  854. appear.  If you send a kitchy postcard to me with your name and address,
  855. the chance that you will be informed of improvements to RGS will increase.
  856. For your information, I collect "C.T. Art - Colortone" sunsets and beach
  857. scenes  from previous decades. Hey folks, come on! USA postcards are still
  858. a mere 19 cents , and you know how to write, don't you???  It is an
  859. interesting reflection on the state of literacy in the USA that
  860. all my software fan mail comes from Europe and Australia!!
  861.  
  862.  You can get to me here:
  863.  
  864.           J Henry H Lowengard
  865.           43 W 16th st. apt 2D
  866.           NYC 10011-6320
  867.           also via IEMUG's MIDI boards:(MIDI-NET)
  868.           Dwight (212) 879-2625, IEMUG (405) 733-3102
  869.           and CompuServe: 76625,2425
  870.               the WELL : jhhl
  871.  
  872.