sugarlabs / tamtam

GNU General Public License v2.0
0 stars 7 forks source link

Port to Csound 6.10 #3

Open quozl opened 6 years ago

quozl commented 6 years ago

TamTam activities;

Reference: https://github.com/sugarlabs/tamtam/tree/master/common/Util/Clooper

Csound 5.x is not available on current Linux distributions.

A port to Csound 6.x using the Csound Python API (import csnd6) was done in the Music Keyboard activity. But the Csound Python API is deprecated.

A port to a more recent Csound such as 6.10 or 7.00 may use the ctcsound API provided in Csound 6.08 and later. See also https://github.com/godiard/music-keyboard-activity/issues/21.

jcmdev0 commented 4 years ago

I updated Clooper to use the csound_threaded.hpp api from 6.10. It seemed like an easier pivot than re-writing the looping logic.

quozl commented 4 years ago

Thanks, well done. On Ubuntu 19.04 x86_64, I've run python setup.py dev, then run make in common/Util/Clooper, then switched to the TamTamJam.activity and started it with sugar-activity. It makes appropriate sound from the default loops. I also tried TamTamMini.activity.

In both cases, some of the UI is broken; I guess the next step is to finish the port to GTK 3?

chimosky commented 3 years ago

While trying to complete the port to GTK 3, activity fails to start with error;

skip /home/ibiam/Activities/TamTamMini.activity/common/Util/Clooper/linux32_508 blobs: /home/ibiam/Activities/TamTamMini.activity/common/Util/Clooper/linux32_508/aclient.so: wrong ELF class: ELFCLASS32
skip /home/ibiam/Activities/TamTamMini.activity/common/Util/Clooper/linux32_513 blobs: /home/ibiam/Activities/TamTamMini.activity/common/Util/Clooper/linux32_513/aclient.so: wrong ELF class: ELFCLASS32
skip /home/ibiam/Activities/TamTamMini.activity/common/Util/Clooper/armv7l_513 blobs: /home/ibiam/Activities/TamTamMini.activity/common/Util/Clooper/armv7l_513/aclient.so: wrong ELF class: ELFCLASS32
Traceback (most recent call last):
  File "/usr/bin/sugar-activity", line 5, in <module>
    activityinstance.main()
  File "/usr/lib/python2.7/dist-packages/sugar3/activity/activityinstance.py", line 179, in main
    module = __import__(module_name)
  File "/home/ibiam/Activities/TamTamMini.activity/TamTamMini.py", line 34, in <module>
    from   common.Util.CSoundClient import new_csound_client
  File "/home/ibiam/Activities/TamTamMini.activity/common/Util/CSoundClient.py", line 12, in <module>
    from common.Util.Clooper import *
  File "/home/ibiam/Activities/TamTamMini.activity/common/Util/Clooper/__init__.py", line 20, in <module>
    raise Exception('cannot find proper binary blobs')
Exception: cannot find proper binary blobs

And this seems to happen cos of this error; happens when I run make in common/Util/Clooper/

g++ -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu/python2.7  -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-IbFBHb/python2.7-2.7.16=. -fstack-protector-strong -Wformat -Werror=format-security  -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -Wall -Werror -fPIC -O2 -finline -std=c++11 -shared -o aclient.so aclient.cpp  -lcsound64
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
aclient.cpp:10:10: fatal error: csound/csound.hpp: No such file or directory
 #include <csound/csound.hpp>
          ^~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:28: aclient.so] Error 1

I have csound v6.12.2 installed.

If there's a need to replace the binaries, I haven't been able to find the latest ones if any.

quozl commented 3 years ago

You're missing Csound development files. On my system, the package name is libcsnd-dev, found by typing "sudo apt-file search csound.hpp". I don't know what the equivalent is on Fedora.

srevinsaju commented 3 years ago

csound-devel on Fedora

chimosky commented 3 years ago

You're missing Csound development files. On my system, the package name is libcsnd-dev, found by typing "sudo apt-file search csound.hpp". I don't know what the equivalent is on Fedora.

Thanks, activity starts now.

quozl commented 3 years ago

Well done.