Author Topic: Programming Query: Translate Enterprise Wokstix to Locomotive BASIC  (Read 3089 times)

0 Members and 1 Guest are viewing this topic.

Offline AMSDOS

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.939
  • Country: au
    • index.php?action=treasury
    • Programs for Turbo Pascal 3
    • Awards
Feel free to move to Programming area if you feel it's necessary.


I'm posting here because this program was written for an Enterprise Computer System, though when one looks at this code, it looks like Locomotive BASIC, until you look at the SOUND & other related statements (used in Line 30). Unfortunately I don't know Enterprise BASIC (otherwise known as EXOS BASIC), and the program was sent to CPC-Power.


I have to wonder though if something like this already exists for the Amstrad because the program itself sounds rather interesting. Otherwise does anyone know how those Sound related commands could be rewritten in Locomotive BASIC?


[attachimg=1]

like
0
No reactions
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

Offline andycadley

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.014
    • Awards
It looks like the Enterprise sound command takes a pitch value, a duration, right and left volumes (between 1 and 100, always the same on both channels) and a source value which is presumably one of two channels. It shouldn't be too hard to map those onto Locomotive BASIC equivalents. Then you'd just need to replace the values that get read into the array with suitable pitches for the AY. The accompanying text tells that they are all sharps, so it's probably a reasonable assumption you start with C# and just move up the scale.
like
0
No reactions

Offline SRS

  • Supporter
  • 6128 Plus
  • *
  • Posts: 654
  • Country: de
  • Schneider CPC464 - what else ?
    • Awards
I guess @Geco can help about that.

He's one of the Enterprise experts here.
like
0
No reactions

Offline AMSDOS

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.939
  • Country: au
    • index.php?action=treasury
    • Programs for Turbo Pascal 3
    • Awards
Thanks folks, I'll contact @Geco if they haven't replied here.


Looks like the program might take some interpretation to get the same result from Locomotive BASIC. Line 30 is the one that puzzles me. I can see it would relate to our ENV command, but the semi-colon bit is confusing, and then moves onto RELEASE which I don't know if the Amstrad has, there maybe something in the Firmware which deals with Sound Release.
like
0
No reactions
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

Offline Geco

  • CPC664
  • ***
  • Posts: 78
  • Country: hu
    • Awards
I think this program can be implemented quite easily into Locomotive Basic, there is no special filter, or effect usage, just simple envelopes.
In Enterprise you can define envelopes from 1-255 ( envelope 0 silent, 255 max volume)
One envelope can contain more patterns each pattern is separated by ;
Ex.
ENVELOPE NUMBER 10; 2,8,63,50;0,24,-16,100;-5,47,-39,50
contains 3 patterns , and the identifier of the envelope is 10, 2nd number is the difference from the actual sound in half tones, 3rd number gives the changes of left speaker (maximum is 63, here increase the volume from the actual volume with 8/64), 4th number is the change of right speaker (here the volume goes to the max from the actual value), 5th number is the duration in 1/50 seconds, 6th,7th,8th,9th are the same like 2nd,3rd,4th,5th.

You should create separate ENV and ENT's for reach the same effect, and as I remember well, in the envelopes in CPC the new values are stored not the changes, so some calculation is necessary to creat the same envelope in CPC.
I made the same during Sorcery+ conversion.

Here is you can find the description of SOUND and ENVELOPE commands on 108-113 pages:
http://enterprise.iko.hu/books/EnterpriseProgrammingGuide.pdf

like
0
No reactions

Offline Geco

  • CPC664
  • ***
  • Posts: 78
  • Country: hu
    • Awards
As I see the envelope in Wokstix is an easy one.
you need an ENV which increase the volume from 0 to the max in 1/50 second, then an envelop which holds the volumes on max for 10/50 sec (I guess it can be skipped, just use the sound command) and the last ENV which moves the volume to 0 in 30/50 second.
an ENT which increase tone by 2/5 half tone in 1/50 second then an ENT which decrease the tone by 2/5 half tone in 10/50 seconds, and the last part makes no effect on tone.
like
0
No reactions

Offline Geco

  • CPC664
  • ***
  • Posts: 78
  • Country: hu
    • Awards
I forgot the release, it can cause some difficulties, if the sound is shorter than the envelope before then envelope processing will be finished at that time and play back will be continued in release phase.

The book has good description about it.
« Last Edit: 20:08, 18 April 16 by Geco »
like
0
No reactions

Offline andycadley

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.014
    • Awards
I wouldn't worry that much about the envelope though, I suspect it's just there to add a slightly "nicer" sound to each note, probably to get something "piano-like".
like
0
No reactions

Offline AMSDOS

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.939
  • Country: au
    • index.php?action=treasury
    • Programs for Turbo Pascal 3
    • Awards
I wouldn't worry that much about the envelope though, I suspect it's just there to add a slightly "nicer" sound to each note, probably to get something "piano-like".


May not be a bad option since I understand the SOUND better than those ENVs & ENTs and work from there.
like
0
No reactions
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

Offline AMSDOS

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.939
  • Country: au
    • index.php?action=treasury
    • Programs for Turbo Pascal 3
    • Awards
Might also help if I download an Enterprise Emulator, any recommendations?
like
0
No reactions
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

Offline Geco

  • CPC664
  • ***
  • Posts: 78
  • Country: hu
    • Awards
Might also help if I download an Enterprise Emulator, any recommendations?
My recommendation is mailto:https://sourceforge.net/projects/ep128emu/ , this is the best EP128emu, it should be configured to be able to read a file from HDD, but if I see well you just want to type the program, and you can save it as a snapshot.
There is EP32 also, it is a quite old, but functioning well, and XEP128, it is under development.
like
0
No reactions

Offline AMSDOS

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.939
  • Country: au
    • index.php?action=treasury
    • Programs for Turbo Pascal 3
    • Awards
I'll give EP32 a go, my emulator computer is getting a bit old now.  ;D 
like
0
No reactions
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

Offline Geco

  • CPC664
  • ***
  • Posts: 78
  • Country: hu
    • Awards
I'll give EP32 a go, my emulator computer is getting a bit old now.  ;D
EP128emu ran well on a PIII 833MHz also :D (if I remember well I used EP128emu V2 on PIII) , but sure PII or PIII was enough for EP32 , and I guess you have much newer machine ;)
like
0
No reactions

Offline AMSDOS

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.939
  • Country: au
    • index.php?action=treasury
    • Programs for Turbo Pascal 3
    • Awards
EP128emu ran well on a PIII 833MHz also :D (if I remember well I used EP128emu V2 on PIII) , but sure PII or PIII was enough for EP32 , and I guess you have much newer machine ;)


It's a 2005 computer running XP with Celeron processor running around 1GHz @ half a Gb.  :D
like
0
No reactions
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

Offline Geco

  • CPC664
  • ***
  • Posts: 78
  • Country: hu
    • Awards

It's a 2005 computer running XP with Celeron processor running around 1GHz @ half a Gb.  :D
It should be enough for EP128Emu, and for all other 8bit machine emulators :D (java emulators excluded :D )
like
0
No reactions