Guest User

play.bat

a guest
Aug 31st, 2022
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 4.07 KB | Source Code | 0 0
  1. @echo off
  2. mode 87, 36
  3. setlocal EnableDelayedExpansion
  4. call :setcolor
  5. color !finalcolor!
  6. cls
  7. echo.
  8. echo. Microsoft Clip Organizer MIDIs                      Press any key to continue . . .
  9. echo. Initializing...
  10. echo.
  11. echo.
  12. echo.
  13. echo.
  14. echo.
  15. echo.
  16. echo.
  17. echo. Microsoft Clip Organizer was a clip art organizing software, which allowed users to
  18. echo. find drawings, photographs, sounds, videos, and other media clips to include in
  19. echo. presentations, publications, and other Office documents. It came with a variety of
  20. echo. stock media clips and offered more selection on the Microsoft Office Online website.
  21. echo. ^(source: https://en.wikipedia.org/wiki/Microsoft_Office_shared_tools#Clip_Organizer^)
  22. echo.
  23. echo. Among these stock media clips, were several MIDI files, which are being played in
  24. echo. this video. I used VLC Media Player and FluidSynth with a Microsoft GS Wavetable
  25. echo. Synth soundfont to convert these into wave files, which I am playing with a simple
  26. echo. batch script.
  27. echo.
  28. bg locate 1 85
  29. ping localhost -n 5 >nul
  30. set /a songcount=0
  31. for /f "delims=" %%a in ('dir /b wave') do set /a songcount+=1
  32. set /a i=1
  33. for /f "delims=" %%a in ('dir /o:s /b wave') do (
  34.     call :setcolor
  35.     color !finalcolor!
  36.     cls
  37.     set "songname=%%a"
  38.     echo.
  39.     echo. Microsoft Clip Organizer MIDIs                      Press any key to continue . . .
  40.     echo. ^(!i!/!songcount!^)
  41.     echo.
  42.     echo.
  43.     echo.
  44.     echo. Playing: !songname:.wav=.mid!
  45.     echo.
  46.     echo.
  47.     echo.
  48.     echo. Microsoft Clip Organizer was a clip art organizing software, which allowed users to
  49.     echo. find drawings, photographs, sounds, videos, and other media clips to include in
  50.     echo. presentations, publications, and other Office documents. It came with a variety of
  51.     echo. stock media clips and offered more selection on the Microsoft Office Online website.
  52.     echo. ^(source: https://en.wikipedia.org/wiki/Microsoft_Office_shared_tools#Clip_Organizer^)
  53.     echo.
  54.     echo. Among these stock media clips, were several MIDI files, which are being played in
  55.     echo. this video. I used VLC Media Player and FluidSynth with a Microsoft GS Wavetable
  56.     echo. Synth soundfont to convert these into wave files, which I am playing with a simple
  57.     echo. batch script.
  58.     echo.
  59.     bg locate 1 85
  60.     call :playsound %%a
  61.     set /a i+=1
  62. )
  63. cls
  64. echo.
  65. echo. Microsoft Clip Organizer MIDIs                      Press any key to continue . . .
  66. echo.
  67. echo.
  68. echo.
  69. echo                            End of playlist
  70. echo.                                   Thank you for watching^^!
  71. echo.
  72. echo.
  73. echo.
  74. echo.
  75. echo. Microsoft Clip Organizer was a clip art organizing software, which allowed users to
  76. echo. find drawings, photographs, sounds, videos, and other media clips to include in
  77. echo. presentations, publications, and other Office documents. It came with a variety of
  78. echo. stock media clips and offered more selection on the Microsoft Office Online website.
  79. echo. ^(source: https://en.wikipedia.org/wiki/Microsoft_Office_shared_tools#Clip_Organizer^)
  80. echo.
  81. echo. Among these stock media clips, were several MIDI files, which are being played in
  82. echo. this video. I used VLC Media Player and FluidSynth with a Microsoft GS Wavetable
  83. echo. Synth soundfont to convert these into wave files, which I am playing with a simple
  84. echo. batch script.
  85. echo.
  86. bg locate 1 85
  87. ping localhost -n 5 >nul
  88. endlocal
  89. exit/b
  90.  
  91. :setcolor
  92.     set /a colorname=%RANDOM% * 10 / 32768
  93.     set /a colorname2=%RANDOM% * 6 / 32768
  94.     if "!colorname2!"=="0" set colorname2=a
  95.     if "!colorname2!"=="1" set colorname2=b
  96.     if "!colorname2!"=="2" set colorname2=f
  97.     if "!colorname2!"=="3" set colorname2=f
  98.     if "!colorname2!"=="4" set colorname2=e
  99.     if "!colorname2!"=="5" set colorname2=f
  100.     set "finalcolor=!colorname!"
  101.     if "!colorname!"=="7" (
  102.         set "finalcolor=!finalcolor!0"
  103.     ) else if "!colorname!"=="!colorname2!" (
  104.         goto setcolor
  105.     ) else (
  106.         set "finalcolor=!finalcolor!!colorname2!"
  107.     )
  108.     exit /b
  109.  
  110.  
  111. :playsound
  112.     PowerShell -c (New-Object Media.SoundPlayer 'D:\Minu muusika\Microsoft Clip Organizer\MIDI\gm\wave\%*').PlaySync() 2>nul >nul
  113.     if not "!ERRORLEVEL!"=="0" goto playsound
  114.     exit /b
Advertisement
Add Comment
Please, Sign In to add comment