Sound Effects

Basic and Machine Language

Moderator: Moderators

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

Sound Effects

Post by Jeff-20 »

Page 138 of the VIC User Guide, #19 Door Opening seems to have a typo? It that correct? It sounds nothing at all like a door opening!

I also want a few sound effects not included in the guide. Can anyone help me? I want a single gun shot, a better door opening or gate opening sound, and maybe even a "squash" sound.
High Scores, Links, and Jeff's Basic Games page.
drvanthorp
Vic 20 Newbie
Posts: 10
Joined: Fri Oct 10, 2008 12:52 am

Post by drvanthorp »

Gunshot is usually a loud short burst of white noise. An rapidly fading echo/reverb might make the gunshot sound more realistic.
Legacy
Vic 20 Enthusiast
Posts: 154
Joined: Wed Dec 31, 2008 4:01 pm

Post by Legacy »

i tried jeff this is the closest i can get to a door opening for now. I talked to noice today about the sound in his demo, and he says orb did that i was checkin out thier program in assembley its amazing, but i think i know how viz creates the bass for robotic liberation.... :shock: , anyways, this is the door opening, enjoy!

its supposed to simulate the open sound of latch and the creaking of opening, i tried to match it with the sample i found online. not even close!


10 v = 36878:s1=36874:s2=s1+1:s3=s1+2:s4=s1+3
20 poke v,15
30 for l = 1 to 20
40 poke s2,128
50 poke s1,128
60 next l
70 for m = 1 to 15
80 poke s4,177
90 next m
100 poke s1,0:pokes2,0:pokes4,0
110 for n = 254 to 128 step -2.5
120 poke s3,n
130 for m = 1 to 2
140 next m
160 next n
170 poke s3,0
180 poke 36878,0
run
Legacy
Vic 20 Enthusiast
Posts: 154
Joined: Wed Dec 31, 2008 4:01 pm

Sound Efx

Post by Legacy »

Here is the examples from Personal Computing on the VIC=20 Appendix G: 20 sound effects for the Vic-20 (a time saver) enjoy!

Code: Select all

=================================

scales (high octave)

1 poke 36878,15
2 for l = 250 to 200 step -2
3 poke 36876,l
4 for m = 1 to 100
5 next m
6 next l 
7 for l = 205 to 250 step 2
8 poke 36878,l
9 for m = 1 to 100
10 next m
11 next l 
12 poke 36876,0:poke 36878,0

=================================

random sounds (high octave)

1 poke 36878,15
2 for l = 1 to 100
3 poke 36876,int(rnd(1)*128)+128
4 for m = 1 to 10
5 next m 
6 next l 
7 poke 36876,0
8 poke 36878,0

=================================

explosion (high tone)* this program plays noise and
			reduces the volume gradualy

1 poke 36877,220
2 for l = 15 to 0 step -1
3 poke 36878,l
4 for m = 1 to 300
5 next m 
6 next l
7 poke 36877,0
8 poke 36878,0

=================================

bombs away

1 poke 36878,10
2 for l = 230 to 128 step -1
3 poke 36876,l
4 for m = 1 to 20 
5 next m
6 next l
7 poke 36876,0
8 poke 36877,200
9 for l = 15 to 0 step-.05
10 poke 36878,l
11 next l
12 poke 36877,0

=================================

red alert

1 poke 36878,15
2 for l = 1 to 10
3 for m = 180 to 235 step 2
4 poke 36876,m
5 for n = 1 to 10
6 next n
7 next m 
8 poke 36876,0
9 for m = 1 to 100
10 next m
11 next l 
12 poke 36878,0

=================================

laser beam

1 poke 36878,15
2 for l = 1 to 30
3 for m = 250 to 240 step -1
4 poke 36876,m
5 next m
6 for m = 240 to 250
7 poke 36876,m
8 next m
9 poke 36876,0
10 next l
11 poke 36878,0

=================================

high-low siren

1 poke 36878,15
2 for l = 1 to 10
3 poke 36875,200
4 for m = 1 to 500
5 next m
6 poke 36875,0
7 poke 36876,200
8 for m = 1 to 500
9 next m
10 poke 36876,0
11 next l 
12 poke 36878,0

=================================

busy signal

1 poke 36878,15
2 for l = 1 to 15
3 poke 36876,160
4 for m = 1 to 400
5 next m 
6 poke 36876,0
7 for m = 1 to 400
8 next m 
9 next l
10 poke 36878,0

=================================

phone ringing

1 poke 36878,15
2 for l = 1 to 5
3 for m = 1 to 50
4 poke 36876,220
5 for n = 1 to 5
6 next n
7 poke 36876,0
8 next m
9 for m = 1 to 3000
10 next m
11 next l
12 poke 36878,0

=================================

birds chirping

1 poke 36878,15
2 for l = 1 to 20
3form=254to240+int(rnd(1)*10)step-1
4 poke36876,m
5 next m
6 poke 36876,0
7 for m = 0 to int(rnd(1)*100)+120
8 next m 
9 next l

=================================

wind

1 poke 36878,15
2 poke 36874,170
3 poke 36877,240
4 for l = 1 to 2000
5 next l 
6 poke 36878,0:poke 36874,0
7 poke 36877,0

=================================

ocean waves

1 poke 36877,180
2 for l = 1 to 10
3 d = int(rnd(1)*5)*50+50
4 for m = 3 to 5
5 poke 36878,m
6 for n = 1 to d
7 next n
8 next m
9 for m = 15 to 3 step -1
10 poke 36878,m
11 for n = 1 to d
12 next n 
13 next m 
14 next l 
15 poke 36878,0
16 poke 36877,0

=================================

vanishing UFO

1 poke 36878,15
2 for l = 130 to 140
3 poke 36876,l
4 for m = 1 to 40
5 next m 
6 next l
7 poke 36878,0
8 poke 36876,0

=================================

UFO landing

1 poke 36878,15
2 for l = 1 to 20
3 for m = 220-l to 160-l step -4
4 poke 36876,m
5 next m
6 for m = 160 -l to 220-l step 4
7 poke 36876,m
8 next m 
9 next l 
10 poke 36878,0
11 poke 36876,0

=================================

UFO shooting

1 poke 36878,15
2 for l = 1 to 15
3 for m = 200 to 220 + l * 2
4 poke 36876,m
5 next m
6 next l
7 poke 36878,0
8 poke 36876,0

=================================

wolf whistle

1 poke 36878,15
2 for l = 148 to 220 step.7
3 poke 36876,l
4 next l
5 for l = 128 to 200
6 poke 36876,l
7 next l 
8 for l = 200 to 128 step -1
9 poke 36876,l
10 next l
11 poke 36878,0:poke36876,0

=================================

running feet

1 poke 36878,15
2 for l = 1 to 10
3 poke 36874,200
4 for m = 1 to 10
5 next m
6 poke 36874,0
7 for m = 1 to 100
8 next m 
9 next l 
10 poke 36878,0

=================================

tick-tock

1 poke 36878,15
2 for l = 1 to 10
3 poke 36875,200
4 for m = 1 to 10
5 next m
6 poke 36875,0
7 for m = 1 to 300
8 next m
9 poke 36874,200
10 for m = 1 to 10
11 next m
12 poke 36874,0
13 for m = 1 to 300
14 next m : next l 
15 poke 36878,0

=================================

door opening

1 poke 36878,15
2 b = 0 
3 for l = 128 to 255 step 11
4 poke 36874,l
5 for m = 1 to 10
6 next m 
7 b = b + 1
8 if b = 3 then b = 0: poke 36874,0
9 next l
10 poke 36874,0:poke36878,0

=================================

blips

1 poke 36878,15
2 poke 36876,220
3 for l = 1 to 5
4 next l 
5 poke 36876,0
6 for l = 1 to 500
7 next l 
8 poke 36876,200
9 for l = 1 to 5
10 next l 
11 poke 36876,0
12 for l = 1 to 500
13 next l 
14 poke 36878,0

=================================
legend of zelda

60 v=36878:s1=36874:s2=s1+1:s3=s1+2:s4=s1+3
70 poke v,15
71 read d,n,d1,n1
72 if d=-1thenpokes1,0:pokes2,0:pokes3,0:pokes4,0:restore:goto 71
73 poke s1,n
75 poke s4,n1
80 fort=1tod:next
90 goto 71
100 data 200,128,200,0, 200,128,200,0, 20,0,20,0, 200,128,200,0
110 data 200,128,200,0, 100,0,100,250, 200,0,200,0, 100,0,100,0
120 data 200,128,200,0, 50,0,50,0, 200,128,200,0, 100,128,100,0
130 data 50,0,50,0, 200,128,200,0, 50,0,50,0, 200,128,200,0
140 data 100,128,100,0, 150,0,150,0, 100,0,100,250, 200,0,200,0
150 data 100,0,100,0
160 data 200,128,200,0, 200,128,200,0, 20,0,20,0, 200,128,200,0
170 data 200,128,200,0, 20,0,20,0, 200,128,200,0, 200,128,200,0
180 data 100,0,100,250, 150,0,150,0, 150,0,150,0
190 data 200,128,200,0, 50,0,50,0, 200,128,200,0, 100,128,100,0
200 data 50,0,50,0, 200,128,200,0, 50,0,50,0, 200,128,200,0
210 data 100,128,100,0, 150,0,150,0, 100,0,100,250, 200,0,200,0
220 data 200,0,200,0,200,0,200,0, 100,0,100,0
500 data -1,0,0,0
run

