<HTML><HEAD><TITLE>PolySnd v2.0 Documentation</TITLE> <META http-equiv=Systran content=charset=windows-1252> <META http-equiv=Content-Type content="text/html; charset=unicode"> <META content="MSHTML 6.00.2800.1264" name=GENERATOR></HEAD> <BODY text=#000000 bgColor=#ffffff background=pictures/fond.jpg> <DIV align=center> <P><IMG height=84 src="pictures/image1.png" width=269></P> <P align=left><strong>Sorry for the bad english, its a automatic translate. </strong></P> <DIV align=left> <P align=left><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#introduction"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#introduction">1 Introduction.</A><BR> <A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#ameliorations"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#introduction"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#ameliorations">2 Made improvements.</A><BR> <A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#prisejack"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#ameliorations"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#prisejack">3 How to manufacture or obtain an adapter Jack 3.5 mm &lt; - &gt; 2.5 mm?</A><BR><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#fonctionnement"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#prisejack"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#fonctionnement">4 Operation of the library and precautions to be taken.</A><BR><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#utilisation"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#fonctionnement"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#utilisation">5 To use PolySnd v2.0 in a program.</A><BR> <A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#gris"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#utilisation"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#gris">6 Information in utilisation with the grayscales and the auto int n°5.</A><BR> <A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#fonctions"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#gris"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#fonctions">7 List and descriptions of the functions of PolySnd v2.0.</A><BR><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#consommation"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#fonctions"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#consommation">8 Points on the consumption of resources with PolySnd v2.0.</A><BR><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#genlib"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#consommation"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#genlib">9 To use PolySnd v2.0 with Genlib.</A><BR> <A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#durees"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#genlib"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#durees">10-Table of the durations.</A><BR> <A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#ameliorer_son"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#durees"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#ameliorer_son">11-To improve quality of the sound.</A><BR> <A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#contact"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#ameliorer_son"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#contact">12-Contact-me.</A><BR> </P> <PRE align="left"><FONT face="Comic Sans MS"><I><FONT size=3><A name=introduction></A></FONT></I></FONT><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#contact"></A><FONT face="Comic Sans MS"><I><FONT size=3>1</FONT></I><FONT size=3>. <U><I>Introduction.</I></U> </FONT></FONT> </PRE> </DIV> <P align=left>&nbsp;&nbsp;&nbsp;<FONT face="Comic Sans MS"><FONT size=3><U><I></I></U></FONT></FONT>PolySnd v2.0 is an audio library optimized for the programming of plays under TI68K. Its goal is to bring a maximum of functions and comfort of programming. It was completely rewritten and reconsidered compared with the other versions. Version 2.0 finally makes it possible to play of the sound in background task with grayscales and it is also able to play of the PCM quality 1 bit with 8000 Hz, ideal for sound effects in the games.</P> <P align=left>&nbsp;</P> <P align=left><I><FONT face="Comic Sans MS"><B><A name=ameliorations></A></B></FONT></I><I><FONT face="Comic Sans MS"><B>2</B></FONT></I><B><I><FONT face="Comic Sans MS">.</FONT></I></B><I><FONT face="Comic Sans MS"></FONT></I><U><I><FONT face="Comic Sans MS"> Made improvements.</FONT></I></U> </P> <P align=left>&nbsp;&nbsp;&nbsp;<U><I><FONT face="Comic Sans MS"></FONT></I></U>PolySnd v2.0 is the only library which is able to play of the musics, of the sound effects, a simple frequency and even of the PCM (format WAV) in programs without this one not blocking its process. It is able to play of the musics on 2 channels (2 channels), with levels of gray and this without slowing down the program in progress. It incorporates 4 functions of data managements (Musics, Sound effects, simple frequency, data management WAV in stereophony), various functions informing on the state of the library and other functions on the musical data processing. PolySnd v2.0 is ideal for the audio programs like (Player, Programmes of composition musical or simple demonstrations graphic), it is the only audio library on any supports confused (calculators) to be usable in programs even requiring a lot CPU.<BR> </P> <P align=left>PolySnd v2.0 is the fruit many months of research and of development, I hope which will fill all your desires.</P> <P align=left>&nbsp;</P> <P align=left><I><FONT face="Comic Sans MS"><B><A name=prisejack></A></B></FONT></I><I><FONT face="Comic Sans MS"><B>3.</B></FONT></I><U><I><FONT face="Comic Sans MS"> How to manufacture or obtain an adapter Jack 3.5 mm &lt; - &gt; 2.5 mm?</FONT></I></U></P> <P align=left>&nbsp;&nbsp;&nbsp;<U><I><FONT face="Comic Sans MS"></FONT></I></U>PolySnd v2.0 requires a Jack adapter 3.5 mm in 2.5 mm stereo, indeed PolySnd v2.0 is a polyphonic library in stereophony and thus to be able to leave the sound on a helmet (advised bus on other supports, the its risk to be parasitized) or on enclosures, you must absolutely have an adapter.</P> <P align=left>If you do not have a Jack adapter 3.5 mm in 2.5 mm, you can get one in certain stores of them, if it is not possible you can manufacture one with little material of them, for that, follow the procedure below:</P> <P align=left></P> <P align=left><I><U></U></I><I><U>Materials:</U></I></P> <P align=left><I><U></U></I>- <B>Male Catch Jack 2.5 mm. </B><IMG height=15 hspace=10 src="pictures/image8.gif" width=78><BR><B></B>You can find of them one in a store of electronics or by recovering the Jack catch of a cord provided with TI.</P> <P align=left>- <B>Catch Jack Female 3.5 mm.</B><IMG height=30 hspace=10 src="pictures/image9.gif" width=91><BR><B></B>Is easily in great surfaces or stores of electronics.</P> <P align=left>- <B>Soldering iron, with tin.</B><BR><B></B>- <B>Black Adhesive tape</B>.<BR>You must connect together the mass, and 2 wire of data.</P> <P align=left><IMG height=30 hspace=85 src="pictures/image10.gif" width=216></P> <P align=left>The gray wire corresponds to the mass, and the wire red and blue, with the data.</P> <P align=left><BR><FONT color=#0000ff><B></B></FONT><FONT color=#0000ff><B>This diagram can be adapted with a Male Jack catch 3.5 mm.</B></FONT></P> <P align=left><BR><I><FONT face="Comic Sans MS"><B><A name=fonctionnement></A></B></FONT></I><FONT color=#0000ff><B></B></FONT><I><FONT face="Comic Sans MS"><B>4.</B></FONT></I><U><I><FONT face="Comic Sans MS"> Operation of the library and precautions to take to create a program.</FONT></I></U></P> <P align=left>&nbsp;&nbsp;&nbsp;<U><I><FONT face="Comic Sans MS"></FONT></I></U>To be able to play of the sound in a program in background task (background) i.e. to make unroll a program while playing of the music and this library uses the auto interruption n°5 with the maximum (8 Khz on HW2 and 11 Khz on HW1) but it remains alchannels available to the programmers thanks to a function included in PolySnd v2.0. This auto interruption being redirected towards the routines of PolySnd v2.0, certain functions of the AMS (Advanced Mathematic Software) will be unusable this is why you must use equivalents.</P> <P align=left>So that this library functions correctly, you must change certain interruptions:</P> <P align=left>- The auto Int n°1, used by the AMS to restore the line of statute (status line), and to post the statute of the keys. Used by certain functions.</P> <P align=left>- The auto Int n°2, used by ngetchx of the AMS (the library, significant Disturbs to decontaminate).</P> <P align=left><FONT color=#ff0000><B>During this documentation, the examples will get to better understand how these 2 interruptions are changed.</B></FONT></P> <P align=left>&nbsp;</P> <P align=left><I><FONT face="Comic Sans MS"><B><A name=utilisation></A></B></FONT></I><FONT color=#ff0000><B></B></FONT><I><FONT face="Comic Sans MS"><B>5.</B></FONT></I><U><I><FONT face="Comic Sans MS"> To use PolySnd v2.0 in a program.</FONT></I></U></P> <P align=left><B><I><U></U></I></B><U><I><FONT face="Comic Sans MS"></FONT></I></U><B><I><U>Dynamic version:</U></I></B></P> <P align=left>&nbsp;&nbsp;&nbsp;<B><I><U></U></I></B>Can only be used only if you program in kernel mode, you must in this case have a kernel and the library PolySnd v2.0 on your TI.<BR>Your program will thus require the presence of PolySnd v2.0 on your TI to function.<BR>You will find the library in the repertory <B>bin</B> then the header in the repertory <B>headers/dynamic.</B></P> <P align=left><BR><U><I><B></B></I></U><B></B><U><I><B>Static version</B></I></U></P> <P align=left>&nbsp;&nbsp;&nbsp;<U><I><B></B></I></U>If your program is developed in nostub or kernel, you wish that your program functions without the presence of the library PolySnd v2.0 and that this one this finds in-house in the program, you will have to use the static version of PolySnd v2.0, the advantages of the static version are that you will save place because your program will use only the functions which it has need for the library, you will find the library with the static format in the repertory <B>bin</B> and the header in the repertory <B>headers\static</B>. </P> <P align=left><BR><U><I></I></U><U><I>Conclusion:</I></U></P> <P align=left>&nbsp;&nbsp;&nbsp;<U><I></I></U>It is preferable to use the dynamic version for very small programs and limiting itself only to one audio sequence (pieces of musics or simple sound effects). The purpose of these programs are only only, to carry out a music and it cannot be used in programs in nostub.</P> <P align=left>On the other hand the static version must be used in large project like audio programs, sound plays, demonstrations, editor of partitions&amp;</P> <P align=left>It is advised to correctly choose according to your program the format of the library, you will be able only to consume a few memory if this choice is well made.<BR> </P> <P align=left>&nbsp;</P> <P align=left><I><FONT face="Comic Sans MS"><B><A name=gris></A>6.</B></FONT></I><U><I><FONT face="Comic Sans MS"> Information in used with the grayscales and the auto int n°5.</FONT></I></U></P> <P align=left>&nbsp;&nbsp;&nbsp;<U><I><FONT face="Comic Sans MS"></FONT></I></U>PolySnd v2.0 was tested with the routines of grayscales of TIGCC, so that the grayscales function correctly with PolySnd v2.0 you must use function <B>USE_GRAY_WITH_POLYSND</B> before the call of <B>GrayOn</B>. <B>USE_GRAY_WITH_POLYSND</B> is not in fact a definition calling upon a hack TIGCC, it is not guaranteed that this line functions in the versions of former TIGCC or higher than version 0.94. This line with for goal not to change and put out of order the auto int 5 used by PolySnd v2.0 at the time of the passage of the routine of grayscales with the auto int 1.</P> <P align=left>PolySnd v2.0 uses can of resources of the auto int 5 this is why it is possible to use it in your programs at a frequency of skeletal thanks to the SetInterrupt5Rate function, by defect the auto int 5 turns to 1 Hz.<FONT color=#0000ff>See list of the functions.</FONT></P> <P align=left>&nbsp;</P> <P align=left><I><FONT face="Comic Sans MS"><B><A name=fonctions></A></B></FONT></I><FONT color=#0000ff></FONT><I><FONT face="Comic Sans MS"><B>7.</B></FONT></I><U><I><FONT face="Comic Sans MS"> List and descriptions of the functions of PolySnd v2.0.</FONT></I></U></P> <P align=left>&nbsp;&nbsp;&nbsp;<U><I><FONT face="Comic Sans MS"></FONT></I></U>The list is given in the form of prototypes for C and out of assembler, an example out of assembler will be given for each function. You will find with the top of the examples the passage of the arguments by registers for the programming in Asssembleur. The functions out of C begins all with the prefixe pSnd _.</P> <P align=left><B><FONT color=#ff0000>Any arguments wong are not taken into account by the library east can cause crash more or less destroy data. I am not to in no case responsible for the losses for data and sudden damage by a bad used of the library</FONT></B></P> <DIV align=left> <P align=left><I><FONT color=#0000ff><U><FONT color=#ff0000 size=4><B><FONT color=#0000ff></FONT></B></FONT></U></FONT></I><B><FONT color=#ff0000></FONT></B><I><FONT color=#0000ff><U><FONT color=#ff0000 size=4><B><FONT color=#0000ff>List functions of PolySnd v2.0</FONT></B></FONT></U></FONT></I></P> <P align=left><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#EnableSound"></A><I><FONT color=#0000ff><U><FONT color=#ff0000 size=4><B><FONT color=#0000ff></FONT></B></FONT></U></FONT></I><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#EnableSound">EnableSound</A><BR><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#DisableSound"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#EnableSound"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#DisableSound">DisableSound</A><BR><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#InstallSound"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#DisableSound"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#InstallSound">InstallSound</A><BR><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#UninstallSound"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#InstallSound"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#UninstallSound">UninstallSound</A><BR><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#Initialize"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#UninstallSound"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#Initialize">Initialize</A><BR><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#SetTempo"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#Initialize"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#SetTempo">SetTempo_voice[1|2]</A><BR><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#GetTempo"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#SetTempo"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#GetTempo">GetTempo_voice[1|2]</A><BR><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#SetState"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#GetTempo"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#SetState">SetState</A><BR><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#SetLoop"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#SetState"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#SetLoop">SetLoop</A><BR><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#SetBeep"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#SetLoop"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#SetBeep">SetBeep_voice[1|2]</A><BR><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#PlayFX"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#SetBeep"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#PlayFX">PlayFX_voice[1|2]</A><BR><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#GetFrequency"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#PlayFX"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#GetFrequency">GetFrequency_voice[1|2]</A><BR><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#PortStatus"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#GetFrequency"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#PortStatus">PortStatus</A><BR><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#Interrupt5"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#PortStatus"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#Interrupt5">Interrupt5</A><BR><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#PlaySound"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#Interrupt5"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#PlaySound">PlaySound_voice[1|2]</A><BR><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#GetLength"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#PlaySound"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#GetLength">GetLength_voice[1|2]</A><BR><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#GetTime"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#GetLength"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#GetTime">GetTime</A><BR><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#GetState"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#GetTime"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#GetState">GetState</A><BR><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#GetMode"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#GetState"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#GetMode">GetMode</A><BR><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#GetLoop"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#GetMode"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#GetLoop">GetLoop</A><BR><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#Time"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#GetLoop"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#Time">Time_voice[1|2]</A><BR><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#SetTime"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#Time"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#SetTime">SetTime_voice[1|2]</A><BR><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#VoiceState"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#SetTime"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#VoiceState">VoiceState</A><BR><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#SetVoiceState"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#VoiceState"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#SetVoiceState">SetVoiceState</A><BR><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#SetIntMask"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#SetVoiceState"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#SetIntMask">SetIntMask</A><BR><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#AddNotes"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#SetIntMask"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#AddNotes">AddNotes_voice[1|2]</A><BR><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#PlayWAV"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#AddNotes"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#PlayWAV">PlayWAV_voice[1|2]</A><BR><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#Sample"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#PlayWAV"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#Sample">Sample_voice[1|2]</A><BR><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#GetNote"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#Sample"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#GetNote">GetNote_voice[1|2]</A><BR><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#_Ptridle"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#GetNote"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#_Ptridle">_ Ptridle_voice[1|2]</A><BR><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#_time_counter"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#_Ptridle"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#_time_counter">_ time_counter_voice[1|2]</A><BR><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#_note_time_counter"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#_time_counter"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#_note_time_counter">_ note_time_counter_voice[1|2]</A><BR><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#_SkipData"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#_note_time_counter"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#_SkipData">_ SkipData_voice[1|2]</A><BR><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#PlayMode"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#_SkipData"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#PlayMode">PlayMode</A><BR><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#Setlength"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#PlayMode"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#Setlength">SetLength_voice[1|2]</A><BR><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#SetInterrupt5Rate"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#Setlength"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#SetInterrupt5Rate">SetInterrupt5Rate</A></P> <P align=left><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#GrayPolysnd"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#SetInterrupt5Rate"></A><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#GrayPolysnd">USE_GRAY_WITH_POLYSND</A></P><PRE align="left">&nbsp; </PRE></DIV> <P align=left><FONT color=#0000ff><B><A name=EnableSound></A></B></FONT><A href="http://perso.wanadoo.fr/tisofts/polysnd/1.htm#GrayPolysnd"></A><FONT color=#0000ff><B>void</B></FONT> pSnd_EnableSound (<B><FONT color=#0000ff>void</FONT></B>);<BR><B><FONT color=#0000ff></FONT></B><B><FONT color=#0000ff>jsr</FONT></B> &nbsp;&nbsp;&nbsp;polysnd2::EnableSound<BR></P> <P align=left><B><U></U></B><B><U>Initialize port I/O.</U></B></P> <P align=left>&nbsp;&nbsp;&nbsp;<B><U></U></B>This function initializes port I/O in low level to make it possible to leave the impulses in binary format, generally this function is called in first and is followed of InstallSound. It inhibits also the auto int n°4.</P> <P align=left>&nbsp;</P> <P align=left><FONT color=#0000ff><B><A name=DisableSound></A></B></FONT><FONT color=#0000ff><B>void</B></FONT> pSnd_DisableSound (<B><FONT color=#0000ff>void</FONT></B>);<BR><B><FONT color=#0000ff></FONT></B><B><FONT color=#0000ff>jsr</FONT></B> &nbsp;&nbsp;&nbsp;polysnd2::DisableSound</P> <P align=left><B><U></U></B><B><U>Port I/O gives in its current state.</U></B></P> <P align=left>&nbsp;&nbsp;&nbsp;<B><U></U></B>This function activates port I/O in high level to return the hand with the TIOS and thus to be managed correctly.</P> <P align=left>&nbsp;</P> <P align=left><FONT color=#0000ff><B><A name=InstallSound></A></B></FONT><FONT color=#0000ff><B>void</B></FONT> pSnd_InstallSound (<B><FONT color=#0000ff>void</FONT></B>);<BR><B><FONT color=#0000ff></FONT></B><B><FONT color=#0000ff>jsr</FONT></B> &nbsp;&nbsp;&nbsp;polysnd2::InstallSound</P> <P align=left><I><U></U></I><I><U>Input:</U></I> <B><FONT color=#ff0000>&nbsp;&nbsp; &nbsp;</FONT>-</B><BR><U><I></I></U><B></B><U><I>Output:</I></U><I>&nbsp;&nbsp;</I>-<BR><I><U></U></I><I><U>DEL: </U></I><B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;d0</B></P> <P align=left><B><U></U><U>Install the audio interruption.</U></B></P> <P align=left>&nbsp;&nbsp;&nbsp;<B><U></U></B>Redirect the auto int 5, initializes the variables of PolySnd v2.0 and installs the audio interruption.<BR>This function is generally after EnableSound.</P> <P align=left>Namely that this function initializes all the values of PolySnd v2.0. by defect PolySnd v2.0 is in mode Stéréo and the loop mode is put at 0.</P> <P align=left>&nbsp;</P> <P align=left><FONT color=#0000ff><B><A name=UninstallSound></A></B></FONT><FONT color=#0000ff><B>void</B></FONT> pSnd_UninstallSound (<B><FONT color=#0000ff>void</FONT></B>);<BR><B><FONT color=#0000ff></FONT></B><B><FONT color=#0000ff>jsr</FONT></B> &nbsp;&nbsp;&nbsp;polysnd2::UninstallSound</P> <P align=left><I><U></U></I><I><U>Input:</U></I> <B><FONT color=#ff0000>&nbsp;&nbsp; &nbsp;</FONT>-</B><BR><U><I></I></U><B></B><U><I>Output:</I></U><I>&nbsp;&nbsp;</I>-<BR><I><U></U></I><I><U>DEL: </U></I><B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; d0</B></P> <P align=left><B><U></U><U>Desinstall the audio interruption.</U></B></P> <P align=left>&nbsp;&nbsp;&nbsp;<B><U></U></B>This function redirects the auto int 5 in its state and its initial value. It change all the functions of PolySnd v2.0.<BR> </P> <P align=left><BR></P> <P align=left><B><FONT color=#0000ff><A name=Initialize></A></FONT></B><B><FONT color=#0000ff>void </FONT></B>pSnd_Initialize (<B><FONT color=#0000ff>void</FONT></B>);<BR><FONT color=#0000ff><B></B></FONT><FONT color=#0000ff><B>jsr</B></FONT> &nbsp;&nbsp;&nbsp;polysnd2::Initialize</P> <P align=left><I><U></U></I><I><U>Input:</U></I> <B><FONT color=#ff0000>&nbsp;&nbsp; &nbsp;</FONT>-</B><BR><U><I></I></U><B></B><U><I>Output:</I></U><I>&nbsp;&nbsp;</I>-<BR><I><U></U></I><I><U>DEL: </U></I><B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;d0, a0</B></P> <P align=left><B><U></U><U>Gives to zero the variables of PolySnd v2.0.</U></B></P> <P align=left>&nbsp;&nbsp;&nbsp;<B><U></U></B>This function gives to zero the variables systems of PolySnd v2.0. It cancels all musics or any sound effects in progress.</P> <P align=left>&nbsp;</P> <P align=left><B><FONT color=#0000ff><A name=SetTempo></A></FONT></B><B><FONT color=#0000ff>void</FONT></B> pSnd_SetTempo_voice1 (<B><FONT color=#0000ff>unsigned short</FONT></B> tempo);<BR><B><FONT color=#0000ff></FONT></B><B><FONT color=#0000ff>void</FONT></B> pSnd_SetTempo_voice2 (<B><FONT color=#0000ff>unsigned short</FONT></B> tempo);<BR> <FONT color=#006600><B></B></FONT><FONT color=#006600><B>#define pSnd_SetTempo (tempo);</B></FONT></P> <P align=left><B><FONT color=#0000ff></FONT></B><FONT color=#006600><B></B></FONT><B><FONT color=#0000ff>move</FONT></B>.<B><FONT color=#ff0000>w</FONT></B> &nbsp;# 120,<B><FONT color=#ff0000>d0</FONT></B><BR> <FONT color=#0000ff><B></B></FONT><B><FONT color=#ff0000></FONT></B><FONT color=#0000ff><B>jsr </B></FONT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;polysnd2::SetTempo_voice[1|2]<BR></P> <DIV align=left> <P align=left><I><U></U></I><I><U>Input:</U></I> <B><FONT color=#ff0000>&nbsp;&nbsp;&nbsp;d0.</FONT><FONT color=#0000ff>w</FONT></B> = Tempo<BR> <U><I></I></U><U><I>Output:</I></U><I>&nbsp;&nbsp;</I>-<BR><I><U></U></I><I><U>DEL: </U></I><B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;d1, d2</B></P></DIV> <P align=left><B><U></U><U>Regulate the tempo on the selected channel.</U></B></P> <P align=left>&nbsp;&nbsp;&nbsp;<B><U></U></B>The tempo is given in bpm. The value of the tempo must range between 1 and 15 850 bpm, this tempo is indicative and more its value will be raised, less it will be precise.</P> <P align=left>Namely that this function belongs to the initialization of PolySnd v2.0.</P> <P align=left>&nbsp;</P> <P align=left><B><FONT color=#0000ff><A name=GetTempo></A></FONT></B><B><FONT color=#0000ff>unsigned short </FONT></B>pSnd_GetTempo_voice1 (<B><FONT color=#0000ff>void</FONT></B>);<BR><FONT color=#0000ff><B></B></FONT><FONT color=#0000ff><B>unsigned short</B></FONT> pSnd_GetTempo_voice2 (<B><FONT color=#0000ff>void</FONT></B>);</P> <P align=left><B><FONT color=#0000ff></FONT></B><B><FONT color=#0000ff>jsr</FONT></B> polysnd2::GetTempo_voice[1|2]</P> <P align=left><I><U></U></I><I><U>Input:</U></I> <B><FONT color=#ff0000>&nbsp;&nbsp;&nbsp;</FONT> -</B><BR> <U><I></I></U><B></B><U><I>Output:</I></U><I>&nbsp;<B><FONT color=#ff0000> </FONT></B></I><B><FONT color=#ff0000>d0.</FONT><FONT color=#0000ff>w</FONT></B><BR> <I><U></U></I><B><FONT color=#0000ff></FONT></B><I><U>DEL: </U></I><B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;d1</B></P> <P align=left><B><U></U><U>Return the tempo in the course of the selected channel.</U></B></P> <P align=left>&nbsp;&nbsp;&nbsp;<B><U></U></B>This function turns over the tempo in progress in bpm, the value of the tempo is indicative and can thus have a certain margin of error.</P> <P align=left>&nbsp;</P> <P align=left><B><FONT color=#0000ff><A name=SetState></A></FONT></B><B><FONT color=#0000ff>void</FONT></B> pSnd_SetState (<B><FONT color=#0000ff>unsigned char</FONT></B> state);<BR><BR><FONT color=#0000ff><B></B></FONT><FONT color=#0000ff><B>move</B></FONT>.<B><FONT color=#ff0000>B</FONT></B> &nbsp;#<FONT color=#006600><B>_</B></FONT><B><FONT color=#006600>ALLVOICES</FONT></B>,<FONT color=#ff0000><B>d0</B></FONT><BR><FONT color=#0000ff><B></B></FONT><FONT color=#ff0000><B></B></FONT><FONT color=#0000ff><B>jsr</B></FONT> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;polysnd2::SetState<BR></P> <P align=left><B></B><I><U></U></I><I><U>Input:</U></I> <B><FONT color=#ff0000>&nbsp;&nbsp;&nbsp;d0</FONT><FONT color=#0000ff>b</FONT></B><BR><U><I></I></U><B><FONT color=#0000ff></FONT></B><U><I>Output:</I></U><I>&nbsp;<B> </B></I><B>-</B><BR><I><U></U></I><B></B><I><U>DEL: </U></I><B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;-</B></P> <P align=left><U><B></B></U><B></B><U><B>Regulate the states of the channels.</B></U></P> <P align=left>&nbsp;&nbsp;&nbsp;<U><B></B></U>This option makes it possible to put in pause/jouer an audio channel according to a bit by defect it is put at zero and thus in pause for the 2 channels, not to forget to activate PolySnd v2.0 with initialization.</P> <P align=left>Channel 1 corresponds to bit 0 and channel 2 with bit 1, when the bit of a channel is to 1, the channel is activated, if the bit is to 0, the channel is in pause.</P> <P align=left><BR> <B><FONT color=#006600></FONT></B><B><FONT color=#006600>#define NOVOICE&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;0<BR> #define VOICE1 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1<BR> #define VOICE2 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2<BR> #define ALLVOICES &nbsp;3</FONT></B></P> <P align=left><B><FONT color=#0000ff></FONT><FONT color=#006600></FONT><FONT color=#0000ff>_NOVOICE &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;equ&nbsp; 0<BR> _VOICE1 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;equ &nbsp;1<BR> _VOICE2 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;equ &nbsp;2<BR> _ALLVOICES &nbsp;equ &nbsp;3</FONT></B></P> <P align=left><B><FONT color=#0000ff></FONT></B>This function can take in parameter only its enumerations.<BR></P> <P align=left> </P> <P align=left><B><FONT color=#0000ff><A name=SetLoop></A></FONT></B><B><FONT color=#0000ff>void</FONT></B> pSnd_SetLoop (<B><FONT color=#0000ff>unsigned char</FONT></B> loop);</P> <P align=left><FONT color=#0000ff><B></B></FONT><FONT color=#0000ff><B>move</B></FONT>.<B><FONT color=#ff0000>b</FONT></B> &nbsp;#<B><FONT color=#006600>_ ALLVOICES</FONT></B>,<B><FONT color=#ff0000>d0</FONT></B><BR> <FONT color=#0000ff><B></B></FONT><B><FONT color=#ff0000></FONT></B><FONT color=#0000ff><B>jsr</B></FONT> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;polysnd2::SetLoop<BR></P> <P align=left><I><U></U></I><I><U>Input:</U></I> <B><FONT color=#ff0000>&nbsp;&nbsp;&nbsp;d0.</FONT><FONT color=#0000ff>b</FONT></B><BR> <U><I></I></U><B><FONT color=#0000ff></FONT></B><U><I>Output:</I></U><I>&nbsp;<B> </B></I><B>-</B><BR><I><U></U></I><B></B><I><U>DEL: </U></I><B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;-</B></P> <P align=left><U><B></B></U><B></B><U><B>Regulate the repetition of sound.</B></U></P> <P align=left>&nbsp;&nbsp;&nbsp;<U><B></B></U>This option makes it possible to repeat in loop a music, sound effects or the purpose of a simple frequency, it is to facilitate the programmer for the development of plays, if a music is played on channel 1 and which must be played in loop, PolySnd v2.0 will take care some by looking at the value passed by SetLoop.<BR> <FONT color=#ff0000><B>Careful</B>, it is not advised to play in loop a music in stereophony with this function because the channels are likely to be desynchronized. <FONT color=#0000ff>See VoiceState function</FONT>.</FONT></P> <P align=left><FONT color=#ff0000></FONT>This function can take in parameter only the enumerations referred to above.<BR></P> <P align=left><BR></P> <P align=left><B><FONT color=#0000ff><A name=SetBeep></A></FONT></B><B><FONT color=#0000ff>void </FONT></B>pSnd_SetBeep_voice1 (<B><FONT color=#0000ff>unsigned short </FONT></B>freq, <B><FONT color=#0000ff>unsigned char</FONT></B> duration);<BR><FONT color=#000000><B><FONT color=#0000ff></FONT></B></FONT><FONT color=#000000><B><FONT color=#0000ff>void</FONT> </B></FONT>pSnd_SetBeep_voice2 (<B><FONT color=#0000ff>unsigned short </FONT></B>freq, <B><FONT color=#0000ff>unsigned char</FONT></B> duration);</P> <P align=left><B><FONT color=#0000ff></FONT></B><B><FONT color=#0000ff>move</FONT></B>.<B><FONT color=#ff0000>w</FONT></B>&nbsp;# 440,<FONT color=#ff0000><B>d0</B></FONT><BR> <FONT color=#0000ff><B></B></FONT><FONT color=#ff0000><B></B></FONT><FONT color=#0000ff><B>move</B></FONT>.<B><FONT color=#ff0000>b</FONT></B>&nbsp;&nbsp; # 30,<FONT color=#ff0000><B>d1</B></FONT><BR> <FONT color=#0000ff><B></B></FONT><FONT color=#ff0000><B></B></FONT><FONT color=#0000ff><B>jsr</B></FONT> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;polysnd2::SetBeep_voice[1|2]<BR></P> <DIV align=left> <P align=left><I><U></U></I><I><U>Input:</U></I> <B><FONT color=#ff0000>&nbsp;&nbsp;&nbsp;d0.</FONT><FONT color=#0000ff>w</FONT></B> = Frequency<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B><FONT color=#ff0000>&nbsp;&nbsp;&nbsp;</FONT></B><B><FONT color=#ff0000>d1</FONT><FONT color=#0000ff>.b</FONT></B> = Length<BR> <U><I></I></U><U><I>Output:</I></U><I>&nbsp;<B> </B></I><B>-</B><BR><I><U></U></I><B></B><I><U>DEL: </U></I><B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; d0</B> </P></DIV> <P align=left><U><B></B></U><B></B><U><B>Adjust PolySnd v2.0 in mode simple frequency on the desired channel. </B></U></P> <P align=left>&nbsp;&nbsp;&nbsp;<U><B></B></U>This function makes it possible to play a simple frequency on the channel of its choice to play this mode, <B>do not forget to regulate SetSate correctly.</B></P> <P align=left>&nbsp;</P> <P align=left><B><FONT color=#0000ff><A name=PlayFX></A></FONT><FONT color=#0000ff>void</FONT></B> pSnd_PlayFX_voice1 (<B><FONT color=#0000ff>unsigned short</FONT></B> * list);<BR><FONT color=#0000ff><B></B></FONT><FONT color=#0000ff><B>void</B></FONT> pSnd_PlayFX_voice2 (<B><FONT color=#0000ff>unsigned short</FONT></B> * list);</P> <P align=left><B><FONT color=#0000ff></FONT></B><B><FONT color=#0000ff>lea&nbsp;&nbsp;</FONT></B>&nbsp;SoundFX(<B><FONT color=#ff0000>PC</FONT></B>),<FONT color=#ff0000><B>a0</B></FONT><BR><FONT color=#0000ff><B></B></FONT><FONT color=#ff0000><B></B></FONT><FONT color=#0000ff><B>jsr</B></FONT> &nbsp;&nbsp;&nbsp;polysnd2::PlayFX_voice[1|2]<BR></P> <P align=left><I><U></U></I><I><U>Input:</U></I> <B><FONT color=#ff0000>&nbsp;&nbsp;&nbsp;a0</FONT></B><BR><U><I></I></U><B><FONT color=#ff0000></FONT></B><U><I>Output:</I></U><I>&nbsp;<B> </B></I><B>-</B><BR><I><U></U></I><B></B><I><U>DEL: </U></I><B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;d0</B><BR></P> <P align=left><B><U></U><U>Play a sound effect on the desired channel.</U></B></P> <P align=left>&nbsp;&nbsp;<B><U></U></B>This function makes it possible to play of the sound effects (sound effects) on the desired channel. This function requires in parameter a pointer corresponding to data coded out of short.</P> <P align=left>Out of C to use this function correctly you must use a list with a dimension which is composed of this channel:</P> <P align=left><B><FONT color=#ff6600></FONT></B><B><FONT color=#ff6600>frequency, duration, frequency, durée&amp; frequency, duration, end</FONT></B></P> <P align=left><B><FONT color=#ff6600></FONT></B>The frequencies lie between 1 and 32768, 0 are regarded as a pause.<BR>The durations here, can go from 1 to 255..<BR></P> <P align=left><BR><U><I></I></U><U><I>Here an example of data, sound effect for PlayFX&amp;:</I></U></P> <P align=left><B><FONT color=#0000ff></FONT></B><U><I></I></U><B><FONT color=#0000ff>unsigned short</FONT></B> MySoundFX[]={<B><FONT color=#ff00ff>5000</FONT></B>,<B><FONT color=#006600>30</FONT></B>,<BR><FONT color=#ff00ff><B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</B></FONT><FONT color=#ff00ff><B>485</B></FONT>,<B><FONT color=#006600>10</FONT></B>,<BR><FONT color=#ff00ff><B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</B></FONT><FONT color=#ff00ff><B>8000</B></FONT>,<B><FONT color=#006600>90</FONT></B>,<BR><FONT color=#ff00ff><B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</B></FONT><FONT color=#ff00ff><B>7000</B></FONT>,<B><FONT color=#006600>50</FONT></B>,<BR><FONT color=#ff00ff><B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</B></FONT><FONT color=#ff00ff><B>6542</B></FONT>,<B><FONT color=#006600>45</FONT></B>,<BR><FONT color=#ff00ff><B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</B></FONT><FONT color=#ff0000><B></B></FONT><FONT color=#ff0000><B>0xFFFF</B></FONT>};</P> <P align=left><FONT color=#ff0000><B></B></FONT><FONT color=#ff0000><B>0xFFFF</B></FONT> (65535) announces to PolySnd v2.0 the end of the sound effect, it is significant to put, without him, PolySnd v2.0 will be lost.</P> <P align=left><B><FONT color=#ff00ff>The xx</FONT></B> correspond to the frequencies of the sound effect MySoundFX.<BR><B><FONT color=#006600>The yy</FONT></B> correspond to the durations of the associated frequencies, the durations depend on the tempo. </P> <P align=left><I><U></U></I><I><U>Out of assembler MySoundFX will give:</U></I></P> <P align=left><I><U></U></I>MySoundFX:<BR> <FONT color=#0000ff><B>dc.</B></FONT>.<b><font color="#ff0000">w</font></b> <FONT color=#ff00ff><B>5000</B></FONT>,<B><FONT color=#006600>30</FONT></B><BR> <FONT color=#0000ff><B></B></FONT><B><FONT color=#006600></FONT></B><FONT color=#0000ff><B>dc.</B></FONT>.<B><font color="#ff0000">w</font></B> <B><FONT color=#ff00ff>485</FONT></B>,<B><FONT color=#006600>10</FONT></B><BR> <FONT color=#0000ff><B></B></FONT><B><FONT color=#006600></FONT></B><FONT color=#0000ff><B>dc.</B></FONT>.<B><font color="#ff0000">w</font></B> <B><FONT color=#ff00ff>8000</FONT></B>,<B><FONT color=#006600>90</FONT></B><BR> <FONT color=#0000ff><B></B></FONT><B><FONT color=#006600></FONT></B><FONT color=#0000ff><B>dc.</B></FONT>.<B><font color="#ff0000">w</font></B> <B><FONT color=#ff00ff>7000</FONT>,<FONT color=#006600>50</FONT></B><BR> <FONT color=#0000ff><B></B></FONT><B><FONT color=#006600></FONT></B><FONT color=#0000ff><B>dc.</B></FONT>.<B><font color="#ff0000">w</font></B> <B><FONT color=#ff00ff>6542</FONT>,<FONT color=#006600>45</FONT></B><BR> <FONT color=#0000ff><B></B></FONT><B><FONT color=#006600></FONT></B><FONT color=#0000ff><B>dc.</B></FONT>.<B><font color="#ff0000">w</font></B> <strong>0xFFFF</strong><BR> </P> <P align=left><B><FONT color=#ff0000>Caution: </FONT></B><FONT color=#ff0000>Do not forget to correctly use SetSate to activate this function.</FONT></P> <P align=left>&nbsp;</P> <P align=left><B><FONT color=#0000ff><A name=GetFrequency></A></FONT></B><FONT color=#ff0000></FONT><B><FONT color=#0000ff>unsigned short</FONT></B> pSnd_GetFrequency_voice1 (<B><FONT color=#0000ff>void</FONT></B>);<BR><FONT color=#0000ff><B></B></FONT><FONT color=#0000ff><B>unsigned short</B></FONT> pSnd_GetFrequency_voice2 (<B><FONT color=#0000ff>void</FONT></B>);</P> <P align=left><B><FONT color=#0000ff></FONT></B><B><FONT color=#0000ff>jsr</FONT></B> polysnd2::GetFrequency_voice[1|2]</P> <P align=left><I><U></U></I><I><U>Input:</U></I> <B><FONT color=#ff0000>&nbsp;&nbsp; </FONT>-</B><BR> <U><I></I></U><B></B><U><I>Output:</I></U><I>&nbsp;<B> </B></I><B><FONT color=#ff0000>d0.</FONT><FONT color=#0000ff>w</FONT></B><BR> <I><U></U></I><B><FONT color=#0000ff></FONT></B><I><U>DEL: </U></I><B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;-</B><FONT color=#ff0000></FONT></P> <P align=left><B><U></U><U>Return the frequency in progress on the desired channel.</U></B></P> <P align=left>&nbsp;&nbsp;<B><U></U></B>This function returns the frequency to be played on the desired channel. The frequency lies between 0 is 32768.</P> <P align=left>&nbsp;</P> <P align=left><B><FONT color=#0000ff><A name=PortStatus></A></FONT></B><B><FONT color=#0000ff>unsigned char</FONT></B> pSnd_PortStatus (<B><FONT color=#0000ff>void</FONT></B>);</P> <P align=left><B><FONT color=#0000ff></FONT></B><B><FONT color=#0000ff>jsr</FONT></B> polysnd2::PortStatus</P> <P align=left><I><U></U></I><I><U>Input:</U></I> <B><FONT color=#ff0000>&nbsp;&nbsp;&nbsp;</FONT>-</B><BR> <U><I></I></U><B></B><U><I>Output:</I></U><I>&nbsp;<B> </B></I><B><FONT color=#ff0000>d0.</FONT><FONT color=#0000ff>b</FONT></B><BR> <I><U></U></I><B><FONT color=#0000ff></FONT></B><I><U>DEL: </U></I><B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;d0</B></P> <P align=left><B><U></U><U>Return the port state I/O in low level.</U></B></P> <P align=left>&nbsp;&nbsp;<B><U></U></B>This function makes it possible to know when the library emits impulses. Channel 1 corresponds to bit 0 and channel 2 with bit 1, if a bit is then armed the tension crossing the wire with given channel corresponding is to 0 V if the bit is disarmed the tension is with ~3V. This function is useful for the creation of an oscilloscope for waves in 0V and 3.3V..<BR> This function returns just the port state (<B><FONT color=#ff0000>0x60000E</FONT></B>).<BR></P> <P align=left>&nbsp;</P> <P align=left><B><FONT color=#0000ff><A name=Interrupt5></A></FONT></B><B><FONT color=#0000ff>void </FONT></B>pSnd_Interrupt5 (<B>INT_HANDLER</B>):</P> <P align=left><FONT color=#0000ff><B></B></FONT><FONT color=#0000ff><B>lea</B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT>interrupt(<B><FONT color=#ff0000>PC</FONT></B>),<FONT color=#ff0000><B>a0</B></FONT><BR><FONT color=#0000ff><B></B></FONT><FONT color=#ff0000><B></B></FONT><FONT color=#0000ff><B>jsr</B></FONT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; polysnd2::Interrupt5<BR></P> <P align=left>Interrupt_handler:<BR> <FONT color=#0000ff><B></B></FONT><FONT color=#0000ff><B>move</B></FONT>.<B><FONT color=#ff0000>w</FONT></B> #$2700,sr<BR> <FONT color=#0000ff><B></B></FONT><FONT color=#0000ff><B>rte</B></FONT></P> <P align=left><I><U></U></I><FONT color=#0000ff><B></B></FONT><I><U>Input:</U></I> <B><FONT color=#ff0000>&nbsp;&nbsp;&nbsp;a0</FONT></B><BR><U><I></I></U><B><FONT color=#ff0000></FONT></B><U><I>Output:</I></U><I>&nbsp;<B> </B></I><B>-</B><BR><I><U></U></I><B></B><I><U>DEL: </U></I><B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;-</B><B></B></P> <P align=left></P> <P align=left><B><U></U><U>auto Int n°5 of PolySnd v2.0.</U></B></P> <P align=left>&nbsp;&nbsp;<B><U></U></B>This function makes it possible to use the auto Int n°5 with PolySnd v2.0. It turns at a precise frequency of 1 Hz by defect. It is adjusted thanks to the SetInterrupt5Rate function.</P> <P align=left><U><I></I></U><U><I>Example out of C:</I></U></P> <P align=left><U><I></I></U>INT_HANDLER OldInt1 = NULL;<BR> INT_HANDLER OldInt2 = NULL;<BR> <BR> <FONT color=#0000ff><B></B></FONT><FONT color=#0000ff><B>volatile unsigned long </B></FONT> counter;</P> <P align=left>DEFINE_INT_HANDLER (<B><FONT color=#ff00ff>Interrupt_handler5</FONT></B>)<BR>{<BR><FONT color=#ff0000><B>&nbsp;&nbsp;</B></FONT><FONT color=#ff0000><B>counter</B></FONT>++;<BR>}</P> <P align=left>DEFINE_INT_HANDLER (myint2)<BR>{<BR>&nbsp;&nbsp;pokeIO (0x60001B, 0);<BR>}</P> <P align=left>void _ main (void)<BR> {<BR>&nbsp;&nbsp;OldInt1 = GetIntVec (AUTO_INT_1);<BR>&nbsp;&nbsp;OldInt2 = GetIntVec (AUTO_INT_2);<BR>&nbsp;&nbsp;SetIntVec (AUTO_INT_1, DUMMY_HANDLER);<BR>&nbsp;&nbsp;SetIntVec (AUTO_INT_2, myint2);<BR></P> <P align=left><B><FONT color=#ff0000>&nbsp;&nbsp;</FONT></B><B><FONT color=#ff0000>counter</FONT></B>= 0;</P> <P align=left>&nbsp;&nbsp;pSnd_EnableSound ();<BR>&nbsp;&nbsp;pSnd_InstallSound ();</P> <P align=left>&nbsp;&nbsp;pSnd_Interrupt5 (<B><FONT color=#ff00ff>Interrupt_handler5</FONT></B>);<BR>&nbsp;<B><FONT color=#0000ff>&nbsp;</FONT></B><B><FONT color=#0000ff>while</FONT></B> (_ keytest (RR_ESC)!=TRUE) printf_xy (0,0, "%ul",counter);</P> <P align=left>&nbsp;&nbsp;pSnd_UninstallSound ();<BR>&nbsp;&nbsp;pSnd_DisableSound ();</P> <P align=left>&nbsp;&nbsp;SetIntVec (AUTO_INT_1, OldInt1);<BR>&nbsp;&nbsp;SetIntVec (AUTO_INT_2, OldInt2);<BR>}</P> <P align=left>In this program <B><I><FONT color=#ff0000>counter</FONT></I></B> will be incremented of 1, 1 time per seconds.<BR></P> <P align=left>&nbsp;</P> <P align=left><B><FONT color=#0000ff><A name=PlaySound></A></FONT></B><B><FONT color=#0000ff>void</FONT></B> pSnd_PlaySound_voice1 (<B><FONT color=#0000ff>unsigned char</FONT></B> *);<BR><FONT color=#0000ff><B></B></FONT><FONT color=#0000ff><B>void</B></FONT> pSnd_PlaySound_voice2 (<B><FONT color=#0000ff>unsigned char</FONT></B> *);</P> <P align=left><B><FONT color=#0000ff></FONT></B><B><FONT color=#0000ff>lea</FONT></B> &nbsp;channel(<B><FONT color=#ff0000>PC</FONT></B>),<B><FONT color=#ff0000>a0</FONT></B><BR><FONT color=#0000ff><B></B></FONT><B><FONT color=#ff0000></FONT></B><FONT color=#0000ff><B>jsr</B></FONT> &nbsp;&nbsp;&nbsp;polysnd2::PlaySound_voice[1|2]<BR></P> <P align=left><I><U></U></I><I><U>Input:</U></I> <B><FONT color=#ff0000>&nbsp;&nbsp;&nbsp;a0</FONT></B><BR><U><I></I></U><B><FONT color=#ff0000></FONT></B><U><I>Output:</I></U><I>&nbsp;<B> </B></I><B>-</B><BR><I><U></U></I><B></B><I><U>DEL: </U></I><B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;d0</B> </P> <P align=left><BR><U><B></B></U><B></B><U><B>Play a music on the desired channel.</B></U></P> <P align=left>&nbsp;&nbsp;<U><B></B></U>This function makes it possible to play a music on the desired channel. This function requires a pointer on data in the char. </P> <P align=left>Out of C to use this function correctly you must use a list with a dimension which is composed of this channel:</P> <P align=left><B><FONT color=#ff6600>note_octave, duration, note_octave, duration ... note_octave, duration, end (0xFF) </FONT></B></P> <P align=left><B><FONT color=#ff6600></FONT></B>The notes followed by their octave are defined thanks to a table of frequencies, look at the file header out of C or ASM to know the notes in their formats. This process is identical for the durations.<BR> The # are noted <I><b>b</b></I> and the bemol <I><b>d</b></I> out of C and ASM. A note is channels preceded by an indent _. do not hesitate to open the files <I>polysnd2.h</I> in the repertory <B>headers</B> to see the writings of the notes and durations& </P> <P align=left><BR><U><I></I></U><U><I>Here an example of data sound effects for PlaySound out of C:</I></U></P> <P align=left><B><FONT color=#0000ff></FONT></B><U><I></I></U><B><FONT color=#0000ff>unsigned char</FONT></B> channel[]={<B><FONT color=#ff00ff>_ do0</FONT></B>,<B><FONT color=#006600>noire</FONT></B>,<BR> <FONT color=#ff00ff><B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</B></FONT><FONT color=#ff00ff><B>_ fa5</B></FONT>,<B><font color="#006600">blanche</font></B>,<BR> <FONT color=#ff00ff><B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</B></FONT><FONT color=#ff00ff><B>_ sold4</B></FONT>,<B><font color="#006600">noire_pointee</font></B>,<BR> <FONT color=#ff00ff><B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</B></FONT><FONT color=#ff00ff><B>_ sib9</B></FONT><FONT color=#006600><B>, croche_pointee</B></FONT>,<BR><FONT color=#ff00ff><B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</B></FONT><FONT color=#ff0000><B></B></FONT><FONT color=#ff0000><B>0xFF</B></FONT>};</P> <P align=left><B><FONT color=#ff0000>The 0xFF</FONT></B> indicates to PolySnd v2.0 the end data musical.</P> <P align=left><I><U></U></I><I><U>Out of assembler channel will give:</U></I></P> <P align=left><I><U></U></I>channel:<BR> <FONT color=#0000ff><B>dc.</B></FONT>.<B><font color="#ff0000">b</font></B> <FONT color=#ff00ff><B>&nbsp;_ do0</B></FONT>,<B><FONT color=#006600>noire</FONT></B><BR> <FONT color=#0000ff><B></B></FONT><B><FONT color=#006600></FONT></B><FONT color=#0000ff><B>dc.</B></FONT>.<B><font color="#ff0000">b</font></B> <FONT color=#ff00ff><B>&nbsp;_ fa5</B></FONT>,<B><font color="#006600">blanche</font></B><BR> <FONT color=#0000ff><B></B></FONT><B><FONT color=#006600></FONT></B><FONT color=#0000ff><B>dc.</B></FONT>.<B><font color="#ff0000">b</font></B> <FONT color=#ff00ff><B>&nbsp;_ sold4</B></FONT>,<B><font color="#006600">noire_pointee</font></B><BR> <FONT color=#0000ff><B></B></FONT><B><FONT color=#006600></FONT></B><FONT color=#0000ff><B>dc.</B></FONT>.<B><font color="#ff0000">b</font></B> <B><FONT color=#ff00ff>&nbsp;_ sib9</FONT></B>,<FONT color=#006600><B>croche_pointee</B></FONT><BR> <FONT color=#0000ff><B>dc.</B></FONT>.<B><font color="#ff0000">b</font></B> <FONT color=#ff0000><B>&nbsp;</B></FONT></P> <P align=left><B><FONT color=#ff0000></FONT></B><FONT color=#ff0000><B></B></FONT><B><FONT color=#ff0000>Attention</FONT></B>, <FONT color=#ff0000>certain functions of PolySnd v2.0 can be used only with this mode there.<BR><B></B><FONT color=#ff0000></FONT><FONT color=#ff0000>Do not forget to correctly use SetSate to activate this function.</FONT> </FONT></P> <P align=left>&nbsp;</P> <P align=left><B><FONT color=#0000ff><A name=GetLength></A></FONT></B><FONT color=#ff0000><FONT color=#ff0000></FONT></FONT><B><FONT color=#0000ff>unsigned char</FONT></B> pSnd_GetLength_voice1 (<B><FONT color=#0000ff>void</FONT></B>);<BR><FONT color=#0000ff><B></B></FONT><FONT color=#0000ff><B>unsigned char</B></FONT> pSnd_GetLength_voice2 (<B><FONT color=#0000ff>void</FONT></B>);</P> <P align=left><B><FONT color=#0000ff></FONT></B><B><FONT color=#0000ff>jsr</FONT></B> polysnd2::GetLength_voice[1|2]</P> <P align=left><I><U></U></I><I><U>Input:</U></I> <B><FONT color=#ff0000>&nbsp;&nbsp;&nbsp;</FONT>-</B><BR> <U><I></I></U><B></B><U><I>Output:</I></U><I>&nbsp;<B> </B></I><B><FONT color=#ff0000>d0</FONT><FONT color=#0000ff>.b</FONT></B><BR> <I><U></U></I><B><FONT color=#0000ff></FONT></B><I><U>DEL: </U></I><B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;d0</B></P> <P align=left><B><U></U><U>Return the duration of a note.</U></B></P> <P align=left>&nbsp;&nbsp;<B><U></U></B>This function makes it possible to know the duration of a frequency or notes to be played. Ideal to follow the projection of a piece of music or sound effects.</P> <P align=left>&nbsp;</P> <P align=left><B><FONT color=#0000ff><A name=GetTime></A></FONT></B><B><FONT color=#0000ff>unsigned short</FONT></B> pSnd_GetTime (<B><FONT color=#0000ff>unsigned char</FONT></B> * PtrData, <B><FONT color=#0000ff>unsigned short</FONT></B> Tempo);</P> <DIV align=left> <P align=left><B><FONT color=#0000ff></FONT></B><B><FONT color=#0000ff>lea</FONT></B> &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;channel(<B><FONT color=#ff0000>PC</FONT></B>),<B><FONT color=#ff0000>a0</FONT></B><BR><FONT color=#0000ff><B></B></FONT><B><FONT color=#ff0000></FONT></B><FONT color=#0000ff><B>move</B></FONT><FONT color=#ff0000>.<B>w</B></FONT> <B>#120</B>,d2<BR> <FONT color=#0000ff><B></B></FONT><FONT color=#0000ff><B>jsr</B></FONT> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;polysnd2::GetTime</P> <P align=left><I><U></U></I><I><U>Input:</U></I> <B><FONT color=#ff0000>&nbsp;&nbsp;&nbsp;a0</FONT></B> = PtrData<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B><FONT color=#ff0000>&nbsp;&nbsp;&nbsp;</FONT></B><B><FONT color=#ff0000>d2.</FONT><FONT color=#0000ff>w</FONT></B> = Tempo<BR> <U><I></I></U><U><I>Output:</I></U><I>&nbsp;<B> </B></I><B><FONT color=#ff0000>d0</FONT>.<font color="#0000ff">w</font></B><BR> <I><U></U></I><B><FONT color=#0000ff></FONT></B><I><U>DEL: </U></I><B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; d0, d1, d2,a0</B> <BR></P></DIV> <P align=left><B><U></U><U>Return the total time of a music.</U></B></P> <P align=left>&nbsp;&nbsp;<B><U></U></B>Return the time which PolySnd v2.0 will spend to play a music, this time is returned in seconds. This function functions only with musical data in the form of PlaySound... <BR> This function is external in PolySnd v2.0 and will modify of anything its behavior. It makes it possible to facilitate the work of the programmer. Ideal for a player or to estimate the duration of a music.</P> <P align=left><B><FONT color=#ff0000><U></U></FONT></B><B><FONT color=#ff0000><U>Caution:</U></FONT></B> <FONT color=#ff0000>Time given is an approximation and thus it is not precise. </FONT></P> <P align=left>&nbsp;</P> <P align=left><B><FONT color=#0000ff><A name=GetState></A></FONT></B><FONT color=#ff0000></FONT><B><FONT color=#0000ff>unsigned char </FONT></B>pSnd_GetState (<B><FONT color=#0000ff>void</FONT></B>);</P> <P align=left><B><FONT color=#0000ff></FONT></B><B><FONT color=#0000ff>jsr</FONT></B> polysnd2::GetState</P> <P align=left><I><U></U></I><I><U>Input:</U></I> <B><B><FONT color=#ff0000>&nbsp;&nbsp;&nbsp;</FONT>-</B><BR> </B><U><I></I></U><B><B></B></B><U><I>Output:</I></U><B><I>&nbsp;<B> </B></I><B><FONT color=#ff0000>d0.</FONT><FONT color=#0000ff>b</FONT></B><BR> </B><I><U></U></I><B><B><FONT color=#0000ff></FONT></B></B><I><U>DEL: </U></I><B><B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;d0</B></B></P> <P align=left><B><U></U><B></B><U>Return the state of a channel.</U></B></P> <P align=left>&nbsp;&nbsp;<B><U></U></B>Return the state of a channel and indicates if the channel is in pause or not. Channel 1 corresponds to bit 0 and channel 2 with bit 1, if this bit is armed, of the sound is played on the corresponding channel, if the bit is disarmed the channel is in pause.</P> <P align=left></P> <P align=left></P> <P align=left></P> <P align=left></P> <P align=left>These enumerations are valid to test the channels:</P> <P align=left><B><FONT color=#006600></FONT></B><B><FONT color=#006600>#define NOVOICE&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;0<BR> #define VOICE1 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1<BR> #define VOICE2 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2<BR> #define ALLVOICES &nbsp;3</FONT></B></P> <P align=left><B><FONT color=#0000ff></FONT><FONT color=#006600></FONT><FONT color=#0000ff>_NOVOICE &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;equ &nbsp;0<BR> _VOICE1 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;equ &nbsp;1<BR> _VOICE2 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;equ &nbsp;2<BR> _ALLVOICES &nbsp;equ &nbsp;3</FONT></B></P> <P align=left>&nbsp;&nbsp;<B><FONT color=#0000ff></FONT></B>VoiceState is rather identical but it is used for a quite precise function, use GetState to know if sound is played on a channel and VoiceState if a channel finished to play a simple frequency, a music or a sound effect. GetState gives the current state of PolySnd v2.0 and VoiceState the state of the mode in progress.</P> <P align=left>&nbsp;</P> <P align=left><B><FONT color=#0000ff><A name=GetMode></A></FONT></B><B><FONT color=#0000ff>unsigned char</FONT></B> pSnd_GetMode (<B><FONT color=#0000ff>void</FONT></B>);</P> <P align=left><FONT color=#0000ff><B></B></FONT><FONT color=#0000ff><B>jsr</B></FONT> polysnd2::GetMode</P> <P align=left><I><U></U></I><I><U>Input:</U></I> <B><FONT color=#ff0000>&nbsp;&nbsp;&nbsp;</FONT>-</B><BR> <U><I></I></U><B></B><U><I>Output:</I></U><I>&nbsp;<B> </B></I><B><FONT color=#ff0000>d0</FONT><FONT color=#0000ff>.b</FONT></B><BR> <I><U></U></I><B><FONT color=#0000ff></FONT></B><I><U>DEL: </U></I><B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;d0</B></P> <P align=left><B><U></U><U>Return the type of data that PolySnd v2.0 is carrying out.</U></B></P> <P align=left>&nbsp;&nbsp;<B><U></U></B>This function makes it possible to know if a simple frequency, a sound effect, a music or of data WAV are to be played on a channel.<BR>This function follows a quite precise coding to know the mode of data carried out.</P> <P align=left>Bits 0 to 3 relates to channel 1 and bits 4 to 7, channel 2, if:</P> <DIV align=left> <P align=left>0001 = beep (simple frequency)<BR>0010 = PlayFX (sound effect)<BR>0100 = PlayWAV (WAV)<BR>1000 = PlaySound (music)</P></DIV> <P align=left>These following enumerations are valid to test the channels:<BR> <FONT color=#006600><B></B></FONT><FONT color=#006600><B>#define BEEP_VOICE1 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1<BR> #define BEEP_VOICE2 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;16<BR> #define FX_VOICE1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2<BR> #define FX_VOICE2 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;32<BR> #define SOUND_VOICE1 &nbsp;&nbsp;8<BR> #define SOUND_VOICE2 &nbsp; 128<BR> #define WAV_VOICE1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4<BR> #define WAV_VOICE2 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;64</B></FONT></P> <P align=left><B><FONT color=#0000ff></FONT></B><FONT color=#006600><B></B></FONT><B><FONT color=#0000ff>_BEEP_VOICE1 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;equ&nbsp;&nbsp;1<BR> _BEEP_VOICE2 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;equ&nbsp;&nbsp;16<BR> _FX_VOICE1 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;equ&nbsp;&nbsp;2<BR> _FX_VOICE2 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;equ&nbsp;&nbsp;32<BR> _SOUND_VOICE1 &nbsp;equ&nbsp;&nbsp;8<BR> _SOUND_VOICE2 &nbsp;equ&nbsp;&nbsp;128<BR> _WAV_VOICE1 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; equ&nbsp;&nbsp;4<BR> _WAV_VOICE2 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;equ&nbsp;&nbsp;64</FONT></B></P> <P align=left><B><FONT color=#0000ff></FONT></B>Example for a sound effect on channel 1 and one music on channel 2. 1000 0010</P> <P align=left><I><U></U></I><I><U>Out of C:</U></I></P> <P align=left><B><FONT color=#0000ff>if</FONT></B> (pSnd_GetMode ()==(<B><FONT color=#006600>FX_VOICE1</FONT></B> |<B><FONT color=#006600> SOUND_VOICE2</FONT></B>)) {...}</P> <P align=left><BR><U><I></I></U><U><I>In ASM:</I></U></P> <P align=left><B><FONT color=#0000ff></FONT></B><U><I></I></U><B><FONT color=#0000ff>jsr</FONT></B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; polysnd2::GetMode <FONT color=#006600>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;appel of GetMode</FONT><BR> <FONT color=#0000ff><B></B></FONT><FONT color=#006600></FONT><FONT color=#0000ff><B>move</B></FONT><B><FONT color=#ff0000>.b</FONT></B> &nbsp;#<B><FONT color=#006600>_ FX_VOICE1</FONT></B>,d1 <FONT color=#006600>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;d1 contains 0000 0010</FONT><BR> <FONT color=#0000ff><B></B></FONT><FONT color=#006600></FONT><FONT color=#0000ff><B>ori</B></FONT>.<b><font color="#ff0000">b</font></b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#<B><FONT color=#006600>_ SOUND_VOICE2</FONT></B>,d1 <FONT color=#006600>&nbsp;;effectue one OR logical with 0000 0010 and 1000 0000, d1 contains 1000 0010</FONT><BR> <FONT color=#0000ff><B></B></FONT><FONT color=#006600></FONT><FONT color=#0000ff><B>cmp</B></FONT><B><FONT color=#ff0000>b</FONT></B> &nbsp;&nbsp;&nbsp;d0, d1 <FONT color=#006600>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;si d0=d1</FONT><BR> <FONT color=#0000ff><B></B></FONT><FONT color=#006600></FONT><FONT color=#0000ff><B>beq</B></FONT> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;continue&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT color=#006600>;then to go to continuous</FONT><BR> <FONT color=#0000ff><B></B></FONT><FONT color=#006600></FONT><FONT color=#0000ff><B>rts</B></FONT> <FONT color=#006600>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;else fine</FONT></P> <P align=left><I></I><FONT color=#006600></FONT><I>continue:</I><BR> <I></I>....<BR></P> <P align=left>&nbsp;</P> <P align=left><B><FONT color=#0000ff><A name=GetLoop></A></FONT></B><B><FONT color=#0000ff>unsigned char</FONT></B> pSnd_GetLoop (<B><FONT color=#0000ff>void</FONT></B>);</P> <P align=left><B><FONT color=#0000ff></FONT></B><B><FONT color=#0000ff>jsr</FONT></B> polysnd2::GetLoop</P> <P align=left><I><U></U></I><I><U>Input:</U></I> <B><FONT color=#ff0000>&nbsp;&nbsp;&nbsp;</FONT>-</B><BR> <U><I></I></U><B></B><U><I>Output:</I></U><I>&nbsp;<B> </B></I><B><FONT color=#ff0000>d0</FONT><FONT color=#0000ff>.b</FONT></B><BR> <I><U></U></I><B><FONT color=#0000ff></FONT></B><I><U>DEL: </U></I><B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;d0</B></P> <P align=left><B><U></U><U>Return if the loop mode is activated on a channel.</U></B></P> <P align=left>&nbsp;&nbsp;<B><U></U></B>This function returns if the loop mode is activated on a channel. Bit 0 corresponds to channel 1 and bit 1 with channel 2. If the bit is armed, the loop mode is activated, if the bit is disarmed the loop mode is decontaminated. This mode is not available for data WAV.</P> <P align=left>These enumerations are valid to test the channels:</P> <P align=left><B><FONT color=#006600></FONT></B><B><FONT color=#006600>#define NOVOICE &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0<BR> #define VOICE1 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1<BR> #define VOICE2 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2<BR> #define ALLVOICES &nbsp;3</FONT></B></P> <P align=left><B><FONT color=#0000ff></FONT><FONT color=#006600></FONT><FONT color=#0000ff>_NOVOICE &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;equ &nbsp;0<BR> _VOICE1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; equ &nbsp;1<BR> _VOICE2 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;equ &nbsp;2<BR> _ALLVOICES &nbsp;equ &nbsp;3</FONT></B></P> <P align=left>&nbsp;</P> <P align=left><B><FONT color=#0000ff><A name=Time></A>unsigned short</FONT></B> pSnd_Time_voice1 (<B><FONT color=#0000ff>void</FONT></B>);<BR><FONT color=#0000ff><B></B></FONT><FONT color=#0000ff><B>unsigned short</B></FONT> pSnd_Time_voice2 (<B><FONT color=#0000ff>void</FONT></B>);</P> <P align=left><B><FONT color=#0000ff></FONT></B><B><FONT color=#0000ff>jsr</FONT></B> polysnd2::_Time_voice[1|2]</P> <P align=left><I><U></U></I><I><U>Input:</U></I> <B><FONT color=#ff0000>&nbsp;&nbsp;&nbsp;</FONT>-</B><BR> <U><I></I></U><B></B><U><I>Output:</I></U><I>&nbsp;<B> </B></I><B><FONT color=#ff0000>d0</FONT><FONT color=#0000ff>.w</FONT></B><BR> <I><U></U></I><B><FONT color=#0000ff></FONT></B><I><U>DEL: </U></I><B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;d0</B></P> <P align=left><B><U></U><U>Return the time passed in seconds since the beginning of a simple frequency, a sound effect or a music on the desired channel.</U></B></P> <P align=left>&nbsp;&nbsp;<B><U></U></B>This function returns the time passed since the beginning of a simple frequency, a sound effect or a music on the desired channel. This time is given in seconds. Ideal for a player. This time can be initialized constantly thanks to SetTime_voice [ 1|2]. Namely that at the time of the end of a mode, the time meter is initialized but continuous A incremented being.</P> <P align=left>&nbsp;</P> <P align=left><B><FONT color=#0000ff><A name=SetTime></A></FONT></B><B><FONT color=#0000ff>void</FONT></B> pSnd_SetTime_voice1 (<B><FONT color=#0000ff>unsigned short</FONT></B> time),<BR><FONT color=#0000ff><B></B></FONT><FONT color=#0000ff><B>void </B></FONT>pSnd_SetTime_voice2 (<B><FONT color=#0000ff>unsigned short </FONT></B>time);<BR> <FONT color=#006600><B></B></FONT><FONT color=#006600><B>#define pSnd_SetTime (time);</B></FONT></P> <P align=left><B><FONT color=#0000ff></FONT></B><FONT color=#006600><B></B></FONT><B><FONT color=#0000ff>move.</FONT><FONT color=#ff0000>w</FONT></B> &nbsp;# 60,<FONT color=#ff0000><B>d0</B></FONT><BR> <FONT color=#0000ff><B></B></FONT><FONT color=#ff0000><B></B></FONT><FONT color=#0000ff><B>jsr</B></FONT> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;polysnd2::SetTime_voice[1|2]<BR></P> <P align=left><I><U></U></I><I><U>Input:</U></I> <B><FONT color=#ff0000>&nbsp;&nbsp;&nbsp;d0</FONT><FONT color=#0000ff>.w</FONT> </B>=<B> </B>Time<BR> <U><I></I></U><U><I>Output:</I></U><I>&nbsp;<B> </B></I><B>-</B><BR><I><U></U></I><B></B><I><U>DEL: </U></I><B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;d0</B></P> <P align=left><B><U></U><U>Change the value of the time meter run out on the desired channel.</U></B></P> <P align=left>&nbsp;&nbsp;<B><U></U></B>This function changes the value of the meter making it possible to determine the past time of a piece of musique... Utile for this positioning in a music. The specified value must be in seconds.</P> <P align=left>&nbsp;</P> <P align=left><B><FONT color=#0000ff><A name=VoiceState></A></FONT></B><B><FONT color=#0000ff>unsigned char</FONT></B> pSnd_VoiceState (<B><FONT color=#0000ff>void</FONT></B>);</P> <P align=left><B><FONT color=#0000ff></FONT></B><B><FONT color=#0000ff>jsr</FONT></B> polysnd2::VoiceState</P> <P align=left><I><U></U></I><I><U>Input:</U></I> <B><FONT color=#ff0000>&nbsp;&nbsp;&nbsp;</FONT>-</B><BR><U><I></I></U><B></B><U><I>Output:</I></U><I>&nbsp;<B> </B></I><B><FONT color=#ff0000>d0</FONT><FONT color=#0000ff>b</FONT></B><BR><I><U></U></I><B><FONT color=#0000ff></FONT></B><I><U>DEL: </U></I><B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;-</B><B></B></P> <P align=left><B><U></U><U>Return the state of a channel.</U></B></P> <P align=left>&nbsp;&nbsp;<B><U></U></B>This function makes it possible to determine if a mode finished playing of the son&amp; bit 0 corresponds to channel 1 and bit 1 with channel 2, if this bit is armed the mode is to be played on the corresponding channel, if the bit is disarmed, PolySnd v2.0 finished playing the mode&amp;</P> <P align=left>This function is useful to synchronize and repeat in loop a music in stereophony.</P> <P align=left>These enumerations are valid to test the channels:</P> <P align=left><B><FONT color=#006600></FONT></B><B><FONT color=#006600>#define NOVOICE &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0<BR> #define VOICE1 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1<BR> #define VOICE2 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2<BR> #define ALLVOICES &nbsp;3</FONT></B></P> <P align=left><B><FONT color=#0000ff></FONT><FONT color=#006600></FONT><FONT color=#0000ff>_NOVOICE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; equ &nbsp;0<BR> _VOICE1 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;equ &nbsp;1<BR> _VOICE2 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;equ &nbsp;2<BR> _ALLVOICES &nbsp;equ &nbsp;3</FONT></B><BR> <B><FONT color=#0000ff></FONT></B>Example to play a music in stereophony in loop without using the function loop:</P> <P align=left>SetVoiceState (<B><FONT color=#006600>ALLVOICES</FONT></B>);</P> <P align=left><B><FONT color=#0000ff></FONT></B><B><FONT color=#0000ff>while</FONT></B> (_ keytest (RR_ESC)==FALSE)<BR>{<BR> <FONT color=#0000ff><B>&nbsp;&nbsp;if </B></FONT>(pSnd_VoiceState ()==<B><FONT color=#006600>NOVOICE</FONT></B>) {pSnd_PlaySound_voice1 (channel1); pSnd_PlaySound_voice2 (channel2); pSnd_SetState (<B><FONT color=#006600>ALLVOICES</FONT></B>);}<BR> &nbsp;&nbsp;....<BR>}<BR></P> <P align=left>&nbsp;</P> <P align=left><B><FONT color=#0000ff><A name=SetVoiceState></A></FONT></B><B><FONT color=#0000ff>void </FONT></B>pSnd_SetVoiceState (<B><FONT color=#0000ff>unsigned char</FONT></B> state);</P> <P align=left><FONT color=#0000ff><B></B></FONT><FONT color=#0000ff><B>move</B></FONT>.<B><FONT color=#ff0000>B</FONT></B> &nbsp;#<B><FONT color=#006600>_ VOICE1</FONT></B>,d0<BR><FONT color=#0000ff><B></B></FONT><FONT color=#0000ff><B>jsr</B></FONT> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;polysnd2::SetVoiceState<BR></P> <P align=left><I><U></U></I><I><U>Input:</U></I> <B><FONT color=#ff0000>&nbsp;&nbsp;&nbsp;d0</FONT>.<FONT color=#0000ff>B</FONT> </B>= Voices<BR><U><I></I></U><U><I>Output:</I></U><I>&nbsp;<B> </B></I><B>-</B><BR><I><U></U></I><B></B><I><U>DEL: </U></I><B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;-</B> </P> <P align=left><B><U></U><U>Regulate VoiceState.</U></B></P> <P align=left><B><FONT color=#ff0000>&nbsp;&nbsp;</FONT><FONT color=#ff0000>Careful</FONT></B>, <FONT color=#ff0000>this function makes it possible to regulate VoiceState according to its needs.<BR> The value passed by SetVoiceState will be initialized if a music is rejouée or if PolySnd v2.0 were configured to receive another processing of data. Use this temporary function by channel of results.</FONT> <FONT color=#ff0000><B>This function is not identical to <I>GetState</I>, <I>GetState</I> returns the current state of PolySnd v2.0 and <I>VoiceState</I> the state running of the mode in progress.<BR></B></FONT></P> <P align=left>&nbsp;</P> <P align=left><B><FONT color=#0000ff><A name=SetIntMask></A></FONT></B><FONT color=#ff0000><B></B></FONT><B><FONT color=#0000ff>void </FONT></B>pSnd_SetIntMask (<B><FONT color=#0000ff>unsigned short</FONT></B> mask);</P> <P align=left><B><FONT color=#0000ff></FONT></B><B><FONT color=#0000ff>move</FONT></B>.<B><FONT color=#ff0000>w</FONT></B> &nbsp;<B>#$2700</B>,<FONT color=#ff0000><B>d0</B></FONT><BR> <FONT color=#0000ff><B></B></FONT><FONT color=#ff0000><B></B></FONT><FONT color=#0000ff><B>jsr</B></FONT> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;polysnd2::SetIntMask<BR></P> <P align=left><I><U></U></I><I><U>Input:</U></I> <B><FONT color=#ff0000>&nbsp;&nbsp;&nbsp;d0</FONT><FONT color=#0000ff>.w</FONT> </B>= mask<BR> <U><I></I></U><U><I>Output:</I></U><I>&nbsp;<B> </B></I><B>-</B><BR><I><U></U></I><B></B><I><U>DEL: </U></I><B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;-</B> </P> <P align=left><B><U></U><U>Regulate the mask of interruptions of PolySnd v2.0.</U></B></P> <P align=left>&nbsp;&nbsp;<B><U></U></B>This function is rather significant if you have evil to use PolySnd v2.0 with other interruptions and that you note that the auto Int 1... is slowed down, this mask makes it possible PolySnd to decontaminate or not to decontaminate certain interruptions at the time of the passage of the interruption of PolySnd v2.0. The value of the mask must be between 0x2100 and 0x2700. by defect this mask is with 0x2400.</P> <P align=left>&nbsp;</P> <P align=left><B><FONT color=#0000ff><A name=AddNotes></A></FONT></B><B><FONT color=#0000ff>void </FONT></B>pSnd_AddNotes_voice1 (<B><FONT color=#0000ff>unsigned char</FONT></B> nbr);<BR><FONT color=#0000ff><B></B></FONT><FONT color=#0000ff><B>void</B></FONT> pSnd_AddNotes_voice2 (<B><FONT color=#0000ff>unsigned</FONT></B> <B><FONT color=#0000ff>char</FONT></B> nbr);<BR> <FONT color=#006600><B></B></FONT><FONT color=#006600><B>#define AddNotes (unsigned char addnts);</B></FONT></P> <P align=left><FONT color=#0000ff><B></B></FONT><FONT color=#006600><B></B></FONT><FONT color=#0000ff><B>move</B></FONT>.<B><FONT color=#ff0000>b</FONT></B> &nbsp;#12,<FONT color=#ff0000><B>d0</B></FONT><BR> <FONT color=#0000ff><B></B></FONT><FONT color=#ff0000><B></B></FONT><FONT color=#0000ff><B>jsr</B></FONT> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;polysnd2::AddNotes_voice1<BR></P> <P align=left><I><U></U></I><I><U>Input:</U></I> <B>&nbsp;&nbsp;&nbsp;<FONT color=#ff0000>d0.</FONT></B><B><FONT color=#0000ff>b</FONT> </B>= AddNote<BR> <U><I></I></U><U><I>Output:</I></U><I>&nbsp;<B> </B></I><B>-</B><BR><I><U></U></I><B></B><I><U>DEL: </U></I><B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;-</B> </P> <P align=left></P> <P align=left></P> <P align=left><B><U></U><U>Allows to play a piece with a number of notes to the top/or below the notes origin.</U></B></P> <P align=left>&nbsp;&nbsp;<B><U></U></B>In the function out of Assembler all the notes of music will be playing 12 notes (1 octave) above the original note. This function is useful to make it possible to increase/decrease by an octave a music without having to modify it.</P> <P align=left>&nbsp;</P> <P align=left><B><FONT color=#0000ff><A name=GetNote></A></FONT></B><B><FONT color=#0000ff>unsigned char</FONT></B> pSnd_GetNote_voice1 (<B><FONT color=#0000ff>void</FONT></B>);<BR><FONT color=#0000ff><B></B></FONT><FONT color=#0000ff><B>unsigned char</B></FONT> pSnd_GetNote_voice2 (<B><FONT color=#0000ff>void</FONT></B>); </P> <P align=left><B><FONT color=#0000ff></FONT></B><B><FONT color=#0000ff>jsr</FONT></B> polysnd2::GetNote_voice[1|2]</P> <P align=left><I><U></U></I><I><U>Input:</U></I> <B><FONT color=#ff0000>&nbsp;&nbsp;&nbsp;</FONT>-</B><BR> <U><I></I></U><B></B><U><I>Output:</I></U><I>&nbsp;<B> </B></I><B><FONT color=#ff0000>d0</FONT><FONT color=#0000ff>.b</FONT></B><BR> <I><U></U></I><B><FONT color=#0000ff></FONT></B><I><U>DEL: </U></I><B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;d0</B></P> <P align=left><B><U></U><U>Return the note in the course of being played.</U></B></P> <P align=left>&nbsp;&nbsp;<B><U></U></B>The returned value corresponds to the index of the note in the frequency table, 0 corresponds to the pause, 1 in Do octave 0& It is rather easy to locate this channel a note with its octave. The table of PolySnd v2.0 contains 120 notes distributed out of 10 octaves.</P> <P align=left>&nbsp;</P> <P align=left><B><FONT color=#0000ff><A name=_Ptridle></A></FONT></B><B><FONT color=#0000ff>void </FONT></B>* pSnd_Ptridle_voice1 (<B><FONT color=#0000ff>void </FONT></B>*);<BR><FONT color=#0000ff><B></B></FONT><FONT color=#0000ff><B>void</B></FONT> * pSnd_Ptridle_voice2 (<B><FONT color=#0000ff>void </FONT></B>*);</P> <P align=left><FONT color=#0000ff><B></B></FONT><FONT color=#0000ff><B>sub</B></FONT><B><FONT color=#ff0000>.l</FONT></B> &nbsp;&nbsp;&nbsp;&nbsp;<FONT color=#ff0000><B>a0</B></FONT>,<FONT color=#ff0000><B>a0 </B></FONT><BR> <FONT color=#0000ff><B></B></FONT><FONT color=#ff0000><B></B></FONT><FONT color=#0000ff><B>jsr</B></FONT> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;polysnd2::_Ptridle_voice[1|2]<BR></P> <P align=left><I><U></U></I><I><U>Input:</U></I> <B>&nbsp;&nbsp;&nbsp;<FONT color=#ff0000>a0</FONT></B><B> </B>= Ptr<BR><U><I></I></U><U><I>Output:</I></U><I>&nbsp;<B> </B></I><B><FONT color=#ff0000>a0</FONT></B><BR><I><U></U></I><B><FONT color=#ff0000></FONT></B><I><U>DEL: </U></I><B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;d0, a0</B></P> <P align=left><B><U></U><U>Return/change the pointer of data of PlaySound.</U></B></P> <P align=left>&nbsp;&nbsp;<B><U></U></B>This function makes it possible to return the pointer of data if the specified argument is NULL or equal to 0 out of Assembler. If this argument is different from NULL or 0, the pointer of data of PlaySound will be modified. Do not forget to use <B><I>the SetSate<B> <I></I></B></I></B>function</I></B> to stop PolySnd v2.0 during your modification and <B><I>_ SkipData_voice[1|2]</I></B> to give the values to zero of the data. Check that your pointer is correctly before making any modifcation, this function can be sources of more or less serious plantings.</P> <P align=left>&nbsp;</P> <P align=left><B><FONT color=#0000ff><A name=_time_counter></A></FONT></B><B><FONT color=#0000ff>unsigned long </FONT></B>pSnd_time_counter_voice1 (<B><FONT color=#0000ff>unsigned long </FONT></B>counter);<BR><B><FONT color=#0000ff></FONT></B><B><FONT color=#0000ff>unsigned long </FONT></B>pSnd_time_counter_voice2 (<B><FONT color=#0000ff>unsigned long </FONT></B>counter);</P> <P align=left><FONT color=#0000ff><B></B></FONT><FONT color=#0000ff><B>move</B></FONT><B><FONT color=#ff0000>.l</FONT></B> <B>&nbsp;&nbsp;#5000</B>,<B><FONT color=#ff0000>d0</FONT></B><BR> <FONT color=#0000ff><B></B></FONT><B><FONT color=#ff0000></FONT></B><FONT color=#0000ff><B>jsr</B></FONT> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;polysnd2::_time_counter_voice[1|2]<BR></P> <P align=left><I><U></U></I><I><U>Input:</U></I> <B>&nbsp;&nbsp;&nbsp;<FONT color=#ff0000>d0.</FONT></B><B><FONT color=#0000ff>l</FONT> </B>= Counter<BR> <U><I></I></U><U><I>Output:</I></U><I>&nbsp;<B> </B></I><B><FONT color=#ff0000>d0</FONT><FONT color=#0000ff>.l</FONT></B><BR> <I><U></U></I><B><FONT color=#0000ff></FONT></B><I><U>DEL: </U></I><B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;d0</B> </P> <P align=left><B><U></U><U>Return/change the time meter of PolySnd v2.0.</U></B></P> <P align=left>&nbsp;&nbsp;<B><U></U></B>This function makes it possible to return the time meter of interruptions of PolySnd v2.0 if the specified argument is NULL or equal to 0 out of Assembler. If this argument is different from NULL or 0, the time meter will be modified. The increments of this meter depend on the SetInterrupt5Rate function, by defect 1 increment of meter corresponds to 1 second. This function is available for permetter précisement to regulate the time meter of each channels.</P> <P align=left>&nbsp;</P> <P align=left><B><FONT color=#0000ff><A name=_note_time_counter></A></FONT></B><B><FONT color=#0000ff>unsigned long </FONT></B>pSnd_note_time_counter_voice1 (<B><FONT color=#0000ff>unsigned long </FONT></B>counter);<BR><B><FONT color=#0000ff></FONT></B><B><FONT color=#0000ff>unsigned long </FONT></B>pSnd_note_time_counter_voice2 (<B><FONT color=#0000ff>unsigned long </FONT></B>counter);</P> <P align=left><FONT color=#0000ff><B></B></FONT><FONT color=#0000ff><B>move.</B></FONT><B><FONT color=#ff0000>l</FONT></B> <B>&nbsp;#0</B>,<FONT color=#ff0000><B>d0</B></FONT><BR> <FONT color=#0000ff><B></B></FONT><FONT color=#ff0000><B></B></FONT><FONT color=#0000ff><B>jsr</B></FONT> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;polysnd2::_note_time_counter_voice[1|2]<BR></P> <P align=left><I><U></U></I><I><U>Input:</U></I> <B>&nbsp;&nbsp;&nbsp;<FONT color=#ff0000>d0.</FONT></B><B><FONT color=#0000ff>l</FONT> </B>= Counter<BR> <U><I></I></U><U><I>Output:</I></U><I>&nbsp;<B> </B></I><B><FONT color=#ff0000>d0</FONT><FONT color=#0000ff>.l</FONT></B><BR> <I><U></U></I><B><FONT color=#0000ff></FONT></B><I><U>DEL: </U></I><B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;d0</B></P> <P align=left><B><U></U><U>Return/change the time meter of the note in progress.</U></B></P> <P align=left>&nbsp;&nbsp;<B><U></U></B>This function makes it possible to return the time meter of interruptions of the note in the course of the PlaySound function, if the specified argument is NULL or equal to 0 out of Assembler. If this argument is different from NULL or 0, the time meter of the note will be modified. The increments of this meter depend on the SetInterrupt5Rate function, by defect 1 increment of meter corresponds to 1 second. This function makes it possible to know how much cycles of interruption the note in progress was played.</P> <P align=left>&nbsp;</P> <P align=left><B><FONT color=#0000ff><A name=_SkipData></A></FONT></B><B><FONT color=#0000ff>void </FONT></B>pSnd_SkipData_voice1 (<B><FONT color=#0000ff>void</FONT></B>);<BR><FONT color=#0000ff><B></B></FONT><FONT color=#0000ff><B>void</B></FONT> pSnd_SkipData_voice2 (<B><FONT color=#0000ff>void</FONT></B>);</P> <P align=left><B><FONT color=#0000ff></FONT></B><B><FONT color=#0000ff>jsr</FONT></B> polysnd2::_SkipData_voice[1|2]</P> <P align=left><B><U></U></B><B><U>Erase the variables of given in progress.</U></B></P> <P align=left>&nbsp;&nbsp;<B><U></U></B>This functions gives to zero the meters of data internal of PolySnd v2.0.</P> <P align=left>&nbsp;</P> <P align=left><B><FONT color=#0000ff><A name=PlayMode></A></FONT></B><B><FONT color=#0000ff>void</FONT></B> pSnd_PlayMode (<B><FONT color=#0000ff>unsigned char</FONT></B> mode);</P> <P align=left><FONT color=#0000ff><B></B></FONT><FONT color=#0000ff><B>move</B></FONT>.<B><FONT color=#ff0000>b</FONT></B> &nbsp;#<B><FONT color=#006600>_ MONO</FONT></B>,<B><FONT color=#ff0000>d0</FONT></B><BR> <FONT color=#0000ff><B></B></FONT><B><FONT color=#ff0000></FONT></B><FONT color=#0000ff><B>jsr</B></FONT> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;polysnd2::PlayMode<BR></P> <P align=left><I><U></U></I><I><U>Input:</U></I> <B>&nbsp;&nbsp;&nbsp;<FONT color=#ff0000>d0.</FONT></B><B><FONT color=#0000ff>b</FONT> </B>= PlayMode<BR> <U><I></I></U><U><I>Output:</I></U><I>&nbsp;<B> </B></I><B>-</B><BR><I><U></U></I><B></B><I><U>DEL: </U></I><B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;-</B> </P> <P align=left><B><U></U><U>Change the mode of reading of PolySnd v2.0.</U></B></P> <P align=left>&nbsp;&nbsp;<B><U></U></B>By defect PolySnd v2.0 is in mode STEREO, this mode makes it possible to exploit 2 channels of the modes different or identical. Malheuresement if you played a music in stereophony, the consumption of resources CPU is rather significant, approximately 15%. But in the contrary case or you play only one music or that sound effects on a channel, you can use the MONO mode, the functions followed prefix voice2 will be ignored until change of the mode. The advantage of the MONO mode is to make it possible to play of the data into MONO on the 2 channels and to gain resources enormously, that is to say a loss of 5% of resources CPU These values are indicative bus depend on the mode used, here PlaySound and of the data. Of course if you use the functions PlayWAV or PlayFX, consumption CPU will be much lower.</P> <P align=left><I><U></U></I><I><U>These enumeration are valid for this function:</U></I></P> <P align=left><B><FONT color=#006600></FONT></B><I><U></U></I><B><FONT color=#006600>#MONO define &nbsp;&nbsp;&nbsp;&nbsp;0<BR> #define STEREO &nbsp;1</FONT></B></P> <P align=left><B><FONT color=#0000ff></FONT><FONT color=#006600></FONT><FONT color=#0000ff>_MONO &nbsp;&nbsp;&nbsp;&nbsp;equ &nbsp;0<BR> _STEREO &nbsp;equ&nbsp; 1</FONT></B></P> <P align=left>&nbsp;</P> <DIV align=left> <P align=left><B><FONT color=#0000ff><A name=SetLength></A>void</FONT></B> pSnd_SetLength_voice1 (<B><FONT color=#0000ff>unsigned char</FONT></B> length);<BR><B><FONT color=#0000ff></FONT></B><B><FONT color=#0000ff>void</FONT></B> pSnd_SetLength_voice1 (<B><FONT color=#0000ff>unsigned char</FONT></B> length);</P></DIV> <P align=left><FONT color=#0000ff><B></B></FONT><FONT color=#0000ff><B>move</B></FONT>.<B><FONT color=#ff0000>b</FONT></B> &nbsp;#<B>20</B>,<B><FONT color=#ff0000>d0</FONT></B><BR> <FONT color=#0000ff><B></B></FONT><B><FONT color=#ff0000></FONT></B><FONT color=#0000ff><B>jsr</B></FONT> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;polysnd2::SetLength_voice[1|2]<BR></P> <P align=left><I><U></U></I><I><U>Input:</U></I> <B>&nbsp;&nbsp;&nbsp;<FONT color=#ff0000>d0</FONT></B><B><FONT color=#0000ff>.b</FONT> </B>= length<BR> <U><I></I></U><U><I>Output:</I></U><I>&nbsp;<B> </B></I><B>-</B><BR><I><U></U></I><B></B><I><U>DEL: </U></I><B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;-</B> </P> <P align=left><B><U></U><U>Régle duration of the note in progress.</U></B></P> <P align=left>&nbsp;&nbsp;<B><U></U></B>This function makes it possible to regulate the time of the note to be played.</P> <P align=left>&nbsp;</P> <P align=left><B><FONT color=#0000ff><A name=SetInterrupt5Rate></A></FONT></B><B><FONT color=#0000ff>void</FONT></B> pSnd_SetInterrupt5Rate (<B><FONT color=#0000ff>unsigned short </FONT></B>freq);</P> <P align=left><FONT color=#0000ff><B></B></FONT><FONT color=#0000ff><B>move</B></FONT>.<B><FONT color=#ff0000>w</FONT></B> &nbsp;#<B>500</B>,<B><FONT color=#ff0000>d0</FONT></B><BR> <FONT color=#0000ff><B></B></FONT><B><FONT color=#ff0000></FONT></B><FONT color=#0000ff><B>jsr</B></FONT> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;polysnd2::Setinterrupt5Rate<BR></P> <P align=left><I><U></U></I><I><U>Input:</U></I> <B>&nbsp;&nbsp;&nbsp;<FONT color=#ff0000>d0</FONT></B><B><FONT color=#0000ff>.w</FONT> </B>= Frequency<BR> <U><I></I></U><U><I>Output:</I></U><I>&nbsp;<B> </B></I><B>-</B><BR><I><U></U></I><B></B><I><U>DEL: </U></I><B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;d0, d1, a0</B> </P> <P align=left><B><U></U><U>Adjust the frequency of linterruption personalized of PolySnd (Interrupt5 function).</U></B></P> <P align=left>&nbsp;&nbsp;<B><U></U></B>This function makes it possible to change the frequency of the Interrupt5 function, by defect this one is to 1 Hz but it is possible to assemble jusq' to 11569 Hz on HW and 8192 Hz on HW2, plus the frequency of the interruption Interrupt5 de PolySnd v2.0 is high plus consumption CPU increases.</P> <P align=left>The functions of time depend on the frequency of this interruption.</P> <P align=left>&nbsp;</P> <P align=left><B><U><FONT color=#0099ff></FONT></U></B><B><U><FONT color=#0099ff>Numerical functions, PolySnd v2.0 is able to play of the sound qualitée 1 bits ata rate of échantillionage with 8000 Hz numerically. This mode at summer developed to allow to play of the sound effects realistic in plays, like noises of step, channels& </FONT></U></B></P> <P align=left><B><FONT color=#0000ff><A name=PlayWav></A></FONT><U><FONT color=#0099ff></FONT></U><FONT color=#0000ff>void </FONT></B>pSnd_PlayWAV_voice1 (<B><FONT color=#0000ff>unsigned char</FONT></B> * wav,<B><FONT color=#0000ff>unsigned short</FONT></B> size);<BR><FONT color=#0000ff><B></B></FONT><FONT color=#0000ff><B>void</B></FONT> pSnd_PlayWAV_voice2 (<B><FONT color=#0000ff>unsigned char</FONT></B> * wav,<B><FONT color=#0000ff>unsigned short </FONT></B>size);<BR> <FONT color=#006600><B></B></FONT><FONT color=#006600><B>#define pSnd_PlayWAV (unsigned char * wav, unsigned short size);</B></FONT></P> <P align=left><B><FONT color=#0000ff></FONT></B><FONT color=#006600><B></B></FONT><B><FONT color=#0000ff>lea</FONT></B> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sound_wav(<B><FONT color=#ff0000>PC</FONT></B>),<FONT color=#ff0000><B>a0</B></FONT><BR><FONT color=#0000ff><B></B></FONT><FONT color=#ff0000><B></B></FONT><FONT color=#0000ff><B>move</B></FONT>.<B><FONT color=#ff0000>w</FONT></B> &nbsp;# fin_sound-sound_wav,<B><FONT color=#ff0000>d0</FONT></B><BR> <FONT color=#0000ff><B></B></FONT><B><FONT color=#ff0000></FONT></B><FONT color=#0000ff><B>jsr</B></FONT> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;polysnd2::PlayWAV_voice[1|2]<BR> ...</P> <P align=left>sound_wav:<BR> <FONT color=#0000ff><B>dc.</B></FONT>.<B><FONT color=#ff0000>b</FONT></B> <B>&nbsp;50,85,124,158,25&amp;</B><BR> <B></B>&amp;<BR>fin_sound: </P> <P align=left><I><U></U></I><I><U>Input:</U></I> <B><FONT color=#ff0000>&nbsp;&nbsp;&nbsp;a0</FONT></B> = PtrData<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B><FONT color=#ff0000>&nbsp;&nbsp;&nbsp;</FONT></B><B><FONT color=#ff0000>d0.</FONT><FONT color=#0000ff>w</FONT></B> = Size<BR> <U><I></I></U><U><I>Output:</I></U><I>&nbsp;<B> </B></I><B>-</B><BR><I><U></U></I><B></B><I><U>DEL: </U></I><B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;-</B></P> <P align=left><U><I></I></U><B></B><U><I>Here an example of use of PlayWAV out of C:</I></U></P> <P align=left><U><I></I></U>INT_HANDLER OldInt1 = NULL;<BR> INT_HANDLER OldInt2 = NULL;<BR> </P> <P align=left>DEFINE_INT_HANDLER (myint2)<BR>{<BR>&nbsp;&nbsp;pokeIO (0x60001B, 0);<BR>} </P> <P align=left><B><FONT color=#0000ff></FONT></B><B><FONT color=#0000ff>unsigned char </FONT></B>sound_wav[]={50,85,124,158,25&amp;};</P> <P align=left>void _ main (void)<BR> {<BR>&nbsp;&nbsp;OldInt1 = GetIntVec (AUTO_INT_1);<BR>&nbsp;&nbsp;OldInt2 = GetIntVec (AUTO_INT_2);<BR>&nbsp;&nbsp;SetIntVec (AUTO_INT_1, DUMMY_HANDLER);<BR>&nbsp;&nbsp;SetIntVec (AUTO_INT_2, myint2);<BR></P> <P align=left>&nbsp;&nbsp;pSnd_EnableSound ();<BR>&nbsp;&nbsp;pSnd_InstallSound ();</P> <P align=left>&nbsp;&nbsp;pSnd_PlayMode (<B><FONT color=#006600>MONO</FONT></B>);</P> <P align=left>&nbsp;&nbsp;pSnd_Sample_voice1 (8192);<BR>&nbsp;&nbsp;pSnd_PlayWAV_voice1 (sound_wav,<B><FONT color=#0000ff>sizeof</FONT></B> (sound_wav));<BR></P> <P align=left>&nbsp;&nbsp;pSnd_SetState (<B><FONT color=#006600>ALLVOICES</FONT></B>);</P> <P align=left><B><FONT color=#0000ff>&nbsp;&nbsp;</FONT></B><B><FONT color=#0000ff>while</FONT></B> ((_ keytest (RR_ESC)! =<B><FONT color=#006600>TRUE</FONT></B>) &amp;&amp; pSnd_GetState ());</P> <P align=left>&nbsp;&nbsp;pSnd_UninstallSound ();<BR>&nbsp;&nbsp;pSnd_DisableSound ();</P> <P align=left>&nbsp;&nbsp;SetIntVec (AUTO_INT_1, OldInt1);<BR>&nbsp;&nbsp;SetIntVec (AUTO_INT_2, OldInt2);<BR>}</P> <P align=left><B><U></U></B><B><U>Makes it possible to play of data WAV in quality 1 bit with 8000 Hz.</U></B></P> <P align=left>&nbsp;&nbsp;<B><U></U></B>It is possible to play of the WAV (its numerical) with PolySnd v2.0. In this example 8192 bits are read per seconds (1024 octets/s), it is possible to decrease the size of the data to the detriment of quality by changing the sampling rate (see Sample_voice[1|2]).<BR>It A was desirable to use a quality 1 bit for PolySnd v2.0 because test them carried out with higher quality to 8 bits was not satisfactory cuts memory of it.</P> <P align=left>&nbsp;</P> <P align=left><B><FONT color=#0000ff><A name=Sample></A></FONT></B><B><FONT color=#0000ff>void </FONT></B>pSnd_Sample_voice1 (<B><FONT color=#0000ff>unsigned </FONT></B>short);<BR><FONT color=#0000ff><B></B></FONT><FONT color=#0000ff><B>void</B></FONT> pSnd_Sample_voice2 (<B><FONT color=#0000ff>unsigned </FONT></B>short);<BR><FONT color=#006600><B></B></FONT><FONT color=#006600><B># define pSnd_Samples (sample);</B></FONT></P> <P align=left><B><FONT color=#0000ff></FONT></B><FONT color=#006600><B></B></FONT><B><FONT color=#0000ff>move</FONT></B>.<B><FONT color=#ff0000>w</FONT></B> &nbsp;#4000,<B><FONT color=#ff0000>d0</FONT></B><BR> <FONT color=#0000ff><B></B></FONT><B><FONT color=#ff0000></FONT></B><FONT color=#0000ff><B>jsr</B></FONT> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;polysnd2::Sample_vioice[1|2]</P> <P align=left><I><U></U></I><I><U>Input:</U></I> <B>&nbsp;&nbsp;&nbsp;<FONT color=#ff0000>d0</FONT></B><B><FONT color=#0000ff>.w</FONT> </B>= sample<BR> <U><I></I></U><U><I>Output:</I></U><I>&nbsp;<B> </B></I><B>-</B><BR><I><U></U></I><B></B><I><U>DEL: </U></I><B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;-</B> <BR></P> <P align=left><B><U></U><U>Adjust the rate of samplerate.</U></B></P> <P align=left>&nbsp;&nbsp;<B><U></U></B>This function makes it possible to decrease or increase the reading rate of the data and thus to make it possible to decrease the size of the files. In the example out of Assembler the sampling rate is 4000 Hz. PolySnd v2.0 is able to go up to 8192 Hz. Data WAV can be produced only by the PolySnd Converti software provided in another pack.</P> <P align=left>&nbsp;</P> <P align=left><B><FONT color=#006600><A name=GrayPolysnd></A></FONT></B><B><FONT color=#006600>USE_GRAY_WITH_POLYSND</FONT></B></P> <P align=left>&nbsp;&nbsp;<B><FONT color=#006600></FONT></B>The purpose of this definition can be used out of C only under TIGCC, it is to make function correctly PolySnd v2.0 with the grayscales of TIGCC.<BR> This definition must be right before <B><FONT color=#ff0000>GrayOn ().</FONT></B><BR> <B><FONT color=#ff0000></FONT></B>It is not assured that this definition functions in the future ones poured TIGCC in this case you must know that the routine of management of the grayscales should not change the auto Int 5 at the time of its passage, if it is not the case you note a deceleration and a rather serious sound of PolySnd v2.0, or all other behaviors odd, it is for that which should be configured correctly the masks of interruptions of the interruptions that you use.</P> <P align=left>&nbsp;</P> <P align=left><I><FONT face="Comic Sans MS"><B><A name=consommation></A></B></FONT></I><I><FONT face="Comic Sans MS"><B>8.</B></FONT></I><U><I><FONT face="Comic Sans MS"> Points on the consumption of resources with PolySnd v2.0.</FONT></I></U></P> <P align=left>&nbsp;&nbsp;<U><I><FONT face="Comic Sans MS"></FONT></I></U>According to the different mode of reading of data, the data itself or the configuration of PolySnd v2.0 (Mono or stereo), the consumption of resources CPU is variable and can be high or very very weak. If you exploit a music in stereo mode 2 channels which comprises a rather high tempo and durations of notes rather weak, consumption CPU can go up up to 15% with only PolySnd v2.0. If you play in MONO mode a music you will perderez approximately 5% of resources CPU to the maximum. According to the mode you can lose only 2% of the resources or more, consequently it is not assured that in a program PolySnd v2.0 slows down this one more or less. This is why you must think well of the incorporation of the sound in your program or play and avoid to the maximum playing of the musics on 2 channels directly in a play asking many resources CPU Get rather musics on 2 channels in menus... </P> <P align=left>&nbsp;</P> <P align=left><I><FONT face="Comic Sans MS"><B><A name=genlib></A></B></FONT></I><I><FONT face="Comic Sans MS"><B>9.</B></FONT></I><U><I><FONT face="Comic Sans MS"> To use PolySnd v2.0 with Genlib.</FONT></I></U></P> <P align=left>&nbsp;&nbsp;<U><I><FONT face="Comic Sans MS"></FONT></I></U>To use Genlib with PolySnd v2.0 correctly you must first of all initialize the Genlib library then to intercept the interruption n°5 of Genlib thanks to the address 0x74. Once this operation carried out it remains you to initialize PolySnd v2.0, to create an interruption with the function Interrupt5 de PolySnd v2.0, in this interruption executer the interruption of Genlib.</P> <P align=left><U><FONT color=#ff0000><B></B></FONT></U><U><FONT color=#ff0000><B>Caution</B></FONT></U>: <FONT color=#ff0000>The interruption of PolySnd v2.0 turns to 5000 Hz and that of Genlib with 90 Hz, consequently you must create a function in the interruption of PolySnd v2.0 capable of executer the every 90 Hz the interruption of Genlib.</FONT></P> <P align=left><U><I></I></U><FONT color=#ff0000></FONT><U><I>In ASM:</I></U></P> <DIV align=left> <P align=left><U><I></I></U>jsr &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;genlib::init &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;Initialise Genlib <BR>move.l &nbsp;$74, GenlibInt &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;Sauvegarde the auto int n°5 of Genlib in GenlibInt<BR>jsr &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;polysnd2::EnableSound&nbsp;&nbsp;&nbsp;&nbsp;;Initialise Port I/O<BR>jsr &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;polysnd2::InstallSound&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;Initialise PolySnd, attention: Not to forget not at the end to restore PolySnd and Genlib </P> <P align=left>lea &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;myint5(PC), a0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;Interruption of PolySnd v2.0<BR>jsr&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;polysnd2::Interrupt5<BR> ... ;votre code<BR> rts </P> <P align=left>myint5:<BR>addi.l &nbsp;#590,counter &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;90/5000*32768<BR>cmpi &nbsp;&nbsp;#32473,counter &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;32768-590/2<BR>corn &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;execute_genblib_interrupt&nbsp;&nbsp;&nbsp;;Si 32473 is smaller or equal to counter then executer interruption of genlib<BR>rte&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;Fin of the interruption of PolySnd</P> <P align=left>execute_genlib_interrupt:<BR>undergone &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#32768,counter&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:Soustrait 32768 with counter<BR>move.l GenlibInt(PC), -(a7)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;Execute interruption of Genlib<BR>rts</P></DIV> <P align=left><I><U></U></I><I><U>Out of C:</U></I></P> <DIV align=left><PRE align="left"><I><U></U></I>INT_HANDLER GenlibInt = NULL; volatile unsigned long counter=0 //5000 Hz DEFINE_INT_HANDLER (myint5) { counter+=590; //90/5000*32768 if (counter&gt;32473) //32768-590/2 { counter-=32768; ExecuteHandler(GenlibInt); } } void _main (void) { counter=0; gl_init (); GenlibInt=GetIntVec(AUTO_INT_5); pSnd_EnableSound (); pSnd_InstallSound (); pSnd_Interrupt5(myint5); ... &nbsp;//Votre code }</PRE> <P align=left><B><FONT color=#ff0000>Do not forget to restore correctly Genlib and PolySnd v2.0 like changing at the beginning auto int n°1 and 2 for PolySnd v2.0.</FONT></B></P> </DIV> <P></P> <P align=left>&nbsp;</P> <P align=left><I><FONT face="Comic Sans MS"><B><A name=durees></A></B></FONT></I><B><FONT color=#ff0000></FONT></B><I><FONT face="Comic Sans MS"><B>10.</B></FONT></I><U><I><FONT face="Comic Sans MS"> Table of the durations.</FONT></I></U><BR></P> <P align=left>&nbsp;&nbsp;<U><I><FONT face="Comic Sans MS"></FONT></I></U>PolySnd v2.0 is able to exploit any note 10 octaves, the octaves are noted from 0 to 9. The list of the notes and the durations is not exhaustive, it is possible to supplement it according to your criteria. </P> <P align=left>A note is preceded by an indent then followed name of the note, then its type (flat or sharp) and finally the number of the octave. For <I><B>a d0 of octave 5</B></I> you will note: <I><B>_ dod4</B></I>.</P> <P align=left>A pause will be noted <I><B>pause</B></I> or <I><B>0</B></I>.</P> <P align=left>Here the table of the durations, the reference of PolySnd v2.0 is the black one with one duration of 32 cycles of tempo. 32 cycles is equivalent to 1 time.</P> <DIV align=left> <TABLE height=374 width="46%" align=center border=1> <TBODY> <TR> <TD width=21></TD> <TD width="32%"> <DIV align=center><B><I><U></U></I></B><B><I><U>Type</U></I></B></DIV></TD> <TD width="35%"> <DIV align=center><B><I><U>Syntax</U></I></B></DIV></TD> <TD width="33%"> <DIV align=center><B><I><U>Duration</U></I></B></DIV></TD></TR> <TR> <TD></TD> <TD width="32%"><FONT color=#ff0000></FONT><B><I><U></U></I></B><FONT color=#ff0000>Round</FONT></TD> <TD width="35%"><B></B><FONT color=#ff0000></FONT><B>ronde</B></TD> <TD width="33%"><B></B>4 times</TD></TR> <TR> <TD></TD> <TD width="32%"><FONT color=#ff0000></FONT><FONT color=#ff0000>White</FONT></TD> <TD width="35%"><B></B><FONT color=#ff0000></FONT><B>blanche</B></TD> <TD width="33%"><B></B>2 times</TD></TR> <TR> <TD></TD> <TD width="32%"><FONT color=#ff0000></FONT><FONT color=#ff0000>White pointed</FONT></TD> <TD width="35%"><B></B><FONT color=#ff0000></FONT><B>blanche_pointee</B></TD> <TD width="33%"><B></B>2+ 1/2 times</TD></TR> <TR> <TD></TD> <TD width="32%"><FONT color=#ff0000></FONT><FONT color=#ff0000>Black pointed</FONT></TD> <TD width="35%"><B></B><FONT color=#ff0000></FONT><B>noire_pointee</B></TD> <TD width="33%"><B></B>1+1/2 times</TD></TR> <TR> <TD></TD> <TD width="32%"><FONT color=#ff0000></FONT><FONT color=#ff0000>Black</FONT></TD> <TD width="35%"><B></B><FONT color=#ff0000></FONT><B>noire</B></TD> <TD width="33%"><B></B>1 time</TD></TR> <TR> <TD></TD> <TD width="32%"><FONT color=#ff0000></FONT><FONT color=#ff0000>Pointed eighth note</FONT></TD> <TD width="35%"><B></B><FONT color=#ff0000></FONT><B>croche_pointee</B></TD> <TD width="33%"><B></B>1/2+1/4 times</TD></TR> <TR> <TD></TD> <TD width="32%"><FONT color=#ff0000></FONT><FONT color=#ff0000>Eighth note</FONT></TD> <TD width="35%"><B></B><FONT color=#ff0000></FONT><B>croche</B></TD> <TD width="33%"><B></B>1/2 times</TD></TR> <TR> <TD></TD> <TD width="32%"><FONT color=#ff0000></FONT><FONT color=#ff0000>Double eighth note</FONT></TD> <TD width="35%"><B></B><FONT color=#ff0000></FONT><B>double_croche</B></TD> <TD width="33%"><B></B>1/4 times</TD></TR> <TR> <TD></TD> <TD width="32%"><FONT color=#ff0000></FONT><FONT color=#ff0000>Thirty-second note</FONT></TD> <TD width="35%"><B></B><FONT color=#ff0000></FONT><B>triple_croche</B></TD> <TD width="33%"><B></B>1/8 times</TD></TR> <TR> <TD></TD> <TD width="32%"><FONT color=#ff0000></FONT><FONT color=#ff0000>Quadruple eighth note</FONT></TD> <TD width="35%"><B></B><FONT color=#ff0000></FONT><B>quadruple_croche</B></TD> <TD width="33%"><B></B>1/16 times</TD></TR> <TR> <TD></TD> <TD width="32%"><FONT color=#ff0000></FONT><FONT color=#ff0000>Sigh</FONT></TD> <TD width="35%"><B></B><FONT color=#ff0000></FONT><B>soupir</B></TD> <TD width="33%"><B></B>1 time</TD></TR> <TR> <TD></TD> <TD width="32%"><FONT color=#ff0000></FONT><FONT color=#ff0000>Pointed sigh</FONT></TD> <TD width="35%"><B></B><FONT color=#ff0000></FONT><B>soupir_pointe</B></TD> <TD width="33%"><B></B>1+1/2 times</TD></TR></TBODY></TABLE> <P align=center><B></B><B>There are abbreviations, look at the file<FONT color=#006600> polysnd2.h.</FONT></B><BR></P></DIV> <P align=left> </P> <P align=left><I><FONT face="Comic Sans MS"><B><A name=ameliorer_son></A></B></FONT></I><B><FONT color=#006600></FONT></B><I><FONT face="Comic Sans MS"><B>11.</B></FONT></I><U><I><FONT face="Comic Sans MS"> To improve quality of the sound.</FONT></I></U></P> <P align=left>&nbsp;&nbsp;<U><I><FONT face="Comic Sans MS"></FONT></I></U>It is possible to improve quality of the sound by manufacturing <U>a low master key</U> on each channel. You must have 2 condensers of 47 PF and 2 resistances of 470 kohms<BR></P> <P align=center><IMG height=153 src="pictures/image11.gif" width=330></P> <P align=center>This low master key be to transform the waves in the form of crenels into sinusoidal waves.</P> <P align=left>&nbsp;</P> <P align=left><I><FONT face="Comic Sans MS"><B><A name=contact></A></B></FONT></I><I><FONT face="Comic Sans MS"><B>12.</B></FONT></I><U><I><FONT face="Comic Sans MS"> To contact me.</FONT></I></U></P> <P align=left>&nbsp;&nbsp;<U><I><FONT face="Comic Sans MS"></FONT></I></U>Do not hesitate to contact me for all suggestions, critical, report/ratio of bugs or quite simply to send your musical creations or any other program using to me PolySnd v2.0. <A href="mailto:geoffrey.anneheim@wanadoo.fr">geoffrey.anneheim@wanadoo.fr</A></P> <P align=left>&nbsp;</P> <P align=left><B><FONT color=#ff0000 size=5><U></U></FONT></B><A href="mailto:geoffrey.anneheim@wanadoo.fr"></A><B><FONT color=#ff0000 size=5><U>Thanks:</U></FONT></B></P> <P align=left><I><U></U></I><B><FONT color=#ff0000 size=5><U></U></FONT></B><I><U>Florian Drevet</U></I> for his superb <B><FONT color=#0000ff>Zguide</FONT></B> which enabled me to learn the assembler very easily</P> <P align=left><I><U></U></I><I><U>Xavier Vassor, Julien Muchembled, Zeljko Juric, Kevin Kofler, Sebastian Reichelt, Jean Canazzi, Niklas Brunlid, Philipp Winkler</U></I> for compiler<B><FONT color=#0000ff> TIGCC SDK</FONT></B> and the very complete help file. Particularly <U><I><B>Kevin Kofler </B></I></U>who helped me in the realization of this library.</P> <P align=left><I><U></U></I><I><U>Vertyos alias bob64, Kevin Kofler, MacInToc, EvaSDK, jackiechan, neuron, Uther Lightbringer, Squale92, BiHi, XDanger, Ximoon, fabedal, the Nile, ExtendeD, Godzil, squalyl and Brunni</U></I> for their assistances, criticisms and suggestions. Do not hesitate to make turns over: <A href="http://www.yaronet.com/">yAronet.com</A></P> <P align=left><A href="http://www.yaronet.com/"></A>Large thank you with <U><I>Jérémie Luissiez (Cheap)</I></U> and <U><I>Paul Froissart (Pollux)</I></U> for the routine of waveàsm.</P> <P align=left><I><U></U></I><I><U>MasterSam</U></I> for its example Only For You. (good an example for PolySnd Player).<BR><U></U><U>Its Web site</U> : <A href="http://perso.wanadoo.fr/mastersam.rc">http://perso.wanadoo.fr/mastersam.rc</A></P> <P align=left><I><U></U></I><A href="http://perso.wanadoo.fr/mastersam.rc"></A><I><U>Raphael Domenge</U></I> to have contributed to PolySnd v2.0.</P> <P align=left><I><U></U></I><I><U>Brunni</U> </I>the author of PolySnd Converti, WAV converted for PolySnd and well faitor of many improvements... </P> <P align=left>PolySnd v2.0 was tested and developed on Ti-92 more, HW2 ROM: 2.05 and 2.08. It was tested on AMS 2.05, 2.08 and 2.09 like on Pedrom v0.76. Grand thank you in <U><I>Patrick Pelissier (PpHd)</I></U>.</P> <P align=left>Thank you in <I><U>Malcolm Smith (TRgenius)</U></I> for the Avoid example and its assistance.</P> <P align=left>And I do not forget <U><I>Iros</I></U>, without him I would not have to adapt PolySnd for the HW1 more.</P> <P align=left><B></B><B>I as well do not forget other people who helped me to carry out this library like my bêtas testers. ;o)</B></P> <P align=left><BR><FONT size=5><I><FONT color=#ff0000><B><U></U></B></FONT></I></FONT><B></B><FONT size=5><I><FONT color=#ff0000><B><U>Software and tools for PolySnd v2.0:</U></B></FONT></I></FONT></P> <P align=left><B><FONT color=#0000ff size=4></FONT></B><FONT size=5><I><FONT color=#ff0000><B><U></U></B></FONT></I></FONT><B><FONT color=#0000ff size=4>PolySnd Converter MIDI:</FONT></B> Converter MIDI in format PolySnd v2.0, it makes it possible to obtain data out of C, ASM or for PolySnd Player. </P> <P align=left><FONT color=#0000ff size=4><B>PolySnd Converti </B></FONT> : Converter WAV in data 1 bit for PolySnd v2.0, it makes it possible to convert a WAV into C or ASM.</P> <P align=left><B><FONT color=#0000ff size=4></FONT></B><B><FONT color=#0000ff size=4>PolySnd Player</FONT></B> : Player of musics, the musics take little place. It is able to return a multitude of information on the music in progress.</P> <P align=left>&nbsp;</P> <P align=left><B><FONT color=#ff0000 size=4><U></U></FONT></B><B><FONT color=#ff0000 size=4><U>Can be that I would have time to develop his tools. </U></FONT></B></P> <P align=left><FONT color=#0000ff size=4><B></B></FONT><B><FONT color=#ff0000 size=4><U></U></FONT></B><FONT color=#0000ff size=4><B>' PolySnd Kit To program BASIC</B></FONT>': Carry out your compositions in Ti-BASIC.</P> <P align=left><B><FONT color=#0000ff size=4></FONT></B><B><FONT color=#0000ff size=4>' PolySnd Editor' Partition</FONT></B>: Carry out your musics notes with notes with this editors.</P> <P align=left><BR><I><FONT color=#ff0000 size=3><B></B></FONT></I><I><FONT color=#ff0000 size=3><B>Remain more than to make you programs with PolySnd v2.0&amp;:o)</B></FONT></I></P> <P align=left><I><FONT color=#ff0000 size=3><B></B></FONT></I>Visit <A href="http://www.ticalc.org/">http://www.ticalc.org/</A> for find its software, kernel&amp;<BR>Visit my site dedicated to the TI68K and my projects: <A href="http://perso.wanadoo.fr/tisofts">TISofts</A></P> <P align=left><I><B><U></U></B></I><A href="http://perso.wanadoo.fr/tisofts"></A><I><B><U>To contact me:</U> </B></I><A href="mailto:geoffrey.anneheim@wanadoo.fr">Geoffrey ANNEHEIM</A></P> <P align=left>&nbsp;</P> <P align=right><FONT size=2><I><FONT face="Georgia, Times New Roman, Times, serif"></FONT></I></FONT><A href="mailto:geoffrey.anneheim@wanadoo.fr"></A><FONT size=2><I><FONT face="Georgia, Times New Roman, Times, serif">Copyright 2003 by Geoffrey ANNEHEIM</FONT></I></FONT></P></DIV><FONT size=2><I><FONT face="Georgia, Times New Roman, Times, serif"></FONT></I></FONT></BODY></HTML>