Csound Csound-dev Csound-tekno Search About

[Csnd] FM synth with PySimpleGUI

Date2018-11-04 12:40
FromRichard
Subject[Csnd] FM synth with PySimpleGUI
AttachmentsScreen Shot 2018-11-04 at 13.28.11.png  
PySimpleGUI is very powerful. This screen shot shows how little code is 
needed to create the sliders window...



Richard


Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2018-11-04 12:48
FromTarmo Johannes
SubjectRe: [Csnd] FM synth with PySimpleGUI
Seems really good framework!
I will dedinitely check it out.
Thanks for sharing!
Tarmo 

4. nov 2018 2:40 PM kirjutas kuupäeval "Richard" <zappfinger@gmail.com>:
PySimpleGUI is very powerful. This screen shot shows how little code is
needed to create the sliders window...



Richard


Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2018-11-04 19:43
Fromjoachim heintz
SubjectRe: [Csnd] FM synth with PySimpleGUI
nice, thanks.  can you post the whole python code and the csd you use?
best -
	joachim



On 04/11/18 13:40, Richard wrote:
> PySimpleGUI is very powerful. This screen shot shows how little code is
> needed to create the sliders window...
>
>
>
> Richard
>
>
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>        https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2018-11-04 21:06
FromRichard
SubjectRe: [Csnd] FM synth with PySimpleGUI
AttachmentssimpleGUI.py  Simple_FM_Synth.csd  
Sure, here it is..

Richard


On 04/11/18 20:43, joachim heintz wrote:
> nice, thanks.  can you post the whole python code and the csd you use?
> best -
>     joachim
>
>
>
> On 04/11/18 13:40, Richard wrote:
>> PySimpleGUI is very powerful. This screen shot shows how little code is
>> needed to create the sliders window...
>>
>>
>>
>> Richard
>>
>>
>> Csound mailing list
>> Csound@listserv.heanet.ie
>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>> Send bugs reports to
>>        https://github.com/csound/csound/issues
>> Discussions of bugs and features can be posted here
>
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>        https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here


Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2018-11-04 21:25
Fromjoachim heintz
SubjectRe: [Csnd] FM synth with PySimpleGUI
thanks.  what is the reference for this import:
from csoundSession import CsoundSession

i think it is not included?


On 04/11/18 22:06, Richard wrote:
> Sure, here it is..
>
> Richard
>
>
> On 04/11/18 20:43, joachim heintz wrote:
>> nice, thanks.  can you post the whole python code and the csd you use?
>> best -
>>     joachim
>>
>>
>>
>> On 04/11/18 13:40, Richard wrote:
>>> PySimpleGUI is very powerful. This screen shot shows how little code is
>>> needed to create the sliders window...
>>>
>>>
>>>
>>> Richard
>>>
>>>
>>> Csound mailing list
>>> Csound@listserv.heanet.ie
>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>> Send bugs reports to
>>>        https://github.com/csound/csound/issues
>>> Discussions of bugs and features can be posted here
>>
>> Csound mailing list
>> Csound@listserv.heanet.ie
>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>> Send bugs reports to
>>        https://github.com/csound/csound/issues
>> Discussions of bugs and features can be posted here
>
>
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>        https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2018-11-04 21:33
FromRichard
SubjectRe: [Csnd] FM synth with PySimpleGUI
AttachmentscsoundSession.py  
You are right, attached now.



