SuperDisk / hUGETracker

The music composition suite for the Nintendo Game Boy
https://superdisk.github.io/hUGETracker/
271 stars 11 forks source link

Sine-like vibrato (or vibrato that goes both up and down) #35

Open lydianchord opened 3 years ago

lydianchord commented 3 years ago

I've noticed that the 4xy vibrato effect doesn't seem to work properly on the wave channel. When I try to use it, it just shifts the pitch up and down once and then keeps the pitch constant. In comparison, I know XPMCK's vibrato effect works on the Game Boy's wave channel as well as the pulse channels, but I'm not sure if it's doing anything specific to make it function the same way in both cases.

(I really like the overall design of hUGETracker so far! Thanks for working on this!)

SuperDisk commented 3 years ago

That shouldn't be the case-- the vibrato effect seems to work for me. Be sure you're choosing a vibrato waveform that isn't too long-- if that's the case then you might get an effect like you described. HT's vibrato isn't quite like ProTracker's or FastTracker's. The first parameter is actually a waveform selector rather than a frequency like in MOD or XM.

Double-click the vibrato effect to see all the possible waveforms. Try the effect 443, it works for me in the wave channel.

lydianchord commented 3 years ago

Here's what 443 sounds like on the wave channel for me (it also sounds like this when I export it):

https://user-images.githubusercontent.com/10644362/105936407-397eeb00-6019-11eb-93bb-8cd88b48f902.mp4

SuperDisk commented 3 years ago

Oh, ok. The intended use of vibrato is to have it in every cell in which you want vibrato. Try this (copy and use Shift+V to flood paste!): image

lydianchord commented 3 years ago

Oh, I see! I incorrectly thought it worked differently on the pulse channels for some reason, but that's probably because I only tried it on shorter notes. Still, other than requiring a flood paste, it's definitely different from other trackers' vibrato effects I've used because it seems like the patterns only allow alternating between the original pitch and a higher pitch (which I think is technically a trill and not a vibrato) instead of moving the pitch in a sine or triangle wave pattern above and below the original pitch.

If 4xy is currently behaving as intended, would it be possible to add a new effect like what I described?

SuperDisk commented 3 years ago

Yeah, it's a little quirky. The E4x command in MOD/XM lets you choose a square vibrato wave as well, which is similar to what HT has. The technical reason for this is because to implement a sine wave, I'd need to store a sine table in ROM which would be fairly big, and implement code to index into it based on frequency-- the current "waveform selection" thing is actually just a number that is ANDed with the counter to choose how frequently the pitch changes, which is a lot simpler and I think the approximation sounds about as good, especially with the rudimentary timbres that are being played.

Do you mind if I close this issue because you got the problem resolved? If there's anything else you need help with please feel free to ask here or contact me on discord (superdisk#5726)

lydianchord commented 3 years ago

Got it. Yes, my original problem has been resolved since it was mostly just a misunderstanding on my part. That said, would it be feasible to add a setting to make the square wave vibrato go above and below the original pitch (or would that be something that's possible to do through custom routines)? I'd still like to be able to make a "flute" sound like the one on the Pokemon GSC soundtrack: https://www.youtube.com/watch?v=Pk4azyKVJJA

SuperDisk commented 3 years ago

Just for kicks I did the first bit of that song in HT just to see how it would sound. I don't think it's that far off actually, but I can see what you mean a little bit. The wave goes up and down in the real thing: https://www.youtube.com/watch?v=uvyEvSv_aMA

nationalpark.zip

I'll take a look at what I can do.

bryc commented 2 years ago

I tried to recreate a song originally done in Deflemask, and the vibrato just doesn't sound as good or lively in comparison. uge file for reference.

https://user-images.githubusercontent.com/1408749/148035724-b6baeb3b-3f45-41f3-9d01-9a21b7995f03.mp4

I understand the square wave vibrato method might be exactly how early NES/GB sound drivers do it, and fits the goal of HT being fast and compact, but it leaves so much to be desired in terms of expression. The loss of modern effects means it's like having to use an outdated NES driver instead of a fully featured modern one. We should be limited by the soundchip, not the driver.