begin process at 2012 02 13 08:27:47
  Trouver un code source :
 
dans
 
Accueil > 

Code

 > 

Multimedia

 > FAITE VOTRE MUSIQUE (MAJ)

FAITE VOTRE MUSIQUE (MAJ)


 Information sur la source

Note :
10 / 10 - par 3 personnes
10,00 / 10

  • 1

  • 2

  • 3

  • 4

  • 5

  • 6

  • 7

  • 8

  • 9

  • 10
Catégorie :Multimedia Niveau :Débutant Date de création :17/02/2003 Date de mise à jour :19/02/2003 01:27:25 Vu / téléchargé :4 250 / 499

Auteur : NeoCortex

Ecrire un message privé
Site perso
Commentaire sur cette source (21)
Ajouter un commentaire et/ou une note

 Description

Cliquez pour voir la capture en taille normale
permet d'editer ca propre musique ou encore d'ouvrir des musique deja existante au format .mcx
Avec 88 morceaux de musique dans le zip de quoi faire chanter votre UC

Source

  • Private Declare Function Beep Lib "kernel32" ( _
  • ByVal dwFreq As Long, _
  • ByVal dwDuration As Long) As Long
  • Dim note As Variant
  • Private Sub Form_KeyPress(KeyAscii As Integer)
  • note = KeyAscii
  • Select Case note
  • Case Asc("a")
  • Text1.Text = Text1.Text & 10
  • Case Asc("z")
  • Text1.Text = Text1.Text & 11
  • Case Asc("3")
  • Text1.Text = Text1.Text & 20
  • Case Asc("e")
  • Text1.Text = Text1.Text & 12
  • Case Asc("4")
  • Text1.Text = Text1.Text & 21
  • Case Asc("r")
  • Text1.Text = Text1.Text & 13
  • Case Asc("5")
  • Text1.Text = Text1.Text & 22
  • Case Asc("t")
  • Text1.Text = Text1.Text & 14
  • Case Asc("w")
  • Text1.Text = Text1.Text & 30
  • Case Asc("s")
  • Text1.Text = Text1.Text & 40
  • Case Asc("x")
  • Text1.Text = Text1.Text & 31
  • Case Asc("d")
  • Text1.Text = Text1.Text & 41
  • Case Asc("c")
  • Text1.Text = Text1.Text & 32
  • Case Asc("v")
  • Text1.Text = Text1.Text & 33
  • Case Asc("g")
  • Text1.Text = Text1.Text & 42
  • Case Asc("b")
  • Text1.Text = Text1.Text & 34
  • Case Asc("h")
  • Text1.Text = Text1.Text & 43
  • Case Asc("n")
  • Text1.Text = Text1.Text & 35
  • Case Asc("j")
  • Text1.Text = Text1.Text & 44
  • Case Asc("k")
  • Text1.Text = Text1.Text & 36
  • Case Asc("Y")
  • Text1.Text = Text1.Text & 50
  • Case Asc("7")
  • Text1.Text = Text1.Text & 60
  • Case Asc("u")
  • Text1.Text = Text1.Text & 51
  • Case Asc("8")
  • Text1.Text = Text1.Text & 61
  • Case Asc("i")
  • Text1.Text = Text1.Text & 52
  • Case Asc("o")
  • Text1.Text = Text1.Text & 53
  • Case Asc("0")
  • Text1.Text = Text1.Text & 62
  • Case Asc("p")
  • Text1.Text = Text1.Text & 54
  • Case Asc("l")
  • Text1.Text = Text1.Text & 63
  • Case Asc("m")
  • Text1.Text = Text1.Text & 55
  • End Select
  • End Sub
  • Private Sub Form_Load()
  • Me.Top = Form2.Top - Me.Height
  • Me.Left = Form2.Left
  • Form4.Show
  • End Sub
  • Private Sub Form_Unload(Cancel As Integer)
  • Unload Form4
  • End Sub
  • Private Sub Label10_Click()
  • Text1.Text = Text1.Text & "32"
  • Call joue(32)
  • End Sub
  • Private Sub Label11_Click()
  • Text1.Text = Text1.Text & "33"
  • Call joue(33)
  • End Sub
  • Private Sub Label12_Click()
  • Text1.Text = Text1.Text & "34"
  • Call joue(34)
  • End Sub
  • Private Sub Label13_Click()
  • Text1.Text = Text1.Text & "35"
  • Call joue(35)
  • End Sub
  • Private Sub Label14_Click()
  • Text1.Text = Text1.Text & "36"
  • Call joue(36)
  • End Sub
  • Private Sub Label15_Click()
  • Text1.Text = Text1.Text & "50"
  • Call joue(50)
  • End Sub
  • Private Sub Label16_Click()
  • Text1.Text = Text1.Text & "51"
  • Call joue(51)
  • End Sub
  • Private Sub Label17_Click()
  • Text1.Text = Text1.Text & "52"
  • Call joue(52)
  • End Sub
  • Private Sub Label18_Click()
  • Text1.Text = Text1.Text & "53"
  • Call joue(53)
  • End Sub
  • Private Sub Label19_Click()
  • Text1.Text = Text1.Text & "54"
  • Call joue(54)
  • End Sub
  • Private Sub Label20_Click()
  • Text1.Text = Text1.Text & "55"
  • Call joue(55)
  • End Sub
  • Private Sub Label24_Click()
  • Text1.Text = Text1.Text & "20"
  • Call joue(20)
  • End Sub
  • Private Sub Label25_Click()
  • Text1.Text = Text1.Text & "21"
  • Call joue(21)
  • End Sub
  • Private Sub Label26_Click()
  • Text1.Text = Text1.Text & "22"
  • Call joue(21)
  • End Sub
  • Private Sub Label27_Click()
  • Text1.Text = Text1.Text & "40"
  • Call joue(40)
  • End Sub
  • Private Sub Label28_Click()
  • Text1.Text = Text1.Text & "41"
  • Call joue(41)
  • End Sub
  • Private Sub Label29_Click()
  • Text1.Text = Text1.Text & "42"
  • Call joue(42)
  • End Sub
  • Private Sub Label3_Click()
  • Text1.Text = Text1.Text & "10"
  • Call joue(10)
  • End Sub
  • Private Sub Label30_Click()
  • Text1.Text = Text1.Text & "43"
  • Call joue(43)
  • End Sub
  • Private Sub Label31_Click()
  • Text1.Text = Text1.Text & "44"
  • Call joue(44)
  • End Sub
  • Private Sub Label32_Click()
  • Text1.Text = Text1.Text & "60"
  • Call joue(60)
  • End Sub
  • Private Sub Label33_Click()
  • Text1.Text = Text1.Text & "61"
  • Call joue(61)
  • End Sub
  • Private Sub Label34_Click()
  • Text1.Text = Text1.Text & "62"
  • Call joue(62)
  • End Sub
  • Private Sub Label35_Click()
  • Text1.Text = Text1.Text & "63"
  • Call joue(63)
  • End Sub
  • Private Sub Label4_Click()
  • Text1.Text = Text1.Text & "11"
  • Call joue(11)
  • End Sub
  • Private Sub Label5_Click()
  • Text1.Text = Text1.Text & "12"
  • Call joue(12)
  • End Sub
  • Private Sub Label6_Click()
  • Text1.Text = Text1.Text & "13"
  • Call joue(13)
  • End Sub
  • Private Sub Label7_Click()
  • Text1.Text = Text1.Text & "14"
  • Call joue(14)
  • End Sub
  • Private Sub Label8_Click()
  • Text1.Text = Text1.Text & "30"
  • Call joue(30)
  • End Sub
  • Private Sub Label9_Click()
  • Text1.Text = Text1.Text & "31"
  • Call joue(31)
  • End Sub
  • Function joue(note2 As Integer)
  • Select Case note2
  • Case 10
  • a = Beep(165, 200)
  • Case 11
  • a = Beep(175, 200)
  • Case 20
  • a = Beep(185, 200)
  • Case 12
  • a = Beep(196, 200)
  • Case 21
  • a = Beep(208, 200)
  • Case 13
  • a = Beep(220, 200)
  • Case 22
  • a = Beep(233, 200)
  • Case 14
  • a = Beep(247, 200)
  • Case 30
  • a = Beep(262, 200)
  • Case 40
  • a = Beep(277, 200)
  • Case 31
  • a = Beep(294, 200)
  • Case 41
  • a = Beep(311, 200)
  • Case 32
  • a = Beep(330, 200)
  • Case 33
  • a = Beep(349, 200)
  • Case 42
  • a = Beep(370, 200)
  • Case 34
  • a = Beep(392, 200)
  • Case 43
  • a = Beep(415, 200)
  • Case 35
  • a = Beep(440, 200)
  • Case 44
  • a = Beep(466, 200)
  • Case 36
  • a = Beep(494, 200)
  • Case 50
  • a = Beep(523, 200)
  • Case 60
  • a = Beep(554, 200)
  • Case 51
  • a = Beep(587, 200)
  • Case 61
  • a = Beep(622, 200)
  • Case 52
  • a = Beep(659, 200)
  • Case 53
  • a = Beep(698, 200)
  • Case 62
  • a = Beep(740, 200)
  • Case 54
  • a = Beep(784, 200)
  • Case 63
  • a = Beep(831, 200)
  • Case 55
  • a = Beep(880, 200)
  • End Select
  • End Function
