Code archives/Audio/Binary rhythms (32)
This code has been declared by its author to be Public Domain code.
Download source code
| |||||
| runtimeerror bin(number); 1 = notetrigger after 32 add other 32 Loads a instrument and creates a rithm of a binary string. In this case a block 32 drumrithm. Chord line (frequency numbers not added yet) f . n.... . 100001010010100ect f=frequency ( a piano on its side for example. liniaal x) n=note (0) The code can be used to create keyboard rhythms or even keyboard songs. Still needs a Root (wortel) for the frequency ; root music. If computer speech is connected. Each note trigger could be a voice(x). X beeing one of the voice actors(esses) or singer(s/esses). (Socially switch Rithms and placements) (track1)x1..x1..x3...x2...x2.x3.. x1 = person 1 (Setting male 40+) x2 = person 2 (Setting female 28+) x3 = person 3 (Setting male (30+) x4 = drum x5 = hat x6 = snare x7 = guitar With a logicaly set dictionary the conversations can be very entertaining. (See : Artificial intelligence.) | |||||
;root music
;note lines (chords) not inserted yet.
Graphics 640,48,16,2
SetBuffer BackBuffer()
Global snd = LoadSound("standard.wav")
cnt = 1
Global abc
Global timer = CreateTimer(5)
a$ = Bin(123)
While KeyDown( 1 ) = False
Cls
If KeyDown(200) = True Then q2 = q2 + 1 : aa$ = Bin(q2)
If KeyDown(205) = True Then q = q + 1 : a$ = Bin(q)
If KeyDown(203) = True Then q = q - 1 : a$ = Bin(q)
If KeyDown(200) = True Then q = Rand(19826422221) : a$ = Bin(q)
;
Text 0,0,a$
Text 0,15,"Cursor up random"
Text 0,25,"Curs left and curs right"
;
b$ = Mid(a$,cnt,1)
DebugLog b$
;
If b$="1" Then
If ( Int ( Mid( aa$,cnt,1 ) ) * 100 ) = 1 Then ozz = ozz + 123 Else ozz = ozz - 123
ChannelVolume abc,.4
ChannelPitch abc,zz
abc = PlaySound( snd ) : ClsColor Rand( 200 ),0,0 : Cls
End If
WaitTimer(timer)
StopChannel abc
cnt = cnt + 1
If cnt>31 Then cnt= 1
Flip
Wend
End |
Comments
None.
Code Archives Forum