Q: How to generate sound file with different frequencies for left/right (alternating)

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Q: How to generate sound file with different frequencies for left/right (alternating)

ffmpeg-11
Hello

I would like to generate a sound file with two frequencies, sinus, one per channel
(left, right) alternating between them. For example: left 0.5 sec 5kHz, then right 0.5 sec 8kHz and so on.
I've spent hours reading ffmpeg docs but am overwhelmed by its power and complexity.

Thanks for your help.
Chris
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Q: How to generate sound file with different frequencies for left/right (alternating)

Michael Koch
Am 13.05.2020 um 22:06 schrieb [hidden email]:
> Hello
>
> I would like to generate a sound file with two frequencies, sinus, one per channel
> (left, right) alternating between them. For example: left 0.5 sec 5kHz, then right 0.5 sec 8kHz and so on.
> I've spent hours reading ffmpeg docs but am overwhelmed by its power and complexity.

ffmpeg -f lavfi -i sine=5000 -f lavfi -i sine=8000 -filter_complex
"[0]volume='lt(mod(t,1.0),0.5)':eval=frame[a];[1]volume='gte(mod(t,1.0),0.5)':eval=frame[b];[a][b]join=inputs=2:channel_layout=stereo"
-t 10 -y out.wav

Michael

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Q: How to generate sound file with different frequencies for left/right (alternating)

Jim Shupert, Jr.-2
In reply to this post by ffmpeg-11
On 5/13/2020 4:06 PM, [hidden email] wrote:
> Hello
>
> I would like to generate a sound file with two frequencies, sinus, one per channel
> (left, right) alternating between them. For example: left 0.5 sec 5kHz, then right 0.5 sec 8kHz and so on.
> I've spent hours reading ffmpeg docs but am overwhelmed by its power and complexity.
>
>
friend
You might wish to have a look at
SOX  http://sox.sourceforge.net/
http://sox.sourceforge.net/Docs/Features

example 1 second wav at 5kHz

|sox -n -r 8000 output.wav synth 1 sine 5000|

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Q: How to generate sound file with different frequencies for left/right (alternating)

ffmpeg-11
On Thu, May 14, 2020 at 09:58:58AM -0400, Jim Shupert wrote:

> On 5/13/2020 4:06 PM, [hidden email] wrote:
> >Hello
> >
> >I would like to generate a sound file with two frequencies, sinus, one per channel
> >(left, right) alternating between them. For example: left 0.5 sec 5kHz, then right 0.5 sec 8kHz and so on.
> >I've spent hours reading ffmpeg docs but am overwhelmed by its power and complexity.
> >
> >
> friend
> You might wish to have a look at
> SOX  http://sox.sourceforge.net/
> http://sox.sourceforge.net/Docs/Features
>
> example 1 second wav at 5kHz
>
> |sox -n -r 8000 output.wav synth 1 sine 5000|
>
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> [hidden email] with subject "unsubscribe".
>

Friend
I know about sox.
"sox -n -r 8000 output.wav synth 1 sine 5000" doesn't do what I asked for.

Thanks,
Chris
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Q: How to generate sound file with different frequencies for left/right (alternating)

ffmpeg-11
In reply to this post by Michael Koch
On Thu, May 14, 2020 at 08:38:14AM +0200, Michael Koch wrote:

> Am 13.05.2020 um 22:06 schrieb [hidden email]:
> >Hello
> >
> >I would like to generate a sound file with two frequencies, sinus, one per channel
> >(left, right) alternating between them. For example: left 0.5 sec 5kHz, then right 0.5 sec 8kHz and so on.
> >I've spent hours reading ffmpeg docs but am overwhelmed by its power and complexity.
>
> ffmpeg -f lavfi -i sine=5000 -f lavfi -i sine=8000 -filter_complex "[0]volume='lt(mod(t,1.0),0.5)':eval=frame[a];[1]volume='gte(mod(t,1.0),0.5)':eval=frame[b];[a][b]join=inputs=2:channel_layout=stereo"
> -t 10 -y out.wav
>
> Michael
>
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> [hidden email] with subject "unsubscribe".
>

Thanks Michael!

Regards,
Chris
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".