[Simulink]​音のピッチをノブ等で​変える際のエラーの対​処方法

■やりたいこと
 下図ブロック線図のようにノブを使ってピッチを変えたい
■課題
 shiftPitch関数をMATLAB functionブロックとして使う場合、
 nsemitonesを外部入力にするとエラーを起こす
■エラー内容
 コンポーネント: MATLAB Function | カテゴリ: Coder エラー
 すべての入力は定数でなければなりません。
-------------------------------------------------------------------------------------------------
もし関数ブロックでの解決が厳しい場合、こちらも検討しています。
(しかしながら、まだ内容理解できていません…)
よろしくお願いいたします。

 Accepted Answer

takemoto
takemoto on 13 Jul 2021

0 votes

エラーの原因を調べ切れていませんが、シミュレーション中のピッチパラメータを可変とす例題としては、以下が使えそうです。
ブロックを置き換えると(添付)、実行中にピッチを変えることはできますが、いかがでしょうか?

More Answers (0)

Categories

Find more on Audio I/O and Waveform Generation in Help Center and File Exchange

Products

Release

R2021a

Asked:

on 12 Jul 2021

Answered:

on 13 Jul 2021

Community Treasure Hunt

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

Start Hunting!