9 users online: bulti, DanMario24YT,  Fernap, GabrielJohn, Gasterus155, MaxwelHacks, MirrorReflect, MorrieTheMagpie, yoshi9429 - Guests: 78 - Bots: 152
Users: 66,302 (2,251 active)
Latest user: didi.5482

trouble with custom SFX

I have this:

I really have no idea what im doing when it comes to music ive tried a bunch of stuff I just need it to play the .brr once at boot when the Nintendo logos shows I can provide the .brr if any one wants to just make a .txt file for me as I have also tried that, musical notes are not my forte ill stick with JAVA and C

I have followed Wakanas music porting tut
and how to use custom .brr in SFX

it just beeps it does not play the .brr

Thank You in advance
The biggest confusion stems from the fact that you're confusing the Nintendo Presents (a custom music) with custom sound effects even though they follow a (slightly) different format.


You don't need a sample set just for a single song (especially with a single sample) – they're better for soundtracks.

	@19 $00 $00 $7F $4F $00

This instrument declaration works neither as a custom SFX instrument due to following reasons:
  • The first value specifies the sample source, not what instrument you want to assign. That means, you can enter either the sample directly (e.g. "CustomSfx.brr", what you want to do) or a valid instrument (e.g. @1, what you're unknowingly trying to do here). "Valid" because SMW never assigns a instrument @18 or @19.
  • Speaking of sample source: There are two ways to declare it.
  • Bytes 2, 3 and 4 are fine since they specify your ADSR / GAIN but byte 5 is another problem: I don't think tuning needs to be ever that high (heck, you never even go into double digits.) and it's even lower with longer samples (if played at o4 at least).

#0 ?0 @19

As explained above, instrument @19 is invalid and you never defined. You want to use @30 since that's where custom song sound effects start. The rest is fine.

v127 b 00

This music data is wrong. v127 is fine here but you're playing o4b of a length zero. You typically want to use a whole note (i.e. 1) and presumably add ties (i.e. ^1) if it plays for longer.

We can create a valid music file, sure, but we need your BRR sample.

In other words: It just beeps because you primarily confused music with sound effects.
EDIT: link removed as clearly no one has any intention of helping me with something I dont understand apparently that makes me an idiot and I should be ignored, you told me what I did wrong but not how to fix it

edit: I do have it registered in Addmusic_sample groups and tweaks.asm
i used brrplayer to fine the proper tuning

thank you for breaking it down
*cough* Anywho, I have basically the same question I know that I need to replace whats inside introscreen.txt but I have no idea how to get it to "see" my sample.brr and the musical notation inside the .txts blows my mind I was trying to follow that first tut OP mentioned but I cant figure it out, any help would be appreciated.
Originally posted by ahegil
EDIT: link removed as clearly no one has any intention of helping me with something I dont understand apparently that makes me an idiot and I should be ignored, you told me what I did wrong but not how to fix it

i have absolutely no idea what made you conclude that people missing out on this thread means everyone suddenly thinks you're an idiot and everyone is deliberately ignoring you. if anything you're reducing your chances at getting help if you're gonna be passive aggressive like that, nobody is really obligated to help you.

anyways, taking a look at the brr you provided i was glad to find that it's a valid one. there's not much you need to do other than paste your Groovy.brr sample inside the samples folder (just there, next to EMPTY.brr for instance, no need to put it inside another folder), and edit 30 IntroScreen.txt. for the latter one, this is the mml you want:

	"Groovy.brr" $00 $00 $7f $02 $00

#option smwvtable

#0 ?0 @30
v255 o4 c2

#amk 2

breaking it down here:
  • since you're only using a single sample, there's no need to write anything inside #samples other than "Groovy.brr". when you see things like #default or #optimized inside the #samples label, it's because they're pre-defined sample groups (see Addmusic_sample groups.txt in the main folder).
  • #instruments takes samples from #samples and assigns them their adsr/gain values and their tuning. with $00 $00 $7f i basically made the sample play at full volume immediatly, and gave it a tuning of $02 $00 so it plays at (what i think is) the correct pitch at o4 C.
  • #option smwvtable comes in all original smw songs; it makes the song use the default velocity table, which essentially makes the songs sound a little more quiet (just like in the original game). not much else to say here.
  • the rest is the actual note data (you may know about what most of this does if you read wakana's tutorial but for the sake of being thorough here it is): #0 is the channel; ?0 will make the song not loop (so it plays once, else you'll be hearing GROOVY GROOVY GROOVY until the fade out); @30 is the number of the custom instrument we defined in #instruments (the first one always starts at @30 and then increases to @31, @32, ..., the more instruments you add to the list, here we only have one though); v255 o4 c2 reproduces the instrument at maximum volume, in octave 4, playing a C note for the duration of a half note. since this is more like a sound effect rather than an actual instrument with an identifiable pitch, me choosing to play o4c2 was made more or less just to make the voice sample sound as "normal" as possible.

if you replace your 30 IntroScreen.txt with this code here, it should work without any problems.

Originally posted by MarioFanGamer
"Valid" because SMW never assigns a instrument @18 or @19.

close but it's actually @19 and @20. @18 is perfectly valid.
LINKS Twitter | YouTube | SoundCloud | Fortaleza Reznor
to hear birds and see none.