Python error: unknown rtaudio module: 'PortAudio', using dummy modulertaudio: dummy module enabled

Hi everyone

I’m trying to run the following Python script involving ctsound:

beispiel 1: eine .csd datei mit dem

“csound performance thread” abspielen

dieses beispiel spielt “endlos” …

stoppen rechts unten mit klick auf den trash

ctcsound importieren

import ctcsound

eine instanz von csound erzeugen

cs = ctcsound.Csound()

cs.setOption(“-o dac”)

eine .csd Datei lesen (kompilieren)

cs.compileCsd(“pling.csd”)

die csound instanz aktivieren

cs.start()

den performance thread erzeugen

pt = ctcsound.CsoundPerformanceThread(cs.csound())

den performance thread starten und auf die anderen threads warten

pt.play()

pt.join()

csound stoppen und reset für neue verwendungen

cs.stop()

cs.cleanup()

Unfortunately, no audio is playing, and I’m instead receiving the error ‘unknown rtaudio module: ‘PortAudio’, using dummy modulertaudio: dummy module enabled’. I’ve checked the PATH for Csound, and have also tried uninstalling and reinstalling Python and Csound, to no success. Perhaos strangely, Csound is able to play sounds without issue.

Does anyone know what the problem could be?

Thanks

James

The problem has since been found: ‘import mediapipe’ needs to be added towards the start of the code.

I am encountering this same error in all instances of Csound (i.e., ctcsound, csound-expressions, lua, etc.), even just running Csound with the -odac output option. Importing mediapipe with ctcsound has no effect. My system is Fedora 44 with Csound version 6.18 (double samples). I have reinstalled Alsa, Portaudio, RtAudio, to no effect. During the build process (I was compelled to build from code because there has not been a Fedora Cspound package since version Fedora 40), CMake configuration detected the Jack, Alsa, and Portaudio dependencies. In spite of attacking this from a number of different angles, such as analyzing my Alsa configurations, or specifying the output target (i.e., -odac:hw:0,0, or -odac:jack), the problem remains frustratingly persistent. Has anyone encountered/solved this issue? I would love to be able to move on with my creative work!
Thanks!

-- Timothy Duncan

I suspect you may need to set OPCODE6DIR64 env variable to point to the path where your opcode libraries are located. Sounds like Csound isn’t finding the opcode libraries (incl. device drivers) at load time.