[00:46] hi ! i need help with kde plasma system settings, it keeps crashing, any help plz ? [00:48] anyone ? [00:51] plz help, :((( [00:57] dragonlord_: Just curious.. since you are crossposting.. are you actually using Kubuntu or Ubuntu Studio? [01:02] ubuntu-studio [01:03] 20.10, i reinstalled but same :( [01:04] need help, only system settings crashes when changing tabs, [01:06] i can't sleep till it works :((( [01:16] :( [14:05] hi ! my system settings keeps crashing, got 20.10.. any help plz ? [14:27] dragonlord_: need more details mate [14:28] dragonlord_: ah, I seem to remember you asking about changing tabs and then finding that your system crashes? If that's the case, try installing a different desktop environment and use that, see if the same problem occurs [14:37] really, i like plasma :( [14:37] no other solution ? [14:38] Maybe ask in #kubuntu [14:38] no answer [14:38] gonna try [14:41] dragonlord_: before you could hope to solve it you at least need to figure out what the problem is [14:41] dragonlord_: if my suggestion solves it, then you know to ask in #kde, because it's most likely a bug in your DE (desktop environment) [14:42] Sigh [14:42] Dragonlord still has some remaining beasts to slay [15:04] where do jack_midi_event_t and jack_midi_event_get() live? The docs aren't completely clear and I can't built this thing I'm writing. :( [15:05] BrianHechinger[m: you are asking this here? not #LAD? [15:05] sorry #lad [15:06] A) I didn't know about #lad [15:06] B) You're all like smart and stuff so I thought you might know. :-P [15:07] Are you writing in c or c++ [15:09] in c++ generally client.midi_event_get() for example [15:09] leave the client param out [15:09] I was just doing plain C [15:10] started with the simple_client.c [15:10] which builds and runs [15:10] but I don't want to touch audio, I want to capture midi events [15:11] You can look at https://github.com/ovenwerks/studio-controls [15:11] go-jack has a bug that makes it useless. I was kinda looking at python which I didn't want to do but it's just a wrapper around the c libraries (as everything seems to be) [15:11] sorry wrong link. [15:11] so I just went for C [15:11] https://github.com/ovenwerks/midikb [15:12] https://github.com/ovenwerks/midikb/blob/master/jack.c has the jack stuff [15:12] yeah, like the docs totally fail to mention midiport.h which I'm assuming is super important here. :-D [15:13] yeah... [15:13] oh, and look at that, they all light up in the IDE all happy now [15:15] BrianHechinger[m: in general the jack api is easier to use than ALSA [15:15] it seems simple enough, they just leave out some very important details in the docs [15:16] some of us are not very good at writing docs :) [15:16] I'm one of us [15:16] :-D [15:17] but that seems like a pretty egregious oversight. [15:19] The examples are supposed to help :) [15:19] Thats where I started [15:22] midikbd was my first jack program (forked from actkbd) [16:23] So i'm capturing the midi event: `printf("buf: %s\n", midi_event.buffer);` [16:23] But I get `SuspendRefNum error` as my string. [16:25] why would you expect a string? I guess midi is char. [16:29] buffer is an unsigned char pointer, so %s is appropriate [16:29] yes but may not be readable. [16:30] but it's literally this string: `SuspendRefNum error` [16:31] Which seems wrong you should have a 3 byte string [16:31] (maybe two for a PC) [16:32] Maybe not initialized? [16:33] ok, but what is `SuspendRefNum error` and where is it coming from? [16:34] I don't know [16:35] I just know I have to open a client, set the process call back (where I read MIDI), create a port in the right direction and then activate the client [16:35] I've done all that, now I'm trying to process the events [16:36] oh wait [16:36] I've forgotten to call jack_midi_event_get [16:38] THAT'S better. :) [16:38] ok, now how do I match those to what I see in Ardour's MIDI Tracer? [16:38] Before actually using this, remove all printf statements as they are not rt safe [16:39] ok, good to know [16:40] if you want to print out midi values, stuuf the events (raw) into a jack ring buffer and read out opf that buffer in another thread (like your main thread) [16:40] other wise you risk xruns [16:41] what if I want to trigger other actions? same thing? [16:41] as long as your ring buffer is big enough to keep up with traffic it will not cause xruns [16:41] it depends on how much code goes into that [16:42] it's not going to be a ton [16:42] just find a process and send it a signal [16:42] if you are taking midi in and coverting it and directly putting MIDI out from that it is ok. [16:42] signals I don't know if they are blocking or not. anything blocking is not RT safe [16:44] they shouldn't be but I'd have to check to be sure [16:44] The guys in #lad probably know better off the top of their head [16:44] This is a _very_ quite channel [16:53] Anyway, my policy for my own work, is to as little as possible in any jack call back. Drop values into a ring buffer or pick up processed from a ring buffer. Then I don't have to worry about any calls I make being non-rt [16:55] Also note that most jack call backs can not make a jack call from within the call back. Set a flag or ring buffer and do it from another thread. [16:56] ok, all good things to know. Thanks! [17:32] Thanks for the #lad tip, got it all sorted! [17:33] * BrianHechinger[m < https://matrix.org/_matrix/media/r0/download/matrix.org/MgPJvNRUmJxjcJnZHJapCTEN/message.txt > [17:33] those are the stop and play transport buttons on the nanokontrol. :) [17:33] now to draw the rest of the owl [18:02] IT WORKS MUAHAHAHAHAHAHA [18:02] :) [18:03] I can now pause and unpause Valheim with the stop and play transport buttons. (valheim doesn't actually pause so I SIGSTOP/SIGCONT it) [18:04] Life is a hack ... [18:15] and we're all hackers [18:29] @ove [18:29] klajsdhflkasjdf [18:29] OvenWerks: ok, I'm not fast enough, I'll need to do the buffer/ring thing [18:30] every press of the button causes an xrun [18:30] :) [18:30] although to be fair I don't really care, but I'll probably fix it for the learning aspect. [18:31] both midikbd and mcpdisp use ring buffers, but midikbd is in c while mcpdisp is in c++ [18:32] jack ring buffers do not require a jack client and can be set up before creating a client/port/etc. [18:34] I try to set up a buffer about 3 or 4 times what I think. They need to be an even hex value (0x10, 0x100, etc. [18:39] for midi there are a few ways of doing things. I think I pull three bytes per event (just add an extra for 0x0 for PC events), so check ring buffer size is > than 3, pull event, cycle. I do some preliminary filtering in the jack call back to eliminate events I am not interested in like running status [18:46] Another way is to put event length as 1 byte, followed by that number of bytes. At the other end check length is more than 0, pull one byte, check length > length, pull those bytes. This will take care of all kinds of events. You do have to have a way of saving length if the evnt has not made it into the buffer (actually this should never happen I think) [18:47] But if all you need is 3 byte events... it's easy. I guess you could pull one byte at a time and do all parsing after the ring buffer. [22:26] Yeah, I filter out the events I want (only two) [22:26] and from there i don't even need to send an event, it can be an arbitrary payload. [22:27] I just need to signal one of two things. I could do it with a single bit. :-D