vendredi 26 juin 2015

MUSIQUE AVEC BLITZ3D

Créez votre dossier LOOP sur votre bureau et décompressez le fichier moteur a l'interieur !
telechargez le fichier son

Print "charge le fichier son en memoire  ..."


sndWave=LoadSound("C:\Users\rendomizer\Desktop\LOOP\moteur.wav")
;ecrivez votre propre chemin vers le fichier son



LoopSound sndWave ;rejoue a l'infini le fichier son

chnWave=PlaySound(sndWave)

Print "joue le fichier son 2 seconds ..."
Delay 2000

Print "Pause pendant 2 seconds ..."
PauseChannel chnWave
Delay 2000

Print "Restaure le fichier son ..."
ResumeChannel chnWave
Delay 2000

Print "Change la vitesse du son ..."
;StopChannel chnWave
ChannelPitch chnWave, 200000
Delay 2000

 Print "ecouter le son a gauche..."
ChannelPan chnWave,-1
Delay 2000

Print "ecoute le son a droite..."
ChannelPan chnWave,1
Delay 2000

Print "fin !"
StopChannel chnWave



Pour jouer deux instruments simultanément essayez ceci :
d'abord  telecharchez les instruments DRUMS
Créez un dossier LOOP sur le bureau et decompressez le fichier instrument dedans !


.debut

If KeyDown(17)=1  And ChannelPlaying (pp1)=0 Then pp1 = PlayMusic ("C:\Users\rendomizer\Desktop\LOOP\stamp.wav"):ResumeChannel pp1 ;écrivez votre chemin complet de VOTRE ordinateur !
If KeyDown(17)=0 Then StopChannel pp1
If KeyDown(19)=1  And ChannelPlaying (pp2)=0 Then pp2 = PlayMusic ("C:\Users\rendomizer\Desktop\LOOP\stich.wav"):ResumeChannel pp2
If KeyDown(19)=0 Then StopChannel pp2
 

Goto debut 

CLAVIER EXTERNE USB MIDI IN BLITZ3D





Dabord il faut telecharger blitz3D avec la librairie blitz3d+midi
essayez toutes vos prises usb pour le test en changent midiopen(1),midiopen(2)...(3) 
Global hIn = MidiInOpen(0)

.debut
    If MidiEvent(hIn) Then
MidiInStart(hIn)

    msg$= MidiGetParam1()
    Print Hex(msg$)

;affiche les données du clavier externe    
    EndIf
   
Goto debut