English Amiga Board


Go Back   English Amiga Board > Support > support.Apps

 
 
Thread Tools
Old 28 July 2010, 16:41   #1
Amiga1992
Registered User
 
Join Date: May 2001
Location: ?
Posts: 19,654
Stupid IFF 8SVX sample problem...

I have a ton of samples, mostly coming from the ST-XX disks, and while they run fine in Octamed or Protracker, any other app that supposedly loads 8SVX IFF samples fails with them. I loaded them in a PC converter program and most of these show up as UNKNOWN FORMAT.

How the hell can I fix them all and how? In batch, preferrably.
I tried a sound converter program I found on Aminet but same deal, they show up as UNRECOGNIZED.

Please help :/
Amiga1992 is offline  
Old 28 July 2010, 17:11   #2
StingRay
move.l #$c0ff33,throat
 
StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
Err, ST-XX samples are usually in RAW format, not 8SVX-IFF.
StingRay is offline  
Old 28 July 2010, 18:36   #3
Amiga1992
Registered User
 
Join Date: May 2001
Location: ?
Posts: 19,654
So how should I interpret them?

OK they are RAW, 8-bit. But what sample rate?
And it is Little Endian, right?
Amiga1992 is offline  
Old 28 July 2010, 18:47   #4
thomas
Registered User
 
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 7,026
Quote:
And it is Little Endian, right?
8bits are one byte. There is no endianess in a byte.

The samples are signed (i.e. -128 to 127) and not unsinged (0 to 255).
thomas is offline  
Old 28 July 2010, 21:22   #5
daxb
Registered User
 
Join Date: Oct 2009
Location: Germany
Posts: 3,307
Quote:
Originally Posted by Akira View Post
So how should I interpret them?

OK they are RAW, 8-bit. But what sample rate?
In batch it might be impossible because the samples could have different sample rate. In RAW samples there is no header with informations. Try the usual 16kHz for all. SoundFX can do this but also other sound converter.
daxb is offline  
Old 29 July 2010, 06:04   #6
Amiga1992
Registered User
 
Join Date: May 2001
Location: ?
Posts: 19,654
Yeah let's assume they all have different sample rates (going from 8000 to 16000 Hz from what I have sen): how am I suppose to know or guess this? I will destroy the sample if I choose this wrong.
I really need to try to batch this. Otherwise I have to load them one by one in Protracker and re-save them.
Amiga1992 is offline  
Old 29 July 2010, 08:10   #7
thomas
Registered User
 
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 7,026
Quote:
Yeah let's assume they all have different sample rates
They cannot have different sample rates, otherwise they could not be used in Soundtracker and the like. Soundtracker assumes that all samples have the same rate. It plays them at different rates to get different notes.
thomas is offline  
Old 29 July 2010, 09:50   #8
StingRay
move.l #$c0ff33,throat
 
StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
Quote:
Originally Posted by thomas View Post
They cannot have different sample rates, otherwise they could not be used in Soundtracker and the like.
This is not true, of course the samples can have different sample rates. To quote Lars Hamre (Protracker coder):

Quote:
There are _NO_ standard sample rate for the samples used in modules.
But most often the samples are done on the rate called C-3 (which is
about 16574 Hz if you have a PAL machine). Sometimes drums are sampled
at A-3 (around 28 kHz), and some sounds are at ~8 kHz or anything else
to save space.
StingRay is offline  
Old 29 July 2010, 10:55   #9
Hewitson
Registered User
 
Hewitson's Avatar
 
Join Date: Feb 2007
Location: Melbourne, Australia
Age: 41
Posts: 3,773
Quote:
There is no endianess in a byte.
This isn't true either.
Hewitson is offline  
Old 29 July 2010, 15:06   #10
Amiga1992
Registered User
 
