sox-users@lists.sourceforge.net unofficial mirror
 help / color / mirror / code / Atom feed
* playing more than 2 sounds with synth option
@ 2020-08-10 15:57 Noah Essl
  2020-08-10 17:36 ` Måns Rullgård
  2020-08-10 19:03 ` Jan Stary
  0 siblings, 2 replies; 5+ messages in thread
From: Noah Essl @ 2020-08-10 15:57 UTC (permalink / raw)
  To: sox-users

Hi!

I am playing 2 frequencies like this:
> play -qn synth $a_number_variable sine $sound_1 sine $sound_2 fade h
$some $random $numbers

and I am trying to play even more sounds like:
> play -qn synth $a_number_variable sine $sound_1 sine $sound_2 sine
$sound_3 sine $sound_4
or like:
> play -qn synth $a_number_variable sine $sound_1 sine $sound_2 synth
sine $sound_3 sine $sound_4

but that doesn't work. How would I do it to play 4 frequencies parallel
with the same command? Is there no support for that and if so, why limit
it to 2?

Thanks in advance for any help!

Noah




_______________________________________________
Sox-users mailing list
Sox-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: playing more than 2 sounds with synth option
  2020-08-10 15:57 playing more than 2 sounds with synth option Noah Essl
@ 2020-08-10 17:36 ` Måns Rullgård
  2020-08-11 12:34   ` Noah Essl
  2020-08-10 19:03 ` Jan Stary
  1 sibling, 1 reply; 5+ messages in thread
From: Måns Rullgård @ 2020-08-10 17:36 UTC (permalink / raw)
  To: Noah Essl; +Cc: sox-users

Noah Essl <arche1@gmx.at> writes:

> Hi!
>
> I am playing 2 frequencies like this:
>> play -qn synth $a_number_variable sine $sound_1 sine $sound_2 fade h
> $some $random $numbers
>
> and I am trying to play even more sounds like:
>> play -qn synth $a_number_variable sine $sound_1 sine $sound_2 sine
> $sound_3 sine $sound_4
> or like:
>> play -qn synth $a_number_variable sine $sound_1 sine $sound_2 synth
> sine $sound_3 sine $sound_4
>
> but that doesn't work. How would I do it to play 4 frequencies parallel
> with the same command? Is there no support for that and if so, why limit
> it to 2?
>
> Thanks in advance for any help!

Your commands create a new channel for each tone.  If you want to mix
them you can do that in a few ways.  One is like this:

$ play -n synth 10 sine 1k synth sine mix 2k synth sine mix 3k

Another way:

$ play -n synth 10 sine 1k sine 2k sine 3k remix -

If that's not what you're looking for, you'll have to describe in more
detail what you're trying to achieve.

-- 
Måns Rullgård


_______________________________________________
Sox-users mailing list
Sox-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: playing more than 2 sounds with synth option
  2020-08-10 15:57 playing more than 2 sounds with synth option Noah Essl
  2020-08-10 17:36 ` Måns Rullgård
@ 2020-08-10 19:03 ` Jan Stary
  1 sibling, 0 replies; 5+ messages in thread
From: Jan Stary @ 2020-08-10 19:03 UTC (permalink / raw)
  To: sox-users

On Aug 10 17:57:17, arche1@gmx.at wrote:
> Hi!
> 
> I am playing 2 frequencies like this:
> > play -qn synth $a_number_variable sine $sound_1 sine $sound_2 fade h
> $some $random $numbers
> 
> and I am trying to play even more sounds like:
> > play -qn synth $a_number_variable sine $sound_1 sine $sound_2 sine
> $sound_3 sine $sound_4
> or like:
> > play -qn synth $a_number_variable sine $sound_1 sine $sound_2 synth
> sine $sound_3 sine $sound_4

Why the extra invocation of 'synth'?
'play -n synth 5 sine 100 sine 200 sine 300 sine 400' works just fine.

> but that doesn't work.

Meaning what? What actual command are you using,
and what exactly is SoX doing? (That is to say,
show us the output of play -V synth ...)

> How would I do it to play 4 frequencies parallel
> with the same command? Is there no support for that and if so, why limit
> it to 2?

Is your hardware capable of playing more than 2 channels?
If not, you will need the remix effect to mix it down to two channels.

	Jan



_______________________________________________
Sox-users mailing list
Sox-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: playing more than 2 sounds with synth option
  2020-08-10 17:36 ` Måns Rullgård
@ 2020-08-11 12:34   ` Noah Essl
  2020-08-11 14:02     ` Måns Rullgård
  0 siblings, 1 reply; 5+ messages in thread
From: Noah Essl @ 2020-08-11 12:34 UTC (permalink / raw)
  To: sox-users

