[Csnd] STK in binary distribution?

I installed the binary distribution 6.17 on MacOS Monterey 12.3.1. Then I installed STK from CCRMA. No matter what I do, I am unable to get csound to find the STK bits . . . I’ve consulted both the csound doc and the STK doc without enlightenment. What am I missing?

Thanks,
Robert

robert@Cecils-MacBook-Pro csound % csound -odac -f --sample-rate=96000 --sample-accurate -W InD.csd

UnifiedCSD: InD.csd

rtaudio: PortAudio module enabled …

using callback interface

rtmidi: PortMIDI module enabled

error: syntax error, unexpected T_IDENT (token “STKModalBar”)

from file InD.csd (1), line 476:

asig STKModalBar <<<

Unexpected untyped word asig when expecting a variable

Parsing failed due to invalid input!

Stopping on parser failure

cannot compile orchestra

end of score. overall amps: 0.0

1 errors in performance

Elapsed time at end of performance: real: 0.011s, CPU: 0.011s

%

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

I don’t see your .csd – but any error message pointing to ‘asig’ might be from an uncompleted prior line?

More likely the STK opcodes are not installed/available.

The line before the complaint about asig is the problem:
"error: syntax error, unexpected T_IDENT (token “STKModalBar”)

from file InD.csd (1), line 476:

asig STKModalBar <<<"

I’ve compiled the STK package and successfully installed, ran some of the demos as tests, works fine. Just can’t get csound to find it. I’ve defined the RAWWAVE_PATH appropriately. Is there another env variable that tells csound where to find the STK opcodes or do I need to build csound from source and tell configure to include the STK bits?

Thanks,

Robert

If you run make install, the opcodes should be installed in the correct place.

Prof. Victor Lazzarini
Maynooth University
Ireland

I did run make install successfully in the STK distribution top directory. Obviously that wasn’t quite right since I still get the error.

robert@Cecils-MacBook-Pro stk-4.6.2 % sudo make install

Password:

/Library/Developer/CommandLineTools/usr/bin/make -C src install

/bin/rm -f libstk.dylib libstk.dylib.4 libstk.dylib

g++ -std=c++11 -fPIC -dynamiclib -install_name /usr/local/lib/libstk-4.6.2.dylib -o libstk-4.6.2.dylib Release/*.o -lpthread -framework CoreAudio -framework CoreFoundation -framework CoreMIDI

/bin/ln -s libstk-4.6.2.dylib libstk.dylib

install -d /usr/local/include/stk

cp -R …/include/*.h /usr/local/include/stk

install -d /usr/local/lib

install -m 644 libstk-4.6.2.dylib /usr/local/lib

ln -sf libstk-4.6.2.dylib /usr/local/lib/libstk.dylib

I tried in the src directory as well and the output was the same as the above and I still get the same error message.

Thank you,
Robert

I should reiterate that I’m using the binary distribution. Was that distribution compiled with STK support or should I grab the source and build my own?

Thanks,
Robert

That looks like STK lib but not the opcodes. Did you build the opcodes from the csound plugins repository?

Prof. Victor Lazzarini
Maynooth University
Ireland

No idea where I would find those . . .

Thank you,
Robert

Here

https://github.com/csound/plugins

Prof. Victor Lazzarini
Maynooth University
Ireland

Might want to pick Julius Smith’s brain about that. He’s teaches audio DSP
at CCRMA. I was having trouble with STK as a stand alone, he steered me
to JUCE and Faust, as I was trying to render his book examples in C++.

Don’t know about STK in conjunction with Csound, check with Julius on that.

Preferred Email (public):
jos@ccrma.stanford.edu

-Partev

Okay, confirming that I must have the source tree installed and build from there. My error was supposing that the binary distribution for MacOS would somehow magically handle the inclusion of external plugins. Didn’t hit this last time I installed csound as I built on a Linux system (no binary distribution). But I bought a shiny new Mac :slight_smile:

Thank you for your help!
Robert

Thank you for the pointer to the STK guru at Stanford. I’ll keep that handy for future issues . . .

Robert

I am not quite sure what you mean. Earlier releases of Csound might have had these opcodes shipped, but they are not in 6.17 (as the release note say).

They are now part of the plugin repository. Some of the opcodes in there have binary releases, but not all (see the releases for that repo). That repository does not have a maintainer so users may need to build their own.

Instructions are in the README.md. With the dependencies installed and a C/C++ toolchain including CMake, it only needs a few commands.

Prof. Victor Lazzarini
Maynooth University
Ireland

Suggest to check whether the STK opcodes are compiled for x86_64 or
arm64, and whether compiling stk opcodes is dont with x86_64 or arm64.
If you're using the binary csound installer, that is built for x86_64.
If you're building csound via homebrew or self-compiling, that will
likely default to arm64 (assuming you are on an M1 mac). Could you
note which cpu architecture you are using?

Using an M1, so x86_64. I think you’re right, saw “arm” flash by during one of the builds. And csound can’t open the resulting libraries even with the correct owner and permissions.

Thank you,
Robert

Try installing csound from homebrew.

M1 is arm64, not?

Yes.

Hi,

I don't know if useful, I have been not using Csound from some time,
and the following reference is very old: I had perhaps similar problems
in using OMChroma OpenMusic library with STK user defined OMChroma
classes, and STK instruments generally. See the following discussion:

Finally I resolved it adding the following option to Csound flags:

--env:RAWWAVE_PATH=/path/to/stk-4.5.0/rawwaves

(or whatever number version of course)

I hope this is useful, otherwise my apologies for not useful mail...

Best

Fabio