Rainbow Rocks 10th Anniversary - Let's celebrate the 10th anniversary of Rainbow Rocks with an art event! Here
Interested in advertising on Derpibooru? Click here for information!
Ministry of Image - Fanfiction Printing

Help fund the $15 daily operational cost of Derpibooru - support us financially!

Description

Messing around with Blitz BASIC. Wrote a simple program that plays the Contra theme using a square waveform looped, delayed and pitched.
Here’s the source code in case anyone is interested:
`Global pontraPic ;The background image
Graphics 640, 480, 32, 2
SetBuffer BackBuffer()
pontraPic = LoadImage(“assets\pontra.bmp”) ;Load picture
Global sqrWave = LoadSound(“assets\pulse13.wav”) ;Load square waveform
; The notes to be played
Global note1 = 6637
Global note2 = 9945
Global note3 = 9386
Global note4 = 7450
Global note5 = 8362
Global note6 = 11162
Global note7 = 12529
; Gfx stuff
Cls
DrawImage pontraPic, 84, 24
; == Play the Contra theme ===========================================
LoopSound sqrWave
; Note 1
chnSqrWave = PlaySound(sqrWave)
ChannelPitch chnSqrWave, note1
Delay 360
PauseChannel chnSqrWave
Delay 360
; Note 2
ChannelPitch chnSqrWave, note2
ResumeChannel chnSqrWave
Delay 360
PauseChannel chnSqrWave
Delay 360
; Note 3
ChannelPitch chnSqrWave, note3
ResumeChannel chnSqrWave
Delay 360
PauseChannel chnSqrWave
Delay 360
; Note 4
ChannelPitch chnSqrWave, note4
ResumeChannel chnSqrWave
Delay 360
PauseChannel chnSqrWave
Delay 360
; Note 5
ChannelPitch chnSqrWave, note5
ResumeChannel chnSqrWave
Delay 720
PauseChannel chnSqrWave
Delay 360
; Note 6 and 7
ChannelPitch chnSqrWave, note6
ResumeChannel chnSqrWave
Delay 360
ChannelPitch chnSqrWave, note7
ResumeChannel chnSqrWave
Delay 1250
; End theme
StopChannel chnSqrWave
Delay 360
Flip
End`

Source

Comments

Syntax quick reference: **bold** *italic* ||hide text|| `code` __underline__ ~~strike~~ ^sup^ %sub%

Detailed syntax guide