On 8/10/20 7:36 PM, Måns Rullgård wrote:
> Noah Essl <arche1@gmx.at> writes:
>
>> Hi!
>>
>> I am playing 2 frequencies like this:
>>> play -qn synth $a_number_variable sine $sound_1 sine $sound_2 fade h
>> $some $random $numbers
>>
>> and I am trying to play even more sounds like:
>>> play -qn synth $a_number_variable sine $sound_1 sine $sound_2 sine
>> $sound_3 sine $sound_4
>> or like:
>>> play -qn synth $a_number_variable sine $sound_1 sine $sound_2 synth
>> sine $sound_3 sine $sound_4
>>
>> but that doesn't work. How would I do it to play 4 frequencies parallel
>> with the same command? Is there no support for that and if so, why limit
>> it to 2?
>>
>> Thanks in advance for any help!
> Your commands create a new channel for each tone.  If you want to mix
> them you can do that in a few ways.  One is like this:
>
> $ play -n synth 10 sine 1k synth sine mix 2k synth sine mix 3k
>
> Another way:
>
> $ play -n synth 10 sine 1k sine 2k sine 3k remix -
>
> If that's not what you're looking for, you'll have to describe in more
> detail what you're trying to achieve.
>
Thanks for your input!
I tried several ways and I liked the "remix -" option the most.

What am I doing: I am programming a 4-voiced random music generator (in
bash) that endlessly plays in the background bc I am fed up with
available music.
Wanna try it: https://github.com/noahsmindfuck/random_music_generator

Is there a way to make the sounds sound like a piano instead of a pure
sine? Or can i actually import/use preexisting curves of existing
instruments (e.g. the 'pluck' that plays a guitar)?



_______________________________________________
Sox-users mailing list
Sox-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: playing more than 2 sounds with synth option
  2020-08-11 12:34   ` Noah Essl
@ 2020-08-11 14:02     ` Måns Rullgård
  0 siblings, 0 replies; 5+ messages in thread
From: Måns Rullgård @ 2020-08-11 14:02 UTC (permalink / raw)
  To: Noah Essl; +Cc: sox-users

Noah Essl <arche1@gmx.at> writes:

> On 8/10/20 7:36 PM, Måns Rullgård wrote:
>> Noah Essl <arche1@gmx.at> writes:
>>
>>> Hi!
>>>
>>> I am playing 2 frequencies like this:
>>>> play -qn synth $a_number_variable sine $sound_1 sine $sound_2 fade h
>>> $some $random $numbers
>>>
>>> and I am trying to play even more sounds like:
>>>> play -qn synth $a_number_variable sine $sound_1 sine $sound_2 sine
>>> $sound_3 sine $sound_4
>>> or like:
>>>> play -qn synth $a_number_variable sine $sound_1 sine $sound_2 synth
>>> sine $sound_3 sine $sound_4
>>>
>>> but that doesn't work. How would I do it to play 4 frequencies parallel
>>> with the same command? Is there no support for that and if so, why limit
>>> it to 2?
>>>
>>> Thanks in advance for any help!
>> Your commands create a new channel for each tone.  If you want to mix
>> them you can do that in a few ways.  One is like this:
>>
>> $ play -n synth 10 sine 1k synth sine mix 2k synth sine mix 3k
>>
>> Another way:
>>
>> $ play -n synth 10 sine 1k sine 2k sine 3k remix -
>>
>> If that's not what you're looking for, you'll have to describe in more
>> detail what you're trying to achieve.
>>
> Thanks for your input!
> I tried several ways and I liked the "remix -" option the most.
>
> What am I doing: I am programming a 4-voiced random music generator (in
> bash) that endlessly plays in the background bc I am fed up with
> available music.
> Wanna try it: https://github.com/noahsmindfuck/random_music_generator
>
> Is there a way to make the sounds sound like a piano instead of a pure
> sine? Or can i actually import/use preexisting curves of existing
> instruments (e.g. the 'pluck' that plays a guitar)?

Try 'pluck' instead of 'sine' in the synth command.

-- 
Måns Rullgård


_______________________________________________
Sox-users mailing list
Sox-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-08-11 14:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-10 15:57 playing more than 2 sounds with synth option Noah Essl
2020-08-10 17:36 ` Måns Rullgård
2020-08-11 12:34   ` Noah Essl
2020-08-11 14:02     ` Måns Rullgård
2020-08-10 19:03 ` Jan Stary

sox-users@lists.sourceforge.net unofficial mirror

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://public-inbox.org/sox-users

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 sox-users sox-users/ https://public-inbox.org/sox-users \
		sox-users@lists.sourceforge.net
	public-inbox-index sox-users

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.audio.sox
	nntp://7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/inbox.comp.audio.sox
	nntp://news.gmane.io/gmane.comp.audio.sox
 note: .onion URLs require Tor: https://www.torproject.org/

code repositories for project(s) associated with this inbox:

	https://80x24.org/mirrors/sox.git

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git