Date: Thu, 30 May 2019 14:08:27 -0300 From: Marcel Bonnet <marcelbonnet@gmail.com> To: Hans Petter Selasky <hps@selasky.org> Cc: FreeBSD multimedia <freebsd-multimedia@freebsd.org>, multimedia@freebsd.org Subject: Re: [jack_umidi] baud rate when writing MIDI messages from USB to jack_umidi Message-ID: <CAPe0dB=QLMQ1GRuQrPmYDmXpzBJ1W8Y9r9Q_38PD_2VtHWvj1A@mail.gmail.com> In-Reply-To: <b994d84b-3da2-a8bf-bd72-44add15d0857@selasky.org> References: <CAPe0dBmmLU8_umJYK9kRwukbc_GeHwuYfJLawP6=nB3gHyJMfA@mail.gmail.com> <3dc15748-39c2-49fe-f423-46d42a4b58d4@selasky.org> <CAPe0dBmLHavci2q2sCVc9zPRXprLjtoujXM8GOheFk8Ns2kfJQ@mail.gmail.com> <b994d84b-3da2-a8bf-bd72-44add15d0857@selasky.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Em qua, 29 de mai de 2019 17:58, Hans Petter Selasky <hps@selasky.org> escreveu: > On 2019-05-29 16:52, Marcel Bonnet wrote: > > On Wed, 29 May 2019 at 11:27, Hans Petter Selasky <hps@selasky.org> > wrote: > > > >> On 2019-05-29 16:15, Marcel Bonnet wrote: > >>> Hello. > >>> > >>> I'm making a MIDI controller with Arduino UNO and I though somebody > could > >>> help me on clarify if I should set a specific baud rate when writing > MIDI > >>> messages from Arduino (from USB port) that are target to jack_umidi. > >>> > >>> I realize that whem I'm writing chars (debug messages) they are > >> interpreted > >>> as random MIDI notes. But when I turn debug off and write something > like: > >>> > >>> Serial.write(0x90); > >>> Serial.write(0x30); > >>> Serial.write(0x7F); > >>> Serial.flush(); > >>> > >>> no MIDI message is received (I used jack_midi_dump to check, it is > >> empty) . > >>> > >>> So I'm not asking about Arduino itself, but maybe it is something > related > >>> to the baud rate? > >>> > >> > >> The USB protocol use a classification byte. Every USB MIDI command is > >> always 4-bytes long. > >> > >> Regular MIDI is using 64000 baud I think. > >> > >> --HPS > >> > >> > > Thanks a lot HPS! > > > > BTW, I looked at > > http://www.gweep.net/~prefect/eng/reference/protocol/midispec.html : it > > states 31250 baud for MIDI. > > > > I'm opening the arduino USB device as: > > $ jack_umidi -S -B -C /dev/cuaU0 > > > > In this case, 9600 baud is too slow? Should I set to 31250 next time? > > > > Thanks in advance, > > > > I've never tested jack_umidi like this :-) > > Maybe you'll need to patch it to set the baud rate. > > --HPS > Now I see why it was not working as expected. And this discussion led me to another approach: I'll write a program to read the serial USB (/dev/cuaU0) from Arduino (I can use the term library to sync the baud rate) and dispatch the data as a jack client to the MIDI device and/or applications involved. ;-) Thank you, HPS. >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAPe0dB=QLMQ1GRuQrPmYDmXpzBJ1W8Y9r9Q_38PD_2VtHWvj1A>
