Author Topic: Mono to stereo in the mixer  (Read 337 times)

hub73

  • Posts: 85
Mono to stereo in the mixer
« on: 26 Oct '22 - 23:26 »
Hello.
I use an external sound card (FocusRite Solo 2nd generation or Komplete Audio 1).
There are two inputs in front of the sound card.
input1 : to connect a microphone to the front XLR input socket. (mono left)
input2 : to connect another sound source (jack) to the front jack socket (for instrument or line) (mono right)

I use a bass mixer.

If i connect to input1 inside the bass mixer i've only the left channel, right channel empty.
or
if i connect to input2 inside the bass mixer i've only the right channel. left channel empty.

Is there a method to convert mono to stereo inside the mixer ? input1 to stereo (or input2 to stereo).

in fact i want to listen the sound on the left earphone and the right earphone inside my headphone (bass mixer output).

Many thanks.



Ian @ un4seen

  • Administrator
  • Posts: 24792
Re: Mono to stereo in the mixer
« Reply #1 on: 27 Oct '22 - 12:24 »
When plugging a mono source into a stereo mixer, the source should be converted to stereo automatically by default. Are your recordings actually mono or are they stereo with one channel silent, ie. what is the "chans" parameter in the BASS_RecordStart calls?

If you ultimately want to place each recording on one channel in the mix then you can use the BASS_SPEAKER_FRONTLEFT and BASS_SPEAKER_FRONTRIGHT flags in the BASS_Mixer_StreamAddChannel calls to do so. Or you can use the BASS_ATTRIB_PAN settings to do it, ie. -1 = left, +1 = right.

hub73

  • Posts: 85
