CALL VOICE COPY
This page was last modified 14:44, 17 May 2020 by Mars2000you. Based on work by NYYRIKKI.

This instruction is available in MSX-AUDIO Basic and MSX-MUSIC Basic.

Contents

Effect

Copies software voice to desired location. First parameter is source and second parameter is destination.

Syntaxes

  • CALL VOICE COPY (@<VoiceNumber>, <Array>)
  • CALL VOICE COPY (<Array>, @<VoiceNumber>)
  • CALL VOICE COPY (@<VoiceNumber1>, @<VoiceNumber2>)

Parameters

<VoiceNumber> Is always preceded by @ (see below Voice Data Table). Each voice corresponds to an instrument defined by FM sound chip internal parameters (hardware) or generated from external parameters (software).

When using MSX-MUSIC, hardware voices (0,2,3,4,5,6,9,10,12,14,16,23,24,33 and 48) can not be used as source. User voice (@63) is the only voice that can be used as destination.

When using MSX-AUDIO, all voices can be used as source. Voices 32 to 63 can be used as destination.

<Array> must be a numeric type variable array that can hold minimum of 32 bytes of RAW byte data (see below Voice Array Format). Using arrays enables creation of new instruments (only one in MSX-MUSIC, 32 in MSX-AUDIO).

Note: If you want to save a voice on a file system, for example on disk, first copy to an array variable and then copy the array variable to disk with COPY.

Voice Data Table

This is a list of the voices available for use with CALL MK VOICE, CALL VOICE, CALL VOICE COPY or the MML @ instruction of PLAY.

Voice No. Name Voice No. Name
0 * Piano 1 32 Piano 3
1 Piano 2 33 * Wood Bass
2 * Violin 34 Santoor 2
3 * Flute 1 35 Brass
4 * Clarinet 36 Flute 2
5 * Oboe 37 Clavicord 2
6 * Trumpet 38 Clavicord 3
7 Pipe Organ 1 39 Koto 2
8 Xylophone 40 Pipe Organ 2
9 * Organ 41 P0hdsPLA
10 * Guitar 42 P0hdsPRA
11 Santoor 1 43 Church Organ L
12 * Electric bass 44 Church Organ R
13 Clavicord 1 45 Synth Violin
14 * Harpsicord 1 46 Synth Organ
15 Harpsicord 2 47 Synth Brass
16 * Vibraphone 48 * Horn
17 Koto 1 49 Shamisen
18 Taiko 50 Magical
19 Engine 1 51 Fuwawa
20 UFO 52 Wonderflat
21 Synth Bell 53 Hard Rock
22 Chime 54 Machine
23 * Synth Bass 55 Machine V
24 * Synthesizer 56 Comic
25 Synth drum 57 SE comic
26 Synth rhythm 58 SE laser
27 Harmo drum 59 SE noise
28 Cow Bell 60 SE star 1
29 Hi-Hat 61 SE star 2
30 Snare drum 62 Engine 2
31 Bass drum 63 User voice**


* Sounds built in to MSX-MUSIC sound chip (Sounds generated by software are without an *)
** User voice is silent by default, but can be altered with CALL VOICE COPY.

The names of the voices are given for reference only and they may not sound the same as the real instruments.

Voice Array Format

Offset Contents
Header:
0~7 Voice name
8 Voice transposition (LSB)
8 Voice transposition (MSB)
10

Bit 0= Algorithm (MSX-AUDIO only)
Bit 1~3= Feedback
Bit 4= Fixed pitch (MSX-AUDIO only)
Bit 5= AMD/PMD load function (MSX-AUDIO only)
Bit 6= PMD (MSX-AUDIO only)
Bit 7= AMD (MSX-AUDIO only)

11~15 Reserved
Operator 0:
16 Bit 0~3= Multiple

Bit 4= Key Scale Rate
Bit 5= EG-Type (Sustained/Percussive tone switch)
Bit 6= Vibrato switch
Bit 7= Amplitude Modulation

17 Bit 0~5= Total Level

Bit 6~7= Key Scale Level

18 Bit 0~3= Decay rate

Bit 4~7= Attack rate

19 Bit 0~3= Release rate

Bit 4~7= Sustain level

20 Bit 0~3= Unused

Bit 4~7= Velocity sensibility (0~8) (MSX-AUDIO only)

21~23 Reserved
Operator 1:
24 Bit 0~3= Multiple

Bit 4= Key Scale Rate
Bit 5= EG-Type (Sustained/Percussive tone switch)
Bit 6= Vibrato switch
Bit 7= Amplitude Modulation

25 Bit 0~5= Total Level (MSX-AUDIO only)

Bit 6~7= Key Scale Level

26 Bit 0~3= Decay rate

Bit 4~7= Attack rate

27 Bit 0~3= Release rate

Bit 4~7= Sustain level

28 Bit 0~3= Unused

Bit 4~7= Velocity sensibility (0~8) (MSX-AUDIO only)

29~31 Reserved


Example

10 CALL MUSIC
20 DEFINT A-Z
30 DIM D(15)
40 CALL VOICE COPY (@1,D)
50 D(8)=0
60 CALL VOICE COPY (D,@63)
70 PLAY #2,"@63V15CDE"

Related to

CALL MK VOICE, CALL VOICE, COPY, PLAY

Compatibility

MSX-AUDIO BASIC, MSX-MUSIC BASIC