VC-mini

Started by sixeight, January 05, 2019, 09:45:51 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

sixeight

#25
When I ordered the 3,5 mm plugs from Reichelt, I also found some rotary encoders that would fit nicely on the board. Then I started drawing AGAIN. Now I should stop really. This is getting out of hand. Are there self-help groups for PCB board design addicts?


HAMERMAN409

>Are there self-help groups for PCB board design addicts?

I get it - the ability to lay out your own board is a very empowering feeling.

In the past I have done some PC board layout's as consulting jobs (I am an EE by day) and they worked out to be roughly one board every two years which was perfect because it was just often enough to keep myself familiar with the layout tools. My last layout was at least 3 years ago so I am starting to feel like I need to lay something out! :-) 

SteveO

Quote from: sixeight on February 19, 2019, 03:16:30 AM
When I ordered the 3,5 mm plugs from Reichelt, I also found some rotary encoders that would fit nicely on the board. Then I started drawing AGAIN. Now I should stop really. This is getting out of hand. Are there self-help groups for PCB board design addicts?



Well, if you ever get bored and feel the need to make another board you could always make one for this project: https://raw.githubusercontent.com/SteveObert/KatanaUSB_Midi_controller/master/images/wiring.png. Plus a 9v to 5v converter and a couple of expression pedal/ external foot switch jacks.   ;) 
;D ;D ;D ;D ;D

HAMERMAN409

I plan on building a Katana controller once my parts arrive (some are coming from China so it may be a while). Once that design seems done and the features are set I would definitely consider laying out a board.

sixeight

I have ordered the Rev B boards and they are on the way to the Netherlands.

I also started programming the Rev. A version for the Helix. So far it will control the looper and speed up patch change of my VG-99/Helix setup, by storing and sending the instant command midi messages earlier. Works really well.

Once I am done I will make a video of this.

sixeight

No time to be bored this weekend...


sixeight

#31
Soldered one of the rev. B boards today. So far it is looking good. I added the optional RGB backlight display and two rotary encoders. But I am still waiting for the LEDs. Ebay did not deliver this time, so I will have to pay a bit more and get them locally.



Display removed and board turned around:


sixeight

The design for the rev.B enclosure:




sixeight

#33
Printed the enclosure. Yet another perfect fit! The guy who designed it, did an excellent job.



It is hard to see the encoders. But they do fit nicely.

Hopefully I can get a nice sticker for the top.

Now it is time to work on the firmware and see if I can get the USB host port working. It may take awhile as the coming weeks are busy. But closer to May I will have more time to spare for this project.

sixeight

#34


The USB host port is up and running, but so far only with a class compliant device, the Zoom MS70-CDR.

So far no errors in the PCB design of the VC-mini.

sixeight

#35
Currently trying to get the USB midi working with the VG-99. I followed the instructions of vit3k. But that does not seem to work.

WARNING: geek alert = on for the following part of this post.  ;)

When i remove both...

if (p[5] != 1) return false; // bInterfaceClass: 1 = Audio class
if (p[6] != 3) return false; // bInterfaceSubClass: 3 = MIDI


...and...

if (p[3] != 2 && p[3] != 3) return false; // must be bulk or interrupt type

...then some data is able to get through, but a large part of it is lost, particularly when requesting several sysex bytes after one another. If I remove the interrupt type from the line, or leave it as it is, I receive no data at all.

So I guess, I am not properly identifying the VG-99, as i am not reading the desciptors properly. Or maybe I am not properly receiving the data.

When I connect the GP-10, nothing happens. No data seems to be passing. The descriptors are not read at all. So something is different here...

I need to do some more study. If any of you USB-midi gurus is willing to share a clue, I would be most grateful.

sixeight

#36
Quote from:  philjynx on March 31, 2019, 09:16:44 AM
...
If you try the same communication thru ALSA does it work? Might help narrow it down if one tech works and one doesn't.

ALSA is a Linux thing, but Teensy does not run Linux. Maybe the ALSA libraries do have a clue, but I haven't been able to find the relevant part yet, as these libraries are quite extensive.

