Giter Site home page Giter Site logo

yamaha-wavecard-format's Introduction

Yamaha Wave-Card Format

Reverse engineering of the Yamaha wave-card format to allow creating custom wave-cards using the Sector101 WaveBlade card.

This information is work in progress. There is a lot of information missing.

The wave-card image is “byte-swapped”, each byte-tuple must be swapped for reading the file.

Original:

BB AA DD CC

Swapped:

AA BB CC DD

File layout

<file_header>
<wave_addr ...> /* file_header.num_waves times */
...
<wave_header ...> /* pointed to by wave_addr.address */
...
sample-data /* sample data blob (44100 Hz, Signed 16-Bit PCM), sample locations are stored in sample_header.sample_start / .sample_stop */
...

Types

SymbolType
UUnsigned
SSigned
CChar
EEnum

Structs

File-Header

SizeTypeFieldDescription
8?Fixed: 00 00 00 00 00 00 00 00
2UCard ID
3?
1UNumber of waves
10CCard name
8?

Wave-Addr

SizeTypeFieldDescription
1?
3UAddressValue * 2, Buffer position of Wave-Header

Sample-Addr

SizeTypeFieldDescription
3UAddressValue * 2, Buffer position of sample data

Wave-Header

SizeTypeFieldDescription
1?
1UNumber of samples
8CName
174?
18?
1280?

Sample-Header

SizeTypeFieldDescription
1UVolume?, 0x7F - Value
1ELoop-Mode2 = Forward Loop
1UKey?, Key = Value-146, Key = 0 = F#0, Octave = (Key-6)/12
1SPitch?
10?Fixed: 3F 00 00 00 22 FF 00 00 3F 00
3Sample-AddrStart
3Sample-AddrLoop-Start
1USample-No
3Sample-AddrLoop-End
1?
3Sample-AddrEnd
82?

Application

Dependencies

  • libsndfile
  • yaml-cpp

Build

mkdir build && cd build
cmake ..
make

Usage

Running:

./sywave unpack <wavecard-file>

Upacks the card to a directory named after the cards name. For the a card named W7701 this would create the following structure:

W7701.wavecard/
├── data.yaml
└── samples
    ├── ASaxHard
    │   ├── 0.wav
    │   ├── 1.wav
    │   ├── 2.wav
    │   ├── 3.wav
    │   ├── 4.wav
    │   ├── 5.wav
    │   ├── 6.wav
    │   ├── 7.wav
    │   ├── 8.wav
    │   └── 9.wav
    ├── ASaxSoft
    │   ├── 0.wav
    │   ├── 1.wav
    │   ├── 2.wav
    │   ├── 3.wav
    │   ├── 4.wav
    │   ├── 5.wav
    │   ├── 6.wav
    │   ├── 7.wav
    │   ├── 8.wav
    │   └── 9.wav
    ├── TSaxHard
    │   ├── 0.wav
    │   ├── 10.wav
    │   ├── 11.wav
    │   ├── 1.wav
    │   ├── 2.wav
    │   ├── 3.wav
    │   ├── 4.wav
    │   ├── 5.wav
    │   ├── 6.wav
    │   ├── 7.wav
    │   ├── 8.wav
    │   └── 9.wav
    └── TSaxSoft
        ├── 0.wav
        ├── 1.wav
        ├── 2.wav
        ├── 3.wav
        ├── 4.wav
        ├── 5.wav
        ├── 6.wav
        ├── 7.wav
        └── 8.wav

The file “data.yaml” contains the cards wave- and sample properties. It’s contents would look like:

