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

Unable to find opcode entry for 'FLpanel' with matching argument types #84

Open
jwaldmann opened this issue Nov 24, 2023 · 1 comment
Open

Comments

@jwaldmann
Copy link

jwaldmann commented Nov 24, 2023

possible duplicate of #13 #69 but since it's a different error message, I'm writing a separate issue.

When I run

dacBy (setTrace <> setJackv "cse") $ do 
 (g,f) <- slider "f" (expSpan 20 2e4) 440 
 panel g ; return $ osc f 

I am getting

0dBFS level = 32768.0
--Csound version 6.16 (double samples) Jul 19 2023
[commit: none]
libsndfile-1.1.0
UnifiedCSD:  /tmp/tmp.csd
STARTING FILE
Creating options
Creating orchestra
closing tag
Creating score
rtmidi: ALSA Raw MIDI module enabled
rtaudio: JACK module enabled
error:  Unable to find opcode entry for 'FLpanel' with matching argument types:
Found: (null) FLpanel cccccc
Line: 23
 from file /tmp/tmp.csd (1)
Parsing failed due to syntax errors
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.002s

this is csound as it comes with Fedora-39.

One comment recommended that this command "should produce output".

$ csound -z1 2>&1|grep FLp
FLpack      (null)      iiiiooo
FLpackEnd   (null)      (null)
FLpack_end  (null)      (null)
FLpanel     (null)      Sjjjoooo
FLpanelEnd  (null)      (null)
FLpanel_end (null)      (null)
FLprintk    (null)      iki
FLprintk2   (null)      ki

[EDIT] I was assuming that (null) indicates some kind of error but I now think it's a compressed type declaration, vis. https://csound.com/docs/manual/FLpanel.html

FLpanel "label", iwidth, iheight [, ix] [, iy] [, iborder] [, ikbdcapture] [, iclose]

apparently, no result, and these arguments: one string, two int, then five optional (int?). This does not seem to match Sjjjoooo exactly (three j)

@jwaldmann
Copy link
Author

I think that csound-expression produces syntax errors when writing the code that calls FLpanel.

$ ghci -package csound-expression -package text

-- the following is in ghci (line by line)

import Csound.Base
import Data.Text.IO
:set -XOverloadedStrings

Data.Text.IO.writeFile "check.csd" =<< (renderCsdBy setThru  $ do (g,f) <- slider "f" (expSpan 20 2e4) 440  ; panel g ; return $ osc f)

now at the shell prompt

$ csound check.csd
UnifiedCSD:  check.csd
error:  Unable to find opcode entry for 'FLpanel' with matching argument types:

Found: (null) FLpanel cccccc
Line: 23
 from file check.csd (1),Parsing failed due to syntax errors
Stopping on parser failure
cannot compile orchestra

When I manually patch the file, it works

$ diff check.csd check-patched.csd
23,24c23,24
< FLpanel , 45, 170, -1, -1, 0, 0
< gkrgg0, girgh0 FLslider f, 20.0, 20000.0, -1, 22, -1, 25, 140, 10, 10
---
> FLpanel "panel" , 45, 170, -1, -1, 0, 0
> gkrgg0, girgh0 FLslider "f", 20.0, 20000.0, -1, 22, -1, 25, 140, 10, 10

  • FLpanel is missing the first argument (the name of the panel)
  • FLslider is missing string quotes around first argument

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

1 participant