PG200 clone with arduino

Hi all,

a synthesizer enthusiast in the need for your help here :slight_smile:

I am trying to understand how to send appropriate serial messages to a synthesizer (Roland JX3P) in order to emulate the behaviour of a rare and expensive nowadays hardware Roland developed in the mid '80s.
The hardware (PG200) was intended as an interface to send tone parameters to the synth in order to create new sounds out of it.

The protocol has just been studied and valuable info are available. Unfortunately I could not get in touch with the original author.

In a nutshell:

  • messages are 9 bit unpaired
  • messages are inverted before be sent
  • a start message has to be sent for the synth to see them as valid

Here is a link to the whole notes the original author wrote
http://www.xonik.no/mpg-200/pg-200/pg-200.html

Now, sending midi messages with arduino is a joke thanks to the work of arduino communities all over the world and i have realized some hardware myself (see i.e. https://www.google.it/amp/s/www.instructables.com/id/almost-Universal-MIDI-SysEx-CC-Programmer-and-Sequ/%3Famp_page=true).
Unfortunately, this is a completely different task and I am in the need for some starting hints from valuable coder.

Could anyone help me in figuring out how to assemble and send those messages with arduino?

Thanks in advance!

  • messages are 9 bit unpaired

The UART of the AVR Arduinos is able to send 9bit data. The drawback: The Serial object (HardwareSerial) doesn't support it. You'd have to write your own code for this.

  • messages are inverted before be sent

Seems to be a simple hardware inverter.

  • a start message has to be sent for the synth to see them as valid

Should be the easiest part.

Thank you for your answer. Unfortunately I have no idea on how to rewrite hardware serial library (I am a "basic" user, not that advanced).
I have seen an old Gammon library for 9 bit messages: would it be of some use?

I really need some insight on the form of such messages...

I have seen an old Gammon library for 9 bit messages: would it be of some use?

Sure, but I would apply the patch to a current version of the HardwareSerial class to get all the bug fixes from the last years.

I really need some insight on the form of such messages...

The linked pages should give you enough inside of the form of such messages. But you cannot use the print() and println() methods of the Stream class as they don't support 9bit characters. Use the write() method for every character sent.

Thanks.
The author of those pages speak about bytes too, so it's not 100% clear to me if every message is 9 bit or some could be 8 bit... Any though?

The author of those pages speak about bytes too, so it's not 100% clear to me if every message is 9 bit or some could be 8 bit... Any though?

I'd expect everything to use 9bit characters. It's extremely uncommon to change the bit size of a character during a transmission.

Thanks. I am waiting for a 6 pin connector to be dropped in my mailbox to start experimenting with this. I will report back!

Barito:
Thanks. I am waiting for a 6 pin connector to be dropped in my mailbox to start experimenting with this. I will report back!

Any luck with this Barito? (sorry for thread resurrection)

Hi guys,

I'm also very interested in this project!

As Barito has pointed out, the hard work has already been done by Xonik (The MPG-200) in analysing the protocol. He/she seems to have been able to implement the functionality in their MPG-200 product also.

There are a few posts on 9-bit frames with the Arduino. It seems possible: [Solved] 9 bit serial problem - Programming Questions - Arduino Forum

How has your tinkering gone Barito? I wonder if it might be worth pooling resources and getting an open-source git repository going for this?

One open question in my mind is what the JP-3X sees as low and high voltage? See the pin-out described by Xonik:
1: -15V
2: +15V
3: +7V
4: GND
5: TX
6: Busy

Looking at the PG200 circuit diagram it looks like there is a 5V regulator... That makes me hopeful that we could just use Arduino Uno's 5v UART Tx..

Another thing of not in the PG200 service manual is that that PG200 doesn't use UART, but signals directly from the CPU. I'm a serial noob so I'm not 100% sure if this is important yet but it could be. It sounds a bit closer to bit banging than traditional serial communication..

Ref (Page 7, top right): http://www.synfo.nl/servicemanuals/Roland/JX-3P_SERVICE_NOTES.pdf

Disclaimer: Excited and full of coffee therefore some or all of the above could be jibberish.

Cheers.

P.S.

I'm attaching a Xonik's doc just in case the site goes down or something.

Xonik Devices - Free the PG-200.zip (186 KB)

Another thing of not in the PG200 service manual is that that PG200 doesn't use UART, but signals directly from the CPU. I'm a serial noob so I'm not 100% sure if this is important yet but it could be. It sounds a bit closer to bit banging than traditional serial communication..

On the Arduino the RX/TX signals are directly from the CPU and there they use UART hardware and not bit-banging.

Hey, this is a bit funny - I was trying to find my mpg200 schematics from my phone (too lazy to go upstairs to my computer) and ended up here.

Sorry for not getting back to you if you’ve tried emailing me, I am horribly bad at answering both emails and forum posts.

How is your project going?

Cheers,
Joakim / Xonik

Some quick answers: all Messages are 9 bit, I use the built in uart and the inversion is done in hardware if I remember correctly.

Oh, and you don’t need the power lines +/-15, 7) if you intend to power the Arduino elsewhere, but you could possibly use the 7v and a 5v reg to power the Arduino, that’s where I get my power from.

Hi Joakim,

I've been keeping an eye on this thread and who better to pop in? :slight_smile:

My attempt hasn't even hit the breadboard yet. Have a couple of other things to get out the door first.

That said, I've been thinking about it and specifically that inverted signal. Given you say,

I use the built in uart and the inversion is done in hardware if I remember correctly

I'm wondering why you wouldn't do the inversion in software?

My guess is that this isn't something covered in the arduino serial libraries therefor the hardware options is simplest? I say this only having glanced at posts on the topic, not really looked at the libraries.

Cheers,
Owley

owley83:
That said, I've been thinking about it and specifically that inverted signal. Given you say, I'm wondering why you wouldn't do the inversion in software?

My guess is that this isn't something covered in the arduino serial libraries therefor the hardware options is simplest? I say this only having glanced at posts on the topic, not really looked at the libraries.

Looking at the schematic for the PG200 (service manual for the JX-3P / PG200 is available online), the original circuit has the output from the CPU driving a transistor, which then drives the signal to the synthesizer. Replicating the original transistor circuit will give you the inversion, and will provide the original output characteristics at the same time. Its unlikely you would be able to directly connect an output from the arduino to the synthesizer, so some type of interface would be necessary anyway.

owley83:
Another thing of note in the PG200 service manual is that that PG200 doesn't use UART, but signals directly from the CPU. I'm a serial noob so I'm not 100% sure if this is important yet but it could be. It sounds a bit closer to bit banging than traditional serial communication..

The PG200 uses an M5L8048 CPU - that chip has no UART, so there was no choice at the time, other than using an external UART chip.