Private Declare Function Beep Lib "kernel32" ( _
                 ByVal dwFreq As Long, _
                 ByVal dwDuration As Long) As Long
Dim note As Variant




Private Sub Form_KeyPress(KeyAscii As Integer)
note = KeyAscii
Select Case note
    Case Asc("a")
        Text1.Text = Text1.Text & 10
    Case Asc("z")
        Text1.Text = Text1.Text & 11
    Case Asc("3")
        Text1.Text = Text1.Text & 20
    Case Asc("e")
        Text1.Text = Text1.Text & 12
    Case Asc("4")
        Text1.Text = Text1.Text & 21
    Case Asc("r")
        Text1.Text = Text1.Text & 13
    Case Asc("5")
        Text1.Text = Text1.Text & 22
    Case Asc("t")
        Text1.Text = Text1.Text & 14
    Case Asc("w")
        Text1.Text = Text1.Text & 30
    Case Asc("s")
        Text1.Text = Text1.Text & 40
    Case Asc("x")
        Text1.Text = Text1.Text & 31
    Case Asc("d")
        Text1.Text = Text1.Text & 41
    Case Asc("c")
        Text1.Text = Text1.Text & 32
    Case Asc("v")
        Text1.Text = Text1.Text & 33
    Case Asc("g")
        Text1.Text = Text1.Text & 42
    Case Asc("b")
        Text1.Text = Text1.Text & 34
    Case Asc("h")
        Text1.Text = Text1.Text & 43
    Case Asc("n")
        Text1.Text = Text1.Text & 35
    Case Asc("j")
        Text1.Text = Text1.Text & 44
    Case Asc("k")
        Text1.Text = Text1.Text & 36
    Case Asc("Y")
        Text1.Text = Text1.Text & 50
    Case Asc("7")
        Text1.Text = Text1.Text & 60
    Case Asc("u")
        Text1.Text = Text1.Text & 51
    Case Asc("8")
        Text1.Text = Text1.Text & 61
    Case Asc("i")
        Text1.Text = Text1.Text & 52
    Case Asc("o")
        Text1.Text = Text1.Text & 53
    Case Asc("0")
        Text1.Text = Text1.Text & 62
    Case Asc("p")
        Text1.Text = Text1.Text & 54
    Case Asc("l")
        Text1.Text = Text1.Text & 63
    Case Asc("m")
        Text1.Text = Text1.Text & 55