On 04/11/18 22:25, joachim heintz wrote:
> thanks. what is the reference for this import:
> from csoundSession import CsoundSession
>
> i think it is not included?
>
>
> On 04/11/18 22:06, Richard wrote:
>> Sure, here it is..
>>
>> Richard
>>
>>
>> On 04/11/18 20:43, joachim heintz wrote:
>>> nice, thanks.  can you post the whole python code and the csd you use?
>>> best -
>>>     joachim
>>>
>>>
>>>
>>> On 04/11/18 13:40, Richard wrote:
>>>> PySimpleGUI is very powerful. This screen shot shows how little 
>>>> code is
>>>> needed to create the sliders window...
>>>>
>>>>
>>>>
>>>> Richard
>>>>
>>>>
>>>> Csound mailing list
>>>> Csound@listserv.heanet.ie
>>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>>> Send bugs reports to
>>>>        https://github.com/csound/csound/issues
>>>> Discussions of bugs and features can be posted here
>>>
>>> Csound mailing list
>>> Csound@listserv.heanet.ie
>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>> Send bugs reports to
>>>        https://github.com/csound/csound/issues
>>> Discussions of bugs and features can be posted here
>>
>>
>> Csound mailing list
>> Csound@listserv.heanet.ie
>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>> Send bugs reports to
>>        https://github.com/csound/csound/issues
>> Discussions of bugs and features can be posted here
>
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>        https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here


Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2018-11-04 22:19
Fromjoachim heintz
SubjectRe: [Csnd] FM synth with PySimpleGUI
thanks.  i see now that it is more or less included in the ctcsound 
repo.  it is nearly working now, but:

TypeError                                 Traceback (most recent call last)
 in ()
       2         event, values = window.Read(timeout=20)
       3         #print(values[0])
----> 4         cs.setControlChannel('modfactor', float(values[0]))
       5         cs.setControlChannel('modindex', float(values[1]))
       6         cs.setControlChannel('modatt', float(values[2])/10.)
TypeError: float() argument must be a string or a number, not 'NoneType'

any idea what can be the reason here?

i am using python 3.5 on debian.

cheers -
	joachim


On 04/11/18 22:33, Richard wrote:
> You are right, attached now.
>
>
>
> On 04/11/18 22:25, joachim heintz wrote:
>> thanks. what is the reference for this import:
>> from csoundSession import CsoundSession
>>
>> i think it is not included?
>>
>>
>> On 04/11/18 22:06, Richard wrote:
>>> Sure, here it is..
>>>
>>> Richard
>>>
>>>
>>> On 04/11/18 20:43, joachim heintz wrote:
>>>> nice, thanks.  can you post the whole python code and the csd you use?
>>>> best -
>>>>     joachim
>>>>
>>>>
>>>>
>>>> On 04/11/18 13:40, Richard wrote:
>>>>> PySimpleGUI is very powerful. This screen shot shows how little
>>>>> code is
>>>>> needed to create the sliders window...
>>>>>
>>>>>
>>>>>
>>>>> Richard
>>>>>
>>>>>
>>>>> Csound mailing list
>>>>> Csound@listserv.heanet.ie
>>>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>>>> Send bugs reports to
>>>>>        https://github.com/csound/csound/issues
>>>>> Discussions of bugs and features can be posted here
>>>>
>>>> Csound mailing list
>>>> Csound@listserv.heanet.ie
>>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>>> Send bugs reports to
>>>>        https://github.com/csound/csound/issues
>>>> Discussions of bugs and features can be posted here
>>>
>>>
>>> Csound mailing list
>>> Csound@listserv.heanet.ie
>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>> Send bugs reports to
>>>        https://github.com/csound/csound/issues
>>> Discussions of bugs and features can be posted here
>>
>> Csound mailing list
>> Csound@listserv.heanet.ie
>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>> Send bugs reports to
>>        https://github.com/csound/csound/issues
>> Discussions of bugs and features can be posted here
>
>
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>        https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2018-11-04 23:21
FromForrest Curo
SubjectRe: [Csnd] FM synth with PySimpleGUI
Hmm, suppose one combined the PYSimpleGUI with a python OSC module, & used that to control csound indirectly. Would that slow things down much?

On Sun, Nov 4, 2018 at 2:19 PM joachim heintz <jh@joachimheintz.de> wrote:
thanks.  i see now that it is more or less included in the ctcsound
repo.  it is nearly working now, but:

TypeError                                 Traceback (most recent call last)
<ipython-input-6-31878f76f458> in <module>()
       2         event, values = window.Read(timeout=20)
       3         #print(values[0])
----> 4         cs.setControlChannel('modfactor', float(values[0]))
       5         cs.setControlChannel('modindex', float(values[1]))
       6         cs.setControlChannel('modatt', float(values[2])/10.)
