0,0 → 1,247 |
MIDAMP for Menuet v1.0 July 29, 2005 |
Written in pure assembler by Ivushkin Andrey aka Willow |
|
Monophonic MIDI player |
|
Vivat assembler et MENUETOS! |
MenuetOS still has a poor sound capabilities. Drivers are written for a few |
soundcard models. Till recently I considered MEOS to be as voiceless as an |
oyster. But then an alternative appeared; dear VaStaNi wrote kernel support of |
PC speaker. Old good times of Pascal and MS-DOS came to me again. About 5 years |
ago I wrote a Pascal application that parsed and played a note string in QBasic |
syntax. |
|
Now MeOS gets the simplest, speaker-driven sound scheme in Mario79's distro, |
but the first melody in Menuet I heard was from the my program MIDAMP in |
December, 2004. On technical reasons its release takes place only now. |
|
So, MIDAMP is the simplest single-voiced MIDI player. It cannot do much though |
it resembles the famous WinAmp. All it can do is to beep MIDI files. |
There are no equalizer, balance and fader, and they won't appear. Moreover, |
I may guarantee the correct sound only for files having a single track, one |
instrument channel and within technological range of notes :-( |
|
######### |
System requirements: |
1. Kernel having following function implemented: |
55/55 - PC speaker interface (critical!) |
67 - window shading; |
66/3 - for extended mouse selection in playlist. |
2. SYSXTREE version not below 52 - opening files and directories (critical!) |
3. RAM amount for application - about 150 Kbytes. |
######### |
|
MIDAMP still uses a single playlist - /HD/1/PLAYLIST.TXT by default. Persons |
interested can change the PLAYLIST_PATH constant value in MIDAMP.ASM. Playlist |
is a simple text file having filenames to be played in each line. It is NOT |
RECOMMENDED to edit the playlist by hand - bugs may appear while loading MIDAMP. |
|
When started, MIDAMP creates a new thread whose job is actually playing. Early |
versions had main thread that processed everything, therefore unpleasant sound |
delays appeared when managing the playlist. Threads communicate intensively |
through IPC, although I think it's an excess in such a case. But it works not |
bad. |
|
MIDAMP is able to shade to window header by pressing the proper button. I tried |
to perform complete minimization through mcall 18,10 (new feature of Kolibri4), |
but ran into the problem while restoring of window when PANEL button pressed. |
That function possibly does not support windows type II ? |
|
Hotkeys - almost like in WinAmp: |
|
Del - delete the selected tracks; |
z - previous track; |
x, Enter, double click - play selected file; |
c, Space - pause; |
v - stop; |
b - next track; |
|
Esc - close the program; |
m - sound on/off; |
PgUp, PgDn - swap 2 tracks (not completed!); |
BackSpace - rewind track; |
Home/End - increase/decrease melody notes offset and play track from beginning |
(it is shown near 'tone>' text). |
|
In the case of polyphonic MIDI, if an intelligent melody isn't heard, you may |
try to choose another track 'trk' or instrument channel 'chnl', pressing '[' or |
']' accordingly and then a number key from '0' to '9'. The file will be played |
from the beginning. To reset track and channel to the default value, press '\' . |
|
Explaining some interface buttons: |
Shuffle toggles random playback on/off. Repeat - current track will loop again |
and again. An icon in the top left corner outputs a brief info about the |
program to the Debug Board. Clicking the time toggles its view - from beginning |
or from the end of file. |
|
Mouse click on playlist when holding Shift or Ctrl button works like in WinAmp. |
|
Remarks to bottom buttons: |
'Add URL' not implemented, on clear reasons; |
'Add Dir' - specify any file in the directory desired. *.MID and *.KAR files of |
that directory will be added to the list; |
'Misc' submenu is not implemented; |
'New List' does nothing. MIDAMP still uses a fixed playlist. |
|
One of the following flags may precede a filename in the commandline: |
|
W - to load a file and wait (default); |
P - to play a file; |
H - to start shaded and close after playback. |
|
To-Do list: |
|
1. Increase playlist size (40 items for now). |
2. Add dialog to select tracks of polyphonic melodies including analysis on |
notes. |
3. Reading text in Karaoke files. |
4. Playlist select. |
5. Note editor, as in Ringtone Editor. |
6. Add comments to source. |
7. Correct bugs to be found. |
|
Special thanks to: |
|
VaStaNi - there would be no need of MIDAMP w/o his code |
Standard MIDI Files 0.06 March 1, 1988 |
MIDI 1.0 Specification |
General MIDI Level Spec |
MIDI SAMPLE DUMP STANDARD |
Standard MIDI File Format by Dustin Caldwell |
Files format of MIDI |
The USENET MIDI Primer by Bob McQueer |
Pavlushin Evgeny for his splendid SYSXTREE (DLGS.INC is the opendialog macro |
of ASCL library edited to meet MIDAMP specific needs) |
|
Send the wishes and bug reports to wil_low@hotbox.ru or to the meos.sysbin.com |
forum. |
|
See you later! |
|
|
**************************************** |
**************************************** |
|
MIDAMP ¤«ï Menuet v1.0 29 ¨î«ï 2005 £. |
¯¨á ç¨á⮬ áᥬ¡«¥à¥ ¢ãèª¨ë¬ ¤à¥¥¬ (Willow) |
|
®®ä®¨ç¥áª¨© MIDI-¯«¥¥à |
|
Vivat assembler et MENUETOS! |
® §¢ãª®¬ ¢ MenuetOS â㣮 ¤® á¨å ¯®à. à ©¢¥à ¯¨á ë ¤«ï ®£à ¨ç¥®£® ªà㣠|
§¢ãª®¢ëå ª àâ. ® ¥¤ ¢¥£® ¢à¥¬¥¨ MeOS ¡ë« ¤«ï ¬¥ï ¥¬ , ª ª àë¡ . ® ¯®â®¬ |
¯®ï¢¨« áì «ìâ¥à ⨢ - 㢠¦ ¥¬ë© VaStaNi ¯¨á « ¯®¤¤¥à¦ªã PC ᯨª¥à . ¥ |
áà §ã ¢á¯®¬¨«¨áì áâ àë¥ ¤®¡àë¥ ¢à¥¬¥ ᪠«ï ¨ MS-DOS. ¥â 5 § ¤ ¯¨á « |
᪠«¥ ¯à®£à ¬¬ªã, ª®â®à ï ¯ àᨫ , ¯®â®¬ ¢®á¯à®¨§¢®¤¨« áâப㠮⠢ |
á¨â ªá¨á¥ QBasic. |
|
¥©ç á MeOS ¢ ¤¨áâਡã⨢¥ Mario79 ®¡à¥â ¥â ¯à®á⥩èãî §¢ãª®¢ãî á奬ã á ¯®¬®éìî |
ᯨª¥à , ® ¯¥à¢ãî ¬¥«®¤¨î ¢ Menuet ï ãá«ëè « ¢á¥-â ª¨ ®â ᢮¥© ¯à®£à ¬¬ë - |
MIDAMP ¢ ¤¥ª ¡à¥ 2004 £®¤ . ® â¥å¨ç¥áª¨¬ ¯à¨ç¨ ¬ ¥¥ ५¨§ ¯à®¨á室¨â ⮫쪮 |
ᥩç á. |
|
â ª, MIDAMP - ¯à®á⥩訩 ®¤®£®«®áë© MIDI-¯à®¨£àë¢ â¥«ì. ¥ ¯à¥â¥¤ã¥â |
¬®£®¥, å®âì ¨ ¯®å®¦ WinAmp. á¥, çâ® ® 㬥¥â, íâ® ¯¨«¨ª âì MIDI-ä ©«ë. |
ª¢ « ©§¥à , ¡ « á ¨ ॣã«ïâ®à £à®¬ª®á⨠¥â ¨ ¥ ¯à¥¤¢¨¤¨âáï. ®«¥¥ ⮣®, |
ª®à४⮥ §¢ãç ¨¥ ¬®£ã £ à â¨à®¢ âì «¨èì ¤«ï ä ©«®¢ á 1 â४®¬, 1 ª «®¬ |
¨áâà㬥⠨ ¢ ¯à¥¤¥« å â¥å®«®£¨ç¥áª®£® ¤¨ ¯ §® ®â :-( |
|
######### |
¨áâ¥¬ë¥ âॡ®¢ ¨ï: |
1. ¤à® á ॠ«¨§ 樥© á«¥¤ãîé¨å á¨á⥬ëå äãªæ¨©: |
55/55 - ¨â¥à䥩á PC ᯨª¥à (¥®¡å®¤¨¬®!); |
67 - ᢮à 稢 ¨¥ ®ª ¢ § £®«®¢®ª; |
66/3 - ¤«ï ०¨¬®¢ ¢ë¤¥«¥¨ï â४®¢ ¬ëèìî. |
2. SYSXTREE ¢¥àᨨ ¥ ¨¦¥ 52 - ®âªàë⨥ ä ©«®¢ ¨ ª â «®£®¢ (¥®¡å®¤¨¬®!) |
3. ¡ê¥¬ ¯ ¬ï⨠¤«ï ¯à®£à ¬¬ë - ®ª®«® 150 ¡. |
######### |
|
®ª çâ® MIDAMP ¨á¯®«ì§ã¥â ¥¤¨áâ¢¥ë© ¯«¥©«¨áâ - ¯® 㬮«ç ¨î |
/HD/1/PLAYLIST.TXT. ¥« î騥 ¬®£ãâ ¨§¬¥¨âì § 票¥ ª®áâ âë PLAYLIST_PATH ¢ |
ä ©«¥ MIDAMP.ASM. «¥©«¨áâ - ®¡ëçë© â¥ªáâ®¢ë© ä ©«, ¢ ª ¦¤®© áâப¥ ª®â®à®£® |
室¨âáï ¨¬ï ä ©« ¤«ï ¢®á¯à®¨§¢¥¤¥¨ï.
£®
¯à ¢¨âì ¢àãçãî - |
¢®§¬®¦ë ¡ £¨ ¯à¨ ¯®á«¥¤ãî饩 § £à㧪¥ ¥£® ¯à¨«®¦¥¨¥¬. |
|
ਠ§ ¯ã᪥ MIDAMP ᮧ¤ ¥â ®¢ë© ¯®â®ª, § ¤ 祩 ª®â®à®£® ï¥âáï ᮡá⢥® |
®§¢ãçª . à ¨å ¢¥àá¨ïå ¢á¥ ¤¥« « £« ¢ë© ¯®â®ª, ¯®í⮬㠢®§¨ª «¨ ¥¯à¨ïâë¥ |
§ ¤¥à¦ª¨ ¢ §¢ãç ¨¨ ¢® ¢à¥¬ï ã¯à ¢«¥¨ï ¯«¥©«¨á⮬. ®â®ª¨ ¨â¥á¨¢® ®¡é îâáï |
¬¥¦¤ã ᮡ®© ç¥à¥§ IPC, å®âï ï ᪫®ïîáì ª ⮬ã, çâ® ¢ ¤ ®¬ á«ãç ¥ íâ® |
¨§«¨è¥á⢮. ® à ¡®â ¥â ¥¯«®å®. |
|
MIDAMP 㬥¥â ᢮à 稢 âìáï ¢ áâப㠧 £®«®¢ª ¦ ⨥¬ ᮮ⢥âáâ¢ãî饩 ª®¯ª¨. |
¯ëâ «áï ᤥ« âì ¯®«®¥ ᢮à 稢 ¨¥ ç¥à¥§ mcall 18,10 (®¢ ï ä¨ç Kolibri4), |
® á⮫ªã«áï á ¯à®¡«¥¬®© ¢®ááâ ®¢«¥¨ï ®ª ¦ ⨥¬ ª®¯ª¨ PANEL. ®§¬®¦®, |
äãªæ¨ï ¥ ¯®¤¤¥à¦¨¢ ¥â ®ª ⨯ II ? |
|
®àï稥 ª« ¢¨è¨ - ¯®ç⨠ª ª ¢ WinAmp: |
|
Del - 㤠«¨âì ¢ë¤¥«¥ë¥ â४¨; |
z - ¯à¥¤ë¤ã騩 â४; |
x, Enter, ¤¢®©®© 饫箪 ä ©«¥ - ¢®á¯à®¨§¢¥¤¥¨¥; |
c, Space - ¯ 㧠; |
v - á⮯; |
b - á«¥¤ãî騩 â४; |
|
Esc - § ªàëâì ¯à®£à ¬¬ã; |
m - ¢ª«îç¨âì/¢ëª«îç¨âì §¢ãª; |
PgUp, PgDn - ¯®¬¥ïâì ¬¥áâ ¬¨ 2 á®á¥¤¨å â४ (¥ § ª®ç¥®!); |
BackSpace - ¯¥à¥¬®âª â४ ¢ ç «®; |
Home/End - 㢥«¨ç¨âì/㬥ìè¨âì â® «ì®áâì ¬¥«®¤¨¨ ¨ ¯à®¨£à âì ¥¥ á ç « |
(®â®¡à ¦ ¥âáï à冷¬ á ¤¯¨áìî 'tone>'). |
|
á«ãç ¥ ¯®«¨ä®¨ç¥áª¨å MIDI, ¥á«¨ ®á¬ëá«¥®© ¬¥«®¤¨¨ ¥ ¯®«ãç ¥âáï, ¬®¦® |
¯®¯à®¡®¢ âì ¢ë¡à âì ¤à㣮© â४ 'trk' ¨«¨ ª « ¨áâà㬥â 'chnl', ¦ ¢ |
ᮮ⢥âá⢥® '[' ¨«¨ ']' ¨ § ⥬ ª« ¢¨èã á ®¬¥à®¬ ®â 0 ¤® 9. ©« ¡ã¤¥â |
¢®á¯à®¨§¢¥¤¥ á á ¬®£® ç « . ¡à®á ¤®à®¦ª¨ ¨ ª « ¢ § 票¥ ¯® 㬮«ç ¨î - |
¦ ⨥¬ '\' . |
|
§ 票¥ ¥ª®â®àëå ª®¯®ª ¨â¥à䥩á : |
Shuffle - á«ãç ©ë© ¯®à冷ª ¯à®¨£àë¢ ¨ï â४®¢. Repeat - ⥪ã騩 â४ ¡ã¤¥â |
¯à®¨£àë¢ âìáï ᮢ ¨ ᮢ . 箪 ¢ «¥¢®¬ ¢¥à奬 㣫㠢뢮¤¨â ªà âªãî |
¨ä®à¬ æ¨î ® ¯à®£à ¬¬¥ ¤®áªã ®â« ¤ª¨. ¥«ç®ª ¢à¥¬¥®© ¬¥âª¥ ¬¥ï¥â |
ᯮᮡ ¥¥ ®â®¡à ¦¥¨ï - á ç « ¨«¨ á ª®æ ä ©« . |
|
¥«ç®ª ¬ëèìî ¯«¥©«¨áâ¥ á ¦ âë¬ Shift ¨«¨ Ctrl à ¡®â ¥â «®£¨ç® WinAmp. |
|
¬¥ç ¨ï ®â®á¨â¥«ì® ª®¯®ª ¢¨§ã: |
'Add URL' ¥ ॠ«¨§®¢ ® ¯® ¯®ïâë¬ ¯à¨ç¨ ¬; |
'Add Dir' - 㪠¦¨â¥ «î¡®© ä ©« ¢ ¦¥« ¥¬®¬ ª â «®£¥. ©«ë *.MID ¨ *.KAR í⮣® |
ª â «®£ ¡ã¤ãâ ¤®¡ ¢«¥ë ¢ ᯨ᮪; |
'Misc' ¯®¤¬¥î ¥ ॠ«¨§®¢ ®; |
'New List' ¨ç¥£® ¥ ¤¥« ¥â. ®ª ¨á¯®«ì§ã¥âáï 䨪á¨à®¢ ë© ¯«¥©«¨áâ. |
|
ª®¬ ¤®© áâப¥ ¯¥à¥¤ ¨¬¥¥¬ ä ©« ¤«ï ¢®á¯à®¨§¢¥¤¥¨ï ¬®¦¥â áâ®ïâì ®¤¨ ¨§ |
ä« £®¢: |
|
W - ¯à®áâ® § £à㧨âì ä ©« (¯® 㬮«ç ¨î); |
P - ¢®á¯à®¨§¢¥áâ¨ ä ©«; |
H - áâ à⮢ âì ᢥàãâë¬ ¢ § £®«®¢®ª, § ªàëâìáï ¯®á«¥ ¢®á¯à®¨§¢¥¤¥¨ï. |
|
â® ¥é¥ 㦮 ᤥ« âì: |
|
1. ¢¥«¨ç¨âì à §¬¥àë ¯«¥©«¨áâ (ᥩç á 40 ¯®§¨æ¨©). |
2. ®¡ ¢¨âì ¤¨ «®£ ¢ë¡®à â४®¢ ¯®«¨ä®¨ç¥áª¨å ¬¥«®¤¨© á ¨å «¨§®¬ ¯® |
«¨ç¨î ®â. |
3. ⥨¥ ⥪áâ ¢ ª à ®ª¥-ä ©« å. |
4. ë¡®à ¯«¥©«¨áâ . |
5. ®âë© à¥¤ ªâ®à, ª ª ¢ Ringtone Editor. |
6. ⪮¬¬¥â¨à®¢ âì ª®¤ (ª ª ¢á¥£¤ , «¥ì). |
7. á¯à ¢¨âì ¡ £¨, ª®â®àë¥, ¥á®¬¥®, ©¤ãâáï ;-) |
|
á®¡ë¥ ¡« £®¤ à®áâ¨: |
|
VaStaNi - ¡¥§ ¥£® ª®¤ ¯¨á ¨¥ MIDAMP ¥ ¨¬¥«® ¡ë á¬ëá« |
Standard MIDI Files 0.06 March 1, 1988 |
MIDI 1.0 Specification |
General MIDI Level Spec |
MIDI SAMPLE DUMP STANDARD |
Standard MIDI File Format by Dustin Caldwell |
®à¬ â ä ©«®¢ MIDI |
The USENET MIDI Primer by Bob McQueer |
¢«îè¨ã
¢£¥¨î § ¥¯à¥¢§®©¤¥ë© SYSXTREE (DLGS.INC - ¯¥à¥à ¡®â ë© á |
ãç¥â®¬ ᯥæ¨ä¨ª¨ MIDAMP'a ¬ ªà®á opendialog ¡¨¡«¨®â¥ª¨ ASCL) |
|
®¦¥« ¨ï ¨ á®®¡é¥¨ï ®¡ ®è¨¡ª å ¯à ¢«ï©â¥ wil_low@hotbox.ru ¨«¨ ä®à㬠|
meos.sysbin.com. |
|
® ®¢ëå ¢áâà¥ç! |