Offline

The code that handles the MIDI status byte checks for a match between the incoming MIDI channel and the channels for MGB (PU1, PU2, WAV, NOISE and POLY) stored in EEPROM. In any case the status byte (midiData[0]) sent to GB has its lower nibble set to 0 for PU1, 1 for PU2, 2 for WAV, 3 for NOISE and 4 for POLY.

e.g. a CC instruction for PU1, controller 1 with value 127 would send B0 01 7F

Offline
Australia

Ahh Fantastic! Thank you very much! I should have the code completed tonight.

Forgot about the 0-127 value range, i'll need to fix that up in the ROM too.

Offline
Unsubscribe

tried the rom on my derp and seems to work well. Have a few feature requests but will wait until we have a open stable before getting into it big_smile

Offline
Australia

I didn't get anything done last night, I think I'm coming down with a cold. I emailed myself the serial handler routine so I can work on it at work and I think I've just finished it. I'll compile as soon as I get home and post it for anyone to try. CC Channel 1,2 and 3 for Pots 1,2 and 3. Not sure if the pot value could originally be 0-255 or 0-127, I didn't email myself that part of the code. The code I just finished assumes its 0-127, if the range is half what is expected I'll just double it in software.

Offline
Unsubscribe

Its probably 0-127 because thats the spec of a midi cc. You might have to scale the output if the adc for the pots code expects higher. I just realized that none of the mgb cc values are that high either so I dont know if this fucks the whole idea up.

Last edited by herr_prof (Jul 9, 2015 1:36 am)

Offline
Australia

Yeah, I'll need to look at the ADC function to see what it was expecting. I know the pots are all scaled down, some as much as 32 times depending on the register it is manipulating. Maybe an option to accept 8 bit values to make full use of 8bit registers. Doesn't conform to the spec but to give the same performance of the original 303 hardware it would be required.

Offline
Australia

Compiled, let me know how it goes. Could only test it via simulating 3 bytes coming in (in BGB), being 0xB0,0x01,0x35 which set pot 1 to value 0x35.

www.bennvenn.com/GB303_Snapshot4.rar

Offline

MIDI WORKS!!!

Offline
Australia

All 3 pots? Is 0-127 enough range?

Offline
BennVenn wrote:

Could only test it via simulating 3 bytes coming in (in BGB), being 0xB0,0x01,0x35 which set pot 1 to value 0x35.

Could you please share the code/script you used to simulated the bytes in BGB?
Could be very helpful
Thx

Offline
Australia

No code or script, just added a breakpoint to the serial interrupt vector then stepped through the code and modified the accumulator to steer the code where I wanted. Did this a few times while on the pot screen to see the values change.

Offline
Michigan

The ADC084S051 has an 8-bit resolution.

Offline
BennVenn wrote:

All 3 pots? Is 0-127 enough range?

Yes, all three pots.  When turning the physical pot, you max out the range to the value 7F before you reach the end travel of the pot.
So say the pot starts out at 7:00 on a clock.  You get to about 2:00 and you max out the value on the screen.  But very usable.

Offline
Unsubscribe

What midi CC is gb-303 expecting? Its channel 1,2,3 for each knob, correct?

Offline

Set 'Full MIDI' for the 'sync' parameter in the last menu in GB303.
Then send MIDI CC 1,2 & 3 on midi channel one.

Offline
Michigan
DSC wrote:
BennVenn wrote:

All 3 pots? Is 0-127 enough range?

Yes, all three pots.  When turning the physical pot, you max out the range to the value 7F before you reach the end travel of the pot.
So say the pot starts out at 7:00 on a clock.  You get to about 2:00 and you max out the value on the screen.  But very usable.

Yup, it just needs mapped from 255 to 127.