overtone 2024-11-06

I only just recently started playing with a midi keyboard and overtone, and it feels like I have some latency. Its subjective and I dont know how to measure it. I just use the out of the box pipewire on fedora 41. Do any of you do anything special to reduce latency in a similar scenario?

it feels like i get latency when playing yoshimi with its own virtual keyboard as well, subjectively around 100 ms. So i dont think the problem lies in overtone necessarily, but rather somewhere later in the audio stack

I don't really play music via my computer, but I'd check setting up JACK first

Then other options I know include running a RT (realtime) kernel, and getting better hardware (which might mean better keyboard, eliminating usb hubs, better usb controller, eliminating usb altogether by getting a PCI midi board)

tnx. in my case im using pipewire to realise the jack interfaces

i will see if i can get RT working

Pipewire is compatible sure, but I don't know how well it handles latency. In pulseaudio times jack was a must

tnx, i will investigate your suggestions

Quick googling shows various things to do with pipewire, including skipping software processing by selecting pro audio interfaces, setting ALSA latencies and clock rates, pipewire quantum settings etc. But seems like that within the last year pipewire has become good enough replacement for JACK even for realtime music

Ah, and setting some kernel parameters like preempt=full and threadirqs

i rebooted and used a wired headest rather than bt, that shaved off a noticeable amount of latency

👍 1

Heh, yeah, definitely

atm im using casa.squid.midi to interface jack-midi to overtone, and it works well except that the underlying alsa midi seems to be sensitive to which usb port i connect the midi kbd to, kinda weirs

i guess in just a brief couple of additional decades we can have a solid linux audio stack 🙂

I think normal bluetooth is at least 200ms. 5.4 might bring that down to 100ms, aptX LL is maybe half that

ah alright, den that explains a lot

It's same with HID devices. Mice, kb and gamepads with their own wireless dongle have much lower latency. Latency just wasn't on their mind when they made Bluetooth…

I was told these were good https://aiaiai.audio/headphones/tma-2-studio-wireless-plus but seems kinda overkill for my dabbling hobbyist needs

And that requires a 3.5mm plug. Kinda weird. Hard to find mobile devices these days with that, dongles have their own latency, I assume

But wired is fine! No messing with audio codecs and wireless protocols. Not likely to move around much anyway then playing an instrument

Or batteries. No wireless headphone is going to last for ten years

I really like how my Shure IEMs can be plugged straight from the earplug to either a wired 3.5mm cable, or to a BT pin. Best of both worlds

seems nice. I just have a pair of bose qc because i do a lot of audio conferencing and normally i need anc

I have Jabra over ears too for ANC and talking on the go

On my desk I use Sennheiser over ears with antlion modmic

youre fully kitted 🙂

Good gear lasts a long time, so can have more

Fully kitted, but no time to make music

Haven't touched my violin in a year, my dualo got just a bit of fooling around last christmas without learning to play it

I mean my exquis. My dualo has been unused for a longer time >_<

ah, hex instruments seems nice, i long thought about building an instrument like that

Hi all, any tips on how to fix this ?🧵

i installed supercollider via brew

do i have to install something on supercollider to get overtone to work?

it happens both when i start supercollider (the app) manually and without starting it

I'm guessing from the error message, I have to disable device 0 somehow

ok got it to work by going into audio midi setup and selecting 44,100 hz https://scsynth.org/t/input-sampling-rate-does-not-match-the-output/562/4

💯 2
❤️ 2

There's probably a way to make supercollider run at 48k as well... I see there's a -S <hardware-sample-rate>, that might be it

👏🏽 1

kind of a dumb question, but how do i run the development version of overtone in my existing overtone project? id like to try out the unreleased stuff @pfeodrippe did for running sclang code in overtone

Im trying this, which doesnt work. What am I doing wrong? ;; // execute first, by itself ;; SynthDef.new("tutorial-PinkNoise", { |out| http://Out.ar(out, http://PinkNoise.ar(0.3)) }).add; ;; // then: ;; x = Synth.new("tutorial-PinkNoise"); ;; y = Synth.new("tutorial-PinkNoise"); ;; x.free; y.free; (http://overtone.sc.sclang/defsynth tutorial-PinkNoise "Some synth." [freq 440, amp 0.5, pan 0.0] [:vars :env] [:raw " { |out| http://Out.ar(out, http://PinkNoise.ar(0.3)) }"]) (tutorial-PinkNoise)

See the generated file in the .overtone folder, it will show you the generated .scd file that the SC IDE understands. You should also see an error in the console (hopefully ahahah) Will go back to the work now, but let me know, will check your message later o/

noticed scd files are written to .overtone/sc/ maybe doc somewhere?

Yes, we can, wdyt of making a small PR adding it? o/ Let me know, otherwise I can do it. I can guide you if you want and we can merge it ;D

Let me know if you were able to see the issue, the sclang/defsynth macro already adds the brackets { }, so maybe you don’t need that?

I trial and errored through some iterations looking at a working generated synthdef from your examples, and how my code, using raw, so now i kind of get it

;; SynthDef.new("tutorial-PinkNoise", { |out| http://Out.ar(out, http://PinkNoise.ar(0.3)) }).add; ;;here, |out| doesnt work (not sure how its supposed to work) (http://overtone.sc.sclang/defsynth tutorial-PinkNoise "Some synth." [freq 440] [:raw "http://Out.ar(0, http://PinkNoise.ar(0.3))"])

as you say, i noticed the{} where added

it seems you need the freq arg, even though its never used

also i dont understand the sclang |out| syntax, and it doesnt seem to work in raw

ill try to make a PR with a slight doc change

1

The | | is for args of the { }, https://doc.sccode.org/Classes/SynthDef.html So maybe if you use “out” as an argument to the macro, it could work

(sclang/defsynth my-synth [out] …)

sclang syntax is really cryptic lol

😅 1

Thanks, Joakim, merged :D Appreciate it. Congrats on your first commit there hahahah

Not dumb, man, see https://github.com/pfeodrippe/vybe/blob/develop/deps.edn#L18. It’s using directly from git (it uses deps.edn, not leiningen). But yes, we should have GitHub actions push a new version from master automatically to clojars. Not sure if someone is working on it already

ah thats nice, tnx

i guess some kind of cicd pipeline in github to push to clojars would be nice

i mostly use gitlab cicd so im not too familiar with githubs cicd

Yes, I use GitHub actions in this vybe project, let me know if you can open an issue about it o/

hmm you mean just for suggesting a cicd build to clojars in the overtone project? sure i can do that

Yes yes, not sure if we already have an issue about it or if someone is working on it, but it’s good so we can remember ahahaha thanks, Joakim o/

seems like overtone development is on fire recently 🙂

🔥 1

We already build in https://github.com/overtone/overtone/blob/master/.github/workflows/build.yml (it was some appreciated effort by Ambrose!), so it shouldn’t take too much to send to clojars… in theory

cool, its very similar to gitlab cicd

im attempting to use the sclang ns, as from the docs: (http://overtone.sc.sclang/defsynth my-synth "Some synth." [freq 440, amp 0.5, pan 0.0] [:vars :env] [:= :env [:http://EnvGen.ar [:Env [0 1 1 0] [0.01 0.1 0.2]] {:doneAction 2}]] [:http://Out.ar 0 [:http://Pan2.ar [:* [:http://Blip.ar :freq] :env :amp] :pan]]) Execution error (ExceptionInfo) at http://overtone.sc.sclang/-synthdef-save! (sclang.clj:303). Error when defining a synthdef, resource not found. Check the stdout, also check that your resources folder is a resource to this Java application. At last, check that SuperCollider is installed, https://supercollider.github.io/downloads

i get some exception

Can you put the full message in a https://gist.github.com/? Make sure you have supercollider installed and you have “resources” as one of your resource paths

hmm how do i achieve "resources" path?

You are using deps.edn, correct? If so, check https://github.com/overtone/overtone/blob/master/deps.edn#L1 in line 1, the paths are src and resources

But yeah, I can improve that to check for a file if the resource is not found, but for now, let me know if this works o/

this was the problem, tnx

this is very cool. Is there some way of converting a random sc statement like { http://SinOsc.ar(http://SinOsc.kr([1, 3]).exprange(100, 2e3), 0, 0.2) }.play

You can use [:raw “…”] ahahaha the parser is very simple for now, but let me know if there is something you can’t do even with :raw

Also, I’m not sure if you can play sounds using the sclang command by default (I guess you have to use the boot flag in the transpiler fn), first, check if you can create it with just Clojure (if you just use normal operators, it should be doable… in theory), if you can’t, create an issue or, if you think it’s simple enough, keep posting messages here o/

I have worked on this to be able to use external plugins/sc code without having to replicate a bunch of code in Clojure (time-consuming and error-prone), e.g. https://github.com/SCLOrkHub/SCLOrkSynths or https://github.com/ambisonictoolkit/atk-sc3

yes its very cool, im atm not grokking it though, so i doing some trial and error

Got it o/ thanks for trying it :D

🙌 1