End Select
End Sub

Private Sub Form_Load()
Me.Top = Form2.Top - Me.Height
Me.Left = Form2.Left
Form4.Show
End Sub


Private Sub Form_Unload(Cancel As Integer)
Unload Form4
End Sub

Private Sub Label10_Click()
Text1.Text = Text1.Text & "32"
Call joue(32)
End Sub

Private Sub Label11_Click()
Text1.Text = Text1.Text & "33"
Call joue(33)
End Sub

Private Sub Label12_Click()
Text1.Text = Text1.Text & "34"
Call joue(34)
End Sub

Private Sub Label13_Click()
Text1.Text = Text1.Text & "35"
Call joue(35)
End Sub

Private Sub Label14_Click()
Text1.Text = Text1.Text & "36"
Call joue(36)
End Sub

Private Sub Label15_Click()
Text1.Text = Text1.Text & "50"
Call joue(50)
End Sub

Private Sub Label16_Click()
Text1.Text = Text1.Text & "51"
Call joue(51)
End Sub

Private Sub Label17_Click()
Text1.Text = Text1.Text & "52"
Call joue(52)
End Sub

Private Sub Label18_Click()
Text1.Text = Text1.Text & "53"
Call joue(53)
End Sub

Private Sub Label19_Click()
Text1.Text = Text1.Text & "54"
Call joue(54)
End Sub

