2018年1月15日 星期一


An audio file reader in FORTH

Ching-Tang Tseng
Hamilton, New Zealand
16 Jan 2018
ilikeforth@gmail.com

We pursued different kinds of application from FORTH. Another could be used as a daily using example is a FORTH designed FILE READER with real voice output.

This kind of application has many advantages. It can be applied to infinite files or objects. I needed it especially when I was getting old gradually. Here, I am not going to talk about its advantages again. There were many articles posted in this blog site had talked about many advantages of a speak-able FORTH system already, but written in Chinese. I am always to make my FORTH system able to do speaking. Major function is in English speaking, Chinese speaking included as well. For the time being, the quality of all Chinese speaking resources did not come up to the practical level. It was just can do only. Chinese speech digital technical development ought to carry out by Chinese government. This topic is out of my discussing range.

Such a design needs Text To Speech (TTS) functions from the platform of Operating System. I am an user of TTS not a designer of TTS. I use FORTH to develop what I need from TTS resources. Owing to this kind of design is always not going to follow the so called new FORTH standard, violate the insistence of new standard supporters, and almost nobody is interesting in it, this posting has only demo without code.

Voice output could be coded into the program in a speak-able FORTH system. Speaking style are sortable, changeable, adjustable…etc., all are able to be controlled by FORTH. After we went into 64 bits FORTH era, Lina64 under Ubuntu V.16.04 OS was one of my favorite FORTH systems. Public domain free charge TTS resources in Linux environment are abundant, much... much more than Windows’ OS environment has supplied.

In general, there were many free charge tools could be used to do the text to speech output from a text file. Their features are as simple as just reading from the beginning to the ending of a file.

This article demonstrates a special video display, designed by myself; show you a controlled audio text file reader in FORTH. I am using a so called break point technique in this design. Once you are touching keyboard after this FILE READER started, system will be HALT (<halt>) until speaking of current streaming text in one sentence had been finished. Let you able to do new different arrangements over there, then use GO to keep going to go again.

For example, while HALT, you are allowed to change the gender of the speaker, to adjust setting parameters of TTS, to modify the typo in the original text file, to look up meanings of some unfamiliar words from a digital dictionary in the same computer, or even though you are feeling bothering before the end of reading, to use a standard instruction QUIT with double ENTER actions, you are able to stop speaking thoroughly… etc., all intentional operations are permitted.

To teach and promote FORTH according to the so called new FORTH standard are difficult nowadays. I have nothing to say about such a situation. And I have no intention to do any teaching or any promotion of FORTH again. I did and enjoyed whatever I needed. They were developed and used in FORTH environment. For the sake of foreclosing any criticism from anywhere, I used to do posting here only. This is my way, my website, my FORTH world. I am happy in using all my design but unhappy with any kind of nonconstructive attacking.

An Introduction of FORTH old material came from FORTH Interest Group (FIG) 35 years ago, to be reused in this demonstration on purpose.


You are welcome to look at and to listen to this demonstration as following.


2018年1月3日 星期三

How can I use only FORTH for 35 years?


Ching-Tang Tseng
Hamilton, New Zealand
3 Jan 2018
ilikeforth@gmail.com

For 35 years, I am using only one kind of computer language FORTH day by day, year after year. There is a very important sticking point makes me able to use only FORTH. I am always interested in some application softwares designed by FORTH, whichever able to apply to infinite objects.

Past posting in this blogger, many programs in mathematical calculations had been showed for this kind of application. Mathematical calculation topics are infinite. ABC FORTH designed by me is able to apply to infinite mathematical calculations.

Based on such a simple principle, from 8 bits FORTH era to 64 bits FORTH era, there were no any exception to me. Such a principle makes me able to use only FORTH for 35 years.

This time, let me show you another kind of software, designed by FORTH and to be used in FORTH environment only. It can be apply to infinite application objects i.e. music songs. I named it A Music Single Note Player. Program was designed in Lina64 FORTH system under Ubuntu v.16.04 OS.

In this application, songs must be programmed into text formats. Player is doing single note melody sound output, according to the music describing text. Owing to the speed and frequency of sound output are different from computer to computer, program are designed in adjustable automatically method. Tone is adjustable. All tones are based on one VALUE setting, named ToneBase. Playing speed is adjustable as well. All playing speeds are based on another VALUE setting, named TimeBase.

For the present, two kinds of instrument sound has been developed. Sound wave shape of a Flute are closing to a pure sine wave sound output. Another Guitar simulate sound are synthesized by the so called pluck sound wave output mode.

A hear-able flute music output demonstration has been posted at the end of last article. This article is going to introduce a guitar music output demonstration to you.

The following demonstration include the Text To Sound output function as well. About this feature, I’d like to demonstrate it in another coming article.

I am living in New Zealand. Introducing a typical Kiwi music seems as a first priority to me. A New Zealand love song named Pokarekare Ana (pronounced in English: Pocalicali Ana) is my favorite one. Many people rewrote this song according to its main melody during the past 100 years. I am able to write all of them into the programs but I preferred the original one music script in 1914. So I spent a few time to prepare needful materials for this article.

Please enjoy this 2:21 minutes visible and audible demonstration, here it is.