[sdiy] MIDI receiving flowchart.. WAS MIDI I/O c code..

John Speth johnspeth at yahoo.com
Sat Mar 21 01:10:52 CET 2020


Neil's flowchart looks right. Here's another way to look at it from a 
state machine perspective. For me personally, coding from a flow chart 
leads to spaghetti code but a state machine translates to code much easier.

http://myplace.frontier.com/~jspeth/MIDI_FSM.pdf

Advice: There is little value and it's probably even detrimental to 
attempt a starting MIDI reception code body. You need to fully implement 
the MIDI reception and decoding parts. You can opt to disregard the 
actions that should be taken after an unambiguous MIDI message is 
received but you need to handle each byte.

JJS

On 3/20/2020 12:26 PM, Neil Johnson wrote:
> You mean like this:
>
> https://github.com/nejohnson/miby
>
> Look in the /doc folder for a PDF.
>
> Neil
>
> On Fri, 20 Mar 2020 at 19:17, Tom Wiltshire <tom at electricdruid.net 
> <mailto:tom at electricdruid.net>> wrote:
>
>     I think a flowchart is a good idea, but I’d say that the voice
>     assignment part is a separate thing from the MIDI. Voice handling
>     is a whole area in its own right.
>
>     Tom
>
>     ==================
>            Electric Druid
>     Synth & Stompbox DIY
>     ==================
>
>>     On 20 Mar 2020, at 19:10, Jean-Pierre Desrochers
>>     <jpdesroc at oricom.ca <mailto:jpdesroc at oricom.ca>> wrote:
>>
>>     One idea came to my mind reading all your great comments:
>>     Would it be usefull for anybody in this DIY forum including
>>     newbies like me
>>     that someone would publish a 'starting' MIDI receiving flowchart
>>     of the basics from the incoming bytes to the actual final process
>>     of each received notes ?
>>     For example this helping flowchart would show the basic steps
>>     of first: the interrupt function (USART Rx flag test, RxBuffer[]
>>     updating, etc...)
>>     Then the behaviour of the main loop processing each received byte
>>     for let's say a polyphonic MIDI to CV 8 voices module ?
>>     And only for one MIDI channel for simplicity to understanding ?
>>     I did in the past a big flowchart for my MIDI to CV 6 voices module
>>     That I could 'squeeze'to keep only what's stated above.
>>     This could be a starting point for anybody who wants to 'correct'
>>     things
>>     and this way the DIY forum would have a 'list standardized' flowchart
>>     For anybody to use in the future..
>>     This would answer many design questions to come.
>>     Again, a small flowchart of how to receive MIDI bytes for only
>>     one MIDI channel
>>     And process for polyphonic use (8 voices).
>>     If this suggestion interests enough diyers I could put my cleaned out
>>     Flowchart on the list as a start..
>>     Or maybe I'll be the only guy to be interested in that
>>     Since many of you gurus have already been through these codings..
>>     JP
>>
>>
>>
>>
>>     _______________________________________________
>>     Synth-diy mailing list
>>     Synth-diy at synth-diy.org <mailto:Synth-diy at synth-diy.org>
>>     http://synth-diy.org/mailman/listinfo/synth-diy
>
>     _______________________________________________
>     Synth-diy mailing list
>     Synth-diy at synth-diy.org <mailto:Synth-diy at synth-diy.org>
>     http://synth-diy.org/mailman/listinfo/synth-diy
>
>
> _______________________________________________
> Synth-diy mailing list
> Synth-diy at synth-diy.org
> http://synth-diy.org/mailman/listinfo/synth-diy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://synth-diy.org/pipermail/synth-diy/attachments/20200320/4172aeaa/attachment.htm>


More information about the Synth-diy mailing list