项目作者: michgz

项目描述 :
Tools for handling Phrase Pad data from Casio musical keyboards, especially CT-X keyboards
高级语言: Python
项目地址: git://github.com/michgz/Casio-Phrase-Pads.git
创建时间: 2021-03-07T16:03:51Z
项目社区:https://github.com/michgz/Casio-Phrase-Pads

开源协议:GNU General Public License v2.0

下载


Casio Phrase Pads

[WORK IN PROGRESS] Tools to translate between CPFF (Casio Phrase File Format) and Standard MIDI. CPFF is used as the format for Phrase Sets and Phrase Pads on the CT-X range of keyboards.

Phrase to MIDI

A file with extension .PHS saved by the CT-X keyboard can be converted to a standard MIDI file by calling (for example):

  1. > python phrase2mid.py PHRSET01.PHS > 01.MID

It also handles phrase sets read directly from the keyboard. The following snippet of Python code will do that (note that the downloading portion of this will only work under Linux. The processing from phrase to MIDI is agnostic to Linux/Windows):

  1. from internal.sysex_comms_internal import download_ac7_internal
  2. from phrase2mid import process_phr
  3. PHR_NUM=4 # 0-3 are Phrase Set 01, 4-7 are Phrase Set 02, ... 96-99 are Phrase Set 25.
  4. y = download_ac7_internal(PHR_NUM, category=35, memory=1)
  5. with open('MyPhrase.MID', 'wb') as f:
  6. process_phr(y).writeFile(f)

Prerequisites

Writing MIDI uses the midiutils library (https://pypi.org/project/MIDIUtil), which must be installed before doing phrase-to-MIDI conversions. Reading
MIDI uses home-grown code which doesn’t need anything to be installed.