p0TP›››››› p0TP ›››››› Several years ago, I bought MIDI MUSIC SYSTEM (MMS) from›› Hybrid Arts, to complement the other Midi software I use on›› our ATARI 800 and 520ST. Included with MMS is a Basic program›› to convert ADVANCED MUSIC SYSTEM (AMS) files into MMS format.›› One reason I bought MMS was that I have a large number of›› very good AMS files and I wanted to convert them and hear›› them through our synthesizer. Unfortunately, several of my›› better files were too big for the converter program to›› handle. I decided to write my own converter program, and›› chose Action! since it would create a smaller and faster›› program.›››››› I pulled apart the original Basic program, and kept only›› the AMS II to MMS portion (the basic program could do AMS I›› to MMS and AMS I to AMS II as well). By writing this program,›› I learned a fair bit about the format of the files used in›› both AMS II and MMS, plus I learned a bit more about›› programming in Action!›››››› You will notice a rather large table in the program, called›› AMSTEMPO. The original Basic program used a rather complex›› formula using floating point numbers to convert the AMS II›››››››››››››› tempo to the equivalent MMS tempo. I do not have the Action!›› Toolkit package which adds floating point support, so I had›› to find an alternate method of doing the conversion. I built›› the table which maps the two tempo values as follows. I›› search the table for an entry which is less than or equal to›› the AMS II tempo. When one is found, the subscript into the›› table for that value is the equivalent MMS tempo. For›› example, if the AMS II tempo was 4171, the appropriate entry›› in the table is in the entry subscripted by 16 (Action!›› arrays start with subscript 0, so the 17'th entry (4171) is›› at subscript location 16), so the equivalent MMS tempo is 16.›››››› Running AMS2MMS is quite simple. After loading it, you are›› presented with the selection screen. You can choose to›› convert a file by pressing 1, or quit execution by pressing›› 2. Having selected to convert a file, you are prompted for›› the file name. If you do not specify the device, the default›› of drive 1 (D1:) will be added to the name you supply. You›› are then prompted to enter the source disk. At this point,›› the original file will be read. You will be prompted for the›› MMS file name you want to use. There is no need to supply the›› file extender, since it will be set to .MUS for you. You will›› then be prompted to insert the output disk. The converted›› file will then be written. The output process will not be›› extremely fast, but a lot of processing is going on as the›› file is being converted and written. Believe me, it is MUCH›››››››››››››› faster than the original Basic program. If the program cannot›› accurately convert the duration of a note, it so informs you,›› telling you the voice and measure where the problem occurred.›› Be sure to go back and fix the problem with MMS later, or the›› voices in the music file could go out of synch when played.›››››› I was able to use this program on all of my AMS II files,›› but there was one problem. It did not support the dynamics›› (volume of the notes --- ppp (quiet) to FFF (loud)) that each›› note had in AMS II. I therefore decided to add this feature.›› I put in a table which contains the equivalent velocities for›› the 8 different AMS II dynamics I support (ppp to FFF). These›› work fine on our Roland, but might not on your synthesizer if›› it does not support all the possible velocity values between›› 0 and 127. You should check into the velocity capabilities of›› your synthesizer, and change the table accordingly. The table›› is called MIDIVEL; update the source to make the changes›› permanent, or override the defaults at startup time (you will›› be prompted for the appropriate velocity values - enter a›› number or just hit return to accept the default). Support of›› velocity values makes the MMS files somewhat bigger. This›› could mean that some very large AMS files might convert but›› be too large to fit into MMS.›››››› The two versions of my program are called AMS2MMS and›››››››››››››› AMS2MMSV (V for Velocity).›››››› AMS2MMS and AMS2MMSV represented my most ambitious projects›› in Action! at the time. If the programs seem a bit cluttered,›› it is because my brain naturally works that way, plus I was›› converting a Basic program which was not written in a›› structured form in the first place. Even though they are not›› elegant, they do at least work. Writing them was worth the›› effort. Although the music files sounded quite good through›› AMS II, they sound much better through the synthesizer.››››››››››››››››››››››››››››››››››››››››