name: W7701
id: 768
wave:
  - name: TSaxSoft
    samples:
      - volume: 126
        orig-key: C2
        loop-mode: loop-forward
        pitch: 14
      - volume: 127
        orig-key: D#2
        loop-mode: loop-forward
        pitch: 9
      - volume: 111
        orig-key: F#2
        loop-mode: loop-forward
        pitch: 22
      - volume: 121
        orig-key: A2
        loop-mode: loop-forward
        pitch: 21
      - volume: 117
        orig-key: C3
        loop-mode: loop-forward
        pitch: 21
      - volume: 124
        orig-key: D#3
        loop-mode: loop-forward
        pitch: 16
      - volume: 111
        orig-key: F#3
        loop-mode: loop-forward
        pitch: 9
      - volume: 110
        orig-key: A3
        loop-mode: loop-forward
        pitch: 6
      - volume: 113
        orig-key: C4
        loop-mode: loop-forward
        pitch: -124
  - name: TSaxHard
    samples:
      - volume: 127
        orig-key: F#1
        loop-mode: loop-forward
        pitch: 9
      - volume: 125
        orig-key: A1
        loop-mode: loop-forward
        pitch: 21
      - volume: 123
        orig-key: C2
        loop-mode: loop-forward
        pitch: 8
      - volume: 127
        orig-key: D#2
        loop-mode: loop-forward
        pitch: 2
      - volume: 119
        orig-key: F#2
        loop-mode: loop-forward
        pitch: 17
      - volume: 122
        orig-key: A2
        loop-mode: loop-forward
        pitch: 10
      - volume: 120
        orig-key: C3
        loop-mode: loop-forward
        pitch: 8
      - volume: 120
        orig-key: D#3
        loop-mode: loop-forward
        pitch: -123
      - volume: 110
        orig-key: F#3
        loop-mode: loop-forward
        pitch: 9
      - volume: 114
        orig-key: A3
        loop-mode: loop-forward
        pitch: -124
      - volume: 108
        orig-key: C4
        loop-mode: loop-forward
        pitch: -124
      - volume: 111
        orig-key: D#4
        loop-mode: loop-forward
        pitch: 16
  - name: ASaxSoft
    samples:
      - volume: 121
        orig-key: F2
        loop-mode: loop-forward
        pitch: -114
      - volume: 127
        orig-key: G#2
        loop-mode: loop-forward
        pitch: -118
      - volume: 102
        orig-key: B2
        loop-mode: loop-forward
        pitch: -122
      - volume: 115
        orig-key: D3
        loop-mode: loop-forward
        pitch: -115
      - volume: 119
        orig-key: F3
        loop-mode: loop-forward
        pitch: -102
      - volume: 120
        orig-key: G#3
        loop-mode: loop-forward
        pitch: -108
      - volume: 114
        orig-key: B3
        loop-mode: loop-forward
        pitch: -99
      - volume: 110
        orig-key: D4
        loop-mode: loop-forward
        pitch: -101
      - volume: 107
        orig-key: F4
        loop-mode: loop-forward
        pitch: -101
      - volume: 115
        orig-key: G#4
        loop-mode: loop-forward
        pitch: -108
  - name: ASaxHard
    samples:
      - volume: 123
        orig-key: F2
        loop-mode: loop-forward
        pitch: 6
      - volume: 127
        orig-key: G#2
        loop-mode: loop-forward
        pitch: -127
      - volume: 111
        orig-key: B2
        loop-mode: loop-forward
        pitch: -122
      - volume: 119
        orig-key: D3
        loop-mode: loop-forward
        pitch: 1
      - volume: 113
        orig-key: F3
        loop-mode: loop-forward
        pitch: -110
      - volume: 121
        orig-key: G#3
        loop-mode: loop-forward
        pitch: -118
      - volume: 115
        orig-key: B3
        loop-mode: loop-forward
        pitch: -122
      - volume: 119
        orig-key: D4
        loop-mode: loop-forward
        pitch: 1
      - volume: 113
        orig-key: F4
        loop-mode: loop-forward
        pitch: -102
      - volume: 112
        orig-key: G#4
        loop-mode: loop-forward
        pitch: -108

WaveBlade programmer connection

The WaveBlade programmer can be used with minicom. A minicom configuration is in this repository. After copying the configuration to /etc/, a connection can be established via sudo minicom wave-blade -c on.

yamaha-wavecard-format's People

Contributors

johannes-wolf avatar

Forkers

jfloresq

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.