MIDI message problem

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 6.

Moderator: Benj

FAQ03
Posts: 8
Joined: Tue Apr 17, 2018 11:35 pm
Contact:

MIDI message problem

Postby FAQ03 » Tue Apr 17, 2018 11:54 pm

Hello, my name is Facundo. I'm from Argentina and I'm using Flowcode 6 to MIDI control a Digitech Whammy V and I have a problem.
I work on a PIC 18F4620 and my problem comes when I send the MIDI command. When analyzing the command with MIDIOX I notice that it is sent two or three times at the same time. This causes the Whammy V not to understand the command. In the programming I use the MIDI Component Macros "SendMIDI". I must assume that it is a mistake in the MIDI library to use Flowcode, I hope you can help me.
Thank you very much, I use the google translator, sorry if it is not very understandable.

User avatar
Benj
Matrix Staff
Posts: 12708
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 3556 times
Been thanked: 3439 times
Contact:

Re: MIDI message problem

Postby Benj » Wed Apr 18, 2018 10:44 am

Hello Facundo,

Can you please attach your program so we can see what's going on.

Also I would recommend running a 1 second flasher test to confirm your hardware is running at the right speed otherwise the timings will be off for the MIDI communications.

https://www.matrixtsl.com/wiki/index.ph ... ED_flasher

FAQ03
Posts: 8
Joined: Tue Apr 17, 2018 11:35 pm
Contact:

Re: MIDI message problem

Postby FAQ03 » Wed Apr 18, 2018 10:00 pm

Benj wrote:Hello Facundo,

Can you please attach your program so we can see what's going on.

Also I would recommend running a 1 second flasher test to confirm your hardware is running at the right speed otherwise the timings will be off for the MIDI communications.

https://www.matrixtsl.com/wiki/index.ph ... ED_flasher


Hello, that would be my project. It's very simple. The problem is that scanning the MIDI output with MIDIOX happens what is in the image that is attached to the project. I hope we can come up with a solution.

https://mega.nz/#!G9glARLT!7zo9zWLPFubA6FJlDTbMe5AGk2CimCQIi3tTg5j3Axk

User avatar
Benj
Matrix Staff
Posts: 12708
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 3556 times
Been thanked: 3439 times
Contact:

Re: MIDI message problem

Postby Benj » Thu Apr 19, 2018 10:05 am

Hello,

I have had a look through the code and I cannot see how the PIC can be generating the additional MIDI messages. Could these be being generated by something else? The note off messages are very specific, maybe this is automatic from the MIDI instrument when changing patch.

Here is the latest v6 component to ensure your component is up to date. Simply copy the attached file into your "Flowcode 6/components" folder and restart Flowcode to load the changes.

midi.fcpx
(12.76 KiB) Downloaded 13 times

FAQ03
Posts: 8
Joined: Tue Apr 17, 2018 11:35 pm
Contact:

Re: MIDI message problem

Postby FAQ03 » Thu Apr 19, 2018 7:45 pm

Benj wrote:Hello,

I have had a look through the code and I cannot see how the PIC can be generating the additional MIDI messages. Could these be being generated by something else? The note off messages are very specific, maybe this is automatic from the MIDI instrument when changing patch.

Here is the latest v6 component to ensure your component is up to date. Simply copy the attached file into your "Flowcode 6/components" folder and restart Flowcode to load the changes.

midi.fcpx



Holla Benj thank you for your answers, they are really very valued.
There should not be any device that generates the additional MIDI notes, but in the same way I attach the schematic and the settings of the PIC 18F4620 of my project since I do not know if they are the correct ones.
In the video that I leave it looks like the Digitech Whammy V receives the MIDI signal from my circuit and from the flowcode simulation. In the link of the attached project the manual Digitech Whammy V where specifies the MIDI functions.
The HEX compilation that has the PIC 18F4620 in the video was made with the file you sent me (midi.fcpx).

LINK PROYECT:https://mega.nz/#!PhBRFDST!V7n7ZaVWP8LSCvI15c3tM3GPKq2IjneAJeS5pevUHZY

VIDEO TEST:https://www.youtube.com/watch?v=nbN1ykfUCoM&feature=youtu.be

