VIC Volume 'click'
Moderator: Moderators
VIC Volume 'click'
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
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
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.
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






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






Here is a very crude Basic program to illustrate how to generate samples:
Notice how notes play for different length, due to I didn't find a formula to time them properly.
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
Anders Carlsson






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