Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
 Welcome to our latest new user maak ! (Registered 2024-04-18) You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > Scaled vibrato strategies?
2014-05-16 19:58
tlr

Registered: Sep 2003
Posts: 1702
Scaled vibrato strategies?

Do anyone of you have any good fast/compact vibrato strategies to share?

I'm aware of the basic difference from the neighbouring note technique but that is usually implemented in a slow way.

I'd like some pointers for more efficient stuff.
(Object code is fully acceptable)
 
... 8 posts hidden. Click here to view all posts....
 
2014-05-17 17:06
chatGPZ

Registered: Dec 2001
Posts: 11100
imho you *want* the vibrato being slightly out of tune - as that greatly contributes to the sound. its somewhat like tuning a 12 string guitar... with the secondary string being perfectly in tune with the first, it just sounds dull and non interesting :=P
2014-05-17 17:08
Soren

Registered: Dec 2001
Posts: 547
Oh yes, reminds me. My simple look-up method also allows me to shape the vibrato, if that wasn't clear from what I wrote.
Sometimes a square shaped vibrato can be a nice thing. Afair some of the grand old computergame composers also did that.
Normally I try to shape vibratos a bit towards a sine wave.
2014-05-17 17:21
chatGPZ

Registered: Dec 2001
Posts: 11100
uhm isnt a square shaped vibrato basically an arpeggio? :)
2014-05-17 18:00
Dane
Account closed

Registered: May 2002
Posts: 421
The fastest way is definitely to use finetune (add to frq)-tables that loop. The downside is you'll need different tables depending on what note you're on, but if you're not that fussed and want to save rastertime...
2014-05-17 18:12
tlr

Registered: Sep 2003
Posts: 1702
@mixer, groepaz: I guess it depends on the speed of the vibrato. If the vibrato is really fast I think you will notice, although it may be desired like groepaz says.

On synthesizers, at least older analog ones, vibrato is almost always implemented as linear modulation.

@stein: Good point about guitar vibrato. Guitars are very interesting control-wise as the modulation approach is very direct to say the least. It would be interesting to see what kind of frequency modulation curve a normal vibrato run gives.
2014-05-17 18:27
chatGPZ

Registered: Dec 2001
Posts: 11100
<nitpicking>that "e-guitar vibrato" is btw often referred to as "pitch bending", not only because it is more extreme, but also because it is not centered around the base frequency :)</nitpicking>
2014-05-17 18:37
Hein

Registered: Apr 2004
Posts: 933
Quote: Both are interesting.

If I understand hein correctly from my quick look he calculates the add value from the table msb.
$00-$5f = 00<msb>, $60-$bf = <msb>00.

Assuming that gets close to the desired widths it's very clever.

I'm a bit confused about what the optimal tracking for width would be. Is it proportional to the difference to the neighbouring note or is it proportional to the actual frequency?

Also, what do you do if the note changes during the vibrato? An add/sub approach with scaling can get lost in such cases?

I've also gone for a vibrato table approach btw, though mine is a bit more focused on flexibility than speed/size.


The msb is also the lsb indeed (00<msb>) and resulting indices (basenote + depth) $60-$bf give me 16bit frequency add/sub values <msb><lsb>.

The scale will change if the base-note changes, but it's true that for glide (for instance c-3 to c-5), the scale will not change until the base-note (c3) is reset to a new one, for instance with a tie-note or after a glissando command has reached it's target note (c5). The new base-note is the new 0 point from where the add/sub values are fetched from the frequency tables.

I'm not sure what you mean by optimal tracking for width.
2014-05-17 18:53
tlr

Registered: Sep 2003
Posts: 1702
By optimal tracking I was thinking that the difference would have a different slope compared to straight frequencies, but I realize that I've totally forgotten my derivatives. :)
                (note/12) 
f(note) = f0 * 2
                        (note/12)
f'(note) = f0 * ln 2 * 2

i.e the difference between any notes a constant distance appart is always proportional to the note halfway between those.

Doing like Hubbard and subtracting just one note away is not 100% accurate though but I guess it doesn't matter.
2014-05-17 20:00
Hein

Registered: Apr 2004
Posts: 933
You can recalculate the slope each frame based on your current frequency and the upcoming frequency, but than it has to be 100% accurate without rounding errors, else your vibrato will detune after a few seconds, I suppose.

In my routine a glide-up can start with an add value of 3 cents each frame, but once it's at the target-note, those 3 cents may have shrunk to a mere 1 cent. :)
2014-05-18 10:17
Frantic

Registered: Mar 2003
Posts: 1627
Just to give some ideas:

If you use flooring when calculating the 16 bit freq values instead of standard rounding you find that the frequency table will actually wrap around nicely, so you can use frequencies in the "lo byte table" for higher values in the hi byte table. (eh.. hard to explain.. tired today). If you look at the commented out lines at the end of the hi byte table you'll see that they are the same as the first lines in the lo byte table, so no need to duplicate them.

So.. first of all, that saves a little bit of RAM since you can use some of the table data both for hi byte values and lo byte values. Then you can also add a bunch of zeroes before the table, to be able to pick sub note values with desired granularity. (e.g. for each octave down in the table you'll have a value that is divided by two, four, eight, etc..) Of course you could also replace the table of zeroes with code that just does a "lda #0" in those cases, to save some table space at the cost of some additional code.

...and you could insert an additional intermediate table to pick a more intelligent set of finetune/vibrato offsets from the freq list. Maybe this way of organizing the tables gives some ideas.. Or not? :) Approaches to vibrato that uses tables run into the problem of extended tables, so I suppose ways of making the tables more compact can be valuable.

(Btw.. the table below was just something I found in an old code file. I don't remember exactly what settings I used for the calculation, so it might be that each octave doesn't even start with a C or such. I post it mainly to illustrate the idea.)

freq_finetunehibytes:
	.byte $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00	; oct0
	.byte $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00	; oct1
	.byte $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00	; oct2
	.byte $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00	; oct3
	.byte $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00	; oct4
	.byte $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00	; oct5
	.byte $00,$00,$00,$00,$00,$00,
freq_hibyte:	;floored
	.byte $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00	; oct0
	.byte $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00	; oct1
	.byte $00,$00,$00,$00,$00,$00,$00,$00,$01,$01,$01,$01	; oct2
	.byte $01,$01,$01,$01,$01,$01,$01,$01,$02,$02,$02,$02	; oct3
	.byte $02,$02,$02,$03,$03,$03,$03,$03,$04,$04,$04,$04	; oct4
	.byte $05,$05,$05,$06,$06,$06,$07,$07,$08,$08,$09,$09	; oct5
	.byte $0a,$0a,$0b,$0c,$0d,$0d,$0e,$0f,$10,$11,$12,$13	; oct6
	.byte $14,$15,$17,$18,$1a,$1b,$1d,$1f,$20,$22,$24,$27	; oct7
;	.byte $29,$2b,$2e,$31,$34,$37,$3a,$3e,$41,$45,$49,$4e	; oct8
;	.byte $52,$57,$5c,$62,$68,$6e,$75,$7c,$83,$8b,$93,$9c	; oct9
;	.byte $a5,$af,$b9,$c4,$d0,$dc,$ea,$f8
freq_lobyte:	;floored as well
	.byte $29,$2b,$2e,$31,$34,$37,$3a,$3e,$41,$45,$49,$4e	; oct0
	.byte $52,$57,$5c,$62,$68,$6e,$75,$7c,$83,$8b,$93,$9c	; oct1
	.byte $a5,$af,$b9,$c4,$d0,$dc,$ea,$f8,$06,$16,$26,$38	; oct2
	.byte $4b,$5e,$73,$89,$a1,$b9,$d4,$f0,$0d,$2c,$4d,$71	; oct3
	.byte $96,$bd,$e7,$13,$42,$73,$a8,$e0,$1b,$59,$9b,$e2	; oct4
	.byte $2c,$7b,$ce,$27,$84,$e7,$51,$c0,$36,$b3,$37,$c4	; oct5
	.byte $59,$f6,$9d,$4e,$09,$cf,$a2,$81,$6d,$67,$6f,$88	; oct6
	.byte $b2,$ed,$3a,$9c,$13,$9f,$44,$02,$da,$ce,$df,$11	; oct7
	.byte $64,$da,$75,$38,$26,$3f,$89,$04,$b4,$9c,$bf,$22	; oct8
	.byte $c8,$b4,$eb,$71,$4c,$7f,$12,$08,$68,$38,$7f,$45	; oct9
	.byte $90,$68,$d6,$e3,$98,$ff,$24,$10
Previous - 1 | 2 - Next
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
RadMan/TSM
Guests online: 57
Top Demos
1 Next Level  (9.8)
2 Mojo  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Comaland 100%  (9.6)
6 No Bounds  (9.6)
7 Uncensored  (9.6)
8 Wonderland XIV  (9.6)
9 The Ghost  (9.6)
10 Bromance  (9.6)
Top onefile Demos
1 It's More Fun to Com..  (9.9)
2 Party Elk 2  (9.7)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.5)
5 Rainbow Connection  (9.5)
6 TRSAC, Gabber & Pebe..  (9.5)
7 Onscreen 5k  (9.5)
8 Dawnfall V1.1  (9.5)
9 Quadrants  (9.5)
10 Daah, Those Acid Pil..  (9.5)
Top Groups
1 Oxyron  (9.3)
2 Nostalgia  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Crackers
1 Mr. Z  (9.9)
2 S!R  (9.9)
3 Mr Zero Page  (9.8)
4 Antitrack  (9.8)
5 OTD  (9.8)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.055 sec.