Language…
8 users online:  Donut, Hidincuzimsmokin, Lady Rozeldix, Mapping_bl, playagmes169,  sincx, worldpeace, Zavok - Guests: 74 - Bots: 309
Users: 55,705 (2,320 active)
Latest user: nigelreg

Is this a desperate or a clever trick?

Hi all,
Over the past few months I have been trying to decide what my first music port should be. Because I've worked with MML before, I wanted to give myself a challenge in AddmusicK, and pick something that not many people have focused on too much for the SPC700. I ultimately decided on a Shovel Knight track, since I love that game's music, and I bet someone could find a use for it in SMW. I'm not basing my port on the original Famitracker version. Instead I'm basing it off a remix which has grown on me and which I think will suit the SPC700 better. i've started the port though it's nowhere near complete yet, so I'm not ready to show it off. Before I get too far into it, I have a decision to make, and I could use some advice.

I once ran out of ram because I got carried away with custom samples. After some pondering I decided the high hat sample I was using could be simulated with noise. So I made that change and after some tuning, it sounds pretty good in the mix. I then thought about messing with my bass and snare drums, which right now take up about 6 K of space. They have a very electronic feel so I want to keep them crisp. If I compress them more it would degrade them too much imho. I know that 6 K isn't that huge, but indulge me for a sec.

I've seen a few Snes tracks, such as gambit's stage in Spiderman and X Men, using noise and a sine wave to simulate a bass drum. If you slow the SPC down you can hear what is going on. This was of course common in prev gen consoles which couldn't do samples well, but I was wondering if this would even be worth considering in AddmusicK as a madman's space-saving technique. Hypothetically it could work. I could make mml strings to play a bass drum or a snare, and then recall them to make actual patterns. Whether it would save space or not is something I don't yet know since it would take a lot more commands to make passable sounds.

Doing that kind of trick seems like it would have a lot of implications though. It's kinda hackery and I wouldn't doubt the dangers of slowdown. Due to my visual impairment I am not really able to play video games, so I haven't messed with roms and emulation at all. If I'm going to try something like that and it ends up working musically, I'd like to at least make sure I know what I'm doing in a practical sense, and find a way to test the sound in-game. I don't really know how to do that yet. As you can probably tell, I get a little carried away with cool toys. :)

I know there are far simpler ways to save space, but I still have to ask! What are your thoughts?
Make more of less, that way you won't make less of more!
Originally posted by musicalman
Hi all,
I once ran out of ram because I got carried away with custom samples. After some pondering I decided the high hat sample I was using could be simulated with noise.

Unless you're using the echo buffer (or #default) it shouldn't be TOO difficult to run out of ARAM. Depending on the song I actually recommend using the FIR Filter. If your echo is 32ms or less (including no delay) you can more or less make a high pass filter/equalizer by adjusting the coefficients. Doing so can allow you to get away with lower quality samples in some cases.

Originally posted by musicalman
I've seen a few Snes tracks, such as gambit's stage in Spiderman and X Men, using noise and a sine wave to simulate a bass drum.

The bass drum is a sample. There are only 5 channels in use and what you describe would require at least 2 channels. Don't see the noise flag at any point either. If you're talking about making a bass kick sample out of a sine wave + noise then sure!

Originally posted by musicalman
I wouldn't doubt the dangers of slowdown.

On an unmodified AMK engine slowdowns are uncommon I believe. There is a #Halvetempo option which is supposed to alleviate that. The only song, in gameplay, I've had that dropped BPMs (occasionally) was one that used Remote Codes somewhat aggressively.

Originally posted by musicalman
I know there are far simpler ways to save space, but I still have to ask! What are your thoughts?


I think your proposal is a step in the right direction. If polyphony isn't a problem then your sine + noise idea is actually decent. The SPC AMK generates is mostly spot on. The most you have to worry about I guess is that Channel 6,7,8 (mostly the latter 2) are sfx channels and if you put a melody there it'll get clipped. Trivial because you can reorder them with little effort.

Code
;#0  some "not important" part
#7 ; Switch with CH 8
c2d2
f+4c+4....
#1
#2
..
..
..

;#7 So important! Why!?
#0 ; Switch with CH 1
a4a8a8b2
b4>c+4....
Originally posted by Brozilla
Unless you're using the echo buffer (or #default) it shouldn't be TOO difficult to run out of ARAM. Depending on the song I actually recommend using the FIR Filter. If your echo is 32ms or less (including no delay) you can more or less make a high pass filter/equalizer by adjusting the coefficients. Doing so can allow you to get away with lower quality samples in some cases.

While this could work, it's a rather unusual workaround and not worth the effort sometimes. This would be more of a last-resort solution; your first bet would be to lower the echo delay.

Some things are correct though. Slowdown, as Brozilla said, is generally caused by remote command abuse, but also more commonly caused by overusing the $E8 command (volume) coupled with high tempo (t70+). #halvetempo has worked very well for me in the past, but you need to make sure to fix some time-based arguments such as the wavelength argument in the vibrato command.


