前提
Processing +minimでオーディオビジュアライザーを制作しています。
PC内の音声をAudioInputで取得するために仮想オーディオデバイスを使用しようとしています。
実現したいこと
minimで、PC内の仮想オーディオデバイスの音声を渡すこと。
発生している問題
AudioInputに仮想オーディオデバイスの音声を渡すことができません。
Windowsのサウンド設定からProcessingの入力デバイスを既定から仮想オーディオデバイスに変更するなど試しましたが、
どうしてもノートPC付属のマイクの音を拾ってしまいます。
仮想オーディオデバイスはYAMAHA SYNCROOMを使用しています。
該当のソースコード
Processing
1import ddf.minim.*; 2Minim minim; 3AudioInput in; 4 5void setup(){ 6 size(1280,720); 7 minim = new Minim(this); 8 in = minim.getLineIn(Minim.MONO,512,12000); 9} 10 11void draw(){ 12 background(0,0,0); 13 for (int n=0;n<99;n++){ 14 strokeWeight(4); 15 stroke(255,255,255); 16 line(500+width/2-n*10,height/2-(2*in.left.get(n)*120),490+width/2-n*10,height/2-(2*in.left.get(n+1)*120)); 17 } 18} 19 20void stop(){ 21 in.close(); 22 minim.stop(); 23 super.stop(); 24}
この類は全然わからないので、ggった雑多な情報です(私は何もわかってません^^;
> Windowsのサウンド設定からProcessingの入力デバイスを既定から仮想オーディオデバイスに変更するなど試しました
PC設定を切り替えればできそうな感じがしますけど、最近の情報はあまり見当たらなかったので何か不具合があるのかもしれませんね。
> How the record source for a computer is set will depend on the soundcard and OS, but typically a user can open a control panel and set the source from there.
> コンピュータの録音ソースをどのように設定するかは、サウンドカードやOSによって異なりますが、通常はユーザーがコントロールパネルを開いて、そこからソースを設定することができます。
もしmacならどうしようもないってことでしょうか。
> This is particularly problematic on the Mac because the input will always wind up being connected to the Mic-In, even if the user has set the input differently using their audio control panel.
> 特にMacの場合、ユーザーがオーディオコントロールパネルで別の入力を設定しても、入力は常にマイク入力に接続されるため、これは問題です。
[Minim : : AudioInput](https://code.compartmental.net/minim/audioinput_class_audioinput.html)
[How to get the currently playing audio as audio input in Processing? - Stack Overflow](https://stackoverflow.com/questions/39472434/how-to-get-the-currently-playing-audio-as-audio-input-in-processing)
Mixerとかそういう話ではない?
[Minim/setInputMixer.pde at master · ddf/Minim](https://github.com/ddf/Minim/blob/master/examples/Advanced/setInputMixer/setInputMixer.pde)
標準のSoundライブラリは、複数入力できるように見えます。
[Sound / Libraries / Processing.org](https://processing.org/reference/libraries/sound/index.html)
[Reference / Processing.org](https://processing.org/reference/libraries/sound/AudioIn.html)
ありがとうございます!
https://github.com/ddf/Minim/blob/master/examples/Advanced/setInputMixer/setInputMixer.pde
で解決いたしました。
回答1件
あなたの回答
tips
プレビュー