Original Post

I can’t get the noise channel to work properly, all I get is clicking sounds and a constant low humming… What am I doing wrong?

//Use a mid-range frequency
u16 freq = 0x3FF;

//Set the frequency
SND_REGS[5].SxFQH = freq >> 8;
SND_REGS[5].SxFQL = freq & 0xFF;

//Set maximum volume
SND_REGS[5].SxLRV = 0xFF;

//Set the envelope to fade out in about 2 seconds
//Also selects one of the 8 noise types
SND_REGS[5].SxEV0 = 0xF7;
SND_REGS[5].SxEV1 = 0x31;

//Start the sound. No interval (uses envelope)
SND_REGS[5].SxINT = 0x9F;

I’m doing the same for the “normal” channels, and they work fine…

10 Replies

Have you tried other frequencies or taps on the noise generator? Some combinations don’t really create a good sound.

DogP

Heh, my bad… that code actually does work on hardware. I was fiddling with different values that didn’t work, then eventually I only tried stuff in rb, where it doesn’t πŸ˜›

LOL… I was gonna ask if you were trying it on hardware, but figured you knew it doesn’t work right in RB πŸ˜› .

DogP

How does the sound work? I tried finding some documentation on that and wasn’t able to…

All there is to know is in the Official Developers manual (First link in the Documents section)

(You need to be logged in to see it though)

You also need to be a member for 6+ months. I’ll PM the link to you, Jose.


There’s also a convenient (but probably useless to a beginner) quick reference to the relevant I/O (well, technically just “O” ;-)) ports in the Wiki, thanks to yours truly 😎

Nice!

Thanks! :blush:

I really need to get busy putting the rest up, but I didn’t want to just plagiarize the manual–if for no other reason than the typos and slightly “engrish” grammar choices! πŸ˜› Plus, I think the organization could be better.

I could, however, provide my OCR’d version so you could make a new (smaller) PDF, but you’d have to reverse some changes I’ve already made and restore the page headers/footers. PM/email me if you want it… I’ve also got the NVC and VIP sections OCR’d, though the latter hasn’t been completely proofread yet.

I wanted to do the same, so I’d say let’s team up! πŸ™‚

 

Write a reply

You must be logged in to reply to this topic.