Private Sub Label20_Click()
Text1.Text = Text1.Text & "55"
Call joue(55)
End Sub

Private Sub Label24_Click()
Text1.Text = Text1.Text & "20"
Call joue(20)
End Sub

Private Sub Label25_Click()
Text1.Text = Text1.Text & "21"
Call joue(21)
End Sub

Private Sub Label26_Click()
Text1.Text = Text1.Text & "22"
Call joue(21)
End Sub

Private Sub Label27_Click()
Text1.Text = Text1.Text & "40"
Call joue(40)
End Sub

Private Sub Label28_Click()
Text1.Text = Text1.Text & "41"
Call joue(41)
End Sub

Private Sub Label29_Click()
Text1.Text = Text1.Text & "42"
Call joue(42)
End Sub

Private Sub Label3_Click()
Text1.Text = Text1.Text & "10"
Call joue(10)
End Sub

Private Sub Label30_Click()
Text1.Text = Text1.Text & "43"
Call joue(43)
End Sub

Private Sub Label31_Click()
Text1.Text = Text1.Text & "44"
Call joue(44)
End Sub

Private Sub Label32_Click()
Text1.Text = Text1.Text & "60"
Call joue(60)
End Sub

Private Sub Label33_Click()
Text1.Text = Text1.Text & "61"
Call joue(61)
End Sub

Private Sub Label34_Click()
Text1.Text = Text1.Text & "62"
Call joue(62)
End Sub

Private Sub Label35_Click()
Text1.Text = Text1.Text & "63"
Call joue(63)
End Sub

Private Sub Label4_Click()
Text1.Text = Text1.Text & "11"
Call joue(11)
End Sub

Private Sub Label5_Click()
Text1.Text = Text1.Text & "12"
Call joue(12)
End Sub

Private Sub Label6_Click()
Text1.Text = Text1.Text & "13"
Call joue(13)
End Sub

Private Sub Label7_Click()
Text1.Text = Text1.Text & "14"
Call joue(14)
End Sub

Private Sub Label8_Click()
Text1.Text = Text1.Text & "30"
Call joue(30)
End Sub

Private Sub Label9_Click()
Text1.Text = Text1.Text & "31"
Call joue(31)
End Sub