About your question itself, it's a valid solution I suppose, but you need to make sure the way you do it is uses as little space as possible, else you risk increasing the song's insert size by a ton. Also, it's not practical in the sense that you require two channels to do it, unless of course you're either okay with that or already using two percussion channels anyway. #tb{:p}

and happy 4000 to me


Quote
The most you have to worry about I guess is that Channel 6,7,8 (mostly the latter 2) are sfx channels and if you put a melody there it'll get clipped. Trivial because you can reorder them with little effort.

<code>

Not true, channel 6 (#5) is completely SFX-free and safe to use.
LINKS Twitter | YouTube | SoundCloud | Fortaleza Reznor
to hear birds and see none.
Originally posted by Brozilla
Depending on the song I actually recommend using the FIR Filter. If your echo is 32ms or less (including no delay) you can more or less make a high pass filter/equalizer by adjusting the coefficients. Doing so can allow you to get away with lower quality samples in some cases.

This is not true. If you lower the quality of a sample you remove higher frequencies. Increasing those higher frequencies does absolutely nothing, since those frequencies are no longer there.
Hi,
First, thank you both for the discussion and encouragement.
Perhaps I should've been more clear about my Gambit stage example. There is indeed a kick sample in there but there is another kick, starting at about 30 seconds into the track, that plays on channel 4, or 5, not sure if you're thinking of channels starting at 0 or 1. If you slow it down to as slow as Snes SPC700 Player will go, you can hear it starts with a noise sample then immediately switches to a falling sine wave, both on the same channel. I think just with the SMW set you could make some cool dance drums that way with amk. There are several darker waveforms in the smw set that could be used for a synth drum tone with fast pitch bends, and the built-in noise could take care of other elements. Though you'd have to be careful since the noise is loud. Also the noise balance can be a little tricky because interpolation messes with the highs on samples but not the noise. I listen to stuff with Gaussian. If you were to use linear, for example, the noise would sound too quiet in the mix because linear makes the samples brighter, which actually would make a good case for lowering the sampling rate of the drum samples, but I digress...

Your idea of using the fir filter as an eq to boost the highs might work, not necessarily for this case as I'm using the echo to add ambiance which I don't really want to change right now. Though I'm still curious about how you'd set it up. Would you set the echo length to $00? I tried that a while ago and it makes things sound weird. I guess you'd somehow have to output only the echo buffer and not the dry signal, but not sure how to do that or if it can be done in amk.

Later tonight or tomorrow I'll make an attempt to do the synth drums thing with a sine wave and noise and post it. Someone might at least have a good chuckle.
Make more of less, that way you won't make less of more!
Originally posted by Torchkas
This is not true.

Here is an example.
Concept is not too different from Super Street Fighter II.
Basically toggle the echo. Minus phasing (FIR coefficients) it's overall cleaner.
Seeing as you're already using echo legitimately don't worry about it but in the future if you use EDL 0 then you'll want a lower MVOL, lower global volume or just cut the MVOL altogether and just play through EVOL.

Originally posted by MaxodeX
Not true, channel 6 (#5) is completely SFX-free and safe to use.

Thought Yoshi drums played there? Don't know how those work anyway :P
@Brozilla: Yoshi drums are part of the main music which only gets activated if you ride Yoshi and thus are technically not a sound effect, not to mention that with AMK you can even chose the channel where Yoshi drums play.
You should make sure your ports sound as intended with the SNES Gauss Table interpolation, as that's the "default" interpolation on the SNES and the one 99% of listeners have their SPC Player set to. (i use cubic spline, oops.)

You can output just the echo buffer instead of the dry signal. AFAIK that's what Torchkas did on his Abstract Map composition for VLDC9 (that vaporwave one), and I think he did that by messing with the MasterLv.


Originally posted by Brozilla

I'm pretty sure those samples already have high frequencies they can increase.

Quote
Thought Yoshi drums played there? Don't know how those work anyway :P

Literally only in the original songs. You need a special command to trigger Yoshi drums, and even then the channel is completely silent until you ride a Yoshi, which is entirely different from how channels 7 and 8 work.
LINKS Twitter | YouTube | SoundCloud | Fortaleza Reznor
to hear birds and see none.
Originally posted by MaxodeX
You can output just the echo buffer instead of the dry signal. AFAIK that's what Torchkas did on his Abstract Map composition for VLDC9 (that vaporwave one), and I think he did that by messing with the MasterLv.

DSP write the MVOL of one or both channels.
Code
$F6 $0C $XX ; $Command $Register $Value
$F6 $1C $XX ; 0C MVOL L, 1C MVOL R, XX = 8-bit signed hex, 80-7F


Originally posted by MaxodeX
I'm pretty sure those samples already have high frequencies they can increase.

Perhaps it came across as wrong but if you have poop it'll essentially be poop unless you're an alchemist.
They are 16000hz, I could lower them if it'll help get the point across better.
Well, I've been playing around for a bit and have something to show for it. But first a question.

Originally posted by MaxodeX
About your question itself, it's a valid solution I suppose, but you need to make sure the way you do it is uses as little space as possible, else you risk increasing the song's insert size by a ton.


This might be an ignorant question but how do you find the insert size? So far I've been using the -norom command and just generating spcs. What is the correct way to know what the insert size would be for putting into a rom?

And now the results of my playing around trying to make drum sounds with a single sample and noise. I managed to get a fairly decent thumpy kick and a hat with one channel, but had to use two for the snare. I tried to optimize as much as possible, though I am no expert so I may be doing something stupid. It isn't much other than a proof of concept really, but have at it.

Code
#SPC
#amk 2

{
}

t48

#instruments
{
n1e $00 $00 $5f $00 $00 ;kick noise
@0 $9f $bf $00 $03 $00 ;kick tone
@0 $cf $7f $00 $03 $00 ;snare tone
n1e $ff $37 $7f $00 $00 ;snare noise
n1f $ff $19 $7f $00 $00 ;hat
}

;Drum Definitions, each is a 16th note in length:
"K=o1 @30 c192 @31 $ec $00 $07 $e0 g32^64^96" ;kick tone
"S1=o3 @32 $ec $00 $02 $d4 g16" ;snare tone
"[email protected] c16" ;snare noise
"[email protected] c16" ;hat

#0 l16 @16
/[K ^ H ^ S1 ^ H ^]4
[K ^ H ^ S1 q79 H ^ H ]4

#1 l16 @16
/[r4 S2^8.]4
[q79 ^ H ^ H q7f S2^ H^]4


Would I use this over sampled drums? Probably not right away, at least not the snare. But the kick and hat might work. And I suppose if you don't have room for a cymbal, the noise could suffice in a pinch but... meh.
Make more of less, that way you won't make less of more!
Originally posted by musicalman
This might be an ignorant question but how do you find the insert size? So far I've been using the -norom command and just generating spcs. What is the correct way to know what the insert size would be for putting into a rom?

You must insert the song into a SMW ROM with AddmusicK. You could do what most porters do and simply use a testing, expanded ROM for cases like this (aka you don't need an actual hack you may be working on or something). When you insert it, you should see this, and the red box shows the insert size of your port.

Also, using AMKGUI is pretty quick when it comes to porting because there's a "porter mode", where AMK quickly reads a .txt and generates an SPC of the selected song without even needing a ROM. This doesn't show you insert size, though. #tb{>:(}


And what you have there seems fairly well optimized and practical (especially with the custom labels).
One thing is that you could try placing the legato command ($F4 $01) for extra smoothness in the kick, like this:
K=o1 @30 $F4 $01 c192 @31 $ec $00 $07 $e0 g32^64 $F4 $01 ^96
Other than that it seems to be going alright, although if you're gonna use two channels anyway I'd recommend you use both. #tb{:]}
LINKS Twitter | YouTube | SoundCloud | Fortaleza Reznor
to hear birds and see none.
Regarding insert size, I will have to try that once I have a completed thing to test with. I thought there was a super easy way to do it for porters or something...
I also tried putting in the legato command as you suggested. In fact i was going to do that for the snare originally, but because there is more overlap between the tonal and noise parts of a typical snare sound, I sort of figured out that 1 channel wouldn't be enough unless you use a custom sample. So I basically thought, ah well if I *must* use two channels to get that sound, might as well use the second one as little as possible. Lol

I'm not sure if I can hear a difference with smoothness using the $f4 $01 command, since 192 is iirc pushing the resolution of the nspc engine. Whether legato would influence the smoothness of that part of the sound is something I don't really know. I'm still not sure whether I'm completely sold on the whole idea. The main purpose of this topic was to have some discussion on it, which I've definitely accomplished. It'd be an innovative way to do drums on a non-sampled port I guess.
Make more of less, that way you won't make less of more!
Originally posted by musicalman
I'm not sure if I can hear a difference with smoothness using the $f4 $01 command,

Done correctly then yes it's possible. Using such fine durations it's best to have as little "quantization" between notes as possible (note's aren't rekeyed with legato.) If audio clipping is minimal or doesn't occur you can also remote code to prevent key offs.

Maybe certain wonky electronic snares will work but due to the nature of it I don't believe you can get a decent/"natural" snare with such practice.

Took another look at Gambit stage, pausing it at the correct time and it is Source 15 --> Source 0 with drums on CH5.
Agreed. In the end I decided to downsample my kick sample and apply a quick pitch bend to the attack to give it more sharpness. That sharp attack is the main reason I didn't want to downsample the kick, but the pitch bend should take care of that. For the snare, I will leave the sample as is because I like how it sounds, and it's about 3 K. I don't think that's too bad.
Make more of less, that way you won't make less of more!