< Back to IRCAM Forum

Problem with new created OMChroma class

Hi All,

I need some help. I have created a new OMChroma user class, I enclose the OpenMusic patch:

020-vocoder-1.omp (14.8 KB)

The used Csound .orc contains the text enclosed into textfile class into the patch. It is a file found on the web. I show a screenshot of OpenMusic enclosed patch:

The problem is the following: in valuating the final sound I obtain an error:

“:: INIT ERROR in instr 1 (opcode soundin) line 24: e[mdiskin2: vc10.wav: failed to open file (No Error.)e[m
:: e[m from file /Users/fabio/lib/OM_workspace/out-files/my_synt.orc (1)
:: acar soundin “vc10.wav” 0 0 0 0
:: B 0.000 - note deleted. i1 had 1 init errorse[m
:: e[mScore finished in csoundPerform().”

The problem presents both with mono files and stereo ones, both with aiff files and wav files.

However if I evaluate synthesize with option “run” it generates two files .orc and .sco that, imported into CsoundQt, runs perfectly, generating the audio file.

I am on OsX El Capitan, 10.11.6, OM 7.0, Csound 6.16, OMChroma 5.2.

I have tested the same exact patch on Linux Fedora 32, OM 7.0, Csound 6.15, OMChroma 5.2 and in that environment the patch runs good, so the problem is only on Mac. I suppose it could be caused by questions relative to filesystem formats, but I have no competence for be sure.

I hope it is all clear. Thank you in advance for any help.

Fabio

Dear Fabio,

I think this is not an OMChroma/OM issue. I say so because i cannot test your patch since you didn’t include your user chroma class.

Anyhow, from what i see here, is that the .orc is not finding your SSDIR defautl directory, so soundin cannot open your vc10.wav sound on Mac. Maybe in your Linux installation this path is already defined in your Bashrc. Check it out.

Best
K

Hi Karim,

Thank you, indeed by terminal (command “env”) I can see that SSDIR is not defined. I had defined it by CsoundQt, thinking it modified my global environment. In Linux I have set it on bashprofile. I am going to do the same on Mac. meanwhile here is my class if you like to test it, without annoying you of course…:

VC10-2.omc (3.5 KB)

I will keep you updated, thank you, ciao

Fabio

No Worry Fabio,
Hope this is the problem. If not, don’t hesitate to report back

Best
K

Hi Karim,

Sorry to disturb you again… Perhaps I am having a mistake in something.

I have added these lines to my .bash_profile file:

SFDIR=/Users/fabio/lib/SFDIR
export SFDIR
SADIR=/Users/fabio/lib/SADIR
export SADIR
SSDIR=/Users/fabio/lib/SSDIR
export SSDIR

also with " " for paths, and then used the command source .bash_profile, but nothing change, the error remain. Also after logout or restarting the computer.

I have also used some other commands like launchctl setenv SSDIR /Users/fabio/lib/SSDIR/, after searching on the web, but without success. But the .orc and .sco files continue to run perfectly.

Ciao

Fabio

Hi Karim,

For the moment I have resolved adding the environment variable SSDIR in Csound flags, in preferences:

In this way everything runs good. But if someone can tell me how to set permanently this environment variable (and other ones like SADIR, SFDIR and so on), I will be grateful.

By terminal the variables appears set: command “echo $SSDIR” gives me the correct path, and Csound, CsoundQt runs good, also with .orc and .sco files generated by OM patches.

Thanks in advance, ciao

Fabio

Dear Fabio,

I
It appears your csound setup on your macos is somehow overriden by something else.

suggest you go thru this before:
https://csound.com/docs/manual/CommandUnifileParFile.html

(maybe you have a .csound6rc in your home?)

and this:

https://csound.com/docs/manual/CommandEnvironment.html

Best
K

Hi Karim,

I have created the hidden file .csound6rc (touch .csound6rc), because I had not, opened it and fixed necessary environment variables. Now everything runs, thank you very much.

Searching on the web a lot of files were reported for fixing environment variables (.csoundrc, .bashrc, .bash_profile, .bashrc…), and changing from a OsX version to other ones, so I were a little confused.

Thank you again, ciao

Fabio

1 Like