Function joue(note2 As Integer)
Select Case note2
        Case 10
        a = Beep(165, 200)
        Case 11
        a = Beep(175, 200)
        Case 20
        a = Beep(185, 200)
        Case 12
        a = Beep(196, 200)
        Case 21
        a = Beep(208, 200)
        Case 13
        a = Beep(220, 200)
        Case 22
        a = Beep(233, 200)
        Case 14
        a = Beep(247, 200)
        Case 30
        a = Beep(262, 200)
        Case 40
        a = Beep(277, 200)
        Case 31
        a = Beep(294, 200)
        Case 41
        a = Beep(311, 200)
        Case 32
        a = Beep(330, 200)
        Case 33
        a = Beep(349, 200)
        Case 42
        a = Beep(370, 200)
        Case 34
        a = Beep(392, 200)
        Case 43
        a = Beep(415, 200)
        Case 35
        a = Beep(440, 200)
        Case 44
        a = Beep(466, 200)
        Case 36
        a = Beep(494, 200)
        Case 50
        a = Beep(523, 200)
        Case 60
        a = Beep(554, 200)
        Case 51
        a = Beep(587, 200)
        Case 61
        a = Beep(622, 200)
        Case 52
        a = Beep(659, 200)
        Case 53
        a = Beep(698, 200)
        Case 62
        a = Beep(740, 200)
        Case 54
        a = Beep(784, 200)
        Case 63
        a = Beep(831, 200)
        Case 55
        a = Beep(880, 200)
End Select
End Function

 

 Conclusion

programme sans pretention, mais je me suis amuser en le programment.

 Fichier Zip

Les Membres Club peuvent télécharger directement un fichier contenu dans le zip sans télécharger le zip en entier !

Télécharger le zip


 Sources du même auteur

Source avec Zip Source avec une capture PES-LIGUE
Source avec Zip Source avec une capture CASSE BRIQUE
Source avec Zip Source avec une capture CALCUL RESEAU
Source avec Zip Source avec une capture COURSE A PIED
Source avec Zip Source avec une capture RADIOCX

 Sources de la même categorie

Source avec Zip Source .NET (Dotnet) MON LECTEUR MP3 par kentharold
Source avec Zip Source avec une capture LECTEUR MULTIMÉDIA par lartiguef
Source avec Zip Source avec une capture RENOMMER SOUS-TITRES par memejoueur
Source .NET (Dotnet) "PARLEUR" EN VB 2010 par clementgeek41
Source avec Zip Source avec une capture CHANGER LE VOLUME SYSTÉME SANS ACTIVEX par kayoub5

Commentaires et avis

Commentaire de TheHacker le 17/02/2003 19:50:41

looooooooooool j'avais pensé a faire ca, mais j'avais pas envie d'enregistrer chaques son en wav, voila uneidée bcp + astucieuse, merci :-) 10/10 !

Commentaire de Mémère le 18/02/2003 16:04:17 administrateur CS

Un manque cruel d'imagination se propage dans cette catégorie pourtant artistique. Le glas aurait il sonné... Mais n'est pas musicien qui veut.

Commentaire de NeoCortex le 18/02/2003 16:58:11

au moin avec toi, mémère, on avance, avec tes critiques toujours plus construcitves les une des autres. Mais comme tu le si bien n'est pas critique qui veut !

Commentaire de Mémère le 18/02/2003 19:33:24 administrateur CS

Tout a fait.

Commentaire de iubito le 18/02/2003 21:40:43

c koa le .mcx ?

Commentaire de NeoCortex le 18/02/2003 21:44:32

.mcx c'est le format qu'utilise le prog pour lire les musique (mcx = MusiqueCorteX ), c'est pour le fun l'extention.
si vous voulez des exemple de musique au format mcx dites le moi je vous en mettrez.

Commentaire de iubito le 18/02/2003 21:46:36

bein vi fo en mettre d exemples ! lol
et tu peux gérer les durées des notes ? noire, blanche tout ça...

Commentaire de max12 le 18/02/2003 22:20:13 administrateur CS

Hoho, c'est pas mal dutout

Commentaire de Nox le 18/02/2003 23:00:12

jaime bien l'idée! et le concept
10/10

Commentaire de boursicotteur le 24/02/2003 19:09:48

Ce prog ne fonctionne pas chez moi car il cherche pause.bas...
Enfin, peu importe car j'étais seulement à l'affût d'idées nouvelles.

