Company logo.jpg (12785 bytes)


Syntax of Easy Format™ Supported Voice/Melody Controller

Home

Introduction to the Easy Format Supported Voice / Melody controller

Tutorial of Easy Format Supported Voice / Melody controller

Introduction to Easy Format Enhanced C

Multiplexed input keys
Voice/Melody file declaration
Input States
Output States
Paths

 

  Determine the multiplexed input keys 

Syntax: Easy n

Easy Format provides friendly access to keyboard scanning arrangement.  Typical keyboard scanning schematic are preset in hardware supported with standard keyboard scanning routines written in assembly language.   Standard scanning arrangement in Easy Format are:

Setup Configuration Trigger Names
Easy 8 2x4 TG1;TG2.....TG8
Easy 12 3x4 TG1;TG2.......TG12
Easy 16 4x4 TG1;TG2.........TG16
Easy 20 4x5 TG1;TG2...........TG20
Easy 24 4x6 TG1;TG2.............TG24
Easy 32 4x8 TG1;TG2...............TG32
Easy 48 6x8 TG1;TG2.................TG48
Easy 64 8x8 TG1;TG2...................TG64

In the Easy Format program, it is required to specify one line statement for the I/O pins to support the scanning function by a simple schematic.   Trigger names (i.e. TG1; TG2; ... TGn) are then assigned to each scanning switch location.  This schematic is a standard circuit and cannot be changed by user.

Example: Easy 8
Easy8schmatic.gif (3051 bytes)
Upbutton.gif (1242 bytes) (Click this button to the top)


  Declare Voice/melody file 

Syntax : voice file / compression method
              melody file
              tone file

If any audio file is used in the application, it is required to declare ahead.   The compression methods of voice files have different option, such as PCM8 and AD4.

Example:

Voice1.wav/pcm8        ; #0 voice files declaration
Voice2.pcm/ad4           ; #1
melody1.mid                 ; #2

Upbutton.gif (1242 bytes) (Click this button to the top)


  Define Input States 

Syntax:
     INPUT STATES
     ;                       TRn                ....
    statename:     [rising edge path][/falling edge path]  ....

The general format to specify the I/O states is presented by a table with the above format.  When the TRn detects a rising edge or falling edge signal, the path name of the specified path will be executed.  User can define the statename and the path label.   The symbol "/" denotes the falling edge path which is an optional existence.

Upbutton.gif (1242 bytes) (Click this button to the top)


  Define Output States 

Syntax:
     OUTPUT STATES
     ;                       OUTn            ....
     statename:      OutputMode  ....

The possible output mode are listed as follows:

OutputMode

Description

X Set OUTn to input with pull high resistor
H Set the output pins to logic high
L Set the output pins to logic low
P+ Send a (+) pulse train to output pins
P- Send a (-) pulse train to output pins
SP+ Send a plus single pulse to output pins
SP- Send a minus pulse to output pins

Upbutton.gif (1242 bytes) (Click this button to the top)


  Define the Paths 

Syntax:
     PATHS
     pathname:   path command ......

The PATH section defines the executing instructions of the application.    User can define multiple pathname which is consisted of sequence of path commands.   Each pathname is initiated by the Input state table when a trigger is detected.  The path command can also instruct to change of next input/output state.  All the commands are summarized as follows:

Path command Description
Input statename To active input state.
Output statename To active output state.
Pathname To execute the specified path.
VAR=pathname Define the variable path.
VAR To execute the variable path.
Volume_1=n Define the volume 1 value (n=0 .. 15).
Volume_2=n Define the volume 2 value (n=0 .. 15).
Samplerate_1=n Define the sample rate 1 value.
Samplerate_2=n Define the sample rate 2 value.
Delay (n) To delay n (min=0.1s) (n=0.1 .. 65).
TRn?H:Pathname If TRn is logic High, then the pathname is executed.
TRn?L:Pathname If TRn is logic Low, then the pathname is executed.
Flashrate = n Set the output pulse rate to "n" pulses per second, where n can be assigned as 1, 2, 3, ..., 12.
FlashrateT = n Set the output pulse rate after the melody tempo, n=1, 2, 3, ... 12.
FlashrateV = n Set the output pulse rate after the volume, n=1, 2, 3 , ... 12.
END Enter power down mode.
Mi = PB Read Port B to Mi.
STOP1 Stop the sound of channel 1 playback.
STOP2 Stop the sound of channel 2 playback.
Mi = data Set the contents of Mi to be data.
Mi = Mj Set the contents Mi to be Mj.
Mi(bn) = 1 or 0 Set bit bn to be 1 or 0, bn=0..7.
Mi = Mj + data Add immediate data with Mj to Mi.
Mi = Mi + Mj Add Mi with Mj to Mi.
Mi = Mj.AND.data AND immediate data with Mj to Mi.
Mi = Mj.OR.data OR immediate data with Mj to Mi.
Mi = Mj.XOR.data XOR immediate data with Mj to Mi.
Mi?data:pathname If Mi=data then pathname is executed.
Mi?Mj:pathname If Mi=Mj then pathname is executed.
Mi(bn)?1:pathname If the bit bn of Mi is "1" then the pathname is executed.
Mi(bn)?0:pathname If the bit bn of Mi is "0" then the pathname is executed.
Mi:[Path1,Path2, ... ,Pathn] Path1 is executed when Mi=1.
Path2 is executed when Mi=2.
Path3 is executed when Mi=3.
...
Pathn is executed when Mi=n.
Random(Mi) Get a random code and put it to Mi.
Timert:timer_path Initialize the timer.  If time out then timer_path is executed, t=0.1 ... 65 sec.
TimerOn Start the timer counter.
TimerOff Stop the timer counter.
n*soundfile, n*#N or #N Play the soundfiles n times.
#N is the N'th soundfile which is defined in the audio file declaration part. The starting number is 0.
[n*soundfile] or [repeat *soundfile] Play the soundfile n times or repeatly via channel 2 and simultaneously execute the next path command.
Wait Stop executing the next path command until the channel 2 soundfile is terminated.

Upbutton.gif (1242 bytes) (Click this button to the top)


[Home]
[Introduction to Easy Format™ supported voice/melody controller]
[Tutorial of Easy Format™ supported voice/melody controller]
[Introduction to Easy Format Enhanced C] [Contact Us]

EasyFormatWord.JPG (11117 bytes)

For any question or comment: e-mail to WebMaster@EasyFormat.com
Copyrights© 1999 Grow with Me, Inc.      All materials are subject to change without notice.  Easy Format is a trademark of Grow With Me, Inc.   Patent no. 5867818 and other pending patents.
Last modified: 04/18/99 04:15 PM