📄 songdbread.m
字号:
function songData=songDbRead(dbName, encoded)
%songDbRead: Read .txt and .db file into a songData structure
% Usage: songData=songDbRead(dbName, encoded)
% txtFile: index file name.
% dbFile: binary database file name.
% encoded: 1 if dbFile is xor-encoded
% songData: a structure contains fields specified in .txt file
% In particular, songData(i).track is a vector containing (pitch, duration) pairs read from dbFile.
% pitch is in semitone, duration is in 1/64 seconds
%
% For example:
% songDb=songDbRead('childSong', 0);
% dispStructInHtml(songDb);
% Roger Jang, 20051202, 20080526
if nargin<0, selfdemo; return; end
if nargin<1, dbName='childSong'; end
if nargin<2, encoded=0; end
% ====== 眖 txtFile 弄
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -