kasploosh.com

Receive Sysex From CZ-101 Using amidi

Even though the title says CZ-101, this is also the procedure to use for a CZ-1000. It might be the procedure to use for CZ-3000 and CZ-5000 as well. But if you have a CZ-1, skip to the easy procedure.

The bad news about the CZ-101 and CZ-1000 is that there is no button you can push to cause all sounds to be dumped one after another. Instead you can only get one sound at a time, and you have to ask for it by name. This tutorial walks you through that process.

Get Ready

  1. Make sure your cables are connected in the correct order. OUT from the computer goes to IN on the CZ. OUT from the CZ goes to IN on the computer.
  2. Make sure the PROTECT switch is set to OFF. This is a slide switch on the back of the CZ.
  3. Make sure SOLO on the keyboard is off. SOLO affects the MIDI mode.
  4. Press the MIDI button on the CZ. To make things simple for this tutorial, we are going to use defaults and MIDI channel 1. Please apply these settings:

    MIDI BASICPolyphonic mode
    CH=01Using MIDI channel 1
    PROG CHANGE=ENAProgram changes enabled

    When you’re done, the LCD should look like one of these:

    MIDI BASIC CH=01 PROG CHANGE=ENA

    Settings screen, CZ-101

    P.MODE KBCH=01 CH=01 PRG=ENA

    Settings screen, CZ-5000

  5. You need to know what port you are targeting with amidi. Your CZ is connected to a physical port on your computer, but what is that port called, according to amidi? To find out, open a terminal and do this:

    amidi -l --> Dir Device Name --> IO hw:0,0 EMU10K1 MPU-401 (UART) --> IO hw:0,1 Emu10k1 Synth MIDI (16 subdevices) --> IO hw:0,2 Emu10k1 Synth MIDI (16 subdevices)

    At this point, you can test to make sure amidi is getting messages from your CZ. Start amidi in dump mode:

    amidi -d

    Now press a few keys on the CZ keyboard. You should see note on and note off events immediately. If not, amidi can’t yet talk to your CZ. Press Ctrl-C to exit dump mode.

Actual Steps

  1. On the computer, open up a terminal and change directories to somewhere you can create sysex files.

    cd /path/to/store/sysex/files/

  2. You need to create a request command for the sound you want to retrieve. Here is how the commands are composed:

    HexMeaningNote
    F0Start a sysex message…
    44 00 00…for a Casio piece of equipment…
    70…using MIDI channel 1…71 = channel 2, 72 = channel 3, etc.
    10…requesting a patch dump…
    00…for preset number 1…01 = preset 2, 02 = preset 3, etc.
    70 31…yes I really want them.This is the okay string, but we are sending it with the request.

    To request the sound from Internal 1, your command would be: F0 44 00 00 70 10 20 70 31. Your command will be different depending on which sound you want to get.

    Note that we are sending the okay string at the same time we are sending the request. This is a little impolite, but it works and is more efficient with our time.

  3. Now that you have composed your command, we need to send it to the CZ-101 and capture the output. It is not difficult to achieve:

    amidi -p hw:0 -S "F0 44 00 00 70 10 20 70 31" -r save_patch_20.syx

    Change "hw:0" to your MIDI port. Change the command string to the one you composed. Choose a good file name.

  4. Wait until the CZ has sent the data, and do not hit any keys on the keyboard. When it is finished, hit Ctrl-C to stop the amidi process. You have now created a sysex file with the contents of one sound. Check and see:

    ls --> save_patch_20.syx

  5. To save everything, you now must repeat this process for every sound. I recommend writing a shell script that iterates and gets every sound in turn.

Supplementary Information

The following is a table of all possible request commands for a CZ-101 or CZ-1000.

Hex CommandMeaning
F0 44 00 00 70 10 00 70 31request patch from PRESET 1
F0 44 00 00 70 10 01 70 31request patch from PRESET 2
F0 44 00 00 70 10 02 70 31request patch from PRESET 3
F0 44 00 00 70 10 03 70 31request patch from PRESET 4
F0 44 00 00 70 10 04 70 31request patch from PRESET 5
F0 44 00 00 70 10 05 70 31request patch from PRESET 6
F0 44 00 00 70 10 06 70 31request patch from PRESET 7
F0 44 00 00 70 10 07 70 31request patch from PRESET 8
F0 44 00 00 70 10 08 70 31request patch from PRESET 9
F0 44 00 00 70 10 09 70 31request patch from PRESET 10
F0 44 00 00 70 10 0A 70 31request patch from PRESET 11
F0 44 00 00 70 10 0B 70 31request patch from PRESET 12
F0 44 00 00 70 10 0C 70 31request patch from PRESET 13
F0 44 00 00 70 10 0D 70 31request patch from PRESET 14
F0 44 00 00 70 10 0E 70 31request patch from PRESET 15
F0 44 00 00 70 10 0F 70 31request patch from PRESET 16
 
F0 44 00 00 70 10 20 70 31request patch from INTERNAL 1
F0 44 00 00 70 10 21 70 31request patch from INTERNAL 2
F0 44 00 00 70 10 22 70 31request patch from INTERNAL 3
F0 44 00 00 70 10 23 70 31request patch from INTERNAL 4
F0 44 00 00 70 10 24 70 31request patch from INTERNAL 5
F0 44 00 00 70 10 25 70 31request patch from INTERNAL 6
F0 44 00 00 70 10 26 70 31request patch from INTERNAL 7
F0 44 00 00 70 10 27 70 31request patch from INTERNAL 8
F0 44 00 00 70 10 28 70 31request patch from INTERNAL 9
F0 44 00 00 70 10 29 70 31request patch from INTERNAL 10
F0 44 00 00 70 10 2A 70 31request patch from INTERNAL 11
F0 44 00 00 70 10 2B 70 31request patch from INTERNAL 12
F0 44 00 00 70 10 2C 70 31request patch from INTERNAL 13
F0 44 00 00 70 10 2D 70 31request patch from INTERNAL 14
F0 44 00 00 70 10 2E 70 31request patch from INTERNAL 15
F0 44 00 00 70 10 2F 70 31request patch from INTERNAL 16
 
F0 44 00 00 70 10 40 70 31request patch from CARTRIDGE 1
F0 44 00 00 70 10 41 70 31request patch from CARTRIDGE 2
F0 44 00 00 70 10 42 70 31request patch from CARTRIDGE 3
F0 44 00 00 70 10 43 70 31request patch from CARTRIDGE 4
F0 44 00 00 70 10 44 70 31request patch from CARTRIDGE 5
F0 44 00 00 70 10 45 70 31request patch from CARTRIDGE 6
F0 44 00 00 70 10 46 70 31request patch from CARTRIDGE 7
F0 44 00 00 70 10 47 70 31request patch from CARTRIDGE 8
F0 44 00 00 70 10 48 70 31request patch from CARTRIDGE 9
F0 44 00 00 70 10 49 70 31request patch from CARTRIDGE 10
F0 44 00 00 70 10 4A 70 31request patch from CARTRIDGE 11
F0 44 00 00 70 10 4B 70 31request patch from CARTRIDGE 12
F0 44 00 00 70 10 4C 70 31request patch from CARTRIDGE 13
F0 44 00 00 70 10 4D 70 31request patch from CARTRIDGE 14
F0 44 00 00 70 10 4E 70 31request patch from CARTRIDGE 15
F0 44 00 00 70 10 4F 70 31request patch from CARTRIDGE 16
 
F0 44 00 00 70 10 60 70 31request patch from CURRENT SOUND area
13549.58363