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

unexpected STRING_TOKEN (token """") - example (from tutorial) not working #13

Closed
jwaldmann opened this issue Nov 28, 2014 · 3 comments
Closed

Comments

@jwaldmann
Copy link

I type an example from the tutorial in ghci:

import Csound.Base
let n1 = button "330"
let n2 = button "440"
let instr x = return $ fades 0.1 0.5 * osc x
let go x evt = sched (const $ instr x) (withDur 2 evt)
dac $ do { (g1, p1) <- n1;(g2, p2) <- n2;panel $ hor [g1, g2];return $ mul 0.25 $ go 330 p1 + go 440 p2 }

result:

0dBFS level = 32768.0
Csound version 6.04 (double samples) Nov 28 2014
libsndfile-1.0.25
UnifiedCSD:  tmp.csd
STARTING FILE
Creating options
Creating orchestra
Creating score
rtaudio: ALSA module enabled
rtmidi: ALSA Raw MIDI module enabled

error: syntax error, unexpected STRING_TOKEN  (token """") from file tmp.csd (1)
 line 25:
>>>FLpanel "" <<<
Unexpected untyped word FLpanel when expecting a variable
Parsing failed due to invalid input!
Stopping on parser failure
cannot compile orchestra
end of score.          overall amps:      0.0
       overall samples out of range:        0
1 errors in performance
Elapsed time at end of performance: real: 0.002s, CPU: 0.001s

(the basic dac $ osc 440 is working.)

@anton-k
Copy link
Contributor

anton-k commented Nov 28, 2014

The cause of the error lies in missing GUI units for Csound. It complains that FLpanel is not defined. In the older versions of Csound the GUIs have to be installed separately. If you are on Windows you need to check the checkbox with GUIs somewhere in the process of installation. If you are on Ubuntu/Linux you need to install csound-gui along with csound.

sudo apt-get install csound csound-gui

@anton-k anton-k closed this as completed Nov 28, 2014
@anton-k
Copy link
Contributor

anton-k commented Nov 28, 2014

Oh I see that your Csound is 6.04 it's the brand new Csound. Then I'm mistaken about older versions. In fact you need to install csound with GUI-support

@jwaldmann
Copy link
Author

Thanks - the example is working for me now.

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

No branches or pull requests

2 participants