For the Teensy 3.6 USB port to work with Boss/Roland devices, I need to edit the midi.cpp file in the USBHost_t36 library, found here:

https://github.com/PaulStoffregen/USBHost_t36

SteveO

#37
I'm no USB-midi guru, but I also tried the changes vit3k suggested and didn't have any luck. With the Katana USB interface timing is crucial, as MrHaroldA pointed out in the Roland_Boss MIDI over USB reverse engineering thread. Maybe timing is important to the VG-99 also. I'm wondering if there is of some sort of timing and wait for response sort of thing going on the Roland Windows/OS-X drivers. Have you checked out MrHaroldA's library for the mini USB Host shield? https://github.com/MrHaroldA/MS3. There may be some clues in that library even though it's not for the Teensy 3.6 USB host port.

sixeight

Quote from: SteveO on March 31, 2019, 09:46:40 AM
I'm no USB-midi guru, but I also tried the changes vit3k suggested and didn't have any luck. With the Katana USB interface timing is crucial, as MrHaroldA pointed out in the Roland_Boss MIDI over USB reverse engineering thread. Maybe timing is important to the VG-99 also. I'm wondering if there is of some sort of timing and wait for response sort of thing going on the Roland Windows/OS-X drivers. Have you checked out MrHaroldA's library for the mini USB Host shield? https://github.com/MrHaroldA/MS3. There may be some clues in that library even though it's not for the Teensy 3.6 USB host port.

Thanks Steve. I have been looking at the MS3 library. It makes use of the "usbh_midi.h" library. I had a look at this library in github, but I can't make any sense of it.

That library is found here: https://github.com/YuuichiAkagawa/USBH_MIDI

This library does not work with the USBHost_t36 library...

SteveO

Quote from: sixeight on March 31, 2019, 10:10:21 AM
Thanks Steve. I have been looking at the MS3 library. It makes use of the "usbh_midi.h" library. I had a look at this library in github, but I can't make any sense of it.

That library is found here: https://github.com/YuuichiAkagawa/USBH_MIDI

This library does not work with the USBHost_t36 library...

I didn't really understand the usbh_midi.h either. I tried hacking away at the USBHost_t36 because I wanted to use it with the Katana USB controller but had no luck, I was in over my head when it comes to USB communicaiton.

sixeight

#40
Sweet progress:



Got the VG-99 and the Katana working. But the GP10 does not work yet. Also did a quick test with the GR-55, which is working as well.

You don't actually see me plug in and out the USB cables, but trust me I do. I had to keep the camera close to the VC-mini, otherwise I could not read a thing.

What did I do to get here:
- copied the latest version of the usbhost_t36 library to the Arduino library folder. I was using an older version.
- changed the endpoint descriptor to accept only bulk type (thanks vit3k).
- increased USB buffer sizes.

So this is a big step forward.

The GP10 is sending and receiving some data, but it is messing up the data somewhere and the VC-mini can't make any sense of it.

SteveO

#41
Quote from: sixeight on April 01, 2019, 10:54:25 AM
Sweet progress:

Got the VG-99 and the Katana working. But the GP10 does not work yet. Also did a quick test with the GR-55, which is working as well.

What did I do to get here:
- copied the latest version of the usbhost_t36 library to the Arduino library folder. I was using an older version.
- changed the endpoint descriptor to accept only bulk type (thanks vit3k).
- increased USB buffer sizes.

So this is a big step forward.

The GP10 is sending and receiving some data, but it is messing up the data somewhere and the VC-mini can't make any sense of it.

Awesome work! This is great. Are you sending SysEx messages using the the MIDI functions in the usbhost_t36 library? 

Edit: I had an older version of the library too, it looks like it was updated Feb 27. Please post the changes you made to the usbhost_t36 library if you don't mind.

CodeSmart

Sixeight, that display looks pretty nice in terms of readability, better then the one I have. Do you have link?
But I got more gear than I need...and I like it!

sixeight