=============================================================================================

*make sure to calibrate the transducer as well...
Last edited by Legacy on Sun Feb 08, 2009 2:22 pm, edited 1 time in total.
User avatar
Jeff-20
Denial Founder
Posts: 5759
Joined: Wed Dec 31, 1969 6:00 pm

Post by Jeff-20 »

How do I paste something into VICE?
High Scores, Links, and Jeff's Basic Games page.
Legacy
Vic 20 Enthusiast
Posts: 154
Joined: Wed Dec 31, 2008 4:01 pm

Post by Legacy »

Ok I'm going to assume you are serious Jeff... you can copy anything into VICE that is on Windows clipboard, highlight the selected text, ctrl+c(or right click and copy). that copys text onto the clipboard, right click the screen on VICE and whatever you have highlighted will be transferred onto VICE, however if the letters are in CAPS everything will look funny cause VICE treats all characters as uppercase to begin with, so if you paste in uppercase VICE will make them the next register up, which is all the character codes.

*Something happens in that minigrafik loader that makes it skip lines and treat part of the data array as a line number which screws it up real bad when pasting into vice. I've found when writing music data, keep every number next to each other, no spaces, and place commas carefully. One wrong comma or space and vice will destroy it!
User avatar
Jeff-20
Denial Founder
Posts: 5759
Joined: Wed Dec 31, 1969 6:00 pm

Post by Jeff-20 »

Maybe it's because I am using VICE 1.2. I cannot right click on the VICE window.
High Scores, Links, and Jeff's Basic Games page.
User avatar
Jeff-20
Denial Founder
Posts: 5759
Joined: Wed Dec 31, 1969 6:00 pm

Post by Jeff-20 »

Just updated my VICE. Boy, is my life gonna be a lot easier.
High Scores, Links, and Jeff's Basic Games page.
User avatar
Pedro Lambrini
Vic 20 Scientist
Posts: 1132
Joined: Mon Dec 01, 2008 11:36 am

Post by Pedro Lambrini »

Yeah, there's a huge difference between VICE 1.2 and 2.1. Apart from the copy & paste benefits the actual sound emulation of the VIC is much, much better as well. I'm sure that'll help you in this particular endeavour. :)
Legacy
Vic 20 Enthusiast
Posts: 154
Joined: Wed Dec 31, 2008 4:01 pm

Post by Legacy »

:shock: hooray for technology!
User avatar
Jeff-20
Denial Founder
Posts: 5759
Joined: Wed Dec 31, 1969 6:00 pm

Post by Jeff-20 »

Thanks Legacy. Now I can scratch "typing in Legacy's sound effect" off my to-do list.
High Scores, Links, and Jeff's Basic Games page.
Royas
Vic 20 Amateur
Posts: 66
Joined: Fri Jan 30, 2009 6:22 pm

Post by Royas »

Copy paste you say?

:shock: :shock: :shock: :shock: :shock:

I wish I knew that last night when I typed in a giant program I found online.
Legacy
Vic 20 Enthusiast
Posts: 154
Joined: Wed Dec 31, 2008 4:01 pm

Post by Legacy »

lol, serious I thought it was common knowledge glad to help
User avatar
Jeff-20
Denial Founder
Posts: 5759
Joined: Wed Dec 31, 1969 6:00 pm

Post by Jeff-20 »

Anyone up for a challenge? Can you think of how "breaking glass" or something shattering might be created on the VIC?
High Scores, Links, and Jeff's Basic Games page.
User avatar
Mike
Herr VC
Posts: 4841
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Post by Mike »

How about this:

Code: Select all

1 V=36864
2 FORT=15TO0STEP-1
3 POKEV+14,T
4 X=RND(1)*T*2+224:POKEV+12,X:POKEV+13,X
5 NEXT
Greetings,

Michael
Post Reply