/srv/irclogs.ubuntu.com/2021/04/02/#ubuntustudio.txt

dragonlord_ hi ! i need help with kde plasma system  settings,  it keeps  crashing,  any help plz ?00:46
dragonlord_anyone ?00:48
dragonlord_plz help, :(((00:51
krytendragonlord_: Just curious.. since you are crossposting.. are you actually using Kubuntu or Ubuntu Studio?00:57
dragonlord_ubuntu-studio01:02
dragonlord_20.10, i reinstalled but same :(01:03
dragonlord_need help, only system settings crashes when changing tabs,01:04
dragonlord_i can't sleep till it works :(((01:06
dragonlord_:(01:16
dragonlord_hi ! my system settings keeps crashing,  got 20.10.. any help plz ?14:05
sirriffsalotdragonlord_: need more details mate14:27
sirriffsalotdragonlord_: 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 occurs14:28
dragonlord_really, i like plasma  :(14:37
dragonlord_no other solution ?14:37
OvenWerksMaybe ask in #kubuntu14:38
dragonlord_no answer14:38
dragonlord_gonna try14:38
sirriffsalotdragonlord_: before you could hope to solve it you at least need to figure out what the problem is14:41
sirriffsalotdragonlord_: 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:41
sirriffsalotSigh14:42
sirriffsalotDragonlord still has some remaining beasts to slay14:42
BrianHechinger[mwhere 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:04
OvenWerksBrianHechinger[m: you are asking this here? not #LAD?15:05
OvenWerkssorry #lad15:05
BrianHechinger[mA) I didn't know about #lad15:06
BrianHechinger[mB) You're all like smart and stuff so I thought you might know. :-P15:06
OvenWerksAre you writing in c or c++15:07
OvenWerksin c++ generally client.midi_event_get() for example15:09
OvenWerksleave the client param out15:09
BrianHechinger[mI was just doing plain C15:09
BrianHechinger[mstarted with the simple_client.c15:10
BrianHechinger[mwhich builds and runs15:10
BrianHechinger[mbut I don't want to touch audio, I want to capture midi events15:10
OvenWerksYou can look at https://github.com/ovenwerks/studio-controls15:11
BrianHechinger[mgo-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
OvenWerkssorry wrong link.15:11
BrianHechinger[mso I just went for C15:11
OvenWerkshttps://github.com/ovenwerks/midikb15:11
OvenWerkshttps://github.com/ovenwerks/midikb/blob/master/jack.c has the jack stuff15:12
BrianHechinger[myeah, like the docs totally fail to mention midiport.h which I'm assuming is super important here. :-D15:12
OvenWerksyeah...15:13
BrianHechinger[moh, and look at that, they all light up in the IDE all happy now15:13
OvenWerksBrianHechinger[m: in general the jack api is easier to use than ALSA15:15
BrianHechinger[mit seems simple enough, they just leave out some very important details in the docs15:15
OvenWerkssome of us are not very good at writing docs :)15:16
BrianHechinger[mI'm one of us15:16
BrianHechinger[m:-D15:16
BrianHechinger[mbut that seems like a pretty egregious oversight.15:17
OvenWerksThe examples are supposed to help :)15:19
OvenWerksThats where I started15:19
OvenWerksmidikbd was my first jack program (forked from actkbd)15:22
BrianHechinger[mSo i'm capturing the midi event: `printf("buf: %s\n", midi_event.buffer);`16:23
BrianHechinger[mBut I get `SuspendRefNum error` as my string.16:23
OvenWerkswhy would you expect a string? I guess midi is char.16:25
BrianHechinger[mbuffer is an unsigned char pointer, so %s is appropriate16:29
OvenWerksyes but may not be readable.16:29
BrianHechinger[mbut it's literally this string: `SuspendRefNum error`16:30
OvenWerksWhich seems wrong you should have a 3 byte string16:31
OvenWerks (maybe two for a PC)16:31
OvenWerksMaybe not initialized?16:32
BrianHechinger[mok, but what is `SuspendRefNum error` and where is it coming from?16:33
OvenWerksI don't know16:34
OvenWerksI 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 client16:35
BrianHechinger[mI've done all that, now I'm trying to process the events16:35
BrianHechinger[moh wait16:36
BrianHechinger[mI've forgotten to call jack_midi_event_get16:36
BrianHechinger[mTHAT'S better. :)16:38
BrianHechinger[mok, now how do I match those to what I see in Ardour's MIDI Tracer?16:38
OvenWerksBefore actually using this, remove all printf statements as they are not rt safe16:38
BrianHechinger[mok, good to know16:39
OvenWerksif 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
OvenWerksother wise you risk xruns16:40
BrianHechinger[mwhat if I want to trigger other actions? same thing?16:41
OvenWerksas long as your ring buffer is big enough to keep up with traffic it will not cause xruns16:41
OvenWerksit depends on how much code goes into that16:41
BrianHechinger[mit's not going to be a ton16:42
BrianHechinger[mjust find a process and send it a signal16:42
OvenWerksif you are taking midi in and coverting it and directly putting MIDI out from that it is ok.16:42
OvenWerkssignals I don't know if they are blocking or not. anything blocking is not RT safe16:42
BrianHechinger[mthey shouldn't be but I'd have to check to be sure16:44
OvenWerksThe guys in #lad probably know better off the top of their head16:44
OvenWerksThis is a _very_ quite channel16:44
OvenWerksAnyway, 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-rt16:53
OvenWerksAlso 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:55
BrianHechinger[mok, all good things to know. Thanks!16:56
BrianHechinger[mThanks for the #lad tip, got it all sorted!17:32
* BrianHechinger[m < https://matrix.org/_matrix/media/r0/download/matrix.org/MgPJvNRUmJxjcJnZHJapCTEN/message.txt >17:33
BrianHechinger[mthose are the stop and play transport buttons on the nanokontrol. :)17:33
BrianHechinger[mnow to draw the rest of the owl17:33
BrianHechinger[mIT WORKS MUAHAHAHAHAHAHA18:02
OvenWerks:)18:02
BrianHechinger[mI can now pause and unpause Valheim with the stop and play transport buttons. (valheim doesn't actually pause so I SIGSTOP/SIGCONT it)18:03
OvenWerksLife is a hack ...18:04
BrianHechinger[mand we're all hackers18:15
BrianHechinger[m@ove18:29
BrianHechinger[mklajsdhflkasjdf18:29
BrianHechinger[mOvenWerks: ok, I'm not fast enough, I'll need to do the buffer/ring thing18:29
BrianHechinger[mevery press of the button causes an xrun18:30
OvenWerks:)18:30
BrianHechinger[malthough to be fair I don't really care, but I'll probably fix it for the learning aspect.18:30
OvenWerksboth midikbd and mcpdisp use ring buffers, but midikbd is in c while mcpdisp is in c++18:31
OvenWerksjack ring buffers do not require a jack client and can be set up before creating a client/port/etc.18:32
OvenWerksI 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:34
OvenWerksfor 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 status18:39
OvenWerksAnother 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:46
OvenWerksBut 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.18:47
BrianHechinger[mYeah, I filter out the events I want (only two)22:26
BrianHechinger[mand from there i don't even need to send an event, it can be an arbitrary payload.22:26
BrianHechinger[mI just need to signal one of two things. I could do it with a single bit. :-D22:27

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!