This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-12-09
Channels
- # adventofcode (132)
- # announcements (19)
- # babashka (7)
- # babashka-sci-dev (6)
- # beginners (46)
- # calva (25)
- # chlorine-clover (5)
- # cider (2)
- # clara (17)
- # clj-kondo (93)
- # clojure (2)
- # clojure-dev (4)
- # clojure-europe (12)
- # clojure-losangeles (3)
- # clojure-nl (7)
- # clojure-uk (4)
- # clojurescript (29)
- # conjure (6)
- # core-async (8)
- # cursive (16)
- # data-science (7)
- # datomic (1)
- # exercism (4)
- # figwheel-main (8)
- # fulcro (9)
- # graphql (2)
- # helix (1)
- # introduce-yourself (3)
- # jobs (3)
- # lsp (4)
- # malli (20)
- # minecraft (3)
- # nextjournal (62)
- # off-topic (16)
- # overtone (34)
- # pathom (5)
- # polylith (10)
- # portal (1)
- # re-frame (104)
- # reagent (29)
- # reitit (1)
- # remote-jobs (2)
- # rum (3)
- # shadow-cljs (22)
- # spacemacs (2)
- # sql (10)
- # tools-deps (17)
- # vim (13)
will that solve it? that looks like something that would have been in apple’s java which i think has long been discontinued
https://github.com/overtone/overtone/blob/02f8cdd2817bf810ff390b6f91d3e84d61afcc85/src/overtone/libs/app_icon.clj looks like the issue
@viniciustozzi FWIW, I am on Java 11 and it worked for me.
Hi thanks for the answer, the issue was that I was using azul JDK and when I switched to openJDK I don’t have that issue anymore. I do have another issue now, when I try to initialize with
(use 'overtone.live)
I get the following error:
SEVERE: Unable to load native libs c and scsynth. Please try an external server with (use 'overtone.core)
I also installed Supercollider via homebrew, so I am not sure why doesnt load the native libs.
Any idea on what could it be? Thanks!
it's trying to start an embedded supercollider server, not sure what's going wrong with that exactly but it's something that can easily cause issues. The alternative is to start supercollider outside of overtone, and then manually connect to it.
Hi Thanks for the response, I tried running the external server but still I had no success:
--> Booting external SuperCollider server...
--> Connecting to external SuperCollider server: 127.0.0.1:16511
Execution error at overtone.sc.machinery.server.connection/external-connection-runner (connection.clj:167).
Error: unable to connect to externally booted server after 50 attempts.
Make sure that you have Server.local.options.maxLogins set to greater than 1 in startup file (startup.scd).
Or if you're on Windows, make sure that the Windows defender isn't blocking the scsynth.exe
But maybe something is wrong with my Supercollider settings, if I try to Boot Server from Supercollider it gives me the following error:
ERROR: Input sample rate is 16000, but output is 44100. Mismatched sample rates are not supported. To disable input, set the number of input channels to 0.
could not initialize audio.
Server 'localhost' exited with exit code 0.
Ah that’s interesting, it’s somehow related to my bluetooth headphones, if I disable it then Supercollider works just fine, and also overtone works fine
I wonder why, but hey it works! I am really happy, thanks everyone for all the help!
Hmmm from that error message my guess would be that your BT headphones show up as an audio device with an input channel (your mic) of 16kHz sample rate, but an output sample rate of 44.1kHz (which has been the norm ever since CD), and SC doesn't know how to deal with that. That would also mean your BT mic can't handle frequencies above 8Khz, which sounds entirely plausible
I connected my headphones and started overtone but I get this error. How do I set the number of input channels to 0?
Ah! I found an older post that has a solution. https://github.com/overtone/overtone/issues/394
If I (:use
overtone.live)` in calva clj-kondo complains all over the place because of unresolved variables. Did anyone else have this issue?
Use :require
instead of :use
(along with :refer
, if you have to)
:use
pollutes the namespace you're using it in, so it's not good practice anyway (+ it confuses linters, as you've already found out)
That solved it, thanks! I was just following the overtone docs but I guess they're from a time when linting wasn't as common.
Hi @UPJP9G4G1 can you please give me an example on how you did this? for me using require is still causing that the linter shows everything as wrong
I am using :refer :all I am not sure if this is right
(ns insane-noises.core
(:require [overtone.core :refer :all]))
:refer :all
is practically the same as :use
Just do:
(ns insane-noises.core
(:require [overtone.core :as oc]))
and then write oc/xxx
instead of just xxx
to call overtone functions
Take a look at the docs for a bit more information: https://clojure.org/guides/learn/namespaces#_declaring_namespacesah that makes sense. But if I do like that, then it doesnt show as an error anymore, but it shows as a warning : “Unresolved var: ov/boot-external-server [unresolved var]“. That’s the code at the moment:
(ns insane-noises.core
(:require [overtone.core :as o]))
(o/boot-external-server)
It works anyway, I am just curious about the warning the message
what IDE/linter are you using?
the namespace is o
in the code but ov
in the warning, are you sure you don't have a typo somewhere?
seems like the linter can't find that function
In any case, this isn't related to overtone, You might have better luck at the channel of your editor/linter
sorry, I typed wrong, it’s actually using just “o” everywhere and it runs just fine
I am using Emacs + CIDER + clj-kondo
yeah, it seems overtone is running everything fine, probably some configuration I need to check, anyway thanks for the help!
That's my setup too but I haven't seen that warning before; maybe you have an old version of #clj-kondo or something? Feel free to ask over there or at #cider, you'll get more/better answers
Hi thanks for the answer, the issue was that I was using azul JDK and when I switched to openJDK I don’t have that issue anymore. I do have another issue now, when I try to initialize with
(use 'overtone.live)
I get the following error:
SEVERE: Unable to load native libs c and scsynth. Please try an external server with (use 'overtone.core)