Re: Mono to stereo in the mixer
« Reply #2 on: 27 Oct '22 - 21:17 »
Thanks Ian.
i use :
gParametres\Channel_ligne = BASS_RecordStart(44100, 2, #Null   , #Null, 0)
 gParametres\Encoder_enregistrement_entree = BASS_Encode_Ogg_StartFile(gParametres\Channel_ligne, @options, #BASS_UNICODE | #BASS_ENCODE_QUEUE, @NomFichier); // setup the encoder
BASS_Mixer_StreamAddChannel(gParametres\Mixer, gParametres\Channel_ligne, #BASS_MIXER_NORAMPIN | #BASS_STREAM_AUTOFREE )

if i use
gParametres\Channel_ligne = BASS_RecordStart(44100, 0, #Null   , #Null, 0) and plug the  microphone inside XLR inpout1 i have correct stereo output on the mixer. But now if i plug a microphone only inside Input2 i have nothing on the mixer...

i want always stereo output on the mixer. Not yet tested with your advice.

BASS_ChannelSetAttribute(gParametres\Mixer,  #BASS_ATTRIB_PAN, 0) ?



Ian @ un4seen

  • Administrator
  • Posts: 24792
Re: Mono to stereo in the mixer
« Reply #3 on: 28 Oct '22 - 13:18 »
If the inputs are mono, try setting the "chans" parameter to 1 in the BASS_RecordStart calls.

And if you want input1 on the left and input2 on the right, then add the BASS_SPEAKER_FRONTLEFT flag to input1 and BASS_SPEAKER_FRONTRIGHT to input2 in the BASS_Mixer_StreamAddChannel calls. Or set BASS_ATTRIB_PAN=-1 and BASS_ATTRIB_PAN=1 (via BASS_ChannelSetAttribute), respectively.

hub73

  • Posts: 85
Re: Mono to stereo in the mixer
« Reply #4 on: 28 Oct '22 - 22:26 »
sorry in fact, i've already use 1 for mono : (error in my previous message)
if i use
gParametres\Channel_ligne = BASS_RecordStart(44100, 1, #Null   , #Null, 0) and plug the  microphone inside XLR inpout1 i have correct stereo output on the mixer. But now if i plug a microphone only inside Input2 i have nothing on the mixer...

Quote
And if you want input1 on the left and input2 on the right
with RecordStart to mono (1) have nothing if i plug anything on input2

Quote
then add the BASS_SPEAKER_FRONTLEFT flag to input1 and BASS_SPEAKER_FRONTRIGHT to input2 in the BASS_Mixer_StreamAddChannel calls
but i've only one BASS_Mixer_StreamAddChannel call ?!? Could you post an code example ?

i use a plugin vst to transform mono to stereo : StereoSavage 2 Elements inside the program and it works.

Many thanks Ian.
« Last Edit: 28 Oct '22 - 22:37 by hub73 »

Ian @ un4seen

  • Administrator
  • Posts: 24792
Re: Mono to stereo in the mixer
« Reply #5 on: 31 Oct '22 - 12:38 »
but i've only one BASS_Mixer_StreamAddChannel call ?!?

Oh, I thought you wanted to record from 2 mono inputs at the same time, with one on the left and one on the right in a stereo mix. Is that not the case?

hub73

  • Posts: 85
Re: Mono to stereo in the mixer
« Reply #6 on: 31 Oct '22 - 19:39 »
Quote
Oh, I thought you wanted to record from 2 mono inputs at the same time, with one on the left and one on the right in a stereo mix. Is that not the case?
Yes, and also record Input1 OR Input2 !

FocusRite Scarlett 2n Gen External sound card.

From the Soundcard :
input1 XLR - mono - at left
input2 jack - mono - at right
inside the program : MICROPHONE (analog Input1 and Input2).

i keep : gParametres\Channel_ligne = BASS_RecordStart(44100, 2, #Null   , #Null, 0)
Ouput1 is at Left and Output2 is a right from the soundcard, not my choice.

1) Is there a method with BASS to set :
input1 XLR - mono - at left ---> now at center on the mixer ? Or now at the right ?

2) Is there a method with BASS to set
input2 Jack ->center on the mixer ? Or now at the left ?

edit : i use pan :  BASS_ChannelSetAttribute(gParametres\Channel_ligne, #BASS_ATTRIB_PAN, Pan) and a checkbox to record to mono or stereo.

note : when i saw a jack and 'line' button to the side of the FocusRite Input2, i believe to have a stereo input. But not seems to be the case. Perhaps only mono.

Many thanks.

 
« Last Edit: 31 Oct '22 - 21:37 by hub73 »

Chris

  • Posts: 2104
Re: Mono to stereo in the mixer
« Reply #7 on: 1 Nov '22 - 08:44 »
Hi, why are not using the Matrix stuff from BassMixer
Code: [Select]
// left Mic Channel

float matrix_L[2][2] = {
    {1, 0}, // left out = left in
    {0, 0} // right out = left in
};
BASS_Mixer_ChannelSetMatrix(Mic_LeftStream, matrix_L); // apply the matrix for the left mic

Code: [Select]
//right Mic Channel

float matrix_R[2][2] = {
    {1, 1}, // left out =right in
    {0, 1} // right out =right  in
};
BASS_Mixer_ChannelSetMatrix(Mic_RightStream, matrix_R); // apply the matrix for the right mic

Ian @ un4seen

  • Administrator
  • Posts: 24792
Re: Mono to stereo in the mixer
« Reply #8 on: 1 Nov '22 - 14:18 »
From the Soundcard :
input1 XLR - mono - at left
input2 jack - mono - at right
inside the program : MICROPHONE (analog Input1 and Input2).

i keep : gParametres\Channel_ligne = BASS_RecordStart(44100, 2, #Null   , #Null, 0)
Ouput1 is at Left and Output2 is a right from the soundcard, not my choice.

1) Is there a method with BASS to set :
input1 XLR - mono - at left ---> now at center on the mixer ? Or now at the right ?

2) Is there a method with BASS to set
input2 Jack ->center on the mixer ? Or now at the left ?

In the input1 case, you can record in mono (chans=1) and use BASS_ATTRIB_PAN to place it on the left/right/center.

The input2 case will be a bit trickier because it sounds like a mono recording captures just silence? In that case, you can use matrix mixing (BASS_MIXER_CHAN_MATRIX) on a stereo recording, like Chris suggests. For example, the matrixes could look like this:

Code: [Select]
float matrix_left[2][2] = {
    {0, 1}, // left out = right in
    {0, 0} // right out = silence
};

float matrix_right[2][2] = {
    {0, 0}, // left out = silence
    {0, 1} // right out = right in
};

float matrix_center[2][2] = {
    {0, 1}, // left out = right in
    {0, 1} // right out = right in
};

If you would like to use matrix mixing on input1 too then you can move the 1s to the first column in the matrixes for that.

hub73

  • Posts: 85
Re: Mono to stereo in the mixer
« Reply #9 on: 1 Nov '22 - 21:19 »
It's all very interesting. I will test all these ideas later. Thank you