Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting csound library on windows #2

Open
cgonza12 opened this issue Jul 3, 2012 · 4 comments
Open

Setting csound library on windows #2

cgonza12 opened this issue Jul 3, 2012 · 4 comments
Assignees
Labels

Comments

@cgonza12
Copy link

cgonza12 commented Jul 3, 2012

Not sure if I'm posting this in the right place, but I'm brand new to sonification and am trying to use playitbyr to sonify some driving simulator data. For some reason none of the .dll files I've tried from the csound/bin folder have been accepted as a csound library in R. I've been using the setCsoundLibrary() function and have put in just about every path I can think of... Anyone having similar issues on Windows machines? Any suggestions?

thanks in advance

@statisfactions
Copy link
Owner

Try changing your working directory to where the dll files are, either before loading playitbyr (and the associated csound package), or before using setCsoundLibrary().

So, in a clean R session:

oldwd <- getwd()
setwd("C:\\Program Files\\Csound\\bin\\")  # or wherever your csound/bin directory is
library(playitbyr)
setwd(oldwd)

If you already have playitbyr or the csound loaded in your session, you could alternatively do:

oldwd <- getwd()
setwd("C:\\Program Files\\Csound\\bin\\")  # or wherever your csound/bin directory is
setCsoundLibrary("csound64.dll.5.2") # or whatever the dll name is
setwd(oldwd)

The underlying problem is that package rdyncall, which my packages rely on to link to csound, seems to sometimes get confused with Windows paths on some but not all Windows computers.

Let me know if this works -- thanks for reporting, and yes, this is the perfect place to post playitbyr issues.

@ghost ghost assigned statisfactions Jul 3, 2012
@scotgl
Copy link

scotgl commented Mar 27, 2013

I tried this recommendation -

setwd(oldwd)
oldwd <- getwd()
setwd("C:\Program Files\Csound\bin") # or wherever your csound/bin directory is (which is the same here )
and got
Error in setwd("C:\Program Files\Csound\bin") :
cannot change working directory
and
setCsoundLibrary(C:\Program Files (x86)\Csound\bin\csound64.dll.5.2)
did
Error: unexpected input in "setCsoundLibrary(C:
Certainly doesn't work ...

Works fine on the Max and Linux side
any hints.

@cgonza12
Copy link
Author

Been a while since I've looked at this, I'll give it a shot and let you know!

@statisfactions
Copy link
Owner

@scotgl -- It looks like R is not actually changing directories in the setwd command.

In the code you posted it looks like you entered the directory as "C:\Program Files\Csound\bin\" but R needs those as double backslashes. It should be setwd("C:\\Program Files\\Csound\\bin\\") instead.

Does that help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants