R_BABAZADEH
دوشنبه 14 اردیبهشت 1383, 21:59 عصر
کسی طریقه نمونه برداری از ورودی (mic or line) کارت صدا و ذخیره اون تو یک ماتریس رو را می داند :idea:
بابک زواری
سه شنبه 15 اردیبهشت 1383, 08:05 صبح
میخوای مثل برنامه sound fourge بصورت ویژوال اینکار رو بکنی ؟
Best Programmer
سه شنبه 15 اردیبهشت 1383, 12:46 عصر
یک مثال برای رکورد صدا.
Sound Recorder.
AudioRecorder is a program for recording sound. You can select the bit rate, 8/16 bits and stereo/mono. It is possible to make a manual recording, but is is also possible to program a recording. The recording can be saved, if you like automatically. All settings are stored in the registry. Furthermore you can choose a midi file (use "Settings") to record. As soon as you hit the "Record" button the midi file starts playing and it is recorded as a wave file at the same time. Some minor bugs have been removed! Furthermore you can now use long file names and map names with spaces in it. Version 2.0!! The newest version is from February 18, 2000 at 11:30 UTC.
Best Programmer
سه شنبه 15 اردیبهشت 1383, 12:48 عصر
اینم یک مثال دیگر :
This code displays the waves (graphically) of a .wav file, just like in Windows' Sound Recorder
مثال:
Private Sub Command1_Click()
Dim LastX, LastY, CurX, CurY As Byte
CommonDialog1.ShowOpen
Form1.Caption = CommonDialog1.FileName & " - Graphical Wave"
If CommonDialog1.CancelError = True Or CommonDialog1.FileName = "" Then Exit Sub
'If the user pressed cancel or didn't se
' lect anything then exit this sub
On Error Resume Next
Picture1.Width = FileLen(CommonDialog1.FileName)
'Makes the invisible picturebox the widt
' h of the size of the .wav file
Open CommonDialog1.FileName For Binary As #1
Get #1, 44, LastY
'Gets the 44th byte of the .wav file (th
' at is where the sound information that w
' e are
'interested in starts)
LastX = 0
For i = 45 To FileLen(CommonDialog1.FileName)
'Loops through each byte (after 44) of t
' he file
Get #1, i, CurY
Picture1.Line (LastX, LastY + 22)-(i, CurY + 22), 0
'Draws a line in the invisible picturebo
' x using the data we read from the file
LastX = i
LastY = CurY
Next i
Close #1
StretchBlt Picture2.hdc, 0, 0, Picture2.ScaleWidth, Picture2.ScaleHeight, Picture1.hdc, 0, 0, Picture1.ScaleWidth, Picture1.ScaleHeight, vbSrcCopy
Picture2.Refresh
'This just copies the area of picture1 i
' nto picture2, so that you can see the wh
' ole Wave
End Sub
Private Sub Form_Load()
Form1.ScaleMode = vbPixels
Picture1.AutoRedraw = True
Picture1.ScaleMode = vbPixels
Picture1.Visible = False
Picture1.Height = 300
Picture1.BackColor = vbWhite
Picture2.AutoRedraw = True
Picture2.ScaleMode = vbPixels
Command1.Caption = "Load .wav"
CommonDialog1.Filter = "Wave Files (.wav) | *.wav"
End Sub
Private Sub Form_Resize()
Picture2.Move 0, Command1.Height, Form1.ScaleWidth, Form1.ScaleHeight
Command1.Move 0, 0, Form1.ScaleWidth, Command1.Height
'Stretches the visible picturebox and th
' e commandbutton to fit the form
End Sub
سه شنبه 15 اردیبهشت 1383, 17:49 عصر
سلام
اقا ممکنه این کد رو به دلفی تبدیل کنید؟؟ من که از این هیچی سر در نمیارم :?
R_BABAZADEH
چهارشنبه 16 اردیبهشت 1383, 00:34 صبح
چطور میشه اطلاعات نمونه برداری شده رو تو یک رماتریس نوشت نه درون یک فایل wav
vBulletin® v4.2.5, Copyright ©2000-1404, Jelsoft Enterprises Ltd.