TypeError: float() argument must be a string or a number, not 'NoneType'

any idea what can be the reason here?

i am using python 3.5 on debian.

cheers -
        joachim


On 04/11/18 22:33, Richard wrote:
> You are right, attached now.
>
>
>
> On 04/11/18 22:25, joachim heintz wrote:
>> thanks. what is the reference for this import:
>> from csoundSession import CsoundSession
>>
>> i think it is not included?
>>
>>
>> On 04/11/18 22:06, Richard wrote:
>>> Sure, here it is..
>>>
>>> Richard
>>>
>>>
>>> On 04/11/18 20:43, joachim heintz wrote:
>>>> nice, thanks.  can you post the whole python code and the csd you use?
>>>> best -
>>>>     joachim
>>>>
>>>>
>>>>
>>>> On 04/11/18 13:40, Richard wrote:
>>>>> PySimpleGUI is very powerful. This screen shot shows how little
>>>>> code is
>>>>> needed to create the sliders window...
>>>>>
>>>>>
>>>>>
>>>>> Richard
>>>>>
>>>>>
>>>>> Csound mailing list
>>>>> Csound@listserv.heanet.ie
>>>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>>>> Send bugs reports to
>>>>>        https://github.com/csound/csound/issues
>>>>> Discussions of bugs and features can be posted here
>>>>
>>>> Csound mailing list
>>>> Csound@listserv.heanet.ie
>>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>>> Send bugs reports to
>>>>        https://github.com/csound/csound/issues
>>>> Discussions of bugs and features can be posted here
>>>
>>>
>>> Csound mailing list
>>> Csound@listserv.heanet.ie
>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>> Send bugs reports to
>>>        https://github.com/csound/csound/issues
>>> Discussions of bugs and features can be posted here
>>
>> Csound mailing list
>> Csound@listserv.heanet.ie
>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>> Send bugs reports to
>>        https://github.com/csound/csound/issues
>> Discussions of bugs and features can be posted here
>
>
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>        https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2018-11-05 08:14
FromRichard van Bemmelen
SubjectRe: [Csnd] FM synth with PySimpleGUI
It looks like values[0] is None. You could verify that by uncommenting the print statement. No idea why. Can you try it on another platform? 
I can try it later on my RPi or on Ubuntu.

Richard 

Op zo 4 nov. 2018 om 23:19 schreef joachim heintz <jh@joachimheintz.de>:
thanks.  i see now that it is more or less included in the ctcsound
repo.  it is nearly working now, but:

TypeError                                 Traceback (most recent call last)
<ipython-input-6-31878f76f458> in <module>()
       2         event, values = window.Read(timeout=20)
       3         #print(values[0])
----> 4         cs.setControlChannel('modfactor', float(values[0]))
       5         cs.setControlChannel('modindex', float(values[1]))
       6         cs.setControlChannel('modatt', float(values[2])/10.)
TypeError: float() argument must be a string or a number, not 'NoneType'

any idea what can be the reason here?

i am using python 3.5 on debian.

cheers -
        joachim


