Read from file... my_wav.wav
sound = selected("Sound")
# το 2323 είναι έστω το δείγμα μας
call zero_crossing2323 sound
# Η μεταβλητή zerocrossing περιέχει το δείγμα σε μορφή zero-crossed
printline zerocrossing='zerocrossing'
# H συνάρτηση αυτή παίρνει ως είσοδο το sample και το
# αντικείμενο sound και με την μεταβλητή zerocrossing
# επιστρέφει τον χρόνο με το sample σε zerocrossing
procedure zero_crossing sample sound
select sound
# convert sample -> time
time=Get time from sample number... sample
printline time='time'
# do zero-crossing
left_zero_cross=Get nearest zero crossing... Left time
right_zero_cross=Get nearest zero crossing... Right time
# Θεωρητικά αυτός ο έλεγχος είναι υπερβολικός αλλά που ξέρεις καμιά φορά..
if (left_zero_cross<>right_zero_cross)
printline Different Left and Right zero crossing!
printline Left='left_zero_cross'
printline Right='right_zero_cross'
else
printline zero_crossing='left_zero_cross'
zerocrossing=left_zero_cross
endif
endproc
Programming links:
20070618
Praat: Convert Sample points to time to zero-crossing.
Εγγραφή σε:
Σχόλια ανάρτησης (Atom)
Πληροφορίες
Αρχειοθήκη ιστολογίου
-
►
2010
(5)
- ► Σεπτεμβρίου (1)
- ► Φεβρουαρίου (2)
-
►
2008
(14)
- ► Δεκεμβρίου (3)
- ► Φεβρουαρίου (1)
- ► Ιανουαρίου (5)
-
▼
2007
(40)
- ► Δεκεμβρίου (4)
Ετικέτες
- C++ (25)
- Unix/Linux (9)
- SuSE 10.2 (8)
- boost (7)
- regex (6)
- Windows (5)
- Windows Vista (4)
- functions (4)
- vim (4)
- Visual Studio .NET 2005 (3)
- firefox (3)
- Windows 7 (2)
- asus eee 901 (2)
- open office (2)
- thunderbird (2)
- video tools (2)
- LaTeX (1)
- Praat Script (1)
- adobe cs4 (1)
- apache (1)
- files (1)
- laptop repair (1)
- php/MySQL (1)
- ubuntu 10.04 (1)
- ubuntu 12.04 (1)
- ubuntu 9.04 (1)
- ubuntu eee (1)
- western digital (1)
- wordpress (1)

Δεν υπάρχουν σχόλια:
Δημοσίευση σχολίου