previous by dateindexnext by date
previous in topictopic list 

Subject: Re: [chromapolaris] Re: Master Tune Membrane Switch

From: David Clarke <ac151@...>
Date: 2007-11-04

>> There are System Exclusive messages that can simulate the pressing
>> of switches. And of course the Tune Request byte does the same
>> thing as LOWER FUNCTION, TUNE ALL.

> Thanks for the reply Paul. How would I go about
> using a system exclusive message to simulate the
> pressing of this switch? Is there documentation for it
> somewhere? And what is the tune request byte?

The MIDI Implementation Manual for the Polaris (available as a link from
the Rhodes Chroma site, Polaris section - here:
http://www.rhodeschroma.com/?id=polaris) outlines what the Polaris can
send/respond to.

The 'Tune Request' is outlined on Page 6.

In summary, there is a standard 'system common message' defined in MIDI
called the Tune Request. If supported, when a card receives this
message it is intended to perform an on-board runing routine.

How you send this will depend somewhat on what you're using to talk to
the Polaris. 0xF6 is the MIDI 'Tune Request' opcode.

In terms of System Exclusive messages for key presses, that's a bit more
involved.

With reference to the MIDI Implementation Manual, you will want to do a
'send message' command.

To confirm that sysex can be received OK by the host, from the Polaris
do a LF-C-12. This should perform a "send main workspace program out
over MIDI." It will do this via a sysex message.

On the host you should see something like:

F0 08 01 4F
30 30 38 35
30 31
F0 08 01 57
32 43 30 30
30 30 46 34
30 30 31 43
30 30 30 30
30 30 30 30
38 30 43 38
41 45 30 36
43 38 31 37
38 36 35 31
30 30 30 30
30 31 30 30
41 30 30 31
46 43 30 44
30 35 46 38
30 31 31 43
38 30 46 46
30 36 30 30
30 39 31 38
30 30 30 30
30 31 30 36
30 30 30 30
31 38 30 36
30 32 37 35
31 46
F0 08 01 53
31 45 30 30
37 46 30 30
F7

Using the MIDI Implementation manual to decode the stream will give you
a good felling for how the Polaris decodes/encodes sysex.

Of this dump, the last portion is the most interest for the original
question.

F0 08 01 53
31 45 30 30
37 46 30 30
F7

Decoding the stream we have:

F0 08 01 = start of sysex, fender ID, channel # (in my case, the MIDI
base channel was '2').

The Polaris uses ASCII strings to represent data - so for the first
message we have:

53 31 45 30 30 37 46 30 30 F7

0x53 = ASCII "S" = Send Message.

A 'send' has the following format:

Sssiimmoo

Where S = ASCII for 'stream'
ss = stream number
ii = instrument number
mm = message
oo = operand

For this example, stream number = 1E (instrument stream) instrument
number = 00
Message = 7F
Operand = 00

In your case where you'd like to change the value of a switch, you'd to
'send' to a stream. Stream 16 is the panel stream.

So that would be:

F0 08 01 53 31 36 30 30 30 43 30 31 F7

Where:

53 = ASCII for "S"
31 36 = stream number "16"
30 30 = instrument number 00 (ignored)
30 43 = "0C" = 'switch press' command
30 31 = "01" = switch #1

So sending this command should 'press' switch #1 (The sequencer 'stop'
button). Changing the switch number (the last two bytes) will allow you
to press any/all buttons on the Polaris.