On 04/11/18 22:33, Richard wrote:
> You are right, attached now.
>
>
>
> On 04/11/18 22:25, joachim heintz wrote:
>> thanks. what is the reference for this import:
>> from csoundSession import CsoundSession
>>
>> i think it is not included?
>>
>>
>> On 04/11/18 22:06, Richard wrote:
>>> Sure, here it is..
>>>
>>> Richard
>>>
>>>
>>> On 04/11/18 20:43, joachim heintz wrote:
>>>> nice, thanks.  can you post the whole python code and the csd you use?
>>>> best -
>>>>     joachim
>>>>
>>>>
>>>>
>>>> On 04/11/18 13:40, Richard wrote:
>>>>> PySimpleGUI is very powerful. This screen shot shows how little
>>>>> code is
>>>>> needed to create the sliders window...
>>>>>
>>>>>
>>>>>
>>>>> Richard
>>>>>
>>>>>
>>>>> Csound mailing list
>>>>> Csound@listserv.heanet.ie
>>>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>>>> Send bugs reports to
>>>>>        https://github.com/csound/csound/issues
>>>>> Discussions of bugs and features can be posted here
>>>>
>>>> Csound mailing list
>>>> Csound@listserv.heanet.ie
>>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>>> Send bugs reports to
>>>>        https://github.com/csound/csound/issues
>>>> Discussions of bugs and features can be posted here
>>>
>>>
>>> Csound mailing list
>>> Csound@listserv.heanet.ie
>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>> Send bugs reports to
>>>        https://github.com/csound/csound/issues
>>> Discussions of bugs and features can be posted here
>>
>> Csound mailing list
>> Csound@listserv.heanet.ie
>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>> Send bugs reports to
>>        https://github.com/csound/csound/issues
>> Discussions of bugs and features can be posted here
>
>
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>        https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2018-11-05 08:18
FromRichard van Bemmelen
SubjectRe: [Csnd] FM synth with PySimpleGUI
That should work and I do not think it will slow down things. PySimpleGUI does not use call backs but uses this in a while loop:

event, values = window.Read(timeout=20)  

You can play with the timeout value (now 20 ms) and make it less

Richard

Op ma 5 nov. 2018 om 00:21 schreef Forrest Curo <treegestalt@gmail.com>:
Hmm, suppose one combined the PYSimpleGUI with a python OSC module, & used that to control csound indirectly. Would that slow things down much?

On Sun, Nov 4, 2018 at 2:19 PM joachim heintz <jh@joachimheintz.de> wrote:
thanks.  i see now that it is more or less included in the ctcsound
repo.  it is nearly working now, but:

TypeError                                 Traceback (most recent call last)
<ipython-input-6-31878f76f458> in <module>()
       2         event, values = window.Read(timeout=20)
       3         #print(values[0])
----> 4         cs.setControlChannel('modfactor', float(values[0]))
       5         cs.setControlChannel('modindex', float(values[1]))
       6         cs.setControlChannel('modatt', float(values[2])/10.)
TypeError: float() argument must be a string or a number, not 'NoneType'

any idea what can be the reason here?

i am using python 3.5 on debian.

cheers -
        joachim


On 04/11/18 22:33, Richard wrote:
> You are right, attached now.
>
>
>
> On 04/11/18 22:25, joachim heintz wrote:
>> thanks. what is the reference for this import:
>> from csoundSession import CsoundSession
>>
>> i think it is not included?
>>
>>
>> On 04/11/18 22:06, Richard wrote:
>>> Sure, here it is..
>>>
>>> Richard
>>>
>>>
>>> On 04/11/18 20:43, joachim heintz wrote:
>>>> nice, thanks.  can you post the whole python code and the csd you use?
>>>> best -
>>>>     joachim
>>>>
>>>>
>>>>
>>>> On 04/11/18 13:40, Richard wrote:
>>>>> PySimpleGUI is very powerful. This screen shot shows how little
>>>>> code is
>>>>> needed to create the sliders window...
>>>>>
>>>>>
>>>>>
>>>>> Richard
>>>>>
>>>>>
>>>>> Csound mailing list
>>>>> Csound@listserv.heanet.ie
>>>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>>>> Send bugs reports to
>>>>>        https://github.com/csound/csound/issues
>>>>> Discussions of bugs and features can be posted here
>>>>
>>>> Csound mailing list
>>>> Csound@listserv.heanet.ie
>>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>>> Send bugs reports to
>>>>        https://github.com/csound/csound/issues
>>>> Discussions of bugs and features can be posted here
>>>
>>>
>>> Csound mailing list
>>> Csound@listserv.heanet.ie
>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>> Send bugs reports to
>>>        https://github.com/csound/csound/issues
>>> Discussions of bugs and features can be posted here
>>
>> Csound mailing list
>> Csound@listserv.heanet.ie
>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>> Send bugs reports to
>>        https://github.com/csound/csound/issues
>> Discussions of bugs and features can be posted here
>
>
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>        https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here