[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference hydra::amiga_v1

Title:AMIGA NOTES
Notice:Join us in the *NEW* conference - HYDRA::AMIGA_V2
Moderator:HYDRA::MOORE
Created:Sat Apr 26 1986
Last Modified:Wed Feb 05 1992
Last Successful Update:Fri Jun 06 1997
Number of topics:5378
Total number of notes:38326

820.0. "8SVX Chunks" by VIDEO::LEIBOW () Fri Oct 16 1987 18:10

    Anybody know where I can get IFFW.c, IFFR.c and the necessary header
    files?  I would like to make a small demo to play sampled sound
    files.
    
    	--Mike
T.RTitleUserPersonal
Name
DateLines
820.1ELWOOD::PETERSFri Oct 16 1987 20:206
    
    	One of the FF disks contains a copy of the IFF info. I will
    find which one and add it to the FF collection on MVCAD3::
    
    		Steve Peters
    
820.2sound editor systemMPGS::BAEDERFri Oct 16 1987 21:244
    also, the sound.arc file contains a pretty good sound editor/player
    no source, but would allow the manipulation (minimal) of the sound,
    and can then save it out as IFF...part of the perfect sound digitizer
    if my memory serves me right..(it often fails me ;-)
820.3strange happeningsVIDEO::LEIBOWSat Oct 17 1987 07:1337
    I have written a small program which will read non compressed 8SVX
    IFF-85 files and play the sound.  I don't think I will nead the
    IFFW or IFFR files anymore, although it would be nice to have them
    for future use.
    
    I came across one weird problem during my audio endeavors, and fixed
    it by accident.  I don't know why the fix works; anyone have any
    ideas:
    
    	The symptom was that the frequency of the sample (playback)
    was to quick.
    
    	ioa_Period = (COLORCLOCK / freq);	/* period of wave */
    
    This is the line that decides how fast the playback should be. 
    ioa_Period is a field of a structure.  It has a type of UWORD. 
    freq is also UWORD.  COLORCLOCK is a constant 3579545L.  When used
    as described here, the playback is about twice as quick as it should
    be.  Now, If I change it to the following:
    
    	ioa_Period = DITZ * (COLORCLOCK / freq);
    
    it works.  The weird part is that DITZ is defined like this:
    
    int	DITZ = 1;
    
    Multiplying (COLORCLOCK / freq) by one should make no net difference.
    
    (COLORCLOCK/freq) should end up as a long, and then converted to
    a UWORD as described in case 1.  (COLORCLOCK/freq) when multiplied
    by the int, should also result in a long.  (the int should have
    been converted to a long)  The final result should have been converted
    to a UWORD.
    
    Either way, I don't see how the result could be different.
    
    
820.4A sexy Amig(c)aVENERE::ZABOTMarco Zabot-Adv.Tech.mgr-Turin ACTMon Oct 19 1987 10:1414
    Mike,
    	would you please upload your 'small' program to playback syntetized
    sounds ??
    	I've always dreamed of adding a sezy voice to Amiga. 
    	'Amiga' is a spanish word for the italian Amica (girlfriend).
    	This word is also used to refer to a woman when you're having
    an affaire. So, when I say to people - I spent a lot of time with
    my Amiga ! - all of them understand - I spending a lot of time with
    my mistress! . That's why I want to add a sexy voice to it ( her??)

    	Using your program will I be able to play back sounds recorded
    using Perfect Sounds ?? ( the same you can find in SOUNDS.ARC )
    
    	Thanx. marco
820.58svx playerVIDEO::LEIBOWMon Oct 19 1987 10:433
    I gotta make some changes to it to make it more "friendly."
    
    I'll release it with my next version of Smokey.
820.6typedef typedef typedefLEDS::HAGERClyde Hager DTN 291-7221Mon Oct 19 1987 17:0128
< Note 820.3 by VIDEO::LEIBOW >
re .3
>    	ioa_Period = (COLORCLOCK / freq);	/* period of wave */
>    This is the line that decides how fast the playback should be. 
>    ioa_Period is a field of a structure.  It has a type of UWORD. 
>    freq is also UWORD.  COLORCLOCK is a constant 3579545L.  When used
>    as described here, the playback is about twice as quick as it should
>    be.  Now, If I change it to the following:
>    	ioa_Period = DITZ * (COLORCLOCK / freq);
>    it works.  The weird part is that DITZ is defined like this:
>    int	DITZ = 1;
>    Multiplying (COLORCLOCK / freq) by one should make no net difference.
>    (COLORCLOCK/freq) should end up as a long, and then converted to
>    a UWORD as described in case 1.  (COLORCLOCK/freq) when multiplied
>    by the int, should also result in a long.  (the int should have
>    been converted to a long)  The final result should have been converted
>    to a UWORD.
    
should should should should should, yes, I agree!
BUT, check out the assembler code the compiler generates and you may be
as disappointed as I was.  The solution I took was to just typedef all
the computational stuff with a typedef around all of it to what I wanted:
    	ioa_Period = (UWORD)(((long)COLORCLOCK / (long)freq));
I forget exactly where the compiler (I'm using MANX AZTEC) blows it, and
I couldn't come up with any general rules other than 'typedef any mixtures
of data types'.  Anybody else out there got any good (simple) rules that
work?
Clyde