FM synth BRR sample generator

Discussion of hardware and software development for Super NES and Super Famicom. See the SNESdev wiki for more information.

Moderator: Moderators

Forum rules
  • For making cartridges of your Super NES games, see Reproduction.
psycopathicteen
Posts: 3140
Joined: Wed May 19, 2010 6:12 pm

Re: FM synth BRR sample generator

Post by psycopathicteen »

I implemented all 8 algorithms but I'm having a quantization noise problem with algorithm 7. In order find the BRR "range" I just added up the carrier volumes, and counted the number of 0 bits at the top. If you have several carriers that are slightly detuned they could cancel each other out, which would turn into a square wave with only 4 bit samples. I guess I just have to find the BRR range by checking each sample individually.
User avatar
Augustus Blackheart
Posts: 61
Joined: Sat Jul 26, 2014 9:50 am

Re: FM synth BRR sample generator

Post by Augustus Blackheart »

psycopathicteen wrote:I implemented all 8 algorithms...
I'm looking forward to hearing what that sounds like.

I made this test awhile ago using the original code you posted... I just dropped your code into the middle of the SNESMod vibrato routine. 4xy: x = vibrato speed and carrier frequency, and y = vibrato depth and modulation frequency; but only when the vibrato waveform is $08-$0f. <$08 is just vibrato waveforms. Each time the song repeats the FM waveform is changed.

Channel 1: FM waveform echo

Channel 3+5 FM waveform
Channel 4+6 2nd waveform (pitch modulation enabled)

carrier frequency = #$02
modulation frequency = #$04

I was working on a ROM that would allow you to change various settings maybe I'll dig that up.

Also, it's weird that .spc extension is not allowed.
Attachments
fmtest.bin
(64.5 KiB) Downloaded 152 times
psycopathicteen
Posts: 3140
Joined: Wed May 19, 2010 6:12 pm

Re: FM synth BRR sample generator

Post by psycopathicteen »

Can BIN be directly used as an SPC file?
93143
Posts: 1715
Joined: Fri Jul 04, 2014 9:31 pm

Re: FM synth BRR sample generator

Post by 93143 »

I just saved it as an SPC file, and it worked.
User avatar
Bregalad
Posts: 8055
Joined: Fri Nov 12, 2004 2:49 pm
Location: Divonne-les-bains, France

Re: FM synth BRR sample generator

Post by Bregalad »

I tried to play it with both of my SPC players and it sounded awful in both. Is this due to an emulation inacuracy or is it supposed to sound like this ?
User avatar
Augustus Blackheart
Posts: 61
Joined: Sat Jul 26, 2014 9:50 am

Re: FM synth BRR sample generator

Post by Augustus Blackheart »

Bregalad wrote:I tried to play it with both of my SPC players and it sounded awful in both. Is this due to an emulation inacuracy or is it supposed to sound like this ?
It doesn't sound great. I noticed playback varied a lot on each SPC player I tried. After real hardware it probably sounded the best on SPCPlay.

Due to limited RAM I'm only using two BRR blocks. How good it sounds depends on the waveform selected and settings used. The ramp up and ramp down waveforms probably sound the worst unless you are looking for a super glitch-y sound.

I've attached another test and a song, although they probably do not sound much better.
Attachments
other-test.spc.bin
Channel 1 & 3 are a saw waveform
Channel 2 is the fm synth
(64.5 KiB) Downloaded 141 times
song.spc.bin
(64.5 KiB) Downloaded 143 times
song.mp3
(2.06 MiB) Downloaded 186 times
psycopathicteen
Posts: 3140
Joined: Wed May 19, 2010 6:12 pm

Re: FM synth BRR sample generator

Post by psycopathicteen »

The first half sounds awesome though
User avatar
Drew Sebastino
Formerly Espozo
Posts: 3496
Joined: Mon Sep 15, 2014 4:35 pm
Location: Richmond, Virginia

Re: FM synth BRR sample generator

Post by Drew Sebastino »

Augustus Blackheart wrote:It doesn't sound great.
What is causing this? It sounds like an electronic voice crack at 22 seconds in.
Last edited by Drew Sebastino on Tue Mar 28, 2017 5:19 am, edited 1 time in total.
Optiroc
Posts: 129
Joined: Thu Feb 07, 2013 1:15 am
Location: Sweden

Re: FM synth BRR sample generator

Post by Optiroc »

Wow, this is awesome!
User avatar
Augustus Blackheart
Posts: 61
Joined: Sat Jul 26, 2014 9:50 am

Re: FM synth BRR sample generator

Post by Augustus Blackheart »

Here's another example (made during a shocking international incident). There's one version with FM and pitch modulation, it's used starting one minute into the song, and one version with pitch modulation only.
Attachments
Augustus Blackheart - Lengi lifi ananas-pizzan - Orsök.bin
with FM (change extension to spc)
(64.5 KiB) Downloaded 137 times
Augustus Blackheart - Lengi lifi ananas-pizzan - Orsök-no-fm.bin
without FM (change extension to spc)
(64.5 KiB) Downloaded 120 times
Post Reply