Language…
16 users online:  Atari2.0, bradcomp, DanMario24YT,  Deeke, Domokun007,  Donut, drkrdnk, hhuxy, JezJitzu, mathie, Maw, nonamelol1,  Segment1Zone2, SirMystic, synthie_cat,  Telinc1 - Guests: 290 - Bots: 348
Users: 64,795 (2,375 active)
Latest user: mathew

Trouble Creating Samples (Solved)

Hello. I am having trouble creating .BRR samples for song I've been working on. I am making a MIDI file of the instrument I want to use. I always make sure that the MIDI is no longer than 2 seconds. I am then opening the file with OpenMPT. Here, I set the loop length, making sure that both the start and end of the loop are both multiples of 16. I am saving my loop as a wave. Then, I am using snesbrr to convert the wave into a .BRR file. The .brr is never any bigger than 4kb. The .brr is playable, but amk won't insert it. I keep getting an error stating that the BRR file was of an invalid length. I don't understand what I am doing wrong. Can someone point me in the right direction? Thank you in advance.
Your layout is on vacation.
How are you converting the sample to .brr? Do you drag and drop it onto the program or do something else? And did you add the loop header to the .brr with a hex editor (will go into detail when I get the necessary info)?
Fanatical like a Demon
Originally posted by BulzomeGuides
I always make sure that the MIDI is no longer than 2 seconds.

It'll be quite hard to get a decent loop point like this. Try making a note on a C note that's 1 whole note in length. Next export as a wave file. After this, I recommend downloading Audacity and opening the wav file with it.

At the very bottom you'll see some boxes with numbers, make sure that you're checking the wav in samples, not seconds. Now you want to hear the whole note and take an estimate as to where you think it loops. Once you've found that point, click that spot and delete what comes after. If your sample is about 4000-5000 samples in length, don't do anything, that's a decent length. If it's longer, go to Effect and then on the dropdown select Change Speed. Specify the percentage you want to speed up, be aware the more you speed up the note, the less quality the brr will have. Try not going past 100% if you can help it. Once you have that done, check the size of your wav in samples. Make sure the size number is dividable by 16 to assure you get the shortest possible looped sample size. Save and export as a wave file.

Now, another recommendation, download a plugin called C700 (info) for FL Studio (all these downloads are free btw). Follow the instructions on the link I gave you on how to install the plugin once you've downloaded FL Studio. This plugin allows you to make use SNES samples in your MIDI's as well as import waves and export brr files from them. It's easy to use, jx follow the directions and if done correctly, you should have a decent sized sample with the best available quality, it even adds the loop header for you saving time!

EDIT: Masterlink responded while I was writing this, but this is jx what I do and it's really simple and fun making samples with this.
Major thanks to Suika Ibuki for layout!
I'm open for music requests, just DM me on discord and we can further discuss there.
SMAS Soundtrack Status: 100% finished
YI Soundtrack Status: 100%
YI Unsampled Soundtrack Status: 100%
NSMB Soundtrack Status: 7.89%
Killer Instinct Soundtrack Status: 14.63%
SPC Thread
From our family to you, keep your pants dry, your dreams wet, and remember, hugs not drugs.
Since you said you checked that the start loop point was a multiple of 16, that error is almost definitely caused by forgetting the loop header or inserting it incorrectly, as Masterlink said.

If you did insert the header, you probably did it backwards--remember that it needs to be in little endian format (so a loop start value of 1A2B, for example, turns into 2B 1A, which is what you add to the start of the BRR in your hex editor).

If you didn't insert it, then look for this value that SNESBRR outputs:



That is what you'll insert as the header (disregard the 0x at the start). Don't forget to convert it to little endian as shown above. (In this case, 0762 becomes 62 07) Then just insert it with a hex editor at the start of the BRR and you should be good to go.
soundcloud / bandcamp / twitter / buy/stream my EP / buy my touhou music / buy my NEW album!!!
Sorry for the delayed response. I got sidetracked. From the responses, I think I know where I'm going wrong. I haven't been implementing the loop header when converting to .brr. My process for converting wav to brr is as follows. After placing cmd, snesbrr, and my wav in the same folder, I open cmd. I then type the following: snesbrr.exe -e sample.wav sample.brr. I think I'm going to retrace my steps, using the information everyone has provided. I'm pretty sure the loop header is where my problem lies. Although, I am going to make sure I am measuring in samples when exporting my wav. Also, I never thought to use Audacity to edit my wav file. I love that program. Thanks everyone for the responses. I'll get to work and post my results here tomorrow. :)
Your layout is on vacation.
Ah, there's the other issue you're having. When converting a looped sample with snesbrr (assuming your sample is looped), you need to type in cmd:

Code
snesbrr -e -l LLLL sample.wav sample.brr


Where LLLL is the starting loop point in OpenMPT.
soundcloud / bandcamp / twitter / buy/stream my EP / buy my touhou music / buy my NEW album!!!
I set the loop the start at 16 and end at 4760 in openMPT. Then I cicked "save sample" and saved it as a .wav. That results in a 10kb fie that is less than a second long. (I'm probably doing something wrong there). Then, I typed in the following in cmd:

snesbrr.exe -e -l LLLL sample.wav sample.brr

It gave me the following error:

Invalid loop start: LLLL
Missing encoding/decoding mode.
Missing input-file argument.
Missing output-file argument.
Try '--help' for more information.

Maybe I'm misunderstanding something?

EDIT: I typed the following in cmd:

Snesbrr.exe -e sample.wav sample.brr -l 0016 4760

It gave me a different error:

Invalid option: 4760
Missing encode/decode mode.
Try '--help' for more information.
Your layout is on vacation.
The loop end point is the end of the sample. There's only one loop point you can specify.

I recommend using C700 instead of snesbrr though since it has better compression and a better interface.
You only input the loop start, the loop's end is in reality the sample's end, so you need to cut it off there
Alright. I have good news and bad news. The good news is that I successfully got it converted to .brr

(I typed: snesbrr.exe -e -l 0016 sample.wav sample.brr)

The bad news is amk wouldn't accept it. I still got the original error from amk.

Should I try editing the loop header in hex? (As suggested earlier). The loop start offset is 0x09, so I change 09, right? The current value of 09 is 40. What should I change this to?

EDIT: I downloaded c700, but it's just .dll file. The was no .exe file.
Your layout is on vacation.
You don't change anything--you just insert it at the start of the file. Assuming you're using HxD (otherwise I'm not sure but there should still be a similar option) go to Edit>Insert bytes. For the bytecount, put 2, and for the hex values, enter your offset (in little endian, of course), so in your case you would put 09 00. Then just hit OK and save the file.

And also, C700 is a plugin for FLStudio, not a standalone program.
soundcloud / bandcamp / twitter / buy/stream my EP / buy my touhou music / buy my NEW album!!!
I added that with HxD and it worked like a charm. Thanks everyone for helping. Also, thank you everyone for being patient with me. The only thing left to do is change the octave of the sample, but that's an easy fix.
Your layout is on vacation.