"My mistress' eyes are nothing like the sun." Shakespeare/Sting CBTAudio (c) 1989 by Jerry J. Trantow This program was originally written to test out volume modulation ideas on the Amiga. It has gradually become an Intuition Program. I have a lot of high hopes for it, but a lot of hardwork remains. Unfortunately I have not stuck the volume modulation b ack in yet. Some of the More Interesting PLANS Linking of Windows for Looped Sound Filtering the Loops to Avoid Clicks * Aggressive Techniques to Play back >8bits of resolution Adaptive Filtering Seperate tasks for audio, display, and interface * Samples reside in either FAST or CHIP Ram (Double Buffering) * CD type 2 or 4 times oversampling SHOULD BE DONE Adjustable Screen Size, Type and Position would be nice * Clipboard functional with standard Amiga programs FFT Clipboard compatible Need to add Special/Decimate and FFT/Window functionality Faster Selecting using DELTA MOUSE MOVES Human Hearing Tranfer Function Display * Fancier Gadgetry Full range of Filtering Functions including Adaptive ASM the FFT(), Filter() etc to get performance increases ** Need to add Fade In / Fade Out to the Amplify Feature (Easy) Dynamically size menus/gadgets or explicitly declare fonts * Memory cleanup to flush WHENEVER low memory FFT editor for Don Senzig GadgetIntuiText be selectable (LONG/SHORT menus) various data compression schemes should allow projects to pass environment if ~extended Display should have a vert scroll Gadget to show volume Need to watch for 2*64K Limitation in Play() Make the ChunkList editable (Utility) Make the ToolType Array editable (Utility) Save/Load variety of formats (Utility) fr should be an structure instance instead of a pointer Should implement LACE ToolType and check for PAL * Need to have Execute Requester pop up on the CUSTOMSCREEN History Spring1986 Started audio.c used assembly to play back samples 1987 Changed from mix of ASM & C to Complete C 5 Feb 1988 Changed over to a Multiple Project Scheme 10 Feb 1988 Added Mouse Selection to the Display 13 Feb 1988 Mouse Select Works 14 Feb 1988 Partitioned Program (It's about time!!) 15 Feb 1988 Fixed File input for AZTEC_C 17 Feb 1988 Worked on Zoom In, Zoom Out 23 Feb 1988 Added Flags to Node Structure 24 Feb 1988 Fixed Gadget MOUSEMOVEs screwing up select 24 Feb 1988 Gave up on DELTAMOVEs w/Select 26 Feb 1988 ModifyProp() math to FLOATs, ULONG overflowed 27 Feb 1988 Changed loop variables in Display() for speed 19 Feb 1988 Did some more partioning - cleanup() 24 Mar 1988 Added Access! File and Color Requesters 26 Mar 1988 Added IFF Reader 30 Mar 1988 Added CUT functionality (non-clipboard) 31 Mar 1988 Added PASTE,COPY functions (still non-Clipboard) *********** CBT00 **************************************** 1 Apr 88 Cleaned up the Menus a little, Added COMMSEQ 1 Apr 88 Added PLAY Gadgets to all windows 10 Apr 88 Incorporated FFT 10 Apr 88 Added Special and FFT to MenuBar 10 Apr 88 Implemented SPECIAL_Amplify (AUTORANGE)Function 10 Apr 88 Added SPECIAL_Frequency that multiplies freq by .7 ************** CBT01************************************** 11 Apr 88 Changed Project Windows to be SIMPLE_REFRESH 11 Apr 88 Screen Size uses GfxBase->Normal Values 12 Apr 88 Fixed Amplify Problem 20 May 88 Fixed up the IFFRead to Pad the NAME,ANNO,etc chunks 20 May 88 Added ChunkList and Voice8Header to Jerrys Node 23 May 88 Added RectFill() to Display() to clear empty windows 1 Jun 88 Added Requesters for AMPLIFY,FREQUENCY and MULTIPLE ************** CBT03 ************************************** 16 Jun 88 Finished ChunkList linked to Node and IFFWriter() 16 Jun 88 Started coding the OverSampling IDEAs 21 Jun 88 Did a little bit of ASM speed up to Display() Looks like an easy 20% size and factor of 2 in speed 22 Jun 88 Added some mutual excludes to the menus 23 Jun 88 Explicitly defined register vars : 4% code size saved 27 Jun 88 Made the Play Gadgets a little more recognizeable 5 Jun 88 Lost a lot of time tracking FFT cleanup problem 7 Jul 88 Strip() was Nulling the UserPort before SafeClose 24 Jul 88 Added Busy Pointer to the FFT() and Display() 25 Jul 88 Added Select Pointer for Mouse Selections 27 Jul 88 Register Variables in audio5.c to speed Mouse Select Mouse Select is still too slow, Needs to use ReportMouse() 27 Jul 88 Off/OnMenu() for Cut, Copy, Paste 27 Jul 88 Implemented Crude Filtering 8 Aug 88 Added File Open Cancel code 8 Aug 88 Added WaitTOF()s for Select All 8 Aug 88 Changed Screen BackGround 23 Oct 88 Somehow managed to lose revision file, used old backup ******************** CBT05 Release ***************************** 24 Oct 88 Released CBT05 along with some sounds 1 Nov 88 Figured out most of the WB, still need to write icons 6 Nov 88 Support multiple Project startup from the WorkBench 6 Nov 88 Support for COLOR= and ICON= 7 Nov 88 Fixed the 0 select problem with the play selection 8 Nov 88 Starting Cleaning for Fred Fish Submission 9 Nov 88 Fixed NO_ICON_POSITION for default saves 9 Nov 88 Fixed SampleRate/2 in FFT display Window 9 Nov 88 Added SaveAs Requester for Default Project Name 15 Nov 88 Started an About Requester 30 Nov 88 Entered code on Prop_Gad_Calculate() 1 Dec 88 Integer Proportional Gadget works fine 17 Dec 88 Changed over to 1.3, Was unable to recreate problems 10 Jan 89 Sidetracked some time on Prop Gadget Example Results are cleaner calculations that work >< 64K 23 Jan 89 Compiled with +f8 for Lucas Board (ffts fast!!) 2 Feb 89 Finished PropGadget Example, found Rob Peck's example 2 Feb 89 Added the a bunch of DEFAULT_DIR to the WB tool info 3 Feb 89 Tool Info saves the Defaults 5 Feb 89 Tool Info works with LAST_DIR 8 Feb 89 TOOL Info settings (DIRs, COLOR, ICON) are remembered 8 Feb 89 PROJECT Icons get modified ToolTypes & Default Names 13 Feb 89 Posted ffp and f8 versions to PSA ---------------------------------------------------------------- 18 Feb 89 Put _checkMath() into f8 version to exit gracefully 18 Feb 89 Replaced _checkMath with C statement 5 Mar 89 eliminated floating point in amplify and mouse select 5 Mar 89 Split the amplify section off from menu.inc 9 Mar 89 Added Shrink/Expand Gadgets to all the windows Help from Marco P -Thanks- 14 Mar 89 Finished Images,etc for shrink/expand project window 18 Mar 89 Implemented WINDOW= for WBmessage and file save 19 Mar 89 Added WBIconPtr to project 24 Mar 89 Split off functions to work on ToolTypes (tool.inc) 30 Mar 89 Finished AllocTool() & FreeTool() for better support 4 Apr 89 Fixed p_open() to work with startup message or menu 5 Apr 89 WINDOW= string during all opens, saves 9 Apr 89 Updated the comments a little bit (DEFAULT_ -> DEF_ 9 Apr 89 Started JJTsDisplayBeep to replace all the printf 15 May 89 My wife finished her paper, so I can play again 15 May 89 Brought Voice8Header into the JerrysNode structure 15 May 89 Play() looks at Voice8Header to get the volume 16 May 89 Implemented FLUSH= to flush libs/fonts on exit 22 May 89 Samples are played as they get read in 22 May 89 Implemented EDIT_KEEP option 1 Jun 89 Iplemented an OPENSND when program starts 12 Jun 89 Implemented REVISED Flag in the JerrysNode Structure 12 Jun 89 .Voice8Header should really be a pointer to the VHDR chunk 18 Jun 89 Fixed fseek() in iff.c and implemented FileSave if changed 18 Jun 89 Sent a version to Pixelations, to demonstrate ToolTypes -------------------------------------------------------------------- 19 Jun 89 Hacked up Play(), SetUpAudio(), etc to play VolModulated still need to AllocJerrysNode for Volume and set up Volume Body 19 Jun 89 Serious hacking on PlayCursors(), started double buffering 21 Jun 89 There are a lot of Arp functions I would like to use could not find the "C" bindings 'ArpBase.h' so it must wait 23 Jun 89 Changed to ARP library to avoid the FileRequest(),PathName 23 Jun 89 Arp CloseWSafely() saved me 96 bytes of code Arp Create,DeletePort() saved 280 bytes Arp Puts() saved 68 bytes 23 Jun 89 fixed Window Titles were occasionally munged from Save_as 23 Jun 89 Temporarily disabled palette()-should use WorkBench Tool 23 Jun 89 Using Arp saved at least 7.5K of data ~6K of code 24 Jun 89 Removed DEF_DIRs which are not use with ARP 27 Jun 89 Disabled code for infinite Play because of synchronous Play 28 Jun 89 Execute(sys:tools/Palette) to change Screen Colors 8 Jul 89 Changed Screen Depth from 3 to 2 for memory conservation 8 Jul 89 Added a very basic PROJECT_ABOUT window 9 Jul 89 Fixed Scroll Gadget because Play() was word aligning cursors 12 Jul 89 Added some ASM to display() to speed up display 15 Jul 89 Directed Requesters to BackWindow, Execute Req still goto WB 15 Jul 89 Turned off Refresh during FileRequest fixes refresh twice 15 Jul 89 Started to Highlight selection in display() 17 Jul 89 Removed Floatpt from gadget.inc, removed some cases in menu.inc 25 Jul 89 Added ellipsis and general cleanup 27 Jul 89 Added GraphicDump to Print menu option 13 Aug 89 Found error in EDIT_KEEP, now use byteCopyMem() in ASM 20 Aug 89 Now sets the File Comment 23 Sep 89 Now uses the pathname when Extended Selecting icons 24 Sep 89 Huffman Compression works, but not written up as IFF extension 1 Oct 89 Measured 62% to 28% Entropy savings with Delta Huffman code (ave=40%) 4 Nov 89 Restored support of samples with repeatHiSamples, check for compression 14 Nov 89 Added SpinPointer to Busy Pointer 3 Aug 90 After a long spell of school, work, etc I cleaned up SpinTask and changed the implementation of the busy Pointer Program Requirements With an Four Color Screen approximately 100K is required to run the program. You must have ARP.library in LIBS: and you should assign TOOLS: to the directory that the WorkBench palette program is in. (it comes on Disk2 in the Tools directory) assign TOOLS: df0:tools The sounds are played synchronously right now. I will return to asynch when I add in the double buffering. This will allow multiple samples and the samples wouldn't have to be in MEMF_CHIP. (just the buffers will) This will take a week or so of program ming to have Play() as a task and useinterrupts to switch buffers. Hopefully, I can integrate Volume Modulation back in at this time. I am interested in providing sound support to anyone developing an Amiga program. Jerry J. Trantow 1560 A. East Irving Place Milwaukee, Wi 53202 (414) 289-0503 If you are fortunate enough to have an 020-881 combo you can use the version CBTAudio_f8. This will ONLY work with a math chip in the co- processor mode. (i.e. the CMI board which uses a 68000 and a 881 or 882 in peripheral mode will not work) The program supports the WorkBench, I suggest you use extended select (shift key) to start multiple projects. In order to use the defaults in the tool icon you must select it before or with the double click. I check the Tool.info for ICON=fileName Name of default ICON (does not have to be a PROJECT) COLOR=fileName needs to be the peculiar hex file Keith defined. OPENSND=fileName Sound to play when program starts LAST_DIR= last(present) directory used in file requester AUTO_PLAY=Y Plays the sample when it gets opened AUTO_PREF=Y This en/disables the automatic saves to the .info files AUTO_ICON=Y Adds the default Icon if the file doesn't have an Icon DELAY=3 Number of seconds to delay before exiting program (debugging) FLUSH=Y Flushes Libraries and Fonts when exiting WINDOW= Use this to see any debugging messages FONT1=Not implemented Yet FONT2=Not implemented Yet ERROR_BEEP= Not Implemented Yet PLUS_MORE_TO_COME..... I check the Project.info for the following FILETYPE=8SVX WINDOW= Dimensions to open the window with Please check the .info file and customize to your hearts content. Known Bugs I still do a CleanUp() instead of a DisplayError() on Gadget Memory allocations The probablility of this causing a problem is relatively low, but could cause a problem with low memory. First time the program is run and opens a project I lose 24 bytes (a lock?). On subsequent runs this loss does not occur. I have not tracked this down. I had a guru when opening a ~IFF file. I did not track this down yet. Special Thanks To Keith Young (of Access! Fame ) whose file and color requester were blatantly used (until I converted over to the ARP religion). Thanks to Rob Peck for his example on Saving .info information, I still can not believe how easy it was!!! To all the ARP programmers who have done such a wonderful job!