Join Date: May 2001
Location: ?
Posts: 19,654
Yes, what Stingray said.
So what, do I just assume they are all at 16Khz or something? They will all be re-pitched to accomodate.
There has to be a way or a tool that works with RAW files ;(
Amiga1992 is offline  
Old 29 July 2010, 17:02   #11
Rixa
Registered User
 
Join Date: Sep 2007
Location: Tampere / Finland
Posts: 127
No tool can guess the sample rate a raw file has been recorded with. I would think that Soundtracker and the like will just pick a certain rate for all. How about you load a raw sample into Protracker and save it in iff 8svx format. Check the rate of the resulting file. Use the same for everything.

Some or all of them will sound 'wrong' as such, but they'll be wrong in the tracker too and are being compensated for in modules by being played slower or faster.
Rixa is offline  
Old 29 July 2010, 21:23   #12
Photon
Moderator
 
Photon's Avatar
 
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,655
Quote:
Originally Posted by Hewitson View Post
This isn't true either.
Well, he probably meant bits are not jumbled within bytes, like bytes are within words on PC. Shift left still doubles the byte value, so writing a byte with the value 128 sends a 1 to D7, not D0 on the memory bus, whereas with big-endian insanity data lines are grouped and jumbled differently depending on the size of the data.

Anyway, I think someone had made a huge archive with all* ST-xx samples converted to IFF already? Presumably with the guidelines Stingray quoted.

If you doubt your converters, you can open the samples in a hex-editor or file editor - first four bytes should be the ascii "FORM". But it's not very likely converters made to read IFF files fail if that is so. It's much more likely the files are raw.


Edit: apparently big-endian according to Wikipedia is when the small values come at the end of the longword. You may substitute the endianness terms in my post with whatever term you want, main thing is that Intel uses the weird slash insane method of storing stuff in memory and everyone else uses the sane method. I'll check my records and see what the correct term is.

Last edited by Photon; 13 August 2010 at 21:21. Reason: 1 lil 2 lil 3 lil endians
Photon is offline  
Old 30 July 2010, 06:02   #13
Amiga1992
Registered User
 
Join Date: May 2001
Location: ?
Posts: 19,654
I'm really fucking confused by all this. Thanks a lot for your help guys, it's not your fault rather than people not following standards when making filetypes :/

I think I will slim this down to a selection of samples and then I will try to convert them by hand. Theoretically if I open them in Protracker and re-save them as IFF they should get the proper header, right?
Amiga1992 is offline  
Old 30 July 2010, 12:32   #14
daxb
Registered User
 
Join Date: Oct 2009
Location: Germany
Posts: 3,307
Quote:
Originally Posted by Akira View Post
I think I will slim this down to a selection of samples and then I will try to convert them by hand. Theoretically if I open them in Protracker and re-save them as IFF they should get the proper header, right?
Thats a hell of work. So I would first search for st-xx samples in 8svx format. If they don`t exists, use a sampleconverter with a fixed sample rate (e.g. 16kHz). If all fails use the manual method.
daxb is offline  
Old 30 July 2010, 14:56   #15
Amiga1992
Registered User
 
Join Date: May 2001
Location: ?
Posts: 19,654
The problem is that I can't ook for that unless I open them up with some sort of samplevconveter or something, since Protracker just opens everything fine.
I will give a try to th sample converter with fixed rate
Amiga1992 is offline  
Old 30 July 2010, 17:53   #16
daxb
Registered User
 
Join Date: Oct 2009
Location: Germany
Posts: 3,307
I guess that Protracker just load the sample and don`t care about sample rate (maybe RAW load/playback). E.g. you can load a sample record with 44kHz into PT and it will be played to slow with B-3 note. C-1 to B-3 "notes" just equal samplerate (about 4kHz to 27kHz). PT load each filetype (ascii, binary, ...).
daxb is offline  
Old 01 August 2010, 08:45   #17
Rixa
Registered User
 
Join Date: Sep 2007
Location: Tampere / Finland
Posts: 127
In the off chance that this will be of help to you, this shell code should convert all files in current directory into wav format using a tool that I think is installed by default in most Linux distributions. It assumes that everything that is not obviously an IFF file is a signed 8-bit mono raw sample recorded at 16574Hz and appends .wav into the output filename.

Quote:
for file in *; do
if [ "$(head -c4 "$file")" = "FORM" ]; then
sox "$file" "${file}.wav"
else
sox -t raw -r 16574 -b -s -c 1 "$file" "${file}.wav"
fi
done
As discussed above, the rate that the sample has been recorded with can not be deduced from the file and playback rate is determined by the note in the module. I did not read the spec, but also suspect that IFF 8SVX does not record the actual sample rate but an amiga-specific number of ticks between samples. The rate used here is calculated from the C-3 note (214) on a PAL machine like this:

3546895/214 = 16574

But an NTSC machine would play it slightly faster:

3579545/214 = 16726

The only IFF sample on ST-01 is strings6, and converted by sox it becomes the latter so sox may assume NTSC. If you want the NTSC throughout, use 16726 instead of 16574.
Rixa is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
I need An IFF/8SVX and an IFF/ANIM Player for PC searcher request.Apps 24 02 July 2020 12:09
WOW! iff 8SVX audio fatboy Amiga scene 9 16 June 2013 19:28
Looking for good 8svx sounds for game SabreGolly Coders. General 6 04 January 2004 00:44
CD32 Music, IFF 8SVX And Whdload Antiriad Games images which need to be WHDified 15 18 December 2003 10:33
Cybiko 8SVX player in C ant512 Coders. General 2 05 September 2003 09:30

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 17:43.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.12640 seconds with 13 queries