[Cs-dev] Porting python program from csound 5.2 to csound 6
Date | 2015-06-10 20:44 |
From | Gonzalo Odiard |
Subject | [Cs-dev] Porting python program from csound 5.2 to csound 6 |
Attachments | None None |
Hello,
I am trying to port a group of applications (the Sugar TamTam activities) to csound 6 using the python bindings. This is needed because csound 5 is not longer supported in new Linux distributions (Fedora > 20, and new versions of Ubuntu). I am trying to do all the port using python, the old version used a c wrapper but was complicated distribute in environments with different architectures. I can make the basic examples work (from [1] and [2]) but I couldn't find a way to use the instruments data files in Tamtam work. I created a minimal test case, are 3 files that can be downloaded from When I run it on Fedora 21, I get: On Fedora 22 is a little different but crash anyway:
Any help is welcomed, I am stuck :/ Thanks in advance, Gonzalo Odiard SugarLabs - Software for children learning |
Date | 2015-06-10 21:24 |
From | Victor Lazzarini |
Subject | Re: [Cs-dev] Porting python program from csound 5.2 to csound 6 |
Attachments | None None |
There is a logging.error() that seems to be printing the ERROR message. I think the method is InputMessage and that is why the Attribute Error is raised. Capital "I" . Victor Lazzarini Dean of Arts, Celtic Studies, and Philosophy Maynooth University Ireland
|
Date | 2015-06-10 22:01 |
From | Gonzalo Odiard |
Subject | Re: [Cs-dev] Porting python program from csound 5.2 to csound 6 |
Attachments | None None |
Thanks! I fix that and other error I found (and uploaded a fixed version) and now do not have errors but no audio is played. I use InputMessage() to play the instrument too. My code do SetOption('-odac') and I have tested doing that with the examples in csound_API_examples and the output go to the audio device without problems. I also tried do not load the csd file at all, but the result is the same. Gonzalo On Wed, Jun 10, 2015 at 5:24 PM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
Gonzalo Odiard SugarLabs - Software for children learning |
Date | 2015-06-10 22:06 |
From | Victor Lazzarini |
Subject | Re: [Cs-dev] Porting python program from csound 5.2 to csound 6 |
Attachments | None None |
Possibly to do with the realtime audio module? Which one do you use? alsa, portaudio, jack, pulseaudio? Csound messages should indicate which. Victor Lazzarini Dean of Arts, Celtic Studies, and Philosophy Maynooth University Ireland
|
Date | 2015-06-10 22:24 |
From | Olivier Bélanger |
Subject | Re: [Cs-dev] Porting python program from csound 5.2 to csound 6 |
Attachments | None None |
Hi, IIRC, the c code in TamTam was there to bypass the audio driver and talk directly to the soundcard... That was the only way to get decent performance out of the system!On Wed, Jun 10, 2015 at 5:06 PM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
|
Date | 2015-06-10 22:27 |
From | Gonzalo Odiard |
Subject | Re: [Cs-dev] Porting python program from csound 5.2 to csound 6 |
Attachments | None None |
Apparently ALSA: [gonzalo@localhost test]$ python csound6_test.py 0dBFS level = 32768.0 Csound version 6.03.2 (double samples) Jan 27 2015 libsndfile-1.0.25 UnifiedCSD: /home/gonzalo/sugar-devel/honey/musickeyboard/music-keyboard-activity/test/tamtamorc.csd STARTING FILE Creating options Creating orchestra Creating score rtaudio: ALSA module enabled rtmidi: ALSA Raw MIDI module enabled sorting score ... ... done --Csound version 6.03.2 (double samples) Jan 27 2015 displays suppressed 0dBFS level = 32768.0 orch now loaded audio buffered in 256 sample-frame blocks writing 1024-byte blks of shorts to dac-m0 (WAV) SECTION 1: removed instance of instr 0 inactive allocs returned to freespace end of score. overall amps: 0.0 0.0 overall samples out of range: 0 0 0 errors in performance 512 1024 sample blks of shorts written to dac-m0 (WAV) signalflowgraph: csoundModuleDestroy(0xc1d910) On Wed, Jun 10, 2015 at 6:06 PM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
Gonzalo Odiard SugarLabs - Software for children learning |
Date | 2015-06-10 22:31 |
From | Gonzalo Odiard |
Subject | Re: [Cs-dev] Porting python program from csound 5.2 to csound 6 |
Attachments | None None |
Thanks Oliver. We still support our old XO-1 :) The c code was needed for all the operations or for the more complex only (TamTamSynth, rythms and so) Maybe I can start with the simple cases. Gonzalo On Wed, Jun 10, 2015 at 6:24 PM, Olivier Bélanger <olivier.belanger@umontreal.ca> wrote:
Gonzalo Odiard SugarLabs - Software for children learning |
Date | 2015-06-10 22:35 |
From | Victor Lazzarini |
Subject | Re: [Cs-dev] Porting python program from csound 5.2 to csound 6 |
Attachments | None None |
it looks like it might be writing to a file, not ALSA:
It's confusing the options. With SetOption you should pass only a single option at a time. Victor Lazzarini Dean of Arts, Celtic Studies, and Philosophy Maynooth University Ireland
|
Date | 2015-06-10 22:51 |
From | Gonzalo Odiard |
Subject | Re: [Cs-dev] Porting python program from csound 5.2 to csound 6 |
Attachments | None None |
Ok. Is confused by the section <CsOptions> -n -odac -m0 -W -s -d </CsOptions> in the tamtamorc.csd file. If I remove it, now say:
Still no sound. Is possible the command sent to play the note is wrong? On Wed, Jun 10, 2015 at 6:35 PM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
Gonzalo Odiard SugarLabs - Software for children learning |
Date | 2015-06-10 22:57 |
From | Victor Lazzarini |
Subject | Re: [Cs-dev] Porting python program from csound 5.2 to csound 6 |
Attachments | None None |
what's in the score section of the CSD? It looks like it is just finishing early. If you have anything in there, you will also need to add a f0 36000 to keep csound open for 36000 secs. If it is empty, then Csound should stay open forever (well for longer than the lifetime of your computer) Victor Lazzarini Dean of Arts, Celtic Studies, and Philosophy Maynooth University Ireland
|
Date | 2015-06-10 23:02 |
From | Gonzalo Odiard |
Subject | Re: [Cs-dev] Porting python program from csound 5.2 to csound 6 |
Attachments | None None |
How should I use it in a context where I need interaction with the user: * The user can select a instrument * The user play keys (in the physical keyboard in the computer or in a keyboard draw in the screen) and the notes are played. That is my final objective. I don't know if is relevant, but the application is using Gtk. Gonzalo On Wed, Jun 10, 2015 at 6:57 PM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
Gonzalo Odiard SugarLabs - Software for children learning |
Date | 2015-06-10 23:03 |
From | Olivier Bélanger |
Subject | Re: [Cs-dev] Porting python program from csound 5.2 to csound 6 |
Attachments | None None |
Don't know if that can be of any help, but I've just ported Cecilia4 to Csound6 and the only change I had to do (apart changing the module name) is to call the Reset() method of the Csound object after joining the perf thread (not needed with Csound5)... OlivierOn Wed, Jun 10, 2015 at 5:57 PM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
|
Date | 2015-06-10 23:05 |
From | Olivier Bélanger |
Subject | Re: [Cs-dev] Porting python program from csound 5.2 to csound 6 |
Attachments | None None |
That is what TamTamMini already does...!
On Wed, Jun 10, 2015 at 6:02 PM, Gonzalo Odiard <godiard@sugarlabs.org> wrote:
|
Date | 2015-06-10 23:07 |
From | Victor Lazzarini |
Subject | Re: [Cs-dev] Porting python program from csound 5.2 to csound 6 |
Attachments | None None |
You should keep Csound open. Try adding the line f0 36000 to the CsScore section of the CSD Victor Lazzarini Dean of Arts, Celtic Studies, and Philosophy Maynooth University Ireland
|
Date | 2015-06-10 23:07 |
From | Gonzalo Odiard |
Subject | Re: [Cs-dev] Porting python program from csound 5.2 to csound 6 |
Attachments | None None |
Exactly. I need port TamTaMini to csound6 On Wed, Jun 10, 2015 at 7:05 PM, Olivier Bélanger <olivier.belanger@umontreal.ca> wrote:
Gonzalo Odiard SugarLabs - Software for children learning |
Date | 2015-06-10 23:07 |
From | Gonzalo Odiard |
Subject | Re: [Cs-dev] Porting python program from csound 5.2 to csound 6 |
Attachments | None None |
I don't know Cecilia, but now I want know her :) On Wed, Jun 10, 2015 at 7:03 PM, Olivier Bélanger <olivier.belanger@umontreal.ca> wrote:
Gonzalo Odiard SugarLabs - Software for children learning |
Date | 2015-06-10 23:09 |
From | Andres Cabrera |
Subject | Re: [Cs-dev] Porting python program from csound 5.2 to csound 6 |
Attachments | None None |
I'm very happy to hear that things are being updated for the XO. I think there is great potential now to use som of the new features in Csound6 like dynamic instrument definitions, which could greatly simplify things (and allow more complex and interesting things). Also I think that performance should be sufficient using the perfThread and alsa output (as you can do in the Raspberri Pi). I'd be happy to test things out on my XO-1 if you let me know how I can try these latest things. On Wed, Jun 10, 2015 at 3:02 PM, Gonzalo Odiard <godiard@sugarlabs.org> wrote:
|
Date | 2015-06-10 23:24 |
From | Gonzalo Odiard |
Subject | Re: [Cs-dev] Porting python program from csound 5.2 to csound 6 |
Attachments | None None |
Thanks Andres! I should say I am deeply ignorant about csound in general, and new features in particular. The csound part on the TamTam activities was like a black box for us. But I developed a piano activity using that black box, to make use of the touch screen in the last XO models (XO-4) You can try the activity here: Moving forward, csound 5 is not longer included in modern linux distributions, then I need start the many times postponed port to csound6. That is the reason I am trying to understand what is needed to play a note, with a instrument in csound 6. Gonzalo On Wed, Jun 10, 2015 at 7:09 PM, Andres Cabrera <mantaraya36@gmail.com> wrote:
Gonzalo Odiard SugarLabs - Software for children learning |
Date | 2015-06-10 23:45 |
From | Andres Cabrera |
Subject | Re: [Cs-dev] Porting python program from csound 5.2 to csound 6 |
Attachments | None None |
Nice. I have a very old XO-1, and I was wondering if you know how I could get Csound6 and your work on the TamTam activities installed there (the easy way :) without having to compile Csound myself...)
You probably know about the Csound API: http://csound.github.io/docs/api/index.html You will find functions there that work at performance time: http://csound.github.io/docs/api/group__PERFORMANCE.html specifically: csoundCompileOrc ( CSOUND * csound, const char * str ) Cheers, Andrés On Wed, Jun 10, 2015 at 3:24 PM, Gonzalo Odiard <godiard@sugarlabs.org> wrote: > > Thanks Andres! > I should say I am deeply ignorant about csound in general, and new features in particular. > The csound part on the TamTam activities was like a black box for us. > But I developed a piano activity using that black box, to make use of the touch screen > in the last XO models (XO-4) You can try the activity here: > http://activities.sugarlabs.org/en-US/sugar/addon/4654 > > Moving forward, csound 5 is not longer included in modern linux distributions, > then I need start the many times postponed port to csound6. > That is the reason I am trying to understand what is needed to play a note, > with a instrument in csound 6. > > Gonzalo > > > On Wed, Jun 10, 2015 at 7:09 PM, Andres Cabrera <mantaraya36@gmail.com> wrote: >> >> I'm very happy to hear that things are being updated for the XO. I think there is great potential now to use som of the new features in Csound6 like dynamic instrument definitions, which could greatly simplify things (and allow more complex and interesting things). >> >> Also I think that performance should be sufficient using the perfThread and alsa output (as you can do in the Raspberri Pi). I'd be happy to test things out on my XO-1 if you let me know how I can try these latest things. >> >> Cheers, >> Andrés >> >> On Wed, Jun 10, 2015 at 3:02 PM, Gonzalo Odiard <godiard@sugarlabs.org> wrote: >>> >>> How should I use it in a context where I need interaction with the user: >>> * The user can select a instrument >>> * The user play keys (in the physical keyboard in the computer or in a keyboard draw in the screen) >>> and the notes are played. >>> That is my final objective. >>> I don't know if is relevant, but the application is using Gtk. >>> >>> Gonzalo >>> >>> On Wed, Jun 10, 2015 at 6:57 PM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote: >>>> >>>> what's in the score section of the CSD? It looks like it is just finishing early. If you have anything in there, you will also need to add a >>>> >>>> f0 36000 >>>> >>>> to keep csound open for 36000 secs. If it is empty, then Csound should stay open forever (well for longer than the lifetime of your computer) >>>> >>>> Victor Lazzarini >>>> Dean of Arts, Celtic Studies, and Philosophy >>>> Maynooth University >>>> Ireland >>>> >>>> On 10 Jun 2015, at 22:51, Gonzalo Odiard <godiard@sugarlabs.org> wrote: >>>> >>>> Ok. Is confused by the section >>>> >>>> <CsOptions> >>>> -n -odac -m0 -W -s -d >>>> </CsOptions> >>>> >>>> in the tamtamorc.csd file. >>>> >>>> If I remove it, now say: >>>> >>>> [gonzalo@localhost test]$ python csound6_test.py >>>> 0dBFS level = 32768.0 >>>> Csound version 6.03.2 (double samples) Jan 27 2015 >>>> libsndfile-1.0.25 >>>> UnifiedCSD: /home/gonzalo/sugar-devel/honey/musickeyboard/music-keyboard-activity/test/tamtamorc.csd >>>> STARTING FILE >>>> Creating options >>>> Creating orchestra >>>> Creating score >>>> rtaudio: ALSA module enabled >>>> rtmidi: ALSA Raw MIDI module enabled >>>> sorting score ... >>>> ... done >>>> --Csound version 6.03.2 (double samples) Jan 27 2015 >>>> displays suppressed >>>> 0dBFS level = 32768.0 >>>> orch now loaded >>>> audio buffered in 256 sample-frame blocks >>>> writing 512 sample blks of 64-bit floats to dac >>>> SECTION 1: >>>> removed instance of instr 0 >>>> inactive allocs returned to freespace >>>> end of score. overall amps: 0.0 0.0 >>>> overall samples out of range: 0 0 >>>> 0 errors in performance >>>> 0 512 sample blks of 64-bit floats written to dac >>>> signalflowgraph: csoundModuleDestroy(0x1fa7910) >>>> >>>> >>>> Still no sound. >>>> >>>> Is possible the command sent to play the note is wrong? >>>> >>>> >>>> >>>> >>>> >>>> >>>> On Wed, Jun 10, 2015 at 6:35 PM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote: >>>>> >>>>> it looks like it might be writing to a file, not ALSA: >>>>> >>>>> writing 1024-byte blks of shorts to dac-m0 (WAV) >>>>> >>>>> >>>>> It's confusing the options. With SetOption you should pass only a single option at a time. >>>>> >>>>> Victor Lazzarini >>>>> Dean of Arts, Celtic Studies, and Philosophy >>>>> Maynooth University >>>>> Ireland >>>>> >>>>> On 10 Jun 2015, at 22:27, Gonzalo Odiard <godiard@sugarlabs.org> wrote: >>>>> >>>>> Apparently ALSA: >>>>> >>>>> [gonzalo@localhost test]$ python csound6_test.py >>>>> 0dBFS level = 32768.0 >>>>> Csound version 6.03.2 (double samples) Jan 27 2015 >>>>> libsndfile-1.0.25 >>>>> UnifiedCSD: /home/gonzalo/sugar-devel/honey/musickeyboard/music-keyboard-activity/test/tamtamorc.csd >>>>> STARTING FILE >>>>> Creating options >>>>> Creating orchestra >>>>> Creating score >>>>> rtaudio: ALSA module enabled >>>>> rtmidi: ALSA Raw MIDI module enabled >>>>> sorting score ... >>>>> ... done >>>>> --Csound version 6.03.2 (double samples) Jan 27 2015 >>>>> displays suppressed >>>>> 0dBFS level = 32768.0 >>>>> orch now loaded >>>>> audio buffered in 256 sample-frame blocks >>>>> writing 1024-byte blks of shorts to dac-m0 (WAV) >>>>> SECTION 1: >>>>> removed instance of instr 0 >>>>> inactive allocs returned to freespace >>>>> end of score. overall amps: 0.0 0.0 >>>>> overall samples out of range: 0 0 >>>>> 0 errors in performance >>>>> 512 1024 sample blks of shorts written to dac-m0 (WAV) >>>>> signalflowgraph: csoundModuleDestroy(0xc1d910) >>>>> >>>>> >>>>> On Wed, Jun 10, 2015 at 6:06 PM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote: >>>>>> >>>>>> Possibly to do with the realtime audio module? Which one do you use? alsa, portaudio, jack, pulseaudio? >>>>>> >>>>>> Csound messages should indicate which. >>>>>> >>>>>> Victor Lazzarini >>>>>> Dean of Arts, Celtic Studies, and Philosophy >>>>>> Maynooth University >>>>>> Ireland >>>>>> >>>>>> On 10 Jun 2015, at 22:01, Gonzalo Odiard <godiard@sugarlabs.org> wrote: >>>>>> >>>>>> Thanks! >>>>>> >>>>>> I fix that and other error I found (and uploaded a fixed version) and now do not have errors >>>>>> but no audio is played. >>>>>> I use InputMessage() to play the instrument too. >>>>>> >>>>>> My code do SetOption('-odac') and I have tested doing that with the examples >>>>>> in csound_API_examples and the output go to the audio device without problems. >>>>>> >>>>>> I also tried do not load the csd file at all, but the result is the same. >>>>>> >>>>>> Gonzalo >>>>>> >>>>>> >>>>>> On Wed, Jun 10, 2015 at 5:24 PM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote: >>>>>>> >>>>>>> There is a logging.error() that seems to be printing the ERROR message. >>>>>>> >>>>>>> I think the method is InputMessage and that is why the Attribute Error is raised. Capital "I" . >>>>>>> >>>>>>> Victor Lazzarini >>>>>>> Dean of Arts, Celtic Studies, and Philosophy >>>>>>> Maynooth University >>>>>>> Ireland >>>>>>> >>>>>>> On 10 Jun 2015, at 20:44, Gonzalo Odiard <godiard@sugarlabs.org> wrote: >>>>>>> >>>>>>> Hello, >>>>>>> >>>>>>> I am trying to port a group of applications (the Sugar TamTam activities) to csound 6 >>>>>>> using the python bindings. This is needed because csound 5 is not >>>>>>> longer supported in new Linux distributions (Fedora > 20, and new versions >>>>>>> of Ubuntu). I am trying to do all the port using python, >>>>>>> the old version used a c wrapper but was complicated distribute in >>>>>>> environments with different architectures. >>>>>>> I can make the basic examples work (from [1] and [2]) but I couldn't >>>>>>> find a way to use the instruments data files in Tamtam work. >>>>>>> >>>>>>> I created a minimal test case, are 3 files that can be downloaded from >>>>>>> http://dev.laptop.org/~gonzalo/csound/ >>>>>>> >>>>>>> When I run it on Fedora 21, I get: >>>>>>> >>>>>>> >>>>>>> $ python csound6_test.py >>>>>>> 0dBFS level = 32768.0 >>>>>>> Csound version 6.03.2 (double samples) Sep 30 2014 >>>>>>> libsndfile-1.0.25 >>>>>>> rtaudio: ALSA module enabled >>>>>>> rtmidi: ALSA Raw MIDI module enabled >>>>>>> --Csound version 6.03.2 (double samples) Sep 30 2014 >>>>>>> graphics suppressed, ascii substituted >>>>>>> 0dBFS level = 32768.0 >>>>>>> orch now loaded >>>>>>> audio buffered in 256 sample-frame blocks >>>>>>> ALSA output: total buffer size: 1024, period size: 256 >>>>>>> writing 256 sample blks of 64-bit floats to dac >>>>>>> SECTION 1: >>>>>>> ERROR:root:load_instrument message "f5001 0 0 -1 /home/gonzalo/sugar-devel/honey/musickeyboard/music-keyboard-activity/test/piano 0 0 0" >>>>>>> Traceback (most recent call last): >>>>>>> File "csound6_test.py", line 47, in <module> >>>>>>> c.load_instrument('piano') >>>>>>> File "csound6_test.py", line 39, in load_instrument >>>>>>> self.perf.inputMessage(message) >>>>>>> File "/usr/lib64/python2.7/site-packages/csnd6.py", line 3036, in <lambda> >>>>>>> __getattr__ = lambda self, name: _swig_getattr(self, CsoundPerformanceThread, name) >>>>>>> File "/usr/lib64/python2.7/site-packages/csnd6.py", line 57, in _swig_getattr >>>>>>> raise AttributeError(name) >>>>>>> AttributeError: inputMessage >>>>>>> inactive allocs returned to freespace >>>>>>> end of score. overall amps: 0.0 >>>>>>> overall samples out of range: 0 >>>>>>> 0 errors in performance >>>>>>> Csound tidy up: Segmentation fault >>>>>>> >>>>>>> On Fedora 22 is a little different but crash anyway: >>>>>>> >>>>>>> $ python csound6_test.py >>>>>>> 0dBFS level = 32768.0 >>>>>>> Csound version 6.03.2 (double samples) Jan 27 2015 >>>>>>> libsndfile-1.0.25 >>>>>>> UnifiedCSD: /home/gonzalo/sugar-devel/honey/musickeyboard/music-keyboard-activity/test/tamtamorc.csd >>>>>>> STARTING FILE >>>>>>> Creating options >>>>>>> Creating orchestra >>>>>>> Creating score >>>>>>> rtaudio: ALSA module enabled >>>>>>> rtmidi: ALSA Raw MIDI module enabled >>>>>>> sorting score ... >>>>>>> ... done >>>>>>> --Csound version 6.03.2 (double samples) Jan 27 2015 >>>>>>> displays suppressed >>>>>>> 0dBFS level = 32768.0 >>>>>>> orch now loaded >>>>>>> audio buffered in 256 sample-frame blocks >>>>>>> writing 512 sample blks of 64-bit floats to dac >>>>>>> ERROR:root:load_instrument message "f5000 0 0 -1 "piano" 0 0 0" >>>>>>> Traceback (most recent call last): >>>>>>> File "csound6_test.py", line 52, in <module> >>>>>>> c.load_instrument('piano') >>>>>>> File "csound6_test.py", line 37, in load_instrument >>>>>>> self.cs.inputMessage(message) >>>>>>> File "/usr/lib64/python2.7/site-packages/csnd6.py", line 1915, in <lambda> >>>>>>> __getattr__ = lambda self, name: _swig_getattr(self, Csound, name) >>>>>>> File "/usr/lib64/python2.7/site-packages/csnd6.py", line 57, in _swig_getattr >>>>>>> raise AttributeError(name) >>>>>>> AttributeError: inputMessage >>>>>>> removed instance of instr 0 >>>>>>> inactive allocs returned to freespace >>>>>>> end of score. overall amps: 0.0 0.0 >>>>>>> overall samples out of range: 0 0 >>>>>>> 0 errors in performance >>>>>>> 0 512 sample blks of 64-bit floats written to dac >>>>>>> signalflowgraph: csoundModuleDestroy(0x155c910) >>>>>>> >>>>>>> >>>>>>> >>>>>>> Any help is welcomed, I am stuck :/ >>>>>>> >>>>>>> Thanks in advance, >>>>>>> >>>>>>> [1] https://github.com/csound/csound >>>>>>> [2] https://github.com/csound/csoundAPI_examples >>>>>>> >>>>>>> -- >>>>>>> Gonzalo Odiard >>>>>>> >>>>>>> SugarLabs - Software for children learning >>>>>>> >>>>>>> ------------------------------------------------------------------------------ >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Csound-devel mailing list >>>>>>> Csound-devel@lists.sourceforge.net >>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel >>>>>>> >>>>>>> >>>>>>> ------------------------------------------------------------------------------ >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Csound-devel mailing list >>>>>>> Csound-devel@lists.sourceforge.net >>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Gonzalo Odiard >>>>>> >>>>>> SugarLabs - Software for children learning >>>>>> >>>>>> ------------------------------------------------------------------------------ >>>>>> >>>>>> _______________________________________________ >>>>>> Csound-devel mailing list >>>>>> Csound-devel@lists.sourceforge.net >>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel >>>>>> >>>>>> >>>>>> ------------------------------------------------------------------------------ >>>>>> >>>>>> _______________________________________________ >>>>>> Csound-devel mailing list >>>>>> Csound-devel@lists.sourceforge.net >>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> Gonzalo Odiard >>>>> >>>>> SugarLabs - Software for children learning >>>>> >>>>> ------------------------------------------------------------------------------ >>>>> >>>>> _______________________________________________ >>>>> Csound-devel mailing list >>>>> Csound-devel@lists.sourceforge.net >>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel >>>>> >>>>> >>>>> ------------------------------------------------------------------------------ >>>>> >>>>> _______________________________________________ >>>>> Csound-devel mailing list >>>>> Csound-devel@lists.sourceforge.net >>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel >>>>> >>>> >>>> >>>> >>>> -- >>>> Gonzalo Odiard >>>> >>>> SugarLabs - Software for children learning >>>> >>>> ------------------------------------------------------------------------------ >>>> >>>> _______________________________________________ >>>> Csound-devel mailing list >>>> Csound-devel@lists.sourceforge.net >>>> https://lists.sourceforge.net/lists/listinfo/csound-devel >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> >>>> _______________________________________________ >>>> Csound-devel mailing list >>>> Csound-devel@lists.sourceforge.net >>>> https://lists.sourceforge.net/lists/listinfo/csound-devel >>>> >>> >>> >>> >>> -- >>> Gonzalo Odiard >>> >>> SugarLabs - Software for children learning >>> >>> ------------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Csound-devel mailing list >>> Csound-devel@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/csound-devel >>> >> >> >> ------------------------------------------------------------------------------ >> >> _______________________________________________ >> Csound-devel mailing list >> Csound-devel@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/csound-devel >> > > > > -- > Gonzalo Odiard > > SugarLabs - Software for children learning > > ------------------------------------------------------------------------------ > > _______________________________________________ > Csound-devel mailing list > Csound-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/csound-devel > |
Date | 2015-06-11 00:06 |
From | Olivier Bélanger |
Subject | Re: [Cs-dev] Porting python program from csound 5.2 to csound 6 |
Attachments | None None |
I'd be happy to test it out me too! I really think the problem is with bad calls to the API or with the audio driver. Csound5 csd files should run as is with Csound6. OlivierOn Wed, Jun 10, 2015 at 6:45 PM, Andres Cabrera <mantaraya36@gmail.com> wrote:
|
Date | 2015-06-11 02:54 |
From | Pete Goodeve |
Subject | [Cs-dev] Csound 6 on the Pi? (was Re: Porting python program from csound 5.2 to 6) |
Attachments | None |
Date | 2015-06-11 16:17 |
From | Gonzalo Odiard |
Subject | Re: [Cs-dev] Porting python program from csound 5.2 to csound 6 |
Attachments | None None |
On Wed, Jun 10, 2015 at 7:45 PM, Andres Cabrera <mantaraya36@gmail.com> wrote:
The easier to have the last stuff is install a new image http://wiki.laptop.org/go/Release_notes/13.2.4 but that is a stable version using F18. No Csound port there yet. This work is in a preparation for newer images.
Will continue looking at the docs Gonzalo
Gonzalo Odiard SugarLabs - Software for children learning |
Date | 2015-06-11 16:42 |
From | Victor Lazzarini |
Subject | Re: [Cs-dev] Porting python program from csound 5.2 to csound 6 |
did you solve your immediate problem? ======================== Dr Victor Lazzarini Dean of Arts, Celtic Studies and Philosophy, Maynooth University, Maynooth, Co Kildare, Ireland Tel: 00 353 7086936 Fax: 00 353 1 7086952 > On 11 Jun 2015, at 16:17, Gonzalo Odiard |
Date | 2015-06-11 17:02 |
From | Gonzalo Odiard |
Subject | Re: [Cs-dev] Porting python program from csound 5.2 to csound 6 |
Attachments | None None |
No. I have tried adding f0 36000 to the CsScore section of the CSD file. I also tried remove all and make the csd file only: <CsoundSynthesizer> <CsScore> f0 36000 </CsScore> </CsoundSynthesizer>. but do not change the result. I was looking for python examples for my use case, but didn't found nothing yet. Gonzalo On Thu, Jun 11, 2015 at 12:42 PM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote: did you solve your immediate problem? Gonzalo Odiard SugarLabs - Software for children learning |
Date | 2015-06-11 17:13 |
From | Gonzalo Odiard |
Subject | Re: [Cs-dev] Porting python program from csound 5.2 to csound 6 |
Attachments | None None |
Making the csd file: <CsoundSynthesizer> <CsInstruments> sr=16000 ksmps=64 nchnls=2 giScale = 1/sr giAliasSr = sr/2.1 </CsInstruments> <CsScore> f0 36000 </CsScore> </CsoundSynthesizer> Do not play a note, but now I hear a "tick" when run the python code On Thu, Jun 11, 2015 at 1:02 PM, Gonzalo Odiard <godiard@sugarlabs.org> wrote:
Gonzalo Odiard SugarLabs - Software for children learning |
Date | 2015-06-11 17:21 |
From | Victor Lazzarini |
Subject | Re: [Cs-dev] Porting python program from csound 5.2 to csound 6 |
No instruments in your CSD file? Where are they? ======================== Dr Victor Lazzarini Dean of Arts, Celtic Studies and Philosophy, Maynooth University, Maynooth, Co Kildare, Ireland Tel: 00 353 7086936 Fax: 00 353 1 7086952 > On 11 Jun 2015, at 17:13, Gonzalo Odiard |
Date | 2015-06-11 17:30 |
From | Gonzalo Odiard |
Subject | Re: [Cs-dev] Porting python program from csound 5.2 to csound 6 |
Attachments | None None |
I try to load one using InputMessage("F5000 0 0 -1 filename 0 0 0") The filename is piano and that file is http://dev.laptop.org/~gonzalo/csound/piano the same instrument file used in csound5 The original csd file is huge http://dev.laptop.org/~gonzalo/csound/tamtamorc.csd I don't know what is really needed and what not, then I am testing with different parts. Gonzalo On Thu, Jun 11, 2015 at 1:21 PM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote: No instruments in your CSD file? Where are they? Gonzalo Odiard SugarLabs - Software for children learning |
Date | 2015-06-11 17:57 |
From | Gonzalo Odiard |
Subject | Re: [Cs-dev] Porting python program from csound 5.2 to csound 6 |
Attachments | None None |
Just as a reference, that is what the old code do: and On Thu, Jun 11, 2015 at 1:30 PM, Gonzalo Odiard <godiard@sugarlabs.org> wrote:
Gonzalo Odiard SugarLabs - Software for children learning |
Date | 2015-06-11 18:55 |
From | Victor Lazzarini |
Subject | Re: [Cs-dev] Porting python program from csound 5.2 to csound 6 |
Attachments | None None |
yes, but that is just a table containing the piano waveform. You actually need an instrument to play it. Maybe you can have a quick scan of the Csound FLOSS manual to have an idea of what you need. If you google it, you'll get the address. Victor Lazzarini Dean of Arts, Celtic Studies, and Philosophy Maynooth University Ireland
|
Date | 2015-06-12 15:42 |
From | Gonzalo Odiard |
Subject | Re: [Cs-dev] Porting python program from csound 5.2 to csound 6 |
Attachments | None None |
Some improvements: I mixed the example from the f command with a example using python to play a sound pressing a button And implemented it using Gtk instead of Tk (needs download the audio file http://www.csounds.com/manualOLPC/examples/beats.wav)
This works. If is useful for others I can send a pull request to add it to the examples. Gonzalo On Thu, Jun 11, 2015 at 2:55 PM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
Gonzalo Odiard SugarLabs - Software for children learning |