Interested in advertising on Derpibooru? Click here for information!
![Use your hooves and trot in to experience the Fediverse with friendship and ponies.](https://derpicdn.net/spns/2024/11/13/00507ea0-a1c1-11ef-ba19-02420a050004.gif)
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
not provided yet
Edited