楼主: zhou.wen
1994 8

[问答] How to read .wav file in SAS for analysis ? [推广有奖]

已卖:4460份资源

教授

9%

还不是VIP/贵宾

-

TA的文库  其他...

SAS Technology

威望
0
论坛币
31987 个
通用积分
6.2141
学术水平
283 点
热心指数
262 点
信用等级
257 点
经验
56058 点
帖子
396
精华
4
在线时间
1328 小时
注册时间
2010-10-12
最后登录
2018-3-9

初级学术勋章 初级热心勋章 中级学术勋章 中级热心勋章

楼主
zhou.wen 发表于 2013-7-26 11:41:29 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
Greetings!
I have a Windows .wav file representing an acoustical signal that I would like to analyze in SAS. How would I go about opening the .wav file?
Many thanks!
I read somewhere that .wav are binary file formats, so that I run


  1. data test;   
  2. infile "c:\...\Windows Default.wav" lrecl = 2000;
  3. input _x  pib5. ;
  4. run;
  5. proc print output:      
  6. _x
  7. 121438095698
  8. 834918219026
复制代码

I wonder what that means? Windows Default.rar (13.48 KB) 本附件包括:
  • Windows Default.wav






二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:Analysis Analysi Analys alysis Analy file

Practice Is The Best Teacher!

沙发
scarfacetony 发表于 2013-7-26 11:49:50
out of my range
看了这个视频,我于是有了进股市的信心!
https://bbs.pinggu.org/thread-2787427-1-1.html

藤椅
webgu 发表于 2013-7-26 12:20:01
I have no idea on this topic.
SAS资源
1. SAS 微信:StatsThinking
2. SAS QQ群:348941365

板凳
Imasasor 发表于 2013-7-26 12:39:15
beyond my capacity
欢迎加入亚太地区第一R&Python数据挖掘群: 251548215;

报纸
zhou.wen 发表于 2013-7-26 12:55:22
I modify my code:
  1. data test;
  2.      infile "C:\..\wav\Windows Default.wav"   lrecl = 300;
  3.      input _x  PIB. @@;
  4.          y=put(_x,hex2.);
  5. run;
复制代码
QQ图片20130726125046.jpg
The result is close to what I want,but the dataset gets only 81 obs which is  far away from the ultraedit's presentation?
Would you improve my code?
Any way!
Thanks for your interest!
Practice Is The Best Teacher!

地板
zhou.wen 发表于 2013-7-26 12:57:05
http://www.mathworks.cn/cn/help/matlab/ref/wavread.html
By the way,it seems to be easy for Matlab!
Practice Is The Best Teacher!

7
zhou.wen 发表于 2013-7-26 13:27:18
All Right! The test file I provide early has  a bit problem.
Use another .wav file,the result will be totally OK..

data test;
infile "C:\Users\Administrator\Documents\MATLAB\handel.wav" lrecl = 300;
input _x PIB2. @@;
y=put(_x,hex4.);
run; handel.rar (120.18 KB) 本附件包括:
  • handel.wav


Practice Is The Best Teacher!

8
zhou.wen 发表于 2013-7-26 13:55:17
cheer up!Waveform Diagram from SAS and Matlab
wav.png
SAS code:
data test;
     infile "C:\Users\Administrator\Documents\MATLAB\handel.wav"   lrecl = 300;
     input _x  PIB2. @@;
         y=put(_x,hex4.);
         y1=ifn(_x>32767,-(65535-_x)/32768,_x/32767);
         id=_n_;
run;
proc template;
define statgraph wav;
dynamic _ID _Y1;
begingraph / designwidth=1016 designheight=432;
   layout lattice / rowdatarange=data columndatarange=data rowgutter=10 columngutter=10;
      layout overlay;
         needleplot x=_ID y=_Y1 / name='needle';
      endlayout;
   endlayout;
endgraph;
end;
run;
proc sgrender data=WORK.TEST template=wav;
dynamic _ID="ID" _Y1="Y1";
run;


Matlab code:
[y, Fs, nbits] = wavread('test.wav');
plot(y)
已有 3 人评分经验 论坛币 学术水平 热心指数 信用等级 收起 理由
qtime + 1 + 1 逐步探索的过程非常棒!
moyunzheng + 1 + 1 + 1 精彩帖子
webgu + 60 + 60 + 1 + 1 + 1 well done!

总评分: 经验 + 60  论坛币 + 60  学术水平 + 3  热心指数 + 3  信用等级 + 2   查看全部评分

Practice Is The Best Teacher!

9
sxlion 发表于 2013-9-8 20:58:23
不错 好帖。

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2025-12-5 16:40