how do I convert a string answer into a readable audioread

1 次查看(过去 30 天)
I want to create a game where users can upload audiofiles and play them at the same volume.
To upload the audiofiles, so far I have tried:
X_1 = input('First song: ','s');
[DJ_Music{1},Fs] = audioread('X_1''.m4a');
However, this gives an error everytime I fill in the audiofile name, does anyone have tips?
It probably has something to do with the string and characters formation?

采纳的回答

Walter Roberson
Walter Roberson 2016-9-25
X_1 = input('First song: ','s');
[DJ_Music{1},Fs] = audioread([X_1 '.m4a']);

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Install Products 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by