VIC Volume 'click'

Modding and Technical Issues

Moderator: Moderators

User avatar
Victragic
Frogger '07
Posts: 605
Joined: Tue Nov 14, 2006 5:56 pm
Location: South Australia

VIC Volume 'click'

Post by Victragic »

As my VIC chip is semi-fried (though I have sourced a backup) I can't answer this one for myself...

When you change the volume bits on 36878, is it normal to get an audible 'click' through the speaker?

If so, does this render any musical effect that requires volume adjustment ineffective? (eg reverb, simple ADSR..)

-G
3^4 is 81.0000001
carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

Post by carlsson »

Yes, it should click. Some VICs (or at least connected through RF modulators) click more than others. Usually it is not too audiable when used as an ADSR effect.

However, it has a bonus side effect: By altering volume quickly, you can play 4 bit samples. All (?) sample based players achieve this by altering volume.
Anders Carlsson

Image Image Image Image Image
User avatar
Jeff-20
Denial Founder
Posts: 5759
Joined: Wed Dec 31, 1969 6:00 pm

Post by Jeff-20 »

I would love to hear an example of sampling. Would viznut's robotic liberation be one?
High Scores, Links, and Jeff's Basic Games page.
Boray
Musical Smurf
Posts: 4064
Joined: Mon May 03, 2004 10:47 am

Post by Boray »

PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)
Wonder-Boy
Vic 20 Enthusiast
Posts: 187
Joined: Wed Sep 13, 2006 3:04 pm

Post by Wonder-Boy »

carlsson wrote:By altering volume quickly, you can play 4 bit samples. All (?) sample based players achieve this by altering volume.
How does altering volume quickly make a sample be heard? I don't understand this.
6502dude
megacart
Posts: 1581
Joined: Wed Dec 01, 2004 9:53 am

Post by 6502dude »

carlsson wrote: All (?) sample based players achieve this by altering volume.
Is this the effect you use with the Multicart song with your custom player?
Image Mega-Cart: the ultimate cartridge for your Commodore Vic-20
carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

Post by carlsson »

The actual click in 16 levels of volume makes it sound like a wave when altered fast enough. It takes a lot of memory to play long samples, which is why it is not commonly heard on the VIC-20.

Aleksi Eeben a while ago released a SID emulator for the VIC-20 which as far as I understand generates a "volume" sample on the fly, emulating three voices no less.

And no, my music player does not make use of any sampled sounds. Adam Klotblixt though already in 1996 wrote a sampled based music player, somewhat along the same principles as Aleksi but using simpler 256 byte long samples. Adam's player was never used in VVV demo, as it uses almost 100% of the CPU time and it would not be possible to have a single visual effect to go with it.
Anders Carlsson

Image Image Image Image Image
carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

Post by carlsson »

Here is a very crude Basic program to illustrate how to generate samples:

Code: Select all

1 V=36878:DATA1,1,1,5,3,3,3,6,5,5,3,3,1,-1
2 READB:IFB=-1THENEND
3 FORI=1TO25+B*5:POKEV,15:FORC=1TO8-B:NEXT
4 POKE V,0:NEXT:GOTO2
Notice how notes play for different length, due to I didn't find a formula to time them properly.
Anders Carlsson

Image Image Image Image Image
Wonder-Boy
Vic 20 Enthusiast
Posts: 187
Joined: Wed Sep 13, 2006 3:04 pm

Post by Wonder-Boy »

Cool! But it is not a sample in the sense that it is a recorded sound that is played back. Do you mean that it is possible to use this technique to translate a sampled sound into a program for Vic-20 and then when the program is run the Vic-20 plays the sound back?

PS Bellman rules
bbell
Vic 20 Hobbyist
Posts: 125
Joined: Thu Mar 10, 2005 7:43 am

Post by bbell »

You can get an idea of this trick using the Tape Tone program, here is the link if you can transfer from the internet to a VIC:

http://sleepingelephant.com/denial/wiki ... e_Toon.prg

If you want to type it in to a VIC, the listing is here:
http://sleepingelephant.com/denial/wiki ... apeton.gif

To use it, load the program and run it.

Type "sys 7424".

Then type the command "tape"

This program will play any tape in the cassette deck through the volume register. Try a music tape for interesting results, especially that with lots of clear tones, like classical music or simple vocals.
Boray
Musical Smurf
Posts: 4064
Joined: Mon May 03, 2004 10:47 am

Post by Boray »

Wonderboy wrote:Cool! But it is not a sample in the sense that it is a recorded sound that is played back. Do you mean that it is possible to use this technique to translate a sampled sound into a program for Vic-20 and then when the program is run the Vic-20 plays the sound back?

PS Bellman rules
Didn't you see my link?
PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)
Wonder-Boy
Vic 20 Enthusiast
Posts: 187
Joined: Wed Sep 13, 2006 3:04 pm

Post by Wonder-Boy »

@bbell
I will try that when I get the chance

@Boray
Yes I saw your link but I have never used expansion memory so I didn't bother with it but maybe later
Boray
Musical Smurf
Posts: 4064
Joined: Mon May 03, 2004 10:47 am

Post by Boray »

That's a problem with samples... they need memory ;) But I think I actually used one byte per sample so it should be possible to make 4-bit samples twice as long as mine...
PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)
User avatar
Victragic
Frogger '07
Posts: 605
Joined: Tue Nov 14, 2006 5:56 pm
Location: South Australia

Post by Victragic »

I'm interested in this - approx how long a sample would you get in say.. 8k of memory?

(Assuming 2x 4-bit samples per byte, of course..)

Also, what's the best way to get the sample into the VIC?? Through a cassette as per the type-in prog above? Or is it best to manipulate a sound file through a PC?

-Glen
3^4 is 81.0000001
Boray
Musical Smurf
Posts: 4064
Joined: Mon May 03, 2004 10:47 am

Post by Boray »

That depends entirely upon what sampling frequency you use (samples per second). The best way is probably to take a sound file on a PC and convert it.

(I made a tape sampler on the C64 once... but you can only get 1 bit samples that way and it sounds really horrible)
PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)
Post Reply