#43
Quote from: CodeSmart on April 01, 2019, 05:52:29 PM
Sixeight, that display looks pretty nice in terms of readability, better then the one I have. Do you have link?

This is the Adafruit RGB backlit display.

https://www.adafruit.com/product/398

But I find the white-on-black Buydisplay displays to be even better in terms of readability.

@SteveO, will post the code later...

sixeight

Quote from: SteveO on April 01, 2019, 03:41:27 PM
Awesome work! This is great. Are you sending SysEx messages using the the MIDI functions in the usbhost_t36 library? 

Edit: I had an older version of the library too, it looks like it was updated Feb 27. Please post the changes you made to the usbhost_t36 library if you don't mind.

I actually just posted on the PJRC forum. See if somebody can help me with the non-responsive GP10. that post also show the changes I made to the library, which are only two in the end. I had to clean up my act before posting...

https://forum.pjrc.com/threads/55635-One-Midi-Device-not-working-with-the-USBHost_t36-library?p=202286#post202286

vit3k

#45
It looks like in newest version of library support for non-compilant midi devices was added.

Do you have a usb host shield for arduino? If yes can you post USB_desc example sketch output for GP10? I think I had this issue with Katana some time ago. I could send messages but none were received. This was happening because wrong endpoint was taken as midi input. It looks like similiar issue.

First question is which endpoint is correct and I'm not sure right now how to find this out. Maybe it could be read somehow on Linux machine?

The second question is why the wrong one is taken. For Katana it was because of the bug I wrote earlier.

EDIT: I see now that it sends and receives program changes messages so interfaces are selected correctly. Looks like a different problem.

sixeight

#46
Quote from: vit3k on April 03, 2019, 10:22:25 AM
It looks like in newest version of library support for non-compilant midi devices was added.

Correct. I installed Arduino 1.8.9 and the Beta version of Teensyduino today. My sketch now compiles without any warnings.

Quote from: vit3k on April 03, 2019, 10:22:25 AMDo you have a usb host shield for arduino? If yes can you post USB_desc example sketch output for GP10? I think I had this issue with Katana some time ago. I could send messages but none were received. This was happening because wrong endpoint was taken as midi input. It looks like similiar issue.

First question is which endpoint is correct and I'm not sure right now how to find this out. Maybe it could be read somehow on Linux machine?

The second question is why the wrong one is taken. For Katana it was because of the bug I wrote earlier.

EDIT: I see now that it sends and receives program changes messages so interfaces are selected correctly. Looks like a different problem.

It is strange that PC and CC work and sysex does not. I figured maybe one interface did not work, but if i connect to the second MIDI interface, the GP-10 still does not send/receive sysex properly.

sixeight

Finally have time to work on the firmware of the VC-mini. The plan is to have a single code base that easily compiles for both the full VController and the VC-mini.

But only having three switches and a single display does give some challenges. So far I implrmented the following:
* Option to run commands on press, on release or on long press.
* Option to press switch combinations 1+2, 2+3 and 1+3 and add commands to these.
* Option to make encoder turn and press fully programmable. Encoder turn is only partially implemented.
* Option for the bottom line of the display to show the first 4 or 5 characters of a patch or parameter name.
* Option to add extra switches or controllers via midi.

The VCmini will have the same functionality as the full VController, though there are some functions for which I lack switches and displays. And I may skip the onboard editing of parameters.

But so far it is looking good.

HAMERMAN409

Quote from: sixeight on May 01, 2019, 12:23:41 PM
Finally have time to work on the firmware of the VC-mini. The plan is to have a single code base that easily compiles for both the full VController and the VC-mini.

I had no idea that could be done (with one being Raspberry Pi based and the other being Arduino based).

sixeight

Quote from: HAMERMAN409 on May 03, 2019, 11:26:54 AM
I had no idea that could be done (with one being Raspberry Pi based and the other being Arduino based).

The VController and the VC-mini are both based around a Teensy. I do use a Raspberry Pi as well, but only to add four USB host ports. The VC-mini also has a host port.

Once this project is finished, I may develop a new full VController with a built in host port. But the VC-mini will keep me busy for awhile.