Jump to content
Sign in to follow this  
TXG/MNX

raw sample file question

Recommended Posts

Hello,

 

I have a .wav sample I did convert it with openmpt to a .mod file and it works ok. Sound is exactly like the .wav.

 

When I use the sample playback playing the same .wav converted to .raw I get it not to work.

 

I did save it as raw headerless file both signed and unsigned and in 8-bit and 16-bit but the sound is much lower then the original .wav.

Then I did play around with the default playback rate in the _RAPU235.S file but nothing seems to change the output from the sample still sounds the same.

I would asume if I lower or increase the default bitrate I hear a difference in playback.

 

I already talked to Linko about his sound engine but he told me to ask the question here because he didn't know raptor aswell.

 

Maybe there is a limitation on sample playback and samplerate, or my output file isn't converted right. Can someone tell me which tool they use to create the .raw sample files or with which program they save/convert it with so I can do some tests with that.

 

Share this post


Link to post
Share on other sites

The sample rates are defined per sample, in _RAPU235.S. Please consult the Sound Engine manual for their format and the values to use for different frequencies.

 

I use CoolEdit to create samples, 16 khz, signed, 8bit, mono.

Edited by CyranoJ

Share this post


Link to post
Share on other sites

I do know the sample rate was in _RAPU235.S I will try Cooledit to make samples to see it Audicity has issues.

Thanx for this info.

Share this post


Link to post
Share on other sites

I can confirm there is a bug in the RAPTOR_playsample command - this will be fixed in the next release.

Share this post


Link to post
Share on other sites

To get around it for now just do SNDFREQ(channel,frequency) after the SNDPLAY command.

Share this post


Link to post
Share on other sites

To get around it for now just do SNDFREQ(channel,frequency) after the SNDPLAY command.

 

That won't help with the API, only RB+

Share this post


Link to post
Share on other sites

Recently I made a batch file that uses sox to convert any wav file (possible all other types of sound files too) to the format the U235SE likes. I'll try to upload it here once I get home as it took away a lot of the pain of converting samples - it even supports batch conversion!

 

(Note to self: include that in rb+ too kthxbai)

  • Like 1

Share this post


Link to post
Share on other sites

 

That won't help with the API, only RB+

 

oops, I thought I was in the rb+ section lol

Share this post


Link to post
Share on other sites

Hmm, apparently .bat file uploading is forbidden here so just copy/paste the following into a .bat file and drag&drop files to it. It will create a folder named "converted" and place all files there. The sample rate is set to 16kHz so you might want to tweak that to suit your needs.

 
rem Example of how to do batch processing with SoX on MS-Windows.
rem
rem Place this file in the same folder as sox.exe (& rename it as appropriate).
rem You can then drag and drop a selection of files onto the batch file (or
rem onto a `short-cut' to it).
rem
rem In this example, the converted files end up in a folder called `converted',
rem but this, of course, can be changed, as can the parameters to the sox
rem command.

cd %~dp0
mkdir converted
FOR %%A IN (%*) DO sox %%A --channels 1 --bits 8 --encoding signed-integer "converted\%%~nA.raw" --show-progress rate -v 16000
pause

Hope this helps!

 

[EDIT]Of course when I said "I made" I meant to say "I botched up a sample from the sox package", at least I had to read the manual (once!) to look up all the conversion switches to use!

Edited by ggn
  • Like 3

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...