Arduino Forum

Using Arduino => Audio => Topic started by: jpapp on Jun 01, 2019, 04:55 pm

Title: Two or more audio outputs
Post by: jpapp on Jun 01, 2019, 04:55 pm
Hello!
Im totally newbie about arduino, but I have a past with different (microchip, st) controllers.
I would like to build a proof of concept audio application, where I need at least two analogue stereo audio outputs and possibly a MIDI output.
Are there any shields for this application, or shall I thinking about building something?
Thanks for your answers!
Title: Re: Two or more audio outputs
Post by: Grumpy_Mike on Jun 03, 2019, 06:25 pm
Quote
where I need at least two analogue stereo audio outputs
Forget it, you can't do that on an Arduino Uno.
Title: Re: Two or more audio outputs
Post by: MarkT on Jun 03, 2019, 07:44 pm
That's probably needs I2S DACs and an Arduino that can drive I2S.
Title: Re: Two or more audio outputs
Post by: SynchRa on Jan 29, 2020, 05:23 pm
Forget it, you can't do that on an Arduino Uno.
I have two  analogue stereo audio outputs (two DFmini players = two stereo signals) 
I use two libraries.


#include <DFRobotDFPlayerMini.h>
#include <DFPlayer_Mini_Mp3.h>
#include <SoftwareSerial.h>

SoftwareSerial mySerial1 (8, 9); 
SoftwareSerial mySerial2 (10, 11);
DFRobotDFPlayerMini myDFPlayer;   
void printDetail(uint8_t type, int value);

void setup() {

 Serial.begin (9600);


  mySerial1.begin(9600);
  delay (100);
    mp3_set_serial (mySerial1);
   delay (100);
  mp3_set_volume (14); // Set volume value. From 0 to 30 (First Analog signal)
   
 
  mySerial2.begin(9600);   
   if (!myDFPlayer.begin(mySerial2)) { 
       while(true);
    }
  myDFPlayer.volume(18);  //Set volume value. From 0 to 30 (Next analog signal)


mp3_play (1);         //Play first song from MP3 player from serial port  rx tx 8 9
myDFPlayer.play(4);   //Play song Nr4 from MP3 player from serial port  rx tx 10 11


(My English very bad)
Title: Re: Two or more audio outputs
Post by: slipstick on Jan 29, 2020, 06:08 pm
I would like to build a proof of concept audio application, where I need at least two analogue stereo audio outputs and possibly a MIDI output.
Where is the data coming from for all these outputs? What processing is needed?

It doesn't sound like an Arduino project but then the specification is rather short of detail.

Steve
Title: Re: Two or more audio outputs
Post by: Grumpy_Mike on Jan 30, 2020, 08:34 am
This thread started in the middle of last year.

Quote
I have two  analogue stereo audio outputs (two DFmini players = two stereo signals) 
I use two libraries.
That is NOT doing it with an Arduino that is doing it with two external sound players. The fact that the Arduino is controlling them is irrelevant. If you want to just trigger two sounds then some sound players will allow up to 14 sounds to be triggered at once. But this WAS NOT what the OP was asking about.
Title: Re: Two or more audio outputs
Post by: MarkT on Jan 30, 2020, 10:08 pm
This sounds like a job for a full-blown DSP chip, although "application" could be anything, but the presence of MIDI out suggests something heavyweight.
Title: Re: Two or more audio outputs
Post by: pjrc on Jan 31, 2020, 01:46 am
You don't need a powerful DSP, but proper I2S hardware matters.

I've supported 4 channel output on Teensy 3.2 (ARM Cortex-M4 at 96 MHz) for years, and also 8 channel output using CS42448 since mid-2017.

Info here:
https://www.sparkfun.com/news/2055
https://oshpark.com/shared_projects/2Yj6rFaW

Old 8 bit AVR is definitely under-powered and lacks I2S.  But even mid-range microcontrollers with proper I2S digital audio ports can do this with good software.