From owner-freebsd-multimedia@freebsd.org Thu May 30 17:08:41 2019 Return-Path: Delivered-To: freebsd-multimedia@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 651A515A5134; Thu, 30 May 2019 17:08:41 +0000 (UTC) (envelope-from marcelbonnet@gmail.com) Received: from mail-oi1-x243.google.com (mail-oi1-x243.google.com [IPv6:2607:f8b0:4864:20::243]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F22FB94B28; Thu, 30 May 2019 17:08:40 +0000 (UTC) (envelope-from marcelbonnet@gmail.com) Received: by mail-oi1-x243.google.com with SMTP id y6so1906932oix.2; Thu, 30 May 2019 10:08:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=b9lrfUjqO272Ou/yvO1t3cGf7A2fM/YgJhTM3OGOyzE=; b=IKwGLlQ12ExJgN7mWnLNxruokhQ7/QmwuEACvOhwDruKZLwKm2kkJ9n8deMeouoqS4 AmDHpXXP4JUOUp4lvGkRc0wKdQedEaNpTxVJZQcyR2VfaO28xHcJqDsxmmHAA2vEFRiy Y44bxXrQK84yLP2rC5SJq1Ma4Et9zzxTrax8m+X3KXHccMk5D5k3dUbUwNu0cRCYsoUg HKR7QHqSsHL/NLiI6YmsoFqripkIyCsY0Krg3myrNqAE0uFBFPX0X+wQ+ZtCL+2DL8/Q hMCII0+dQ3tema6YLJLXKcYADHHiX1PU/WK0icL9Ufh7ejXVFP7TRogv1Km/qi5MAc0B aWdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=b9lrfUjqO272Ou/yvO1t3cGf7A2fM/YgJhTM3OGOyzE=; b=ZhXfwFuX0eqd+HDUIU83/7Vmru1Sz8Sim/smGSm4X+r+54DfXFboFvslpJ9aZjXYjY O0Ax2mpCM7Mmx67w+qqphY0M5vlsq5N/qQPfvIeX8XsN4sTbKKlx35XEYH57KUD+Kqpk YbC1LQw4Wncs2smFxeOjvpgIVrI96S8ySpvCno+6YWTPZyfnSxI9Rhpge3fp5b1o2yHG yo1+KLe9NmczGpSz+B63QgcpMxbmCZ4G+z4RkLJOto6/WegGcumP3PMXeJFtv4LjSnnx uSLu+gWbWc1vbVnm93g17dzW5gUzhgJ8jPl1aZVxf6jzY8LXnkbjry8A5PR4bE/dadMo fmUg== X-Gm-Message-State: APjAAAV/vyF3zNv7GTEKB0d+4VtrSzddPQ6+W+9ooFS8QWop2ZXolKye r7TuhPlf5oYmL+o3jchUz8I5J3ZMAPc9k7rmYMqsDA== X-Google-Smtp-Source: APXvYqypxkkDEsTzVkL56z4JxYxSB66N1mOqufU2e0jhTceZN+vpfLziRKZfgOPiU+LLbmn1M5KnEGBJ9K2vwQrayqk= X-Received: by 2002:aca:5004:: with SMTP id e4mr3164560oib.179.1559236120169; Thu, 30 May 2019 10:08:40 -0700 (PDT) MIME-Version: 1.0 References: <3dc15748-39c2-49fe-f423-46d42a4b58d4@selasky.org> In-Reply-To: From: Marcel Bonnet Date: Thu, 30 May 2019 14:08:27 -0300 Message-ID: Subject: Re: [jack_umidi] baud rate when writing MIDI messages from USB to jack_umidi To: Hans Petter Selasky Cc: FreeBSD multimedia , multimedia@freebsd.org X-Rspamd-Queue-Id: F22FB94B28 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.95 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.95)[-0.950,0] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 May 2019 17:08:41 -0000 Em qua, 29 de mai de 2019 17:58, Hans Petter Selasky escreveu: > On 2019-05-29 16:52, Marcel Bonnet wrote: > > On Wed, 29 May 2019 at 11:27, Hans Petter Selasky > 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. >