VIDEO TEST 2:https://www.youtube.com/watch?v=TkBchAGp2LI&feature=youtu.be

Image

Image

Image

FAQ03
Posts: 8
Joined: Tue Apr 17, 2018 11:35 pm
Contact:

Re: MIDI message problem

Postby FAQ03 » Thu Apr 19, 2018 9:16 pm

Benj wrote:Hello,

I have had a look through the code and I cannot see how the PIC can be generating the additional MIDI messages. Could these be being generated by something else? The note off messages are very specific, maybe this is automatic from the MIDI instrument when changing patch.

Here is the latest v6 component to ensure your component is up to date. Simply copy the attached file into your "Flowcode 6/components" folder and restart Flowcode to load the changes.

midi.fcpx


Another problem that can cause the failure is that when recording the HEX file in the PIC 18F4620 it generates an error.
To avoid the error, uncheck the "Verify after" box. The burner I use is a MiniPro TL866.
It should be noted that despite the fact that this error is generated, the PIC 18F4620 is recorded the same with the HEX file. But I think that some configuration might not be recorded correctly.

Image

Image

Image

Image

FAQ03
Posts: 8
Joined: Tue Apr 17, 2018 11:35 pm
Contact:

Re: MIDI message problem

Postby FAQ03 » Fri Apr 20, 2018 5:37 pm

Benj wrote:Hello,

I have had a look through the code and I cannot see how the PIC can be generating the additional MIDI messages. Could these be being generated by something else? The note off messages are very specific, maybe this is automatic from the MIDI instrument when changing patch.

Here is the latest v6 component to ensure your component is up to date. Simply copy the attached file into your "Flowcode 6/components" folder and restart Flowcode to load the changes.

midi.fcpx


Hi Benj, I just did a test with a PIC 16F877A using the same circuit and using flowcode 6 in the same way as with the PIC 18F4620. This time at the time of recording the PIC 16F877A I had no problems, but still doing the same problem of sending two or even three midi commands.
The Digitech Whammy V continues behaving in the same way as in the video.

Image

Image

FAQ03
Posts: 8
Joined: Tue Apr 17, 2018 11:35 pm
Contact:

Re: MIDI message problem

Postby FAQ03 » Wed Apr 25, 2018 4:11 pm

please can someone help me! I am convinced that the failure is due to some parameter of flowcode 6.

User avatar
Steve
Matrix Staff
Posts: 2980
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 65 times
Been thanked: 298 times
Contact:

Re: MIDI message problem

Postby Steve » Thu Apr 26, 2018 9:49 am

You may need the MIDI Initialise command at the beginning of your program. This will set up the UART correctly.

I've looked at the code generated by your flowchart and it is not sending the command multiple times. Also, the simulation should not affect the running program once it is downloaded and running on the chip.

FAQ03
Posts: 8
Joined: Tue Apr 17, 2018 11:35 pm
Contact:

Re: MIDI message problem

Postby FAQ03 » Fri Apr 27, 2018 2:31 pm

Steve wrote:You may need the MIDI Initialise command at the beginning of your program. This will set up the UART correctly.

I've looked at the code generated by your flowchart and it is not sending the command multiple times. Also, the simulation should not affect the running program once it is downloaded and running on the chip.




Hello Steve, I had forgotten to put the initialization. But in the tests he did on video, the PIC18F4620 and PIC16F877A had the initiation of MIDI. It is a failure that I still can not solve.

PROYECT:https://mega.nz/#!PhBRFDST!V7n7ZaVWP8LSCvI15c3tM3GPKq2IjneAJeS5pevUHZY

FAQ03
Posts: 8
Joined: Tue Apr 17, 2018 11:35 pm
Contact:

Re: MIDI message problem

Postby FAQ03 » Fri Apr 27, 2018 2:40 pm

Steve wrote:You may need the MIDI Initialise command at the beginning of your program. This will set up the UART correctly.

I've looked at the code generated by your flowchart and it is not sending the command multiple times. Also, the simulation should not affect the running program once it is downloaded and running on the chip.




I was thinking that someone would send me a project like mine where I just tried the MIDI program changes with a PIC18F4620 or a PIC16F877A. Maybe I'm making a mistake in something.