easy way to write midi translation s/ware?

Discussion in 'comp.music.midi' started by Dennis, Jun 27, 2003.

  1. Dennis

    Dennis Guest

    I need to do a bit of midi translation but don't really want to learn C or
    java etc.
    I'm running a NI B4 clone and want to drive it from a multikeyboard Yamaha.
    The B4 has 120 sequential presets, normally selected using a 10 way switch
    (bank) and 12 keys. I have 22 buttons available on the Yamaha, say 1 to 10=A
    to J (bank) and 11 to 22 = 1 to 12.
    If i select A (bank 1) and then 2 I need to convert this to preset 2
    If i select C (bank 3) keeping preset 2 needs to convert to 38 i.e, 3x12+2
    If i select C preset 8 needs to convert to 44 i.e, 3x12+8
    If i select F (bank 6), keeping preset 8 need to produce 6x12+8=80 etc.
    Following conversion I need to output the appropriate control change.
    Anyone have a simple idea of how to do this?
    TIA
    Ray.
  2. Dennis

    Dennis Guest

    I should have made it clearer that the s/ware will need to remember which is
    the current bank to be able to x12 it.
  3. On Fri, 27 Jun 2003 23:13:00 GMT, "Dennis" <Dennis@aufwiedersehen.pet>
    wrote:

    >I need to do a bit of midi translation but don't really want to learn C or
    >java etc.
    >I'm running a NI B4 clone and want to drive it from a multikeyboard Yamaha.
    >The B4 has 120 sequential presets, normally selected using a 10 way switch
    >(bank) and 12 keys. I have 22 buttons available on the Yamaha, say 1 to 10=A
    >to J (bank) and 11 to 22 = 1 to 12.
    >If i select A (bank 1) and then 2 I need to convert this to preset 2
    >If i select C (bank 3) keeping preset 2 needs to convert to 38 i.e, 3x12+2
    >If i select C preset 8 needs to convert to 44 i.e, 3x12+8
    >If i select F (bank 6), keeping preset 8 need to produce 6x12+8=80 etc.
    >Following conversion I need to output the appropriate control change.
    >Anyone have a simple idea of how to do this?


    I thought that the banks were implemented as just program changes,
    12 times 10 = 120. All you need is to send the appropriate program
    change.

    But if you need bank select, you need a keyboard setting to send
    that as well. Check on the manual for the keyboard.

    A proper B4 emulation, NI's own of course is one, has a lot of CC's
    used for drawbars and other controls, so it could be useful to have a
    keyboard or separate control surface with knobs or sliders set for
    that.

    --
    *-__Jeffery Jones__________| *Starfire* |____________________-*
    ** Muskego WI Access Channel 14/25 <http://www.execpc.com/~jeffsj/mach7/>
    *Starfire Design Studio* <http://www.starfiredesign.com/>
  4. Dennis

    Dennis Guest

    "Jeffery S. Jones" <jeffsj@execpc.com> wrote in message
    news:9hurfvgtetnl3krqnakdr914uelpbnq5js@4ax.com...
    > I thought that the banks were implemented as just program changes,
    > 12 times 10 = 120. All you need is to send the appropriate program
    > change.
    >
    > But if you need bank select, you need a keyboard setting to send
    > that as well. Check on the manual for the keyboard.
    >
    > A proper B4 emulation, NI's own of course is one, has a lot of CC's
    > used for drawbars and other controls, so it could be useful to have a
    > keyboard or separate control surface with knobs or sliders set for
    > that.


    Hi Jeffery, the thing is that the keyboard is not modable and the B4 doesn't
    have banks as such, just sequential patches 1 to 120.
    I want to use my 16 patch buttons as 2 sets of 8 giving me 64 patches.
    Drawbars etc will follow later. I really want to run something as below (vb
    maybe) patched into midiox. Midiox is already converting the knee lever to
    B4 rotor speed. My prob is how to tie-in something like this.


    Using the 16 HS-8 registration buttons to control B4.
    P=Preset, B=Bank.

    1 2 3 4 5 6 7 8 9 10 11 12 13
    14 15 16
    P1 P2 P3 P4 P5 P6 P7 P8 B1 B2 B3 B4 B5 B6 B7
    B8

    I.e, 8 banks of 8 giving 64 presets. 1-16 normally produce C0 00 to C0 0F.

    At startup assume that bank 1/preset 1 are selected = C0 00
    X=0, Y=0, Z=0 output C0 Z
    I.e, P1 to 8 set X, B1 to 8 set Y, Z is current preset value.

    P1 will add 0 - P2 will add 1 - P3 will add 2 - P4 will add 3
    P5 will add 4 - P6 will add 5 - P7 will add 6 - P8 will add 7

    B1 will add 0 - B2 will add 8 - B3 will add 16 - B4 will add 24
    B5 will add 32 - B6 will add 40 - B7 will add 48 - B8 will add 56

    PROG:
    10 X=0:Y=0:Z=0:eek:utput C0 00
    20 Wait here for control change (C0) between 00 and 0F
    30 IF CC 00 to CC 07 then X=0 to 7
    40 IF CC 08 to CC 0F then Y=0 to 7
    50 Z=(Y*8) + X
    60 rem get HEX from table
    70 restore:for i = 1 to z:read HEX:next i
    80 output C0 HEX:goto 20

    table:
    90 0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f
    100 10,11,12,13,14,15,16,17,18,19,1a,1b,1c,1d,1e,1f
    110 20,21,22,23,24,25,26,27,28,29,2a,2b,2c,2d,2e,2f
    120 30,31,32,33,34,35,36,37,38,39,3a,3b,3c,3d,3e,3f
  5. On Sun, 29 Jun 2003 11:07:06 GMT, "Dennis" <Dennis@aufwiedersehen.pet>
    wrote:

    >
    >"Jeffery S. Jones" <jeffsj@execpc.com> wrote in message
    >news:9hurfvgtetnl3krqnakdr914uelpbnq5js@4ax.com...
    >> I thought that the banks were implemented as just program changes,
    >> 12 times 10 = 120. All you need is to send the appropriate program
    >> change.
    >>
    >> But if you need bank select, you need a keyboard setting to send
    >> that as well. Check on the manual for the keyboard.
    >>
    >> A proper B4 emulation, NI's own of course is one, has a lot of CC's
    >> used for drawbars and other controls, so it could be useful to have a
    >> keyboard or separate control surface with knobs or sliders set for
    >> that.

    >
    >Hi Jeffery, the thing is that the keyboard is not modable and the B4 doesn't
    >have banks as such, just sequential patches 1 to 120.
    >I want to use my 16 patch buttons as 2 sets of 8 giving me 64 patches.
    >Drawbars etc will follow later. I really want to run something as below (vb
    >maybe) patched into midiox. Midiox is already converting the knee lever to
    >B4 rotor speed. My prob is how to tie-in something like this.


    Ok, that makes sense. If it was just patches, I'd figure you could
    simply run through all the numbers using the program change button
    rather than presets. Since the B4 program lets you so all sorts of
    setups, wouldn't using that work?

    Or does the keyboard only have 16 patch buttons, for presets, and no
    separate program change button?

    >Using the 16 HS-8 registration buttons to control B4.
    >P=Preset, B=Bank.
    >
    > 1 2 3 4 5 6 7 8 9 10 11 12 13
    >14 15 16
    >P1 P2 P3 P4 P5 P6 P7 P8 B1 B2 B3 B4 B5 B6 B7
    >B8
    >
    >I.e, 8 banks of 8 giving 64 presets. 1-16 normally produce C0 00 to C0 0F.
    >
    >At startup assume that bank 1/preset 1 are selected = C0 00
    >X=0, Y=0, Z=0 output C0 Z
    >I.e, P1 to 8 set X, B1 to 8 set Y, Z is current preset value.
    >
    >P1 will add 0 - P2 will add 1 - P3 will add 2 - P4 will add 3
    >P5 will add 4 - P6 will add 5 - P7 will add 6 - P8 will add 7
    >
    >B1 will add 0 - B2 will add 8 - B3 will add 16 - B4 will add 24
    >B5 will add 32 - B6 will add 40 - B7 will add 48 - B8 will add 56
    >
    >PROG:
    >10 X=0:Y=0:Z=0:eek:utput C0 00
    >20 Wait here for control change (C0) between 00 and 0F
    >30 IF CC 00 to CC 07 then X=0 to 7
    >40 IF CC 08 to CC 0F then Y=0 to 7
    >50 Z=(Y*8) + X
    >60 rem get HEX from table
    >70 restore:for i = 1 to z:read HEX:next i
    >80 output C0 HEX:goto 20
    >
    >table:
    >90 0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f
    >100 10,11,12,13,14,15,16,17,18,19,1a,1b,1c,1d,1e,1f
    >110 20,21,22,23,24,25,26,27,28,29,2a,2b,2c,2d,2e,2f
    >120 30,31,32,33,34,35,36,37,38,39,3a,3b,3c,3d,3e,3f
    >


    I think you'd need a program. MIDIOX will let you easily convert
    single control messages. Someone else may know more, I've never done
    anything quite that complex.

    --
    *-__Jeffery Jones__________| *Starfire* |____________________-*
    ** Muskego WI Access Channel 14/25 <http://www.execpc.com/~jeffsj/mach7/>
    *Starfire Design Studio* <http://www.starfiredesign.com/>
  6. Dennis

    Dennis Guest

    "Jeffery S. Jones" <jeffsj@execpc.com> wrote in message
    news:502ufv8u50v0uo79kv79vbhum9bqkb961p@4ax.com...

    > Or does the keyboard only have 16 patch buttons, for presets, and no
    > separate program change button?

    That's it exactly.

    > I think you'd need a program. MIDIOX will let you easily convert
    > single control messages. Someone else may know more, I've never done
    > anything quite that complex.

    Cheers for your input Jeffery.
  7. In VisualC++ this is not very difficult using the MCI library winmm.lib
    (mmsystem.h)
    use midiInOpen to open a device to send all midi data to a callback
    function, specify your own handler function as a midiInOpen parameter
    use midiOutOpen to open the device where to send midi data
    use midiOutShortMsg to send short 1-3 byte messages.

    In Basic it is difficult to access midi input since you need to catch
    the data when the device sends (it arrives in a time critical function
    which must be handled immediately), that sensitive parts are usually
    done in a DLL or VBX which is not written in basic self (e.g. written in
    C, C++).

    Java seems to be able to catch midi input using certain java midi sound
    API.

    Dennis wrote:
    > PROG:
    > 10 X=0:Y=0:Z=0:eek:utput C0 00
    > 20 Wait here for control change (C0) between 00 and 0F
    > 30 IF CC 00 to CC 07 then X=0 to 7
    > 40 IF CC 08 to CC 0F then Y=0 to 7
    > 50 Z=(Y*8) + X
    > 60 rem get HEX from table
    > 70 restore:for i = 1 to z:read HEX:next i
    > 80 output C0 HEX:goto 20
    >
    > table:
    > 90 0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f
    > 100 10,11,12,13,14,15,16,17,18,19,1a,1b,1c,1d,1e,1f
    > 110 20,21,22,23,24,25,26,27,28,29,2a,2b,2c,2d,2e,2f
    > 120 30,31,32,33,34,35,36,37,38,39,3a,3b,3c,3d,3e,3f

Share This Page