Generates test sample(audio)

버전 1.0.0.0 (2.64 KB) 작성자: Chandra
Generates test samples by randomly combining a known set of test data.
다운로드 수: 633
업데이트 날짜: 2012/10/26

라이선스 보기

This is utility function used to generate test samples by randomly combining audio samples (encoded in wave format) located at a specified directory*

[out save_dir] = generateTestData(data_loc,n,len,[save,r])

DESC:
Generates test sample(s) 'out' by randomly choosing test data located at 'data_loc'

eg., for
data_loc = [ 1,2,3,4,5 ]
generateTestData(data_loc,1,4) might return out = [ 5,7,1,7 ]

INPUT:
data_loc := /path/to/data from which audio sample(s) has to be generated.
n := #test samples to generate
len := #elements in each test sample.
save := boolean,
true - save the generated sample(s) to disk.
By default, saved at data_loc/samples/<out(n).name>.wav
false - do not save (default)
r := 0 - no repetetion [1]
k - #repetetions in each test sample (not implemented)

OUTPUT:
out(n) := generated test sample(s)

.srate := sampling rate of the generated sample [2]
.data := the data
.name := name of the generated sample

NOTE:
[1] Repetetions is allowed by default; use r=0 to turn off repetetion.
[2] In-consistencies in sampling rate amoungst the test data would yield
unpredictable sampling rate (although with-in test data) of generated sample.

* This program uses the 'combinator' written by Matt Fig to randomly combine the test data.
(You can download it here : http://www.mathworks.com/matlabcentral/fileexchange/24325-combinator-combinations-and-permutations)

** This is my first program written in Matlab. I wrote this utility function as a part of my lab work in Audio. Suggestions and inputs are always welcome.

인용 양식

Chandra (2024). Generates test sample(audio) (https://www.mathworks.com/matlabcentral/fileexchange/38798-generates-test-sample-audio), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2011a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Audio I/O and Waveform Generation에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.0.0.0