Depuis plusieurs mois je travaille sur un prog similaire mais beaucoup plus sophistiqué. Il fonctionne déjà mais il devrait être complètement terminé dans un mois ou deux.

Vous pourrez éditer de la musique avec les vrais symboles de musique (blanche, noire, etc). Vous pourrez synthétiser tous les sons midi et pourrez jouer simultanément plusieurs canaux. Donc vous pourrez par exemple composer un morceau de musique contenant tout un orchestre.

Commentaire de Drgn13 le 28/04/2003 19:22:14

il suffit de faire projet, ajouter module, existant, et tu va selectionne pause.bas et nrml apré il s'est ajouté au projet..

Commentaire de Drgn13 le 28/04/2003 19:25:53

sinon je connassait une autre facon de gérer un beep:

'mettre ca dans un module:
Declare Function beep Lib "kernel32" Alias "Beep" (ByVal dwFreq As Long, ByVal dwDuration As Long) As Long
'dwFreq est la fréquence en Hertz du son et dwDuration est sa durée.
'mettreca pour émettre le beep:
beep 440, 100

ici la fréquence est 440 et la durée 100 et on peux changer...

Commentaire de Drgn13 le 28/04/2003 19:30:05

oups je viens de m'appercevoir que ce code est ici:
http://www.vbfrance.com/article.aspx?ID=7670

Commentaire de leocat le 12/12/2004 21:20:24

vraiment super comme source, en + bien détaillé 10/10 !!

Commentaire de zagyoshi le 18/12/2005 10:25:40

Bravo :-)

Commentaire de Drgn13 le 24/12/2005 12:57:34

aucun rapport : j'aime bien les 3 derniers messages a plus d'un an d'intervalle.. mais ca prouve que tu perds pas ton 10/10 a la longue ^^

Commentaire de debutant VB le 05/12/2008 19:20:36

Belle source,
cependant je pense qu'un calcul des fréquences à partir de la note serait plus simple : (cela éviterait les dizaines de lignes à la fin)
Public Sub JouerNote(ByVal nbDemi_tons As Integer)
    Dim Freq As Double
    Freq = 440 * ((2 ^ (1 / 12)) ^ CDbl(ConvertNote(mNote)))
    Call Beep(CLng(Freq), 200)
End Sub
(nbDemi_tons étant le nombre de demi-tons par rapport au La de référence (440 Hz))

Bonne continuation ;)

Commentaire de debutant VB le 05/12/2008 19:22:11

euh CDbl(nbDemi_tons) à la place de CDbl(ConvertNote(mNote)), excusez-moi.

Commentaire de NeoCortex le 01/01/2009 20:40:41

Bonne initiative d'améliorer le code.

Commentaire de itanium888 le 26/02/2010 15:55:49

Concrètement, comment utiliser ce programme ? Il n'y a pas une version compilée ?

Commentaire de etienne2000 le 21/06/2011 15:07:33

Salut, je voudrais bien l'utiliser mais cela m'est impossible, je ne dispose que de Virtual basic 2008 et quand il fait la convertion vb6 vers vb8, il dit qu'il manque pause.bas alors qu'il y est, donc impossible a ouvrir, tu pourrais le compiler si c'est possible car pour l'instant je ne peut absolument pas l'ouvrir.

 Ajouter un commentaire




Nos sponsors


Sondage...

CalendriCode

Février 2012
LMMJVSD
  12345
6789101112
13141516171819
20212223242526
272829    

Consulter la suite du CalendriCode

 
Développement réalisé par Nicolas SOREL (Nix) avec l'aide de : Cyril DURAND et Emmanuel (EBArtSoft), Merci à Vincent pour ses précieux conseils.
CodeS-SourceS.com© Toute reproduction même partielle est interdite sauf accord écrit du Webmaster
CodeS-SourceS.com© est une marque déposée tous droits réservés

Google Coop CodeS-SourceS Google Coop CodeS-SourceS
Temps d'éxécution de la page : 4,602 sec (4)

Nous contacter | Annoncer sur CodeS-SourceS | Mentions légales