sending bach scores over UDP

Discussions, advice, bug reports and much more about the "bach" environment.
Post Reply
drakeandersen
Posts: 4
Joined: Fri May 15, 2020 6:53 pm

sending bach scores over UDP

Post by drakeandersen » Mon Aug 01, 2022 2:39 pm

Hi all,

I am building a program where I would like to send relatively long (100-200 bars; 1 voice only) bach llll format scores over a LAN via UDP. I wrap the notation and some header info into a single llll and then use [o.pack] to pack with OSC address into [udpsend] (CNMAT mode on). I also increase the maxpacketsize of [updsend] to 65536 bytes.

However, it seems that the score files are too large. Scores of up to 20 bars or so will go through, while anything larger will be dropped. Does anyone have any advice? Do I need to experiment with different maxpacketsize values? (I am just sending a single message so maxqueuesize is irrelevant, right?) Or perhaps convert into a different file format (xml?) for the transfer and then convert back on the other side? Or do I just have to chop up the score, send it piecemeal, and reassemble locally? Would like to avoid this if possible...

Also: is there a good way to precisely determine the file size of a bach score (native)?

Thanks,

Drake

drakeandersen
Posts: 4
Joined: Fri May 15, 2020 6:53 pm

Re: sending bach scores over UDP

Post by drakeandersen » Tue Aug 02, 2022 1:57 am

A quick update in case it's helpful for anyone else: I was able to send the large scores over UDP by using separate dump messages and reassembling the score locally. I wrapped the output of each outlet with odot/OSC addresses (/Pitches, /Duration, etc.). Seems like there was quite a bit of material within the score llll that I didn't need--at least for relatively straightforward (i.e. common practice) scores.

Still have to verify maximum score size that can be sent this way, but most recent test was close to 200 bars. Trickiest bit was getting dynamics and articulations--iterated over all notes then conditional select (by onset)/dumpselection to check for relevant slot contents. If someone has a more elegant solution I'd still be curious. -DA

gratkowski
Posts: 41
Joined: Tue Aug 21, 2012 12:50 pm

Re: sending bach scores over UDP

Post by gratkowski » Mon Aug 15, 2022 3:05 pm

I tried a similar approach just using simple scores and some slots. It would be nice to see your approach.
I just needed to send scores from a database and decided to have the same database in the receiver patch, so I just need to send the query.
It would be great to have a way to compress the score data somehow...

LivinTheDream
Posts: 10
Joined: Fri Apr 02, 2021 12:42 am

Re: sending bach scores over UDP

Post by LivinTheDream » Thu Sep 15, 2022 6:38 pm

hey guys, i made some headway a couple years ago on a similar project with bach.roll, and hooked it up to a bunch of o.schedules to trigger bundles. I'm attaching a demo. Curious about your approaches. I documented to the left of the messy patch. Ps Danielle helped me many steps along the way, and as you can see, there's lots of room for improvement. pps - version 0.8.1b
Attachments
share.zip
(19.66 KiB) Downloaded 123 times

LivinTheDream
Posts: 10
Joined: Fri Apr 02, 2021 12:42 am

Re: sending bach scores over UDP

Post by LivinTheDream » Thu Sep 15, 2022 9:43 pm

oh and fyi i'm finding a more effective solution for properly grouping breakpoints w/their respective notes in a chord situation, i can share that if there's interest.

Post Reply