Fork me on GitHub
#overtone
<
2021-12-09
>
devn00:12:38

will that solve it? that looks like something that would have been in apple’s java which i think has long been discontinued

devn00:12:30

haven’t tried this, but the “Solution for Java 9 and later” seems promising

devn00:12:50

gonna see if i can run it

devn00:12:42

@viniciustozzi FWIW, I am on Java 11 and it worked for me.

devn00:12:52

without needing to do any of the above

Vinicius Vieira Tozzi16:02:40

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)

Vinicius Vieira Tozzi16:02:59

I also installed Supercollider via homebrew, so I am not sure why doesnt load the native libs.

Vinicius Vieira Tozzi16:02:06

Any idea on what could it be? Thanks!

plexus09:03:53

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.

Vinicius Vieira Tozzi20:03:53

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

Vinicius Vieira Tozzi20:03:33

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.

Vinicius Vieira Tozzi20:03:52

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

Vinicius Vieira Tozzi20:03:03

I wonder why, but hey it works! I am really happy, thanks everyone for all the help!

plexus06:03:47

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

Gerome06:12:58

Instead of using an older Java Version I'd also recommend using an open source one.

Gerome20:12:37

I connected my headphones and started overtone but I get this error. How do I set the number of input channels to 0?

Gerome20:12:47

Ah! I found an older post that has a solution. https://github.com/overtone/overtone/issues/394

Gerome21:12:28

If I (:use overtone.live)` in calva clj-kondo complains all over the place because of unresolved variables. Did anyone else have this issue?

pavlosmelissinos21:12:43

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)

Gerome08:12:25

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.

👍 2
Vinicius Vieira Tozzi21:03:24

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

Vinicius Vieira Tozzi21:03:45

I am using :refer :all I am not sure if this is right

Vinicius Vieira Tozzi21:03:48

(ns insane-noises.core
  (:require [overtone.core :refer :all]))

pavlosmelissinos23:03:23

: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_namespaces

Vinicius Vieira Tozzi18:03:54

ah 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)

Vinicius Vieira Tozzi18:03:13

It works anyway, I am just curious about the warning the message

pavlosmelissinos18:03:37

what IDE/linter are you using?

pavlosmelissinos18:03:12

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

Vinicius Vieira Tozzi21:03:22

sorry, I typed wrong, it’s actually using just “o” everywhere and it runs just fine

👍 1
Vinicius Vieira Tozzi21:03:33

I am using Emacs + CIDER + clj-kondo

Vinicius Vieira Tozzi21:03:59

yeah, it seems overtone is running everything fine, probably some configuration I need to check, anyway thanks for the help!

pavlosmelissinos22:03:38

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

👍 1
Vinicius Vieira Tozzi16:02:40

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)