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

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

 Respuesta aceptada

takemoto
takemoto el 13 de Jul. de 2021

0 votos

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

Más respuestas (0)

Categorías

Más información sobre Audio I/O and Waveform Generation en Centro de ayuda y File Exchange.

Productos

Versión

R2021a

Preguntada:

el 12 de Jul. de 2021

Respondida:

el 13 de Jul. de 2021

Community Treasure Hunt

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

Start Hunting!