├── .github ├── dependabot.yml └── workflows │ ├── make.sh │ └── make.yml ├── .gitignore ├── .gitmodules ├── license.txt ├── readme.md ├── src ├── aboutform.mfm ├── aboutform.pas ├── aboutform_mfm.pas ├── alsa_mixer.pas ├── captionstrumpract.pas ├── commander.mfm ├── commander.pas ├── commander_mfm.pas ├── config.mfm ├── config.pas ├── config_mfm.pas ├── configlayout.mfm ├── configlayout.pas ├── configlayout_mfm.pas ├── conflang.mfm ├── conflang.pas ├── conflang_mfm.pas ├── dialogfiles.mfm ├── dialogfiles.pas ├── dialogfiles_mfm.pas ├── dockpanel1.mfm ├── dockpanel1.pas ├── dockpanel1_mfm.pas ├── dp.res ├── drums.mfm ├── drums.pas ├── drums_mfm.pas ├── equ │ ├── Acoustic.equ │ ├── Classical.equ │ ├── Dancing.equ │ ├── Flat.equ │ ├── Jazz.equ │ ├── Metal.equ │ ├── Rock.equ │ └── Vocal.equ ├── equalizer.mfm ├── equalizer.pas ├── equalizer_mfm.pas ├── errorform.mfm ├── errorform.pas ├── errorform_mfm.pas ├── filelistform.mfm ├── filelistform.pas ├── filelistform_mfm.pas ├── findmessage.mfm ├── findmessage.pas ├── findmessage_mfm.pas ├── guitars.mfm ├── guitars.pas ├── guitars_mfm.pas ├── imagedancer.mfm ├── imagedancer.pas ├── imagedancer_mfm.pas ├── images │ ├── basstab.png │ ├── guiaretab.png │ ├── noimagetag.png │ ├── noimagetag_anim.png │ ├── piano1oct.png │ └── piano4oct.png ├── infosd.mfm ├── infosd.pas ├── infosd_mfm.pas ├── ini │ └── dummy.txt ├── lang │ ├── strumpract_ar.po │ ├── strumpract_de.po │ ├── strumpract_el.po │ ├── strumpract_empty.po │ ├── strumpract_eo.po │ ├── strumpract_es.po │ ├── strumpract_fr.po │ ├── strumpract_he.po │ ├── strumpract_id.po │ ├── strumpract_it.po │ ├── strumpract_nl.po │ ├── strumpract_pl.po │ ├── strumpract_pt.po │ ├── strumpract_ro.po │ ├── strumpract_ru.po │ ├── strumpract_uk.po │ └── strumpract_zh.po ├── lib │ ├── FreeBSD │ │ ├── aarch64 │ │ │ ├── libmpg123-64.so │ │ │ ├── libportaudio-64.so │ │ │ └── libsndfile-64.so │ │ └── amd64 │ │ │ ├── libmpg123-64.so │ │ │ ├── libportaudio-64.so │ │ │ ├── libsndfile-64.so │ │ │ └── libsoundtouch-64.so │ ├── Linux │ │ ├── 32bit │ │ │ ├── LibMpg123-32.so │ │ │ ├── LibPortaudio-32.so │ │ │ ├── LibSndFile-32.so │ │ │ ├── LibSoundTouch-32.so │ │ │ └── libxmp-32.so │ │ ├── 64bit │ │ │ ├── LibMpg123-64.so │ │ │ ├── LibPortaudio-64.so │ │ │ ├── LibSndFile-64.so │ │ │ ├── LibSndFile-64.so.2 │ │ │ ├── LibSoundTouch-64.so │ │ │ └── libxmp-64.so │ │ ├── aarch64_raspberrypi │ │ │ ├── libmpg123_aarch64.so │ │ │ ├── libportaudio_aarch64.so │ │ │ ├── libsndfile_aarch64.so │ │ │ ├── libsoundtouch_aarch64.so │ │ │ └── libxmp_aarch64.so │ │ └── arm_raspberrypi │ │ │ ├── libmpg123-arm.so │ │ │ ├── libportaudio-arm.so │ │ │ ├── libsndfile-arm.so │ │ │ ├── libsoundtouch-arm.so │ │ │ └── libxmp-arm.so │ ├── Mac │ │ └── 64bit │ │ │ ├── LibMpg123-64.dylib │ │ │ ├── LibPortaudio-64.dylib │ │ │ ├── LibSndfile-64.dylib │ │ │ └── libSoundTouchDLL.dylib │ ├── OpenBSD │ │ └── 64bit │ │ │ ├── LibMpg123-64.so │ │ │ ├── LibPortaudio-64.so │ │ │ ├── LibSndFile-64.so │ │ │ └── libSoundTouchDll-64.so │ └── Windows │ │ ├── 32bit │ │ ├── LibMpg123-32.dll │ │ ├── LibPortaudio-32.dll │ │ ├── LibSndFile-32.dll │ │ ├── LibSoundTouch-32.dll │ │ ├── libgcc_s_dw2-1.dll │ │ └── libxmp-32.dll │ │ └── 64bit │ │ ├── LibMpg123-64.dll │ │ ├── LibPortaudio-64.dll │ │ ├── LibSndFile-64.dll │ │ ├── LibSoundTouch-64.dll │ │ └── libxmp-64.dll ├── linux-install-desktop-icon-StrumPract.sh ├── main.mfm ├── main.pas ├── main_mfm.pas ├── mse_ovoaudiotag.pas ├── mse_ovobasetag.pas ├── mse_ovofile_mp3.pas ├── mse_ovotag_dummy.pas ├── mse_ovotag_id3v2.pas ├── msecolordialog.mfm ├── msecolordialog.pas ├── msecolordialog_mfm.pas ├── msefiledialogx.mfm ├── msefiledialogx.pas ├── msefiledialogx_mfm.pas ├── msememodialog.mfm ├── msememodialog.pas ├── msememodialog_mfm.pas ├── msesigfftgui.pas ├── msesignal.pas ├── msestockobjects.mfm ├── msestockobjects.pas ├── msestockobjects_mfm.pas ├── msewidgets.pas ├── ovocommonfunctions.pas ├── ovofile_dummy.pas ├── ovoid3v1genres.pas ├── ovosong.pas ├── ovotag.inc ├── piano.mfm ├── piano.pas ├── piano_mfm.pas ├── po2arrays.pas ├── potools.mfm ├── potools.pas ├── potools_mfm.pas ├── randomnote.mfm ├── randomnote.pas ├── randomnote_mfm.pas ├── recorder.mfm ├── recorder.pas ├── recorder_mfm.pas ├── songplayer.mfm ├── songplayer.pas ├── songplayer_mfm.pas ├── sound │ ├── bass │ │ ├── Ba1_SOL_G.mp3 │ │ ├── Ba2_RE_D.mp3 │ │ ├── Ba3_LA_A.mp3 │ │ └── Ba4_MI_E.mp3 │ ├── drums │ │ ├── BD.mp3 │ │ ├── HH.mp3 │ │ ├── OH.mp3 │ │ └── SD.mp3 │ ├── guitar │ │ ├── 1_MI_E.mp3 │ │ ├── 2_SI_B.mp3 │ │ ├── 3_SOL_G.mp3 │ │ ├── 4_RE_D.mp3 │ │ ├── 5_LA_A.mp3 │ │ ├── 6_MI_E.mp3 │ │ ├── A7_GUIT.mp3 │ │ ├── A_GUIT.mp3 │ │ ├── Am7_GUIT.mp3 │ │ ├── Am_GUIT.mp3 │ │ ├── B_GUIT.mp3 │ │ ├── Bm_GUIT.mp3 │ │ ├── C_GUIT.mp3 │ │ ├── Cm_GUIT.mp3 │ │ ├── D_GUIT.mp3 │ │ ├── Dm_GUIT.mp3 │ │ ├── E_GUIT.mp3 │ │ ├── Em_GUIT.mp3 │ │ ├── F_GUIT.mp3 │ │ ├── Fm_GUIT.mp3 │ │ ├── G_GUIT.mp3 │ │ └── Gm_GUIT.mp3 │ ├── piano │ │ ├── A_PIANO.mp3 │ │ ├── Am_PIANO.mp3 │ │ ├── B_PIANO.mp3 │ │ ├── Bm_PIANO.mp3 │ │ ├── C_PIANO.mp3 │ │ ├── Cm_PIANO.mp3 │ │ ├── D_PIANO.mp3 │ │ ├── Dm_PIANO.mp3 │ │ ├── E_PIANO.mp3 │ │ ├── Em_PIANO.mp3 │ │ ├── F_PIANO.mp3 │ │ ├── Fm_PIANO.mp3 │ │ ├── G_PIANO.mp3 │ │ └── Gm_PIANO.mp3 │ ├── song │ │ └── test.mp3 │ └── voice │ │ ├── de │ │ ├── 1.mp3 │ │ ├── 2.mp3 │ │ ├── 3.mp3 │ │ ├── 4.mp3 │ │ └── and.mp3 │ │ ├── en │ │ ├── 1.mp3 │ │ ├── 2.mp3 │ │ ├── 3.mp3 │ │ ├── 4.mp3 │ │ └── and.mp3 │ │ ├── es │ │ ├── 1.mp3 │ │ ├── 2.mp3 │ │ ├── 3.mp3 │ │ ├── 4.mp3 │ │ └── and.mp3 │ │ ├── fr │ │ ├── 1.mp3 │ │ ├── 2.mp3 │ │ ├── 3.mp3 │ │ ├── 4.mp3 │ │ └── and.mp3 │ │ ├── it │ │ ├── 1.mp3 │ │ ├── 2.mp3 │ │ ├── 3.mp3 │ │ ├── 4.mp3 │ │ └── and.mp3 │ │ ├── nl │ │ ├── 1.mp3 │ │ ├── 2.mp3 │ │ ├── 3.mp3 │ │ ├── 4.mp3 │ │ └── and.mp3 │ │ └── pt │ │ ├── 1.mp3 │ │ ├── 2.mp3 │ │ ├── 3.mp3 │ │ ├── 4.mp3 │ │ └── and.mp3 ├── spectrum1.mfm ├── spectrum1.pas ├── spectrum1_mfm.pas ├── splash.mfm ├── splash.pas ├── splash_mfm.pas ├── status.mfm ├── status.pas ├── status_mfm.pas ├── strumpract.pas ├── strumpract.prj ├── synthe.mfm ├── synthe.pas ├── synthe_mfm.pas ├── units │ └── dummy.txt ├── uos.pas ├── uos_define.inc ├── uos_flat.pas ├── uos_libsndfile.pas ├── uos_libxmp.pas ├── uos_mpg123.pas ├── uos_mseaudio.pas ├── uos_msesigaudio.pas ├── uos_portaudio.pas ├── uos_soundtouch.pas ├── waveform.mfm ├── waveform.pas ├── waveform_mfm.pas └── win_mixer.pas └── strumpract.png /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | --- 2 | version: 2 3 | updates: 4 | - package-ecosystem: "github-actions" 5 | directory: "/" 6 | schedule: 7 | interval: "monthly" 8 | -------------------------------------------------------------------------------- /.github/workflows/make.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -euo pipefail 3 | if [[ -f '/etc/os-release' ]]; then 4 | source '/etc/os-release' 5 | fi 6 | case ${ID:?} in 7 | debian | ubuntu) sudo bash -c ' 8 | apt-get update; apt-get -y install lazarus 9 | ' >/dev/null ;; 10 | esac 11 | declare -ar OPS=( 12 | -Fuuse/mseide-msegui/lib/common/{*,kernel/linux} 13 | -Fuuse/bgrabitmap/bgrabitmap 14 | -dmse_dynpo 15 | -dclass_bridge 16 | -dBGRABITMAP_USE_MSEGUI 17 | -B 18 | ) 19 | declare -i exitCode=0 20 | while read -r; do 21 | if ! [[ ${REPLY} =~ /use/ ]]; then 22 | mapfile -t < <( 23 | if [[ -f "${REPLY%.*}.pas" ]]; then 24 | if (fpc "${OPS[@]}" -B "${REPLY%.*}.pas"); then 25 | printf 'SUCCES\t\x1b[32m%s\x1b[0m\n' "${REPLY}" >&2 26 | printf 'exitCode:0\n' 27 | else 28 | printf 'ERROR\t\x1b[31m%s\x1b[0m\n' "${REPLY}" >&2 29 | printf 'exitCode:1\n' 30 | fi | 31 | grep --extended-regexp '(Error:|Fatal:|Linking|exitCode)' 32 | fi 33 | ) 34 | if ((${#MAPFILE[@]})) && ((${MAPFILE[-1]##*:})); then 35 | exitCode+=${MAPFILE[-1]##*:} 36 | fi 37 | printf '%s\n' "${MAPFILE[@]}" 38 | fi 39 | done < <(find '.' -type 'f' -name '*.prj') 40 | exit "${exitCode}" 41 | -------------------------------------------------------------------------------- /.github/workflows/make.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: Make 3 | 4 | on: 5 | schedule: 6 | - cron: '0 0 1 * *' 7 | push: 8 | branches: 9 | - "**" 10 | pull_request: 11 | branches: 12 | - master 13 | - main 14 | 15 | concurrency: 16 | group: ${{ github.workflow }}-${{ github.ref }} 17 | cancel-in-progress: true 18 | 19 | jobs: 20 | build: 21 | runs-on: ${{ matrix.os }} 22 | timeout-minutes: 120 23 | strategy: 24 | matrix: 25 | os: 26 | - ubuntu-latest 27 | 28 | steps: 29 | - name: Checkout 30 | uses: actions/checkout@v4 31 | with: 32 | submodules: true 33 | 34 | - name: Build on Linux 35 | if: runner.os == 'Linux' 36 | shell: bash 37 | run: bash .github/workflows/make.sh 38 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | *.ppu 3 | *.dcu 4 | *.~* 5 | *.a 6 | *.bak 7 | *.bak? 8 | *.rst 9 | *.rsj -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "use/bgrabitmap"] 2 | path = use/bgrabitmap 3 | url = git@github.com:bgrabitmap/bgrabitmap.git 4 | [submodule "use/mseide-msegui"] 5 | path = use/mseide-msegui 6 | url = git@github.com:mse-org/mseide-msegui.git 7 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # StrumPract is various tools for musicians. 2 | 3 | Like: 4 | 5 | - Learn to play drums set in 4 lessons and develop your art. 6 | - Practice your other instruments with a editable drums machine. 7 | - Tune your guitar and bass. 8 | - Play audio files and loop it, can be mp3, ogg, wav, flac, mod, it, s3m, xm files. 9 | - Adjust the tempo of the playing song to what you want. 10 | - DJ console for auto-mixing, with 2 players and direct-output of mic. 11 | - Record your ideas-jam. 12 | - Chords randomizer for jamming. 13 | - Image Dancer. 14 | - Tag infos with images. 15 | - Many Layout and Styles. 16 | 17 | There are compiled executable for Linux 32/64, Windows 32/64, FreeBSD 64, MacOS X 18 | and arm-aarch64 Rpi 32/64. =\> https://github.com/fredvs/strumpract/releases/ 19 | 20 | StrumPract was compiled with: FPC 3.2.2: http://www.freepascal.org 21 | 22 | Graphic widgetset: MSEgui 5.10.4: https://github.com/mse-org/mseide-msegui 23 | 24 | Graphic library: BGRABitmap v11.5.8: https://github.com/bgrabitmap/bgrabitmap 25 | 26 | Audio library: uos 1.8.0: https://github.com/fredvs/uos 27 | 28 | 29 | DJ Wave Layout Gold Style: 30 | 31 | ![alt text](https://user-images.githubusercontent.com/3421249/99883934-b2815100-2c2a-11eb-9709-e6eb5748f13a.png) 32 | 33 | DJ Info Layout Carbon Style: 34 | 35 | ![alt text](https://user-images.githubusercontent.com/3421249/123707438-02339500-d86a-11eb-9613-d539e05ae69d.png) 36 | 37 | Jam Layout Silver Style: 38 | 39 | ![alt text](https://user-images.githubusercontent.com/3421249/99883960-de9cd200-2c2a-11eb-943a-55d128e03afa.png) 40 | 41 | Jam Layout Carbon: 42 | 43 | ![alt text](https://user-images.githubusercontent.com/3421249/210138213-9384b9d8-396e-48e9-a781-9fe3036f3827.png) 44 | 45 | All docked: 46 | 47 | ![alt text](https://user-images.githubusercontent.com/3421249/89722588-a3fc8a00-d9eb-11ea-86cb-aba8dad9e2ce.png) 48 | 49 | All tab: 50 | 51 | ![alt text](https://user-images.githubusercontent.com/3421249/89722494-592e4280-d9ea-11ea-8651-78675ba9a9f1.png) 52 | 53 | All float: 54 | 55 | ![alt text](https://user-images.githubusercontent.com/3421249/89722555-394b4e80-d9eb-11ea-952e-fd51c14a5517.png) 56 | 57 | Chords Randomizer: 58 | 59 | ![alt text](https://user-images.githubusercontent.com/3421249/89698734-0a69a580-d923-11ea-8ec0-ba58ed2698de.png) 60 | 61 | Image Dancer: 62 | 63 | ![alt text](https://user-images.githubusercontent.com/3421249/99883946-ca58d500-2c2a-11eb-92fb-12c3d5b0956b.png) 64 | 65 | 66 | Fred van Stappen -------------------------------------------------------------------------------- /src/aboutform.mfm: -------------------------------------------------------------------------------- 1 | object about_form: taboutfo 2 | visible = False 3 | bounds_x = 475 4 | bounds_y = 239 5 | bounds_cx = 372 6 | bounds_cy = 320 7 | container.frame.localprops = [] 8 | container.frame.localprops1 = [] 9 | container.bounds = ( 10 | 0 11 | 0 12 | 372 13 | 320 14 | ) 15 | optionswindow = [wo_dialog] 16 | font.name = 'stf_default' 17 | font.localprops = [] 18 | options = [fo_screencentered, fo_cancelonesc, fo_autoreadstat, fo_autowritestat, fo_savepos, fo_savezorder, fo_savestate] 19 | icon.options = [bmo_masked, bmo_graymask] 20 | icon.origformat = 'png' 21 | icon.image = { 22 | 00000000120000002000000020000000D8050000000000000000000000000000 23 | 000000000000000000000000000000000000000000000049D3D3D301EBEDEE01 24 | ECF2F301F1F2F201D4D4D40100000004E4E4E401F6F4F401F4EDED01F6F5F501 25 | 00000013DDE7E80174C8CF011DBEC70185CCD201E2EDEE01A7A7A70100000002 26 | D2D2D201E9D9D901CF737301C7201E01D2888701ECE6E60100000011F8F8F801 27 | 94D3D80101BDC6037DCBD201ECF0F00100000002EDE4E401CC616101C6070103 28 | DCA8A801E0E0E00100000010DBE5E60126BEC60101BDC604BFE0E40100000001 29 | CCCCCC01DBACAB01C6070104C9515001F0EFEF0100000010C6E2E50101BDC605 30 | 8ECFD501ECECEC01F2F2F201CE6E6D01C6070104C61C1901EBE1E10100000010 31 | C9E4E60101BDC60558C3CB01F3F4F401F2E9E901C6191601C6070104C6201D01 32 | F1EBEB0100000010E3EAEA012ABEC60101BDC6044FC3CB01FEFEFE01F8EEEE01 33 | C60D0701C6070104CA585701F2F1F10100000010E3E3E30189CED40101BDC604 34 | 6FC7CE01EAEAEA01EBE7E701C73E3D01C6070104DAA2A201EEEEEE010000000B 35 | E7E7E901BEBDD101BEBCD101EBEAEE01BCBCBC0100000001CCE2E50115BDC501 36 | 01BDC603A8D6DA01DEDEDE01EEEEEE01D5969601C6070103C6353301E8D7D701 37 | 00000001BABABA01EEE6EE01DFB9DF01E0C0E001ECEBEC0100000005EDEDED01 38 | 9996BE013E309E027A76B101E0DFE601A3A3A301E1E1E101B5DADE011FBDC501 39 | 01BDC60173CAD101E7EEEF0100000002EBDCDC01CC5B5B01C6070101C6383601 40 | E3C5C501FAFAFA01D8D8D801E8D7E801CB58CB01C601C601C605C601D9A5D901 41 | E5E5E50100000004CDCCD9013F319E013E309E038480B501EFEEF10100000001 42 | E6E6E601D7E6E801BEDDE001E8EEEE01E4E4E401F5F6F501F8F8F801D5D5D501 43 | EFE4E401E1BEBD01E5D8D801E2E2E20100000001EEE5EE01CC5ECC01C601C603 44 | C623C601E6DAE60100000004B1AFCB013E309E05C4C3D70100000004E6EBE601 45 | AFCDAE0165A764016EA86D01BAD6B901E6E8E60100000003D4D4D401DDB0DD01 46 | C601C605DFC0DF0100000004BBB9D1013E309E059F9DC201DCDCDC0100000002 47 | E4E6E40189B888010B8000030D8102019CC19C01F3F3F30100000002F0F0F001 48 | D280D201C601C605E3C7E30100000004D1D1DC0141349E013E309E04928FBC01 49 | FFFFFF0100000001D9D9D901B4D0B4010C8001010B80000414850C01C4DBC301 50 | EDEDED0100000001FAFAFA01C653C601C601C604C733C701EBE3EB0100000004 51 | F3F3F4018D8AB9013E309E049B98C001EDEDED0100000001DEEADE0141923F01 52 | 0B80000662A36101E7EDE70100000001F5F5F501CF75CF01C601C604D79DD701 53 | E3E3E301000000046E6E6E01D5D4DE015C55A6013E309E023F319E01BCBBD001 54 | D0D0D001EEEEEE0198BF98010B800008ADCAAD01D2D2D201E0E0E001DDAEDD01 55 | C601C603CD61CD01E2D8E20100000006C6C6C601D7D7E2018F8BBA016C67AC01 56 | B1AFCA01ECECED01F2F2F201C4D8C401118408010B8000082D892A01D2E2D201 57 | BBBBBB01ECE7EC01D99ED901CD5CCD01D794D701EAE2EA019898980100000007 58 | FFFFFF01EDEDED01FCFCFC01EAEAEA01FFFFFF01DAE8DA01499747010B80000A 59 | 64A26301E0EBE001FAFAFA01EEEEEE01FEFEFE01E6E6E6010000000DDBE7DB01 60 | 499247010B80000C649E6301E5EEE5010000000FEEF0EE017CAD7B010B80000E 61 | 95BB9401F0F1F0010000000EC1D8C0010C8101010B80000E17851001D2E3D201 62 | 0000000DE1E1E10193B892010B800010A3C0A201C1C1C1010000000CDDDEDD01 63 | 62A061010B8000108BB18A01DDDDDD010000000CDDDEDD01619E5F010B800010 64 | 8BB18B01DBDBDB010000000CE2E2E20198BB97010B800010A7C5A701CBCBCB01 65 | 0000000C48484801CEDECE01278723010B80000E47934501DCE8DC010000000D 66 | 10101001FFFFFF01C2D6C201469344010B80000110820601529951019EC39E01 67 | B9D2B901CCE7CB01CBE5CA01B8D1B80196BD9501449342010C8001010B800001 68 | 579A5601D0E2CF01F4F4F4010000000FDBDBDB01E2E9E201D1E6D101D3E5D301 69 | F0F3F001E9E9E901000000039E9E9E01E3E3E301EFF2EF01D1E5D101D2E6D101 70 | E2E6E201C8C8C801000000480004000000000000000000000000000000000000 71 | 0000000000000000000000000000000000000000000000000000000000000000 72 | 000000000000000000000000000000000000000000000000000253733F010000 73 | 0000024B733F000000000000000000000000000000000000008CFFFFF98F0100 74 | 0006ACFFFFFC6D000000000000000000000000000000000025F8FFFFFFFA5100 75 | 0074FFFFFFFFF1100000000000000000000000000000000077FFFFFFFFFFC900 76 | 09EAFFFFFFFFFF500000000000000000000000000000000089FFFFFFFFFFFD1C 77 | 3CFFFFFFFFFFFF620000000000000000000000000000000089FFFFFFFFFFFF44 78 | 6AFFFFFFFFFFFE5E000000000000000000000000000000006BFFFFFFFFFFFF4E 79 | 71FFFFFFFFFEFB4C0000000000000000000000000000000032FEFFFFFFFFFF35 80 | 5EFFFFFFFFFEF20F000000000000000000000055C4C6640200BAFFFFFFFFEE08 81 | 1BFCFFFFFFFE9A000977CABB3F000000000039FCFFFFFF980127EAFFFFFD7500 82 | 009AFBFBF9CF1006B4FFFFFFF522000000009EFEFFFFFFFF4E002398AC6B134E 83 | 46147DAE8F160071FFFFFFFFFF7E00000000B7FFFFFFFFFFC0000000005FECFF 84 | FFE24A00000003E1FFFFFFFFFF9C00000000B3FFFFFFFFFFFB0F000051FEFFFF 85 | FFFFF831000029FFFFFFFFFFFF9C0000000091FFFFFFFFFFFF1A0012E7FFFFFF 86 | FFFFFFCC04003AFFFFFFFFFFFF6E0000000037FEFFFFFFFFFE160089FFFFFFFF 87 | FFFFFFFF680033FFFFFFFFFFF51D0000000001ABFFFFFFFFD40231F7FFFFFFFF 88 | FFFFFFFFEA220AEBFFFFFFFC8B0000000000000FAFFEFFF4460FD0FFFFFFFFFF 89 | FFFFFFFFFFB90661FAFFFA8A06000000000000000136511A06B8FFFFFFFFFFFF 90 | FFFFFFFFFFFD9D0125512C000000000000000000000000009FFFFFFFFFFFFFFF 91 | FFFFFFFFFFFFFF7F0000000000000000000000000000004EFEFFFFFFFFFFFFFF 92 | FFFFFFFFFFFFFFFA2D0000000000000000000000000000C2FFFFFFFFFFFFFFFF 93 | FFFFFFFFFFFFFFFFA10000000000000000000000000018FCFFFFFFFFFFFFFFFF 94 | FFFFFFFFFFFFFFFFEE060000000000000000000000003AFFFFFFFFFFFFFFFFFF 95 | FFFFFFFFFFFFFFFFFE130000000000000000000000003BFFFFFFFFFFFFFFFFFF 96 | FFFFFFFFFFFFFFFFFE1400000000000000000000000015FAFFFFFFFFFFFFFFFF 97 | FFFFFFFFFFFFFFFFEA0600000000000000000000000001B0FEFFFFFFFFFFFFFF 98 | FFFFFFFFFFFFFFFF8C000000000000000000000000000117DAFDFFFFFFF8C993 99 | 9AD1FDFFFFFFFFC30C00000000000000000000000000000011769E995B170000 100 | 000120649D9E6B09000000000000000000000000000000000000000000000000 101 | 0000000000000000000000000000000000000000000000000000000000000000 102 | 00000000000000000000000000000000 103 | } 104 | windowopacity = -Inf 105 | moduleclassname = 'tmseform' 106 | object about_text: tmemoedit 107 | frame.colorclient = 13431495 108 | frame.localprops = [frl_colorclient] 109 | frame.localprops1 = [] 110 | frame.sbhorz.pagesize = 1 111 | frame.sbvert.pagesize = 1 112 | bounds_x = 8 113 | bounds_y = 9 114 | bounds_cx = 357 115 | bounds_cy = 300 116 | optionsedit = [oe_readonly, oe_closequery, oe_checkmrcancel, oe_linebreak, oe_eatreturn, oe_resetselectonexit, oe_nofirstarrownavig, oe_focusrectonreadonly] 117 | textflags = [tf_xcentered, tf_wordbreak, tf_noselect] 118 | textflagsactive = [tf_xcentered, tf_wordbreak] 119 | value = 'Drums Pract version 1.0.' 120 | reffontheight = 17 121 | end 122 | end 123 | -------------------------------------------------------------------------------- /src/aboutform.pas: -------------------------------------------------------------------------------- 1 | unit aboutform; 2 | {$ifdef FPC}{$mode objfpc}{$h+}{$endif} 3 | interface 4 | uses 5 | msetypes,mseglob,mseguiglob,mseguiintf,mseapplication,msestat,msemenus,msegui, 6 | msegraphics,msegraphutils,mseevent,mseclasses,msewidgets,mseforms,mseedit, 7 | msestatfile,msestream,msestrings,sysutils,msesimplewidgets,mseact,msedataedits, 8 | mseificomp,mseificompglob,mseifiglob; 9 | type 10 | taboutfo = class(tmseform) 11 | about_text: tmemoedit; 12 | procedure resizeab(fonth: integer); 13 | end; 14 | var 15 | aboutfo: taboutfo; 16 | implementation 17 | uses 18 | aboutform_mfm; 19 | 20 | procedure taboutfo.resizeab(fonth: integer); 21 | var 22 | ratio: double; 23 | begin 24 | ratio := fonth / 12; 25 | bounds_cxmax := 0; 26 | bounds_cxmin := 0; 27 | bounds_cymax := 0; 28 | bounds_cymin := 0; 29 | bounds_cxmax := round(372 * ratio); 30 | bounds_cxmin := bounds_cxmax; 31 | bounds_cymax := round(350 * ratio); 32 | bounds_cymin := bounds_cymax; 33 | font.Height := fonth; 34 | 35 | about_text.font.color := font.color; 36 | about_text.font.Height := font.Height; 37 | about_text.left := round(10 * ratio); 38 | about_text.Width := round(352 * ratio); 39 | about_text.Height := round(330 * ratio); 40 | about_text.top := round(10 * ratio); 41 | end; 42 | 43 | end. 44 | -------------------------------------------------------------------------------- /src/conflang.mfm: -------------------------------------------------------------------------------- 1 | object conflangfo: tconflangfo 2 | visible = False 3 | bounds_x = 452 4 | bounds_y = 271 5 | bounds_cx = 331 6 | bounds_cy = 222 7 | bounds_cxmin = 331 8 | bounds_cymin = 222 9 | bounds_cxmax = 331 10 | bounds_cymax = 222 11 | container.frame.localprops = [] 12 | container.frame.localprops1 = [] 13 | container.face.fade_pos.count = 2 14 | container.face.fade_pos.items = ( 15 | 0 16 | 1 17 | ) 18 | container.face.fade_color.count = 2 19 | container.face.fade_color.items = ( 20 | -1610612731 21 | 12434877 22 | ) 23 | container.face.fade_direction = gd_down 24 | container.face.localprops = [fal_fadirection] 25 | container.bounds = ( 26 | 0 27 | 0 28 | 331 29 | 222 30 | ) 31 | font.name = 'stf_default' 32 | font.localprops = [] 33 | options = [fo_screencentered, fo_autoreadstat, fo_autowritestat, fo_savepos, fo_savezorder, fo_savestate] 34 | statfile = mainfo.tstatfile1 35 | caption = 'Languages' 36 | windowopacity = -Inf 37 | oncreated = oncreat 38 | moduleclassname = 'tmseform' 39 | object gridlang: twidgetgrid 40 | frame.localprops = [] 41 | frame.localprops1 = [] 42 | taborder = 2 43 | bounds_x = 21 44 | bounds_y = 48 45 | bounds_cx = 290 46 | bounds_cy = 163 47 | font.height = 15 48 | font.name = 'unifont' 49 | font.localprops = [flp_height] 50 | optionsgrid = [og_rowinserting, og_rowdeleting, og_focuscellonenter, og_autofirstrow, og_autoappend, og_colchangeontabkey, og_wrapcol, og_autopopup, og_mousescrollcol] 51 | rowcount = 7 52 | datacols.count = 3 53 | datacols.items = < 54 | item[gridlangtext] 55 | colorselect = -1610612731 56 | coloractive = -1610612731 57 | colorfocused = -1610612731 58 | width = 224 59 | options = [co_readonly, co_disabled, co_savevalue, co_savestate, co_mousescrollrow] 60 | widgetname = 'gridlangtext' 61 | dataclass = tgridmsestringdatalist 62 | data = ( 63 | ( 64 | '' 65 | '' 66 | '' 67 | '' 68 | '' 69 | '' 70 | '' 71 | ) 72 | ) 73 | end 74 | item[gridlangbool] 75 | color = -1610612731 76 | width = 44 77 | options = [co_drawfocus, co_savevalue, co_savestate, co_mousescrollrow] 78 | widgetname = 'gridlangbool' 79 | dataclass = tgridintegerdatalist 80 | data = ( 81 | ( 82 | 0 83 | 0 84 | 0 85 | 0 86 | 0 87 | 0 88 | 0 89 | ) 90 | ) 91 | end 92 | item[gridlangcode] 93 | width = 1 94 | options = [co_invisible, co_savevalue, co_savestate, co_mousescrollrow] 95 | widgetname = 'gridlangcode' 96 | dataclass = tgridmsestringdatalist 97 | data = ( 98 | ( 99 | '' 100 | '' 101 | '' 102 | '' 103 | '' 104 | '' 105 | '' 106 | ) 107 | ) 108 | end> 109 | datarowheight = 17 110 | statfile = mainfo.tstatfile1 111 | oncellevent = oncellev 112 | reffontheight = 16 113 | object gridlangtext: tstringedit 114 | optionswidget1 = [ow1_fontglyphheight] 115 | optionsskin = [osk_framebuttononly] 116 | taborder = 1 117 | enabled = False 118 | visible = False 119 | bounds_x = 0 120 | bounds_y = 0 121 | bounds_cx = 224 122 | bounds_cy = 17 123 | optionsedit = [oe_readonly, oe_undoonesc, oe_closequery, oe_checkmrcancel, oe_nogray, oe_shiftreturn, oe_eatreturn, oe_resetselectonexit, oe_exitoncursor, oe_endonenter, oe_autoselect, oe_autoselectonfirstclick, oe_focusrectonreadonly] 124 | value = 'English' 125 | reffontheight = 16 126 | end 127 | object gridlangbool: tbooleaneditradio 128 | optionswidget1 = [] 129 | optionsskin = [osk_framebuttononly] 130 | color = -1610612731 131 | taborder = 2 132 | bounds_x = 225 133 | bounds_y = 0 134 | bounds_cx = 44 135 | bounds_cy = 17 136 | visible = False 137 | value = True 138 | end 139 | object gridlangcode: tstringedit 140 | optionswidget1 = [ow1_fontglyphheight] 141 | optionsskin = [osk_framebuttononly] 142 | taborder = 3 143 | visible = False 144 | bounds_x = 270 145 | bounds_y = 0 146 | bounds_cx = 1 147 | bounds_cy = 17 148 | reffontheight = 16 149 | end 150 | end 151 | object lsetasdefault: tlabel 152 | optionswidget1 = [ow1_fontglyphheight, ow1_autoscale] 153 | color = -2147483645 154 | taborder = 4 155 | bounds_x = 58 156 | bounds_y = 0 157 | bounds_cx = 192 158 | bounds_cy = 44 159 | reffontheight = 17 160 | end 161 | object setasdefault: tbooleanedit 162 | color = -2147483645 163 | frame.caption = ' ' 164 | frame.captiondist = 4 165 | frame.localprops = [] 166 | frame.localprops1 = [frl1_captiondist] 167 | frame.outerframe = ( 168 | 0 169 | 3 170 | 75 171 | 3 172 | ) 173 | taborder = 1 174 | bounds_x = 36 175 | bounds_y = 10 176 | bounds_cx = 88 177 | bounds_cy = 19 178 | statfile = mainfo.tstatfile1 179 | end 180 | object ok: tbutton 181 | frame.optionsskin = [fso_flat] 182 | frame.localprops = [frl_optionsskin] 183 | frame.localprops1 = [] 184 | frame.template = commanderfo.tframecomp2 185 | face.fade_pos.count = 2 186 | face.fade_pos.items = ( 187 | 0 188 | 1 189 | ) 190 | face.fade_color.count = 2 191 | face.fade_color.items = ( 192 | 16250871 193 | 13750737 194 | ) 195 | face.fade_direction = gd_down 196 | face.localprops = [] 197 | bounds_x = 246 198 | bounds_y = 7 199 | bounds_cx = 77 200 | bounds_cy = 26 201 | anchors = [an_top, an_right] 202 | state = [as_localcaption, as_localonexecute] 203 | caption = 'OK' 204 | onexecute = oncok 205 | end 206 | object bpotools: tbutton 207 | color = -2147483645 208 | frame.optionsskin = [fso_flat] 209 | frame.localprops = [frl_optionsskin] 210 | frame.localprops1 = [] 211 | taborder = 3 212 | hint = 'Tools' 213 | bounds_x = 219 214 | bounds_y = 7 215 | bounds_cx = 22 216 | bounds_cy = 26 217 | anchors = [an_top, an_right] 218 | state = [as_localinvisible, as_localcaption, as_localimagelist, as_localimagenr, as_localcolor, as_localhint, as_localonexecute] 219 | imagelist = mainfo.buttonicons 220 | imagenr = 23 221 | onexecute = ontools 222 | end 223 | end 224 | -------------------------------------------------------------------------------- /src/conflang.pas: -------------------------------------------------------------------------------- 1 | unit conflang; 2 | 3 | {$ifdef FPC}{$mode objfpc}{$h+}{$endif} 4 | interface 5 | 6 | uses 7 | msetypes, 8 | mseglob, 9 | mseguiglob, 10 | mseguiintf, 11 | mseapplication, 12 | msestat, 13 | msemenus, 14 | msegui, 15 | msegraphics, 16 | msegraphutils, 17 | mseevent, 18 | mseclasses, 19 | msewidgets, 20 | mseforms, 21 | msesimplewidgets, 22 | msegraphedits, 23 | mseificomp, 24 | mseificompglob, 25 | mseifiglob, 26 | msescrollbar, 27 | msestatfile, 28 | mseact, 29 | msedataedits, 30 | msedragglob, 31 | msedropdownlist, 32 | mseedit, 33 | msegrids, 34 | msegridsglob, 35 | msestream, 36 | msewidgetgrid, 37 | SysUtils, 38 | msedispwidgets, 39 | mserichstring; 40 | 41 | type 42 | tconflangfo = class(tmseform) 43 | ok: TButton; 44 | setasdefault: tbooleanedit; 45 | gridlang: twidgetgrid; 46 | gridlangtext: tstringedit; 47 | gridlangbool: tbooleaneditradio; 48 | gridlangcode: tstringedit; 49 | bpotools: TButton; 50 | lsetasdefault: tlabel; 51 | procedure oncok(const Sender: TObject); 52 | procedure oncreat(const Sender: TObject); 53 | procedure oncellev(const Sender: TObject; var info: celleventinfoty); 54 | procedure ontools(const Sender: TObject); 55 | procedure resizecl(fonth: integer); 56 | end; 57 | 58 | var 59 | conflangloaded: shortint = 0; 60 | conflangfo: tconflangfo; 61 | 62 | implementation 63 | 64 | uses 65 | main, 66 | msestockobjects, 67 | potools, 68 | conflang_mfm, 69 | captionstrumpract; 70 | 71 | procedure tconflangfo.resizecl(fonth: integer); 72 | var 73 | ratio: double; 74 | begin 75 | ratio := fonth / 12; 76 | bounds_cxmax := 0; 77 | bounds_cxmin := 0; 78 | bounds_cymax := 0; 79 | bounds_cymin := 0; 80 | bounds_cxmax := round(331 * ratio); 81 | bounds_cxmin := bounds_cxmax; 82 | bounds_cymax := round(222 * ratio); 83 | bounds_cymin := bounds_cymax; 84 | font.Height := fonth; 85 | 86 | // gridlangbool.frame.font.color := font.color; 87 | //gridlangbool.frame.font.Height := font.Height; 88 | gridlangbool.left := round(225 * ratio); 89 | gridlangbool.top := 0; 90 | 91 | gridlang.font.color := font.color; 92 | gridlang.font.Height := font.Height; 93 | gridlang.left := round(21 * ratio); 94 | gridlang.Width := round(290 * ratio); 95 | gridlang.Height := round(163 * ratio); 96 | gridlang.top := round(48 * ratio); 97 | gridlang.datarowheight := round(17 * ratio); 98 | 99 | 100 | gridlang.datacols[0].Width := round(224 * ratio); 101 | gridlang.datacols[1].Width := round(44 * ratio); 102 | 103 | // setasdefault.frame.font.color := font.color; 104 | // setasdefault.frame.font.Height := font.Height; 105 | setasdefault.left := round(36 * ratio); 106 | setasdefault.top := round(11 * ratio); 107 | 108 | ok.font.color := font.color; 109 | ok.font.Height := font.Height; 110 | ok.left := round(246 * ratio); 111 | ok.Width := round(77 * ratio); 112 | ok.Height := round(26 * ratio); 113 | ok.top := round(7 * ratio); 114 | 115 | lsetasdefault.font.color := font.color; 116 | lsetasdefault.font.Height := font.Height; 117 | lsetasdefault.left := round(58 * ratio); 118 | lsetasdefault.Width := round(192 * ratio); 119 | lsetasdefault.Height := round(42 * ratio); 120 | lsetasdefault.top := 0; 121 | 122 | bpotools.left := round(219 * ratio); 123 | bpotools.Width := round(22 * ratio); 124 | bpotools.Height := round(26 * ratio); 125 | bpotools.top := round(7 * ratio); 126 | end; 127 | 128 | procedure tconflangfo.oncok(const Sender: TObject); 129 | begin 130 | Close; 131 | end; 132 | 133 | procedure tconflangfo.oncreat(const Sender: TObject); 134 | begin 135 | Visible := False; 136 | end; 137 | 138 | procedure tconflangfo.oncellev(const Sender: TObject; var info: celleventinfoty); 139 | var 140 | x: integer; 141 | begin 142 | // if conflangloaded > 0 then 143 | if info.eventkind = cek_buttonrelease then 144 | begin 145 | MSEFallbackLang := ''; 146 | for x := 0 to gridlang.rowcount - 1 do 147 | if x = info.cell.row then 148 | begin 149 | gridlangbool[x] := True; 150 | MSEFallbackLang := gridlangcode[x]; 151 | mainfo.setlangstrumpract(MSEFallbackLang); 152 | 153 | end 154 | else 155 | gridlangbool[x] := False; 156 | end; 157 | end; 158 | 159 | procedure tconflangfo.ontools(const Sender: TObject); 160 | begin 161 | application.createform(theaderfo, headerfo); 162 | headerfo.icon := icon; 163 | headerfo.Show(True); 164 | end; 165 | 166 | end. 167 | 168 | -------------------------------------------------------------------------------- /src/dialogfiles.mfm: -------------------------------------------------------------------------------- 1 | object dialogfilesfo: tdialogfilesfo 2 | optionswidget = [ow_arrowfocus, ow_subfocus, ow_destroywidgets, ow_hinton] 3 | visible = False 4 | bounds_x = 596 5 | bounds_y = 300 6 | bounds_cx = 336 7 | bounds_cy = 315 8 | bounds_cxmin = 336 9 | bounds_cymin = 315 10 | bounds_cxmax = 336 11 | bounds_cymax = 315 12 | container.optionswidget = [ow_mousefocus, ow_tabfocus, ow_arrowfocus, ow_subfocus, ow_mousetransparent, ow_destroywidgets] 13 | container.frame.localprops = [] 14 | container.frame.localprops1 = [] 15 | container.face.localprops = [] 16 | container.face.template = mainfo.tfaceplayer 17 | container.bounds = ( 18 | 0 19 | 0 20 | 336 21 | 315 22 | ) 23 | optionswindow = [wo_message, wo_alwaysontop] 24 | options = [fo_screencentered, fo_closeonenter, fo_closeonf10, fo_autoreadstat, fo_autowritestat, fo_savepos, fo_savestate] 25 | icon.options = [bmo_masked] 26 | icon.origformat = 'png' 27 | windowopacity = -Inf 28 | onclose = oncloseev 29 | moduleclassname = 'tmseform' 30 | object selected_file: tedit 31 | optionswidget1 = [ow1_fontglyphheight] 32 | color = -2147483645 33 | frame.caption = 'Selected' 34 | frame.localprops = [frl_colorclient] 35 | frame.localprops1 = [] 36 | frame.outerframe = ( 37 | 0 38 | 18 39 | 0 40 | 0 41 | ) 42 | face.localprops = [] 43 | face.template = mainfo.tfaceplayer 44 | bounds_x = 7 45 | bounds_y = 6 46 | bounds_cx = 324 47 | bounds_cy = 39 48 | anchors = [an_left, an_top, an_right] 49 | optionsedit = [oe_readonly, oe_undoonesc, oe_closequery, oe_checkmrcancel, oe_shiftreturn, oe_eatreturn, oe_resetselectonexit, oe_exitoncursor, oe_endonenter, oe_autoselect, oe_autoselectonfirstclick, oe_focusrectonreadonly] 50 | reffontheight = 15 51 | end 52 | object tbutton1: tbutton 53 | color = -2147483645 54 | frame.font.name = 'stf_default' 55 | frame.font.localprops = [] 56 | frame.localprops = [frl_optionsskin] 57 | frame.localprops1 = [] 58 | face.fade_direction = gd_down 59 | face.localprops = [fal_fadirection] 60 | face.template = mainfo.tfaceplayer 61 | taborder = 1 62 | bounds_x = 276 63 | bounds_y = 3 64 | bounds_cx = 50 65 | bounds_cy = 18 66 | anchors = [an_top, an_right] 67 | state = [as_localinvisible, as_localcaption, as_localcolor, as_localonexecute] 68 | caption = '&OK' 69 | onexecute = butok 70 | end 71 | object setother: tbooleanedit 72 | color = -2147483645 73 | frame.hiddenedges = [edg_right, edg_top, edg_left, edg_bottom] 74 | frame.caption = 'Set it for the other player too' 75 | frame.localprops = [frl_hiddenedges, frl_colorclient] 76 | frame.localprops1 = [frl1_captiondist] 77 | frame.outerframe = ( 78 | 0 79 | 2 80 | 179 81 | 3 82 | ) 83 | face.localprops = [] 84 | face.template = mainfo.tfaceplayer 85 | taborder = 2 86 | bounds_x = 69 87 | bounds_y = 2 88 | bounds_cx = 192 89 | bounds_cy = 17 90 | statfile = mainfo.tstatfile1 91 | colorglyph = -1610612728 92 | end 93 | object list_files: tfilelistview 94 | frame.levelo = 0 95 | frame.colordkwidth = 0 96 | frame.colorhlwidth = 0 97 | frame.optionsskin = [fso_flat] 98 | frame.localprops = [frl_levelo, frl_colordkwidth, frl_colorhlwidth, frl_optionsskin, frl_colorclient] 99 | frame.localprops1 = [] 100 | face.localprops = [] 101 | face.template = mainfo.tfaceplayer 102 | taborder = 3 103 | bounds_x = 5 104 | bounds_y = 51 105 | bounds_cx = 329 106 | bounds_cy = 259 107 | anchors = [an_left, an_top, an_right, an_bottom] 108 | font.name = 'stf_default' 109 | font.localprops = [] 110 | colorselect = 16760476 111 | colorglyph = 16449400 112 | cellwidth = 322 113 | cellheight = 19 114 | fixrows.color = -2147483645 115 | optionsgrid = [og_focuscellonenter, og_sorted, og_colchangeontabkey, og_wraprow, og_wrapcol, og_autopopup, og_mousescrollcol] 116 | options = [lvo_readonly, lvo_horz, lvo_drawfocus, lvo_leftbuttonfocusonly, lvo_focusselect, lvo_mouseselect, lvo_locate] 117 | onselectionchanged = loaddef 118 | filelist.options = [flo_sortname, flo_sorttype] 119 | reffontheight = 15 120 | end 121 | end 122 | -------------------------------------------------------------------------------- /src/dialogfiles.pas: -------------------------------------------------------------------------------- 1 | unit dialogfiles; 2 | 3 | {$ifdef FPC}{$mode objfpc}{$h+}{$endif} 4 | interface 5 | 6 | uses 7 | Classes, 8 | msetypes, 9 | mseglob, 10 | mseguiglob, 11 | mseguiintf, 12 | mseapplication, 13 | msestat, 14 | msemenus, 15 | msegui, 16 | msegraphics, 17 | msegraphutils, 18 | mseevent, 19 | mseclasses, 20 | msewidgets, 21 | mseforms, 22 | mseact, 23 | msebitmap, 24 | msedataedits, 25 | msedatanodes, 26 | mseedit, 27 | msegrids, 28 | mseificomp, 29 | mseificompglob, 30 | mseifiglob, 31 | mselistbrowser, 32 | msestatfile, 33 | msestream, 34 | msestrings, 35 | msesys, 36 | SysUtils, 37 | msesimplewidgets, 38 | msedispwidgets, 39 | mserichstring, 40 | msefiledialog, 41 | msedragglob, 42 | msedropdownlist, 43 | msegridsglob, 44 | msegraphedits, 45 | msescrollbar; 46 | 47 | type 48 | tdialogfilesfo = class(tmseform) 49 | tbutton1: TButton; 50 | selected_file: tedit; 51 | setother: tbooleanedit; 52 | list_files: tfilelistview; 53 | procedure loaddef(const Sender: tcustomlistview); 54 | procedure butok(const Sender: TObject); 55 | procedure oncloseev(const Sender: TObject); 56 | procedure doeq; 57 | 58 | end; 59 | 60 | var 61 | dialogfilesfo: tdialogfilesfo; 62 | dialogfilesformcreated: Boolean = True; 63 | layoutbusy: Boolean = False; 64 | 65 | procedure dodialogfiles; 66 | 67 | implementation 68 | 69 | uses 70 | dialogfiles_mfm, 71 | equalizer; 72 | 73 | var 74 | asliders: tasliders; 75 | 76 | procedure dodialogfiles; 77 | begin 78 | try 79 | application.createform(tdialogfilesfo, dialogfilesfo); 80 | dialogfilesfo.Show; 81 | dialogfilesfo.bringtofront; 82 | dialogfilesformcreated := True; 83 | finally 84 | end; 85 | end; 86 | 87 | procedure tdialogfilesfo.doeq; 88 | var 89 | str, str2: msestring; 90 | x: integer = 1; 91 | ds: char; 92 | begin 93 | with TStringList.Create do 94 | try 95 | Loadfromfile(list_files.directory + directoryseparator + selected_file.Text); 96 | str := Text; 97 | finally 98 | Free; 99 | end; 100 | 101 | str2 := copy(str, 1, system.pos('|', str) - 1); 102 | 103 | ds := decimalseparator; 104 | decimalseparator := '.'; 105 | 106 | asliders[1].Value := strtofloat(str2); 107 | 108 | while (system.pos('|', str) > 0) and (x < 20) do 109 | begin 110 | Inc(x); 111 | str2 := system.copy(str, system.pos('|', str) + 1, 6); 112 | str := stringreplace(str, '|', ' ', 113 | [rfIgnoreCase]); 114 | 115 | if trim(str2) <> '' then 116 | asliders[x].Value := strtofloat(str2); 117 | 118 | end; 119 | decimalseparator := ds; 120 | end; 121 | 122 | 123 | procedure tdialogfilesfo.loaddef(const Sender: tcustomlistview); 124 | begin 125 | layoutbusy := True; 126 | if Assigned(list_files.selectednames) then 127 | begin 128 | selected_file.Text := list_files.selectednames[0]; 129 | 130 | if fileexists(list_files.directory + directoryseparator + selected_file.Text) then 131 | begin 132 | if (tag = 0) or ((setother.Visible = True) and (setother.Value = True)) then 133 | with equalizerfo1 do 134 | begin 135 | EQEN.Value := True; 136 | asliders[1] := tslider1; 137 | asliders[2] := tslider2; 138 | asliders[3] := tslider3; 139 | asliders[4] := tslider4; 140 | asliders[5] := tslider5; 141 | asliders[6] := tslider6; 142 | asliders[7] := tslider7; 143 | asliders[8] := tslider8; 144 | asliders[9] := tslider9; 145 | asliders[10] := tslider10; 146 | asliders[11] := tslider11; 147 | asliders[12] := tslider12; 148 | asliders[13] := tslider13; 149 | asliders[14] := tslider14; 150 | asliders[15] := tslider15; 151 | asliders[16] := tslider16; 152 | asliders[17] := tslider17; 153 | asliders[18] := tslider18; 154 | asliders[19] := tslider19; 155 | asliders[20] := tslider20; 156 | doeq; 157 | end; 158 | 159 | if (tag = 1) or ((setother.Visible = True) and (setother.Value = True)) then 160 | with equalizerfo2 do 161 | begin 162 | EQEN.Value := True; 163 | asliders[1] := tslider1; 164 | asliders[2] := tslider2; 165 | asliders[3] := tslider3; 166 | asliders[4] := tslider4; 167 | asliders[5] := tslider5; 168 | asliders[6] := tslider6; 169 | asliders[7] := tslider7; 170 | asliders[8] := tslider8; 171 | asliders[9] := tslider9; 172 | asliders[10] := tslider10; 173 | asliders[11] := tslider11; 174 | asliders[12] := tslider12; 175 | asliders[13] := tslider13; 176 | asliders[14] := tslider14; 177 | asliders[15] := tslider15; 178 | asliders[16] := tslider16; 179 | asliders[17] := tslider17; 180 | asliders[18] := tslider18; 181 | asliders[19] := tslider19; 182 | asliders[20] := tslider20; 183 | doeq; 184 | end; 185 | 186 | if (tag = 2) then 187 | with equalizerforec do 188 | begin 189 | EQEN.Value := True; 190 | asliders[1] := tslider1; 191 | asliders[2] := tslider2; 192 | asliders[3] := tslider3; 193 | asliders[4] := tslider4; 194 | asliders[5] := tslider5; 195 | asliders[6] := tslider6; 196 | asliders[7] := tslider7; 197 | asliders[8] := tslider8; 198 | asliders[9] := tslider9; 199 | asliders[10] := tslider10; 200 | asliders[11] := tslider11; 201 | asliders[12] := tslider12; 202 | asliders[13] := tslider13; 203 | asliders[14] := tslider14; 204 | asliders[15] := tslider15; 205 | asliders[16] := tslider16; 206 | asliders[17] := tslider17; 207 | asliders[18] := tslider18; 208 | asliders[19] := tslider19; 209 | asliders[20] := tslider20; 210 | doeq; 211 | end; 212 | 213 | end; 214 | end; 215 | layoutbusy := False; 216 | end; 217 | 218 | procedure tdialogfilesfo.butok(const Sender: TObject); 219 | begin 220 | layoutbusy := False; 221 | Close; 222 | end; 223 | 224 | procedure tdialogfilesfo.oncloseev(const Sender: TObject); 225 | begin 226 | //dialogfilesformcreated:= false; 227 | end; 228 | 229 | end. 230 | 231 | -------------------------------------------------------------------------------- /src/dp.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/dp.res -------------------------------------------------------------------------------- /src/equ/Acoustic.equ: -------------------------------------------------------------------------------- 1 | 0.5783|0.5663|0.5000|0.5000|0.5000|0.6265|0.6145|0.6024|0.6265|0.5542|0.5783|0.5663|0.5783|0.5000|0.5904|0.6506|0.6747|0.6145|0.6145|0.5542| 2 | -------------------------------------------------------------------------------- /src/equ/Classical.equ: -------------------------------------------------------------------------------- 1 | 0.6506|0.5663|0.5000|0.5000|0.5000|0.5000|0.5000|0.6024|0.6265|0.6627|0.5783|0.5663|0.5783|0.5181|0.5000|0.5000|0.5663|0.6627|0.6988|0.6627| 2 | -------------------------------------------------------------------------------- /src/equ/Dancing.equ: -------------------------------------------------------------------------------- 1 | 0.4337|0.5542|0.5000|0.5000|0.5000|0.5000|0.5542|0.6627|0.7470|0.7952|0.5783|0.6506|0.5783|0.5000|0.5000|0.5000|0.5663|0.6145|0.7470|0.7952| 2 | -------------------------------------------------------------------------------- /src/equ/Flat.equ: -------------------------------------------------------------------------------- 1 | 0.5000|0.5000|0.5000|0.5000|0.5000|0.5000|0.5000|0.5000|0.5000|0.5000|0.5000|0.5000|0.5000|0.5000|0.5000|0.5000|0.5000|0.5000|0.5000|0.5000| 2 | -------------------------------------------------------------------------------- /src/equ/Jazz.equ: -------------------------------------------------------------------------------- 1 | 0.6506|0.5663|0.5000|0.5000|0.5000|0.5000|0.5000|0.6024|0.6265|0.7831|0.5783|0.5663|0.5783|0.5000|0.5000|0.5000|0.5663|0.6627|0.6988|0.7831| 2 | -------------------------------------------------------------------------------- /src/equ/Metal.equ: -------------------------------------------------------------------------------- 1 | 0.7831|0.6867|0.5000|0.5904|0.5000|0.5000|0.7470|0.5783|0.8434|0.9398|0.8313|0.7952|0.5783|0.6747|0.5000|0.5060|0.7229|0.4940|0.8072|0.9157| 2 | -------------------------------------------------------------------------------- /src/equ/Rock.equ: -------------------------------------------------------------------------------- 1 | 0.5663|0.5542|0.5000|0.5000|0.5000|0.5000|0.5060|0.5783|0.6386|0.6386|0.6145|0.6506|0.5783|0.4940|0.5000|0.5000|0.5663|0.6145|0.7470|0.7229| 2 | -------------------------------------------------------------------------------- /src/equ/Vocal.equ: -------------------------------------------------------------------------------- 1 | 0.5663|0.4337|0.3855|0.6265|0.6627|0.7229|0.8193|0.6265|0.6265|0.5301|0.5663|0.5060|0.3976|0.6747|0.6747|0.7590|0.7831|0.5904|0.5904|0.5060| 2 | -------------------------------------------------------------------------------- /src/errorform.mfm: -------------------------------------------------------------------------------- 1 | object errorfo: terrorfo 2 | bounds_x = 482 3 | bounds_y = 282 4 | bounds_cx = 390 5 | bounds_cy = 104 6 | bounds_cxmin = 390 7 | bounds_cymin = 104 8 | bounds_cxmax = 390 9 | bounds_cymax = 104 10 | container.frame.localprops = [] 11 | container.frame.localprops1 = [] 12 | container.bounds = ( 13 | 0 14 | 0 15 | 390 16 | 104 17 | ) 18 | optionswindow = [wo_notaskbar, wo_rounded] 19 | windowopacity = -Inf 20 | moduleclassname = 'tmseform' 21 | object tlabel1: tlabel 22 | bounds_x = 89 23 | bounds_y = 49 24 | bounds_cx = 229 25 | bounds_cy = 19 26 | caption = 'Some libraries did not load...' 27 | font.height = 16 28 | font.name = 'stf_default' 29 | font.localprops = [flp_height] 30 | reffontheight = 19 31 | end 32 | object tlabel2: tlabel 33 | taborder = 1 34 | bounds_x = 80 35 | bounds_y = 74 36 | bounds_cx = 241 37 | bounds_cy = 19 38 | caption = 'The application will terminate.' 39 | font.height = 16 40 | font.name = 'stf_default' 41 | font.localprops = [flp_color, flp_height] 42 | reffontheight = 19 43 | end 44 | object tlabel3: tlabel 45 | taborder = 2 46 | bounds_x = 62 47 | bounds_y = 14 48 | bounds_cx = 246 49 | bounds_cy = 22 50 | caption = '*** StrumPract Warning ***' 51 | font.color = -1610612729 52 | font.height = 18 53 | font.style = [fs_italic] 54 | font.name = 'stf_default' 55 | font.localprops = [flp_color, flp_style, flp_height] 56 | reffontheight = 22 57 | end 58 | end 59 | -------------------------------------------------------------------------------- /src/errorform.pas: -------------------------------------------------------------------------------- 1 | unit errorform; 2 | {$ifdef FPC}{$mode objfpc}{$h+}{$endif} 3 | interface 4 | uses 5 | msetypes, mseglob, mseguiglob, mseguiintf, mseapplication, msestat, msemenus, 6 | msegui,msegraphics, msegraphutils, mseevent, mseclasses, msewidgets, mseforms, 7 | msesimplewidgets; 8 | type 9 | terrorfo = class(tmseform) 10 | tlabel1: tlabel; 11 | tlabel2: tlabel; 12 | tlabel3: tlabel; 13 | end; 14 | var 15 | errorfo: terrorfo; 16 | implementation 17 | uses 18 | errorform_mfm; 19 | end. 20 | -------------------------------------------------------------------------------- /src/errorform_mfm.pas: -------------------------------------------------------------------------------- 1 | unit errorform_mfm; 2 | {$ifdef FPC}{$mode objfpc}{$h+}{$endif} 3 | 4 | interface 5 | 6 | implementation 7 | uses 8 | mseclasses,errorform; 9 | 10 | const 11 | objdata: record size: integer; data: array[0..957] of byte end = 12 | (size: 958; data: ( 13 | 84,80,70,48,8,116,101,114,114,111,114,102,111,7,101,114,114,111,114,102, 14 | 111,8,98,111,117,110,100,115,95,120,3,226,1,8,98,111,117,110,100,115, 15 | 95,121,3,26,1,9,98,111,117,110,100,115,95,99,120,3,134,1,9,98, 16 | 111,117,110,100,115,95,99,121,2,104,12,98,111,117,110,100,115,95,99,120, 17 | 109,105,110,3,134,1,12,98,111,117,110,100,115,95,99,121,109,105,110,2, 18 | 104,12,98,111,117,110,100,115,95,99,120,109,97,120,3,134,1,12,98,111, 19 | 117,110,100,115,95,99,121,109,97,120,2,104,26,99,111,110,116,97,105,110, 20 | 101,114,46,102,114,97,109,101,46,108,111,99,97,108,112,114,111,112,115,11, 21 | 0,27,99,111,110,116,97,105,110,101,114,46,102,114,97,109,101,46,108,111, 22 | 99,97,108,112,114,111,112,115,49,11,0,16,99,111,110,116,97,105,110,101, 23 | 114,46,98,111,117,110,100,115,1,2,0,2,0,3,134,1,2,104,0,13, 24 | 111,112,116,105,111,110,115,119,105,110,100,111,119,11,12,119,111,95,110,111, 25 | 116,97,115,107,98,97,114,10,119,111,95,114,111,117,110,100,101,100,0,13, 26 | 119,105,110,100,111,119,111,112,97,99,105,116,121,5,0,0,0,0,0,0, 27 | 0,128,255,255,15,109,111,100,117,108,101,99,108,97,115,115,110,97,109,101, 28 | 6,8,116,109,115,101,102,111,114,109,0,6,116,108,97,98,101,108,7,116, 29 | 108,97,98,101,108,49,8,98,111,117,110,100,115,95,120,2,89,8,98,111, 30 | 117,110,100,115,95,121,2,49,9,98,111,117,110,100,115,95,99,120,3,229, 31 | 0,9,98,111,117,110,100,115,95,99,121,2,19,7,99,97,112,116,105,111, 32 | 110,6,30,83,111,109,101,32,108,105,98,114,97,114,105,101,115,32,100,105, 33 | 100,32,110,111,116,32,108,111,97,100,46,46,46,11,102,111,110,116,46,104, 34 | 101,105,103,104,116,2,16,9,102,111,110,116,46,110,97,109,101,6,11,115, 35 | 116,102,95,100,101,102,97,117,108,116,15,102,111,110,116,46,108,111,99,97, 36 | 108,112,114,111,112,115,11,10,102,108,112,95,104,101,105,103,104,116,0,13, 37 | 114,101,102,102,111,110,116,104,101,105,103,104,116,2,19,0,0,6,116,108, 38 | 97,98,101,108,7,116,108,97,98,101,108,50,8,116,97,98,111,114,100,101, 39 | 114,2,1,8,98,111,117,110,100,115,95,120,2,80,8,98,111,117,110,100, 40 | 115,95,121,2,74,9,98,111,117,110,100,115,95,99,120,3,241,0,9,98, 41 | 111,117,110,100,115,95,99,121,2,19,7,99,97,112,116,105,111,110,6,31, 42 | 84,104,101,32,97,112,112,108,105,99,97,116,105,111,110,32,119,105,108,108, 43 | 32,116,101,114,109,105,110,97,116,101,46,11,102,111,110,116,46,104,101,105, 44 | 103,104,116,2,16,9,102,111,110,116,46,110,97,109,101,6,11,115,116,102, 45 | 95,100,101,102,97,117,108,116,15,102,111,110,116,46,108,111,99,97,108,112, 46 | 114,111,112,115,11,9,102,108,112,95,99,111,108,111,114,10,102,108,112,95, 47 | 104,101,105,103,104,116,0,13,114,101,102,102,111,110,116,104,101,105,103,104, 48 | 116,2,19,0,0,6,116,108,97,98,101,108,7,116,108,97,98,101,108,51, 49 | 8,116,97,98,111,114,100,101,114,2,2,8,98,111,117,110,100,115,95,120, 50 | 2,62,8,98,111,117,110,100,115,95,121,2,14,9,98,111,117,110,100,115, 51 | 95,99,120,3,246,0,9,98,111,117,110,100,115,95,99,121,2,22,7,99, 52 | 97,112,116,105,111,110,6,26,42,42,42,32,83,116,114,117,109,80,114,97, 53 | 99,116,32,87,97,114,110,105,110,103,32,42,42,42,10,102,111,110,116,46, 54 | 99,111,108,111,114,4,7,0,0,160,11,102,111,110,116,46,104,101,105,103, 55 | 104,116,2,18,10,102,111,110,116,46,115,116,121,108,101,11,9,102,115,95, 56 | 105,116,97,108,105,99,0,9,102,111,110,116,46,110,97,109,101,6,11,115, 57 | 116,102,95,100,101,102,97,117,108,116,15,102,111,110,116,46,108,111,99,97, 58 | 108,112,114,111,112,115,11,9,102,108,112,95,99,111,108,111,114,9,102,108, 59 | 112,95,115,116,121,108,101,10,102,108,112,95,104,101,105,103,104,116,0,13, 60 | 114,101,102,102,111,110,116,104,101,105,103,104,116,2,22,0,0,0) 61 | ); 62 | 63 | initialization 64 | registerobjectdata(@objdata,terrorfo,''); 65 | end. 66 | -------------------------------------------------------------------------------- /src/findmessage.mfm: -------------------------------------------------------------------------------- 1 | object findmessagefo: tfindmessagefo 2 | visible = False 3 | bounds_x = 459 4 | bounds_y = 298 5 | bounds_cx = 352 6 | bounds_cy = 58 7 | container.frame.localprops = [] 8 | container.frame.localprops1 = [] 9 | container.bounds = ( 10 | 0 11 | 0 12 | 352 13 | 58 14 | ) 15 | font.color = -1610612734 16 | font.name = 'stf_default' 17 | font.localprops = [flp_color] 18 | caption = 'Find in song list' 19 | icon.options = [bmo_masked, bmo_graymask] 20 | icon.origformat = 'png' 21 | icon.image = { 22 | 0000000012000000180000001800000088050000000000000000000000000000 23 | 0000000000000000000000000000000000000000FFFFFF1EB6652B01B7662E01 24 | B8693301B7672F02B8693301B7662E01B6652B01FFFFFF0EAF612901B1642F01 25 | B6693A01CC816B01D9908601E09C9901E09F9D01E0A09901D7978601BD764C01 26 | B1652F01AF622901FFFFFF0BA95E2801A9602C01C0755B01D088860190584F01 27 | 5C352D0145271E014B2B2101643E3801A5756D01E9B7B601D59B8B01AC622F01 28 | A95E2801FFFFFF09A25A2601A35C2A01C57C6F01AA6762015C3525015C3E2B01 29 | 57403001493C32014A3D3401543E2F01563B2B0159382A01D4A7A301E3ADA901 30 | A55E2D01A35B2601FFFFFF089E592901B26A4F01AD696201603A2401533F3101 31 | 4B4D4D015E5E5E01999B9D01DADADA01D4D4D50176767601523F330152342401 32 | C6918D01CB8C7C019E592901FFFFFF07965323019B572D01BC747001673B2601 33 | 554234015B5E5E017B7B7B018B8F8F01E2E2E301FBFCFC01FFFFFF01F5F5F601 34 | 9C9D9D015B473A015D3A2A01DE9F9E01A865410196532301FFFFFF0690512301 35 | A6634B01945848015D412D015E5E5E0183878701A3A3A801BCBCC301DADADA01 36 | FBFBFB01FDFDFD01F6F6F601C2C5C501686868015A3F30019F695E01C07C6D01 37 | 91512401FFFFFF068C4F2601AD68590177443301654E3F01797C7C01A7A7AC01 38 | CCCCCC01CCD9D901D5D5D501D2E1E101D9D9D901D0DADA01B2B2B80185898901 39 | 67514401754C3C01C9827A018C4F2601FFFFFF0684492101B66D670175432E01 40 | 6D5A520190949401B9C1C101CCCCD901CCDDDD01D1E8E801D1D1D101C8DBDB01 41 | D5D5D501CCCCCC019CA1A10172665B01603E2901CE838001854A210183491E01 42 | FFFFFF057E461E01B269630180473601776259019CA1A101CACAD501D2E1E101 43 | E8E8E801D5D5D501CCCCCC01CCCCE601CFCFDF01D1D1D101A6ACAC01786B6001 44 | 64432D01C87B78017F4620017D451D01FFFFFF057A432001A25D500198504401 45 | 866054019FA4A401D3D3D301D2D2D201E6E6E601FFFFFF01AAAAAA01C6E3E301 46 | DDDDDD01CECEDB01AEAEB401745E4D01784D3D01B66A62017A452001FFFFFF06 47 | 703F1B0190523E01B25C53018F5A4F01959A9A01BFC8C801C9D7D701D8D8EB01 48 | E3E3E301DFDFDF01D5D5D501D2E1E101C8D3D301A3A3A80170533F018E564901 49 | 9E5B4B01723F1C01FFFFFF066E3D190177422301B7635E01B75E5A0199695E01 50 | B0B0B601D1D1DC01D5D5D501DDDDDD01CCDDDD01D2D2D201CECECE01BCC3C301 51 | 7D685701704D3601B36662017C4528016E3D1901FFFFFF07713F1C018B4D3801 52 | C5605C01B96562019F6C6201B7B7BE01D3D3D301CEDBDB02C8D3D301BCC3C301 53 | 836C5C01725039019C5A520192503F015F391F0100000001FFFFFF076E3D1901 54 | 703E1B019D554B01C05E5A01B9635D01A0635701996C5C01977E7001947F7201 55 | 846752017C594301744F380198574C019F564C01744728014647490121252B01 56 | FFFFFF086E3D1901703E1B018A4B3601B25C5701AA5950019F5A4D0190574401 57 | 82523D017F513C0189524301A35754018B4B39016F3F1E015B564F018D979F01 58 | 363B3E0121262A01FFFFFF086E3D1901703E1C01764121018B4A380197514501 59 | A2555002975145018C4A3801744021015A351C0157483C0159504601555E6301 60 | 88929801292B30012025270100000001FFFFFF07000000016C3C19016E3D1A01 61 | 703E1C016F3D1A026F3D1C0167391901552F13010E1315011416190137353001 62 | 48443E01576167017F878E011F23270117171B0100000002FFFFFF0400000005 63 | 04020101060401010000000409090C011315180121232401383837015C646A01 64 | 737B81011C202401060C0C0100000001FFFFFF040000000C0404040111131501 65 | 171A1D01292E30015F676C0140464B011113150100000001FFFFFF040000000D 66 | 000202010F12130114171A011B20230114171B010F13130100000001FFFFFF05 67 | 0000000E0F1214011115180200000002FFFFFF070000000FFFFFFF0240020000 68 | 0000000000000000000000000000000000000000000000000000000000004289 69 | C7F3F4C98B45000000000000000000000000000011ADF4FEFFFFFFFFFEF6B415 70 | 00000000000000000000003DEDF9FFFFFCFDFDFDFEFFFCF14400000000000000 71 | 000012EEFFFFFBE2AD9292B1E3FCFFFFF2160000000000000000AEF8FFFBA86A 72 | 5F71ACAC74A9FBFFFCB80000000000000042F4FFF9A45F4D407EE2FCD6759FFB 73 | FFF64A00000000000088FDFFDC5F463222218BC3AB6658DEFEFE930000000000 74 | 00C6FFF7A34C3119141211141B2B459EF8FFD0000000000000F3FFF87F3E2114 75 | 0F0B0B0E12193670FAFFF7010000000000F4FFFA7C3618110B06050A10162E6A 76 | FAFFF8020000000000C8FFF9A73517110A0403090F152C90F7FFD20000000000 77 | 008AFDFEE43A1C130D09080C111732CAFDFE9500000000000045F3FFFDA02A16 78 | 120F0F1115227AF7FFF44D00000000000000B2F8FFFE9627171515172270F6FF 79 | FFF0020000000000000013EEFFFFFDDB8B504C79C1F8FFFFFFFCA40000000000 80 | 00000041EFF8FFFEF8F9F8F4FDFFFFFFFFFFFB7C000000000000000015B5F3FE 81 | FFFFFFFFFEFAFAFAFFFFFFFA570100000000000000014B94D0F7F8D5A0646EF2 82 | F4FFFFFFFA3E0401000000000102050B111A232931383F6EEFF4FFFFFFF72904 83 | 000000000103080F172028313A424C5F86E8F7FFFFFD7F07000000000103070C 84 | 141B232C343B424A586DCBF4F3F544040000000000010204080C12181D212324 85 | 24231F57A1490301000000000000000101020405060708070605040201010000 86 | } 87 | windowopacity = -Inf 88 | onclose = onclosefind 89 | moduleclassname = 'tmseform' 90 | object tbutton3: tbutton 91 | Tag = 1 92 | frame.optionsskin = [fso_flat] 93 | frame.localprops = [frl_optionsskin] 94 | frame.localprops1 = [] 95 | face.localprops = [] 96 | taborder = 1 97 | bounds_x = 281 98 | bounds_y = 2 99 | bounds_cx = 66 100 | bounds_cy = 24 101 | state = [as_default, as_localdefault, as_localcaption, as_localonexecute] 102 | caption = 'E&xit' 103 | font.name = 'stf_default' 104 | font.localprops = [] 105 | onexecute = onclose 106 | end 107 | object tbutton2: tbutton 108 | frame.optionsskin = [fso_flat] 109 | frame.localprops = [frl_optionsskin] 110 | frame.localprops1 = [] 111 | face.localprops = [] 112 | bounds_x = 6 113 | bounds_y = 2 114 | bounds_cx = 94 115 | bounds_cy = 24 116 | state = [as_default, as_localdefault, as_localcaption, as_localonexecute] 117 | caption = 'Find &Next' 118 | font.name = 'stf_default' 119 | font.localprops = [] 120 | onexecute = onfindnext 121 | end 122 | object findtext: thistoryedit 123 | frame.captiontextflags = [tf_bottom] 124 | frame.localprops = [] 125 | frame.localprops1 = [] 126 | frame.button.frame.localprops = [] 127 | frame.button.frame.localprops1 = [] 128 | frame.buttons.count = 1 129 | frame.buttons.items = < 130 | item 131 | frame.localprops = [] 132 | frame.localprops1 = [] 133 | end> 134 | taborder = 2 135 | bounds_x = 6 136 | bounds_y = 32 137 | bounds_cx = 190 138 | bounds_cy = 22 139 | anchors = [an_left, an_top, an_right] 140 | statfile = mainfo.tstatfile1 141 | optionsedit1 = [oe1_autopopupmenu, oe1_savevalue, oe1_savestate] 142 | optionsedit = [oe_undoonesc, oe_closequery, oe_checkmrcancel, oe_resetselectonexit, oe_exitoncursor, oe_autoselect, oe_autoselectonfirstclick] 143 | onchange = onchangefind 144 | dropdown.cols.count = 1 145 | dropdown.cols.items = < 146 | item 147 | end> 148 | reffontheight = 15 149 | end 150 | object casesensitive: tbooleanedit 151 | frame.caption = 'Case &Sensitive' 152 | frame.localprops = [] 153 | frame.localprops1 = [] 154 | frame.outerframe = ( 155 | 0 156 | 2 157 | 89 158 | 2 159 | ) 160 | taborder = 3 161 | bounds_x = 207 162 | bounds_y = 34 163 | bounds_cx = 104 164 | bounds_cy = 17 165 | anchors = [an_top, an_right] 166 | statfile = mainfo.tstatfile1 167 | end 168 | object tbutton4: tbutton 169 | frame.optionsskin = [fso_flat] 170 | frame.localprops = [frl_optionsskin] 171 | frame.localprops1 = [] 172 | face.localprops = [] 173 | taborder = 4 174 | hint = 'Reset index to 0' 175 | bounds_x = 206 176 | bounds_y = 2 177 | bounds_cx = 68 178 | bounds_cy = 24 179 | state = [as_default, as_localdefault, as_localcaption, as_localhint, as_localonexecute] 180 | caption = '&Reset' 181 | font.name = 'stf_default' 182 | font.localprops = [] 183 | onexecute = onreset 184 | end 185 | object tbutton5: tbutton 186 | Tag = 1 187 | frame.optionsskin = [fso_flat] 188 | frame.localprops = [frl_optionsskin] 189 | frame.localprops1 = [] 190 | face.localprops = [] 191 | taborder = 5 192 | bounds_x = 106 193 | bounds_y = 2 194 | bounds_cx = 94 195 | bounds_cy = 24 196 | state = [as_default, as_localdefault, as_localcaption, as_localonexecute] 197 | caption = 'Find A&ll' 198 | font.name = 'stf_default' 199 | font.localprops = [] 200 | onexecute = onfindall 201 | end 202 | end 203 | -------------------------------------------------------------------------------- /src/findmessage.pas: -------------------------------------------------------------------------------- 1 | unit findmessage; 2 | 3 | {$ifdef FPC}{$mode objfpc}{$h+}{$endif} 4 | interface 5 | 6 | uses 7 | msetypes,msegrids,mseglob,mseguiglob,mseguiintf,mseapplication,msestat, 8 | msemenus,msegui,msegraphics,msegraphutils,mseevent,mseclasses,msewidgets, 9 | mseforms,msesimplewidgets,mseact,msedataedits,msedropdownlist,mseedit, 10 | mseificomp,mseificompglob,mseifiglob,msestatfile,msestream,SysUtils, 11 | msegraphedits,msescrollbar; 12 | 13 | type 14 | tfindmessagefo = class(tmseform) 15 | tbutton3: TButton; 16 | tbutton2: TButton; 17 | findtext: thistoryedit; 18 | casesensitive: tbooleanedit; 19 | tbutton4: TButton; 20 | tbutton5: TButton; 21 | procedure onfindnext(const Sender: TObject); 22 | procedure onclose(const Sender: TObject); 23 | procedure onreset(const Sender: TObject); 24 | procedure onfindall(const Sender: TObject); 25 | procedure onclosefind(const sender: TObject); 26 | procedure onchangefind(const sender: TObject); 27 | procedure resizefm(fonth: integer); 28 | end; 29 | 30 | var 31 | findmessagefo: tfindmessagefo; 32 | imessages: integer = 0; 33 | 34 | implementation 35 | 36 | uses 37 | filelistform, 38 | findmessage_mfm; 39 | 40 | procedure tfindmessagefo.resizefm(fonth: integer); 41 | var 42 | ratio: double; 43 | begin 44 | ratio := fonth / 12; 45 | bounds_cxmax := 0; 46 | bounds_cxmin := 0; 47 | bounds_cymax := 0; 48 | bounds_cymin := 0; 49 | bounds_cxmax := round(352 * ratio); 50 | bounds_cxmin := bounds_cxmax; 51 | bounds_cymax := round(58 * ratio); 52 | bounds_cymin := bounds_cymax; 53 | font.Height := fonth; 54 | 55 | casesensitive.frame.font.color := font.color; 56 | casesensitive.frame.font.Height := font.Height; 57 | casesensitive.left := round(207 * ratio); 58 | // casesensitive.Width := round(104 * ratio); 59 | // casesensitive.Height := round(298 * ratio); 60 | casesensitive.top := round(34 * ratio); 61 | 62 | findtext.font.color := font.color; 63 | findtext.font.Height := font.Height; 64 | findtext.left := round(6 * ratio); 65 | findtext.Width := round(190 * ratio); 66 | findtext.Height := round(22 * ratio); 67 | findtext.top := round(32 * ratio); 68 | 69 | tbutton2.font.color := font.color; 70 | tbutton2.font.Height := font.Height; 71 | tbutton2.left := round(6 * ratio); 72 | tbutton2.Width := round(94 * ratio); 73 | tbutton2.Height := round(24 * ratio); 74 | tbutton2.top := round(2 * ratio); 75 | 76 | tbutton3.font.color := font.color; 77 | tbutton3.font.Height := font.Height; 78 | tbutton3.left := round(281 * ratio); 79 | tbutton3.Width := round(66 * ratio); 80 | tbutton3.Height := round(24 * ratio); 81 | tbutton3.top := round(2 * ratio); 82 | 83 | tbutton4.font.color := font.color; 84 | tbutton4.font.Height := font.Height; 85 | tbutton4.left := round(206 * ratio); 86 | tbutton4.Width := round(68 * ratio); 87 | tbutton4.Height := round(24 * ratio); 88 | tbutton4.top := round(2 * ratio); 89 | 90 | tbutton5.font.color := font.color; 91 | tbutton5.font.Height := font.Height; 92 | tbutton5.left := round(106 * ratio); 93 | tbutton5.Width := round(94 * ratio); 94 | tbutton5.Height := round(24 * ratio); 95 | tbutton5.top := round(2 * ratio); 96 | end; 97 | 98 | procedure tfindmessagefo.onfindnext(const Sender: TObject); 99 | var 100 | found: Boolean = False; 101 | gridcoo: gridcoordty; 102 | begin 103 | 104 | gridcoo.col := 0; 105 | gridcoo.row := 0; 106 | 107 | if findtext.Value <> '' then 108 | begin 109 | while (imessages < filelistfo.list_files.rowcount) and (found = False) do 110 | begin 111 | if not casesensitive.Value then 112 | begin 113 | if system.pos(lowercase(findtext.Value), lowercase(filelistfo.list_files[0][imessages])) > 0 then 114 | begin 115 | found := True; 116 | gridcoo.row := imessages; 117 | end; 118 | end 119 | else if system.pos(findtext.Value,filelistfo.list_files[0][imessages]) > 0 then 120 | begin 121 | found := True; 122 | gridcoo.row := imessages; 123 | end; 124 | 125 | Inc(imessages); 126 | end; 127 | 128 | if found then 129 | begin 130 | filelistfo.list_files.selectcell(gridcoo, csm_select, False); 131 | filelistfo.list_files.focuscell(gridcoo); 132 | 133 | end 134 | else 135 | showerror(' ' + findtext.Value + ' not found.' + ' ', 'Warning'); 136 | end; 137 | //close; 138 | end; 139 | 140 | procedure tfindmessagefo.onclose(const Sender: TObject); 141 | begin 142 | Close; 143 | end; 144 | 145 | procedure tfindmessagefo.onreset(const Sender: TObject); 146 | begin 147 | imessages := 0; 148 | filelistfo.list_files.defocuscell; 149 | filelistfo.list_files.datacols.clearselection; 150 | end; 151 | 152 | procedure tfindmessagefo.onfindall(const Sender: TObject); 153 | var 154 | found: Boolean = False; 155 | incfind : integer = 0; 156 | gridcoo: gridcoordty; 157 | begin 158 | 159 | onreset(Sender); 160 | gridcoo.col := 0; 161 | gridcoo.row := 0; 162 | 163 | if findtext.Value <> '' then 164 | begin 165 | while (imessages < filelistfo.list_files.rowcount) do 166 | begin 167 | if not casesensitive.Value then 168 | begin 169 | if system.pos(lowercase(findtext.Value), lowercase(filelistfo.list_files[0][imessages])) > 0 then 170 | begin 171 | found := True; 172 | inc(incfind); 173 | gridcoo.row := imessages; 174 | filelistfo.list_files.selectcell(gridcoo, csm_select, False); 175 | end; 176 | end 177 | else if system.pos(findtext.Value, filelistfo.list_files[0][imessages]) > 0 then 178 | begin 179 | found := True; 180 | inc(incfind); 181 | gridcoo.row := imessages; 182 | filelistfo.list_files.selectcell(gridcoo, csm_select, False); 183 | end; 184 | 185 | Inc(imessages); 186 | end; 187 | 188 | if not found then 189 | showerror(' ' + findtext.Value + ' not found.' + ' ', 'Warning') 190 | else if incfind = 1 then filelistfo.list_files.focuscell(gridcoo) ; 191 | 192 | end; 193 | 194 | end; 195 | 196 | procedure tfindmessagefo.onclosefind(const sender: TObject); 197 | begin 198 | imessages := 0; 199 | 200 | end; 201 | 202 | procedure tfindmessagefo.onchangefind(const sender: TObject); 203 | begin 204 | imessages := 0; 205 | end; 206 | 207 | end. 208 | 209 | -------------------------------------------------------------------------------- /src/imagedancer.mfm: -------------------------------------------------------------------------------- 1 | object imagedancerfo: timagedancerfo 2 | frame.localprops = [] 3 | frame.localprops1 = [] 4 | frame.grip_size = 8 5 | frame.grip_grip = stb_dens0 6 | frame.grip_options = [go_closebutton, go_buttonhints, go_vert] 7 | frame.grip_face.localprops = [] 8 | frame.grip_face.template = mainfo.tfacebutgray 9 | frame.grip_faceactive.localprops = [] 10 | frame.grip_faceactive.template = mainfo.tfacegreen 11 | visible = False 12 | bounds_x = 318 13 | bounds_y = 252 14 | bounds_cx = 442 15 | bounds_cy = 206 16 | bounds_cxmin = 442 17 | bounds_cymin = 206 18 | container.frame.localprops = [] 19 | container.frame.localprops1 = [] 20 | container.face.localprops = [] 21 | container.face.template = mainfo.tfacebutgray 22 | container.bounds = ( 23 | 0 24 | 0 25 | 434 26 | 206 27 | ) 28 | dragdock.facetab = mainfo.tfacebutgray 29 | dragdock.faceactivetab = mainfo.tfaceplayerlight 30 | dragdock.optionsdock = [od_savepos, od_savezorder, od_canfloat, od_candock, od_captionhint] 31 | dragdock.onfloat = onfloat 32 | dragdock.ondock = ondock 33 | optionswindow = [wo_taskbar] 34 | statfile = mainfo.tstatfile1 35 | caption = 'Dancing Square' 36 | icon.options = [bmo_masked, bmo_graymask] 37 | icon.origformat = 'png' 38 | icon.image = { 39 | 00000000120000002000000020000000F4040000000000000000000000000000 40 | 00000000000000000000000000000000000000000000002FC5C2C001AAA5A301 41 | C0CFBA01968E8C010000001BC2CFBB018CC27B0161B938015AD20F0166B54401 42 | 9EC89001C5C2C101000000197E9E6D015BDB01015BDC000362C93401B0BFA801 43 | 00000018C4BFBD0171AD59015BDC000586987801000000119CA6BD01838FA901 44 | B4BCCD0100000004C4BFBE0175B95C015BDC00058189750100000010ABB1C001 45 | 3A83CA010486D8017098CD01D0D0D30100000003E1DEDD017BA8680159D70101 46 | 5BDC000354B71B0187827B0100000002B6B2B101A39C9A010000000CA9B0C101 47 | 3082CB010088DC010D82D20158668701847976010000000377696801689F4D01 48 | 5CD812015BDA080161CF2E0192AD8701D0CDCC010000000193949D014883C401 49 | 347CC10174788C010000000BB2AEAD01697798011D7ECA010088DC011281D101 50 | 6E87AF01B4B0B1010000000397B988018D938201676C510198A48D019E969501 51 | 00000001AEA9A7016687B7010088DC027E9CCA010000000D7B8BAA011386D801 52 | 0088DC011586D70185A3D001918E9601D7D4D401C0BEBD0187858E0193A4C401 53 | 9395A301B6B3B20100000001969EB0017792BE010E83D3010088DC013382CA01 54 | A1A9BC010000000DD3D0D001749BD1010D87DA010088DC010388DB014A83C401 55 | 6282B1017891B901197DC9010387DA012D84D0017387AC01687CA0014B86C701 56 | 0188DC010088DC011184D501818CA5010000000FA8A19F015B7299010A84D501 57 | 0088DC070983D4010187DB010088DC020287DA015E83B601988F8C0100000010 58 | 7B6D6B01859BC101597AAB01407BBB010088DC060685D701317CC2015782BA01 59 | 7D93B801B3BBCB0100000013CECBCA01A09DA001628BC1010088DC030F86D801 60 | 5184C2017690B9019E9B9E01BFBAB801000000168F8683014F76AB010088DC03 61 | 5184C001AAA4A201000000198C817F014D78AF010088DC035488C601ADA6A501 62 | 00000019BFBAB9016789BA010088DC031F80CC018990A3010000001A6980A801 63 | 0088DC04608AC00197979E01000000197687A8011A86D6010088DC046180AE01 64 | ABB6CB01000000189C9593014E7DB5010088DC054C86C7017369690100000017 65 | 695C59013080CA010088DC063776B70198ADCF01000000169DB3D7010887DA01 66 | 0088DC02578DCD01438ED8010088DC032D85D2016C6D7E0100000015B3BCCF01 67 | 0088DC034776AF01ACB2BF01476FA3010287DA010088DC02217DC70182818C01 68 | 00000013CBC7C7019BA3B6010088DC020486D901707A9601000000018A807E01 69 | 4A89CD010088DC020784D5016B67720100000011B5B0AF0196949B017289B001 70 | 3385D0010088DC02107DCA0196908F0100000001B0ABAB013C80C5010088DC02 71 | 3480C8017D97C00100000010AEB1BC016E7FA0014380C1010287DB010088DC03 72 | 2E7BC101B2B4BD01000000018094B6010386D9010088DC010587DA017483A201 73 | 0000000FA9A09E018996B1014C86C7010684D6010088DC030F84D5014F87C601 74 | 79829801E7E5E501B4AFAD013E81C5010088DC024485C901AAA5A3010000000F 75 | 9B9EAC011882D1010088DC030785D6013F82C7017A839B01ACA6A50100000002 76 | 9F9A99011E7FCB010088DC010785D7017988A601000000108B8484010D81D101 77 | 0088DC010585D6014686CA018895B001B8B6B801000000049F9894014A75AB01 78 | 0F7DCB013C74B1018D84840100000010BBB7B901738FBA016294D201728CB601 79 | AEB2C00100000007B1B8C801968F9001A9AFBE0100000012CFCECD01BFBBBA01 80 | D6D2D20100000035000400000000000000000000000000000000000000000000 81 | 0000000000000000000000000000000000000000000000000000000425551100 82 | 000000000000000000000000000000000000000000000000000018BBFFFFF077 83 | 02000000000000000000000000000000000000000000000000009AFFFFFFFFFF 84 | 5700000000000000000000000000000000000000000000000017F7FFFFFFFFFF 85 | A80000000000000000000000000000000000557E18000000001BFFFFFFFFFFFF 86 | AC0000000000000000000000000000000041FCFFDB2000000002B4FFFFFFFFFF 87 | 4D0000364300000000000000000000000049FEFFFFAB0600000012C3FEFFFB99 88 | 060044FBFD6B00000000000000000000000184FDFFFFA8060000000349552701 89 | 000CE0FFFFBD00000000000000000000000000A6FFFFFFAB17060A63A5480200 90 | 1798FFFFF63D000000000000000000000000000EC2FFFFFFFFD2DDFFFFFF97BC 91 | FBFFFFFF9B0000000000000000000000000000000DC0FFFFFFFFFFFFFFFFFFFF 92 | FFFFFFE00B000000000000000000000000000000000DACE1FFFFFFFFFFFFFFFF 93 | FFE0942E000000000000000000000000000000000000000B31FFFFFFFFFFDC8E 94 | 3B0B0000000000000000000000000000000000000000000015FFFFFFFFFF2200 95 | 00000000000000000000000000000000000000000000000015FFFFFFFFFF1B00 96 | 00000000000000000000000000000000000000000000000014FBFFFFFFFF5400 97 | 00000000000000000000000000000000000000000000000000B7FFFFFFFFEC16 98 | 0000000000000000000000000000000000000000000000000048FFFFFFFFFFDB 99 | 360000000000000000000000000000000000000000000000001BFFFFFFFFFFFF 100 | EE3800000000000000000000000000000000000000000000001BFFFFFFFFFFFF 101 | FFF17D0000000000000000000000000000000000000000000031FFFFFFC4F9FF 102 | FFFFFD8100000000000000000000000000000000000000000069FFFFFF714DDE 103 | FFFFFFFD6C000000000000000000000000000000000000000187FFFFFF6F0020 104 | E1FFFFFF910000000000000000000000000000000000012DACFDFFFFFF6F0038 105 | F8FFFFF729000000000000000000000000000000002E9AFDFFFFFFFFFD4F00BA 106 | FFFFFFAA000000000000000000000000000000079AFBFFFFFFFFFFF06B0332FA 107 | FFFFF82A00000000000000000000000000000084FFFFFFFFFFEF8D19000063FF 108 | FFFFA2000000000000000000000000000000008CFFFFFFFCAD2A000000001EE5 109 | FFEB27000000000000000000000000000000001FCCFEA836000000000000002A 110 | 6D2F000000000000000000000000000000000000071701000000000000000000 111 | 0000000000000000000000000000000000000000000000000000000000000000 112 | 000000000000000000000000 113 | } 114 | windowopacity = -Inf 115 | oncreate = crea 116 | oncreated = oncreat 117 | oneventloopstart = onevstart 118 | ondestroy = ondestroy 119 | onshow = onshow 120 | onhide = onhide 121 | moduleclassname = 'tdockform' 122 | object pb: tpaintbox 123 | optionswidget = [ow_mousefocus, ow_tabfocus, ow_arrowfocus, ow_mousewheel, ow_destroywidgets] 124 | color = -2147483645 125 | frame.localprops = [] 126 | frame.localprops1 = [] 127 | taborder = 1 128 | onpaint = onpaint_imagedancerfo 129 | bounds_x = 0 130 | bounds_y = 0 131 | bounds_cx = 434 132 | bounds_cy = 206 133 | anchors = [] 134 | onmouseevent = onmouseevform 135 | end 136 | object openglwidget: topenglwidget 137 | color = -2147483645 138 | visible = False 139 | bounds_x = 0 140 | bounds_y = 0 141 | bounds_cx = 434 142 | bounds_cy = 206 143 | bounds_cxmin = 200 144 | bounds_cymin = 200 145 | anchors = [] 146 | onmouseevent = onmouseevgl 147 | onrender = onrenderexe 148 | fpsmax = 30 149 | oncreatewinid = createwinidexe 150 | onclientrectchanged = clientrectchangedexe 151 | end 152 | end 153 | -------------------------------------------------------------------------------- /src/images/basstab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/images/basstab.png -------------------------------------------------------------------------------- /src/images/guiaretab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/images/guiaretab.png -------------------------------------------------------------------------------- /src/images/noimagetag.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/images/noimagetag.png -------------------------------------------------------------------------------- /src/images/noimagetag_anim.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/images/noimagetag_anim.png -------------------------------------------------------------------------------- /src/images/piano1oct.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/images/piano1oct.png -------------------------------------------------------------------------------- /src/images/piano4oct.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/images/piano4oct.png -------------------------------------------------------------------------------- /src/ini/dummy.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/ini/dummy.txt -------------------------------------------------------------------------------- /src/lib/FreeBSD/aarch64/libmpg123-64.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/lib/FreeBSD/aarch64/libmpg123-64.so -------------------------------------------------------------------------------- /src/lib/FreeBSD/aarch64/libportaudio-64.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/lib/FreeBSD/aarch64/libportaudio-64.so -------------------------------------------------------------------------------- /src/lib/FreeBSD/aarch64/libsndfile-64.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/lib/FreeBSD/aarch64/libsndfile-64.so -------------------------------------------------------------------------------- /src/lib/FreeBSD/amd64/libmpg123-64.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/lib/FreeBSD/amd64/libmpg123-64.so -------------------------------------------------------------------------------- /src/lib/FreeBSD/amd64/libportaudio-64.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/lib/FreeBSD/amd64/libportaudio-64.so -------------------------------------------------------------------------------- /src/lib/FreeBSD/amd64/libsndfile-64.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/lib/FreeBSD/amd64/libsndfile-64.so -------------------------------------------------------------------------------- /src/lib/FreeBSD/amd64/libsoundtouch-64.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/lib/FreeBSD/amd64/libsoundtouch-64.so -------------------------------------------------------------------------------- /src/lib/Linux/32bit/LibMpg123-32.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/lib/Linux/32bit/LibMpg123-32.so -------------------------------------------------------------------------------- /src/lib/Linux/32bit/LibPortaudio-32.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/lib/Linux/32bit/LibPortaudio-32.so -------------------------------------------------------------------------------- /src/lib/Linux/32bit/LibSndFile-32.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/lib/Linux/32bit/LibSndFile-32.so -------------------------------------------------------------------------------- /src/lib/Linux/32bit/LibSoundTouch-32.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/lib/Linux/32bit/LibSoundTouch-32.so -------------------------------------------------------------------------------- /src/lib/Linux/32bit/libxmp-32.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/lib/Linux/32bit/libxmp-32.so -------------------------------------------------------------------------------- /src/lib/Linux/64bit/LibMpg123-64.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/lib/Linux/64bit/LibMpg123-64.so -------------------------------------------------------------------------------- /src/lib/Linux/64bit/LibPortaudio-64.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/lib/Linux/64bit/LibPortaudio-64.so -------------------------------------------------------------------------------- /src/lib/Linux/64bit/LibSndFile-64.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/lib/Linux/64bit/LibSndFile-64.so -------------------------------------------------------------------------------- /src/lib/Linux/64bit/LibSndFile-64.so.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/lib/Linux/64bit/LibSndFile-64.so.2 -------------------------------------------------------------------------------- /src/lib/Linux/64bit/LibSoundTouch-64.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/lib/Linux/64bit/LibSoundTouch-64.so -------------------------------------------------------------------------------- /src/lib/Linux/64bit/libxmp-64.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/lib/Linux/64bit/libxmp-64.so -------------------------------------------------------------------------------- /src/lib/Linux/aarch64_raspberrypi/libmpg123_aarch64.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/lib/Linux/aarch64_raspberrypi/libmpg123_aarch64.so -------------------------------------------------------------------------------- /src/lib/Linux/aarch64_raspberrypi/libportaudio_aarch64.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/lib/Linux/aarch64_raspberrypi/libportaudio_aarch64.so -------------------------------------------------------------------------------- /src/lib/Linux/aarch64_raspberrypi/libsndfile_aarch64.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/lib/Linux/aarch64_raspberrypi/libsndfile_aarch64.so -------------------------------------------------------------------------------- /src/lib/Linux/aarch64_raspberrypi/libsoundtouch_aarch64.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/lib/Linux/aarch64_raspberrypi/libsoundtouch_aarch64.so -------------------------------------------------------------------------------- /src/lib/Linux/aarch64_raspberrypi/libxmp_aarch64.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/lib/Linux/aarch64_raspberrypi/libxmp_aarch64.so -------------------------------------------------------------------------------- /src/lib/Linux/arm_raspberrypi/libmpg123-arm.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/lib/Linux/arm_raspberrypi/libmpg123-arm.so -------------------------------------------------------------------------------- /src/lib/Linux/arm_raspberrypi/libportaudio-arm.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/lib/Linux/arm_raspberrypi/libportaudio-arm.so -------------------------------------------------------------------------------- /src/lib/Linux/arm_raspberrypi/libsndfile-arm.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/lib/Linux/arm_raspberrypi/libsndfile-arm.so -------------------------------------------------------------------------------- /src/lib/Linux/arm_raspberrypi/libsoundtouch-arm.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/lib/Linux/arm_raspberrypi/libsoundtouch-arm.so -------------------------------------------------------------------------------- /src/lib/Linux/arm_raspberrypi/libxmp-arm.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/lib/Linux/arm_raspberrypi/libxmp-arm.so -------------------------------------------------------------------------------- /src/lib/Mac/64bit/LibMpg123-64.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/lib/Mac/64bit/LibMpg123-64.dylib -------------------------------------------------------------------------------- /src/lib/Mac/64bit/LibPortaudio-64.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/lib/Mac/64bit/LibPortaudio-64.dylib -------------------------------------------------------------------------------- /src/lib/Mac/64bit/LibSndfile-64.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/lib/Mac/64bit/LibSndfile-64.dylib -------------------------------------------------------------------------------- /src/lib/Mac/64bit/libSoundTouchDLL.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/lib/Mac/64bit/libSoundTouchDLL.dylib -------------------------------------------------------------------------------- /src/lib/OpenBSD/64bit/LibMpg123-64.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/lib/OpenBSD/64bit/LibMpg123-64.so -------------------------------------------------------------------------------- /src/lib/OpenBSD/64bit/LibPortaudio-64.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/lib/OpenBSD/64bit/LibPortaudio-64.so -------------------------------------------------------------------------------- /src/lib/OpenBSD/64bit/LibSndFile-64.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/lib/OpenBSD/64bit/LibSndFile-64.so -------------------------------------------------------------------------------- /src/lib/OpenBSD/64bit/libSoundTouchDll-64.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/lib/OpenBSD/64bit/libSoundTouchDll-64.so -------------------------------------------------------------------------------- /src/lib/Windows/32bit/LibMpg123-32.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/lib/Windows/32bit/LibMpg123-32.dll -------------------------------------------------------------------------------- /src/lib/Windows/32bit/LibPortaudio-32.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/lib/Windows/32bit/LibPortaudio-32.dll -------------------------------------------------------------------------------- /src/lib/Windows/32bit/LibSndFile-32.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/lib/Windows/32bit/LibSndFile-32.dll -------------------------------------------------------------------------------- /src/lib/Windows/32bit/LibSoundTouch-32.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/lib/Windows/32bit/LibSoundTouch-32.dll -------------------------------------------------------------------------------- /src/lib/Windows/32bit/libgcc_s_dw2-1.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/lib/Windows/32bit/libgcc_s_dw2-1.dll -------------------------------------------------------------------------------- /src/lib/Windows/32bit/libxmp-32.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/lib/Windows/32bit/libxmp-32.dll -------------------------------------------------------------------------------- /src/lib/Windows/64bit/LibMpg123-64.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/lib/Windows/64bit/LibMpg123-64.dll -------------------------------------------------------------------------------- /src/lib/Windows/64bit/LibPortaudio-64.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/lib/Windows/64bit/LibPortaudio-64.dll -------------------------------------------------------------------------------- /src/lib/Windows/64bit/LibSndFile-64.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/lib/Windows/64bit/LibSndFile-64.dll -------------------------------------------------------------------------------- /src/lib/Windows/64bit/LibSoundTouch-64.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/lib/Windows/64bit/LibSoundTouch-64.dll -------------------------------------------------------------------------------- /src/lib/Windows/64bit/libxmp-64.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/lib/Windows/64bit/libxmp-64.dll -------------------------------------------------------------------------------- /src/linux-install-desktop-icon-StrumPract.sh: -------------------------------------------------------------------------------- 1 | ## Linux: Script to install icon on desktop and in menu Programming. 2 | ## Thanks to Roland Chastain. 3 | 4 | BASENAME="StrumPract" 5 | ## Application full name 6 | APP="strumpract" 7 | ## Script directory 8 | SCRDIR="$(dirname "$(readlink -f "$0")")" 9 | ## Desktop directory 10 | DDIR="$HOME/Desktop" 11 | ## Applications menu directory 12 | ADIR="$HOME/.local/share/applications" 13 | 14 | echo "INFO Create desktop and menu icon." 15 | 16 | if [ ! -d $DDIR ] ; 17 | then 18 | echo "WARNING Cannot find $DDIR" 19 | DDIR="$HOME/Bureau" 20 | fi 21 | 22 | if [ -d $DDIR ] ; 23 | then 24 | FILE=$DDIR/$BASENAME.desktop 25 | echo "INFO Create $FILE" 26 | cat > $FILE << EOF 27 | [Desktop Entry] 28 | Version=1.0 29 | Type=Application 30 | Name=StrumPract 31 | Comment=Tools for musicians 32 | Exec=$SCRDIR/strumpract %F 33 | Icon=$SCRDIR/strumpract.png 34 | Path=$SCRDIR/ 35 | Terminal=false 36 | StartupNotify=false 37 | Categories=AudioVideo;Audio;AudioVideoEditing; 38 | MimeType=application/x-ogg;application/ogg;audio/x-vorbis+ogg;audio/vorbis;audio/x-vorbis;audio/x-scpls;audio/x-mp3;audio/x-mpeg;audio/mpeg;audio/x-mpegurl;audio/x-flac;audio/mp4;audio/x-it;audio/x-mod;audio/x-s3m;audio/x-stm;audio/x-xm; 39 | Keywords=DJ;Synthesizer;Recording;Tuner;Audio;Song;MP3;Playlist; 40 | EOF 41 | echo "INFO Set permission" 42 | sudo chmod -R 777 $FILE 43 | echo "INFO Done" 44 | else 45 | echo "ERROR Cannot find $DDIR" 46 | exit 0 47 | fi 48 | 49 | echo "INFO Copy .desktop to applications menu directory" 50 | 51 | if [ -d $ADIR ] ; 52 | then 53 | FILE1=$DDIR/$BASENAME.desktop 54 | FILE2=$ADIR/$BASENAME.desktop 55 | echo "INFO Create $FILE2" 56 | cp -f $FILE1 $FILE2 57 | echo "INFO Set permission" 58 | sudo chmod -R 777 $FILE2 59 | echo "INFO Done" 60 | else 61 | echo "ERROR Cannot find $ADIR" 62 | exit 0 63 | fi 64 | -------------------------------------------------------------------------------- /src/mse_ovoaudiotag.pas: -------------------------------------------------------------------------------- 1 | { 2 | This file is part of OvoTag 3 | Copyright (C) 2011 Marco Caselli 4 | 5 | OvoPlayer is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU General Public License 7 | as published by the Free Software Foundation; either version 2 8 | of the License, or (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 | 19 | } 20 | {$I ovotag.inc} 21 | unit mse_ovoAudioTag; 22 | 23 | interface 24 | 25 | uses 26 | Classes, SysUtils, ovoSong, 27 | mse_ovobaseTag; 28 | 29 | function SupportedExtension: string; 30 | 31 | Procedure RegisterTagReader(const Extensions: string; 32 | const TagReader: TTagReaderClass); 33 | 34 | function LoadTags(Song: TSong): boolean; 35 | function ExtractTags(FileName: string): TCommonTags; overload; 36 | function ExtractTags(FileTags: TTagReader): TCommonTags; overload; 37 | function GetFileTagsObject(FileName: string): TTagReader; 38 | function IdentifyKind(FileName: string): TTagReaderClass; 39 | 40 | implementation 41 | uses strutils, ovofile_Dummy; 42 | 43 | type 44 | RTagReader = record 45 | Extensions : String; 46 | TagReader : TTagReaderClass; 47 | end; 48 | 49 | var 50 | AReaderList : array of RTagReader; 51 | 52 | function SupportedExtension: string; 53 | var 54 | i:Integer; 55 | begin 56 | result:= ''; 57 | for i := Low(AReaderList) to High(AReaderList) do 58 | result:= Result + AReaderList[i].Extensions; 59 | 60 | end; 61 | 62 | procedure RegisterTagReader(const Extensions: string; 63 | const TagReader: TTagReaderClass); 64 | var 65 | tr: RTagReader; 66 | begin 67 | tr.Extensions:=Extensions; 68 | tr.TagReader:=TagReader; 69 | SetLength(AReaderList, Length(AReaderList) +1); 70 | AReaderList[High(AReaderList)] := tr; 71 | end; 72 | 73 | function LoadTags(Song: Tsong): boolean; 74 | begin 75 | // Result := FileExistsUTF8(Song.FullName); 76 | Result := FileExists(Song.FullName); 77 | 78 | if result and not (song.TagLoaded) then 79 | begin 80 | Song.SetTags(ExtractTags(Song.FullName)); 81 | Song.TagLoaded := True; 82 | Result := Song.Tags.Title = ''; 83 | end; 84 | 85 | end; 86 | 87 | function GetFileTagsObject(FileName: string): TTagReader; 88 | var 89 | kind: TTagReaderClass; 90 | begin 91 | kind := IdentifyKind(FileName); 92 | Result:= kind.Create(FileName); // FallBack 93 | end; 94 | 95 | function IdentifyKind(FileName: string): TTagReaderClass; 96 | var 97 | ext: string; 98 | i : Integer; 99 | begin 100 | Result := TDummyReader; 101 | if AnsiStartsStr('HTTP:\\', UpperCase(FileName)) or 102 | AnsiStartsStr('MMS:\\', UpperCase(FileName)) then 103 | begin 104 | exit; 105 | end; 106 | 107 | ext := lowercase(ExtractFileExt(Filename)); 108 | 109 | for i := Low(AReaderList) to High(AReaderList) do 110 | if Pos(ext, AReaderList[i].Extensions) > 0 then 111 | begin 112 | result := AReaderList[i].TagReader; 113 | exit; 114 | end; 115 | end; 116 | 117 | function ExtractTags(FileTags: TTagReader): TCommonTags; 118 | begin 119 | Result := Default(TCommonTags); 120 | if FileTags = nil then 121 | exit; 122 | Result := FileTags.GetCommonTags; 123 | end; 124 | 125 | 126 | function ExtractTags(FileName: string): TCommonTags; 127 | var 128 | InteTags: TTagReader; 129 | begin 130 | InteTags:= GetFileTagsObject(FileName); 131 | result := ExtractTags(InteTags); 132 | InteTags.free; 133 | end; 134 | 135 | initialization 136 | setlength(AReaderList, 0); 137 | RegisterTagReader(DummyFileMask, TDummyReader); 138 | finalization 139 | setlength(AReaderList, 0); 140 | end. 141 | -------------------------------------------------------------------------------- /src/mse_ovotag_dummy.pas: -------------------------------------------------------------------------------- 1 | { 2 | This file is part of OvoTag 3 | Copyright (C) 2011 Marco Caselli 4 | 5 | OvoTag is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU General Public License 7 | as published by the Free Software Foundation; either version 2 8 | of the License, or (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 | 19 | } 20 | {$I ovotag.inc} 21 | unit mse_ovotag_Dummy; 22 | 23 | interface 24 | 25 | uses 26 | Classes, mclasses, SysUtils, mse_ovobaseTag; 27 | 28 | type 29 | { TDummyTags } 30 | 31 | TDummyTags = class(TTags) 32 | public 33 | Function GetCommonTags: TCommonTags; override; 34 | procedure SetCommonTags(CommonTags: TCommonTags); override; 35 | function ReadFromStream(AStream: TStream;ExtInfo:pointer=nil): boolean; override; 36 | function WriteToStream(AStream: TStream): DWord; override; 37 | end; 38 | 39 | 40 | implementation 41 | { TDummyTags } 42 | 43 | function TDummyTags.GetCommonTags: TCommonTags; 44 | begin 45 | Result:=inherited GetCommonTags; 46 | end; 47 | 48 | procedure TDummyTags.SetCommonTags(CommonTags: TCommonTags); 49 | begin 50 | inherited SetCommonTags(CommonTags); 51 | end; 52 | 53 | function TDummyTags.ReadFromStream(AStream: TStream;ExtInfo:pointer=nil): boolean; 54 | begin 55 | Clear; 56 | result := false; 57 | end; 58 | 59 | function TDummyTags.WriteToStream(AStream: TStream): DWord; 60 | begin 61 | Result := AStream.size; 62 | end; 63 | 64 | end. 65 | 66 | -------------------------------------------------------------------------------- /src/msememodialog.mfm: -------------------------------------------------------------------------------- 1 | object msememodialogfo: tmsememodialogfo 2 | visible = False 3 | bounds_x = 444 4 | bounds_y = 208 5 | bounds_cx = 409 6 | bounds_cy = 388 7 | container.frame.localprops = [] 8 | container.frame.localprops1 = [] 9 | container.bounds = ( 10 | 0 11 | 0 12 | 409 13 | 388 14 | ) 15 | font.color = -1610612734 16 | font.name = 'stf_default' 17 | font.localprops = [flp_color] 18 | options = [fo_screencentered, fo_closeonesc, fo_autoreadstat, fo_autowritestat, fo_savepos, fo_savestate] 19 | caption = 'Default PO header' 20 | icon.options = [bmo_masked, bmo_graymask] 21 | icon.origformat = 'png' 22 | icon.image = { 23 | 00000000120000002000000020000000E8050000000000000000000000000000 24 | 000000000000000000000000000000000000000000000048DADADA01E3E9E301 25 | D1E5D101D4E6D401EFF2EF01E8E8E8010000000398989801E5E5E501EEF2EE01 26 | D2E4D101D2E6D101E3E7E301CFCFCF010000000E10101001FEFEFE01C2D7C201 27 | 469244010A8000010E810401529950019EC39E01B9D2B901CEE7CE01CCE5CC01 28 | B8D1B80196BD9501449342010B8000010A800001579A5601D0E2D001F3F3F301 29 | 0000000D2B2B2B01CEDECE01268722010B8000060A8000020B80000646924401 30 | DCE7DC010000000DE4E4E40197BB96010B800010A8C6A701CCCCCC010000000C 31 | E0E0DF01609E5F010B80001089B18801D9D9D9010000000CE0E0E00161A06001 32 | 0B80001089B08801DDDDDD010000000CE0E0E00192B891010B800010A3C1A301 33 | BEBEBE010000000DC1D9C1010C8101010B80000E17851001D2E3D2010000000E 34 | EEF0EE017CAD7B010B80000E95BC9501F1F1F1010000000FDBE6DB0149914701 35 | 0B80000C649E6301E5EEE5010000000CFFFFFF01EEEEEE01FCFCFC01EBEBEB01 36 | FFFFFF01DAE8DA014A9748010B80000A64A26301E0EBE001FDFDFD01F0F0F001 37 | FFFEFF01E8E8E80100000008C7C7C701D7D6E1018F8BBA016C66AC01B1AFCB01 38 | EDEDEE01F1F1F101C4D8C401128408010B8000082D8A2901D2E2D201BDBDBD01 39 | ECE7EC01D99ED901CD5CCD01D894D801E9E1E9019F9F9F010000000572727201 40 | D5D4DF015C55A6013E309E023E319E01BCBBD001CACACA01EDEDED0198BF9801 41 | 0B800008ADCAAD01D2D2D201DCDCDC01DCAEDC01C601C603CE61CE01E2D8E201 42 | 00000005F3F3F3018E8ABA013E309E049A98C001EEEEEE0100000001DEEADE01 43 | 429240010B80000662A26101E7ECE70100000001F6F6F601CF73CF01C601C604 44 | D79DD701E2E2E20100000004D1D1DC0141339E013E309E04918EBB01FFFFFF01 45 | 00000001D8D8D801B4D0B4010B8100010B80000414850C01C4DBC401EEEEEE01 46 | 00000001FAFAFA01C653C601C601C604C732C701EBE4EB0100000004BAB8D001 47 | 3E309E059F9DC201DADADA0100000002E5E7E50189B888010B8000030C810101 48 | 9CC19C01F3F4F30100000002F0F0F001D17ED101C601C605E3C7E30100000004 49 | B0AECB013E309E05C4C3D70100000004E7EBE601AFCDAF0165A764016EA86D01 50 | BAD6BA01E7E9E70100000003D0D0D001DDB0DD01C601C605DDBFDD0100000004 51 | CDCCD9013F319E013E309E038480B501EFEFF10100000001E6E6E601D7E6E801 52 | BFDDE001E8EEEF01E2E2E201F6F6F601F9F9F901D5D5D501EFE4E401E0BDBD01 53 | E6D9D901E1E1E10100000001EEE5EE01CC5ECC01C601C603C622C601E7DBE701 54 | 00000004ECECEC019996BE013E309E027A76B101E0DFE6019E9E9E01E0E0E001 55 | B5DADE011EBDC50101BDC60173CAD101E7EEEE0100000002EBDCDC01CC5B5A01 56 | C6070101C6373601E3C5C501FAFAFA01D9D9D901E8D6E801CB58CB01C601C601 57 | C605C601D9A6D901E4E4E40100000005E6E6E801BEBDD201BEBDD101EBEBEE01 58 | C4C4C40100000001CCE2E50113BCC50101BDC603A9D6DA01DEDEDE01EFEFEF01 59 | D5959501C6070103C6353301E7D6D60100000001BBBBBB01EEE6EE01DFB9DF01 60 | E0C0E001EDECED010000000BE3E3E3018ACED40101BDC6046EC7CE01ECECEC01 61 | ECE8E801C73F3E01C6070104DAA2A201EFEFEF0100000010E3EAEB0128BEC601 62 | 01BDC6044FC3CB01FEFFFE01F8EEEE01C6151101C6070104CA585701F0EEEE01 63 | 00000010CAE4E70100BDC60101BDC60457C3CA01F5F5F501F2E9E901C61E1C01 64 | C6070104C61D1A01F1EAEA0100000010C7E2E50100BDC60101BDC6048DCFD501 65 | EBEBEB01F3F3F301CD6D6C01C6070104C6191601ECE2E20100000010DDE6E701 66 | 24BDC60101BDC604BFE1E40100000001C9C9C901DBACAC01C6070104C9525101 67 | EFEDED0100000010F8F8F80195D3D80101BDC6037DCBD201ECF0F00100000002 68 | EDE4E301CC616001C6070103DCA8A801E3E3E30100000011DDE7E80174C8CF01 69 | 1BBEC60185CCD201E2ECEE019B9B9B0100000002D0D0D001E9D9D901CF737301 70 | C71F1C01D2888701EDE6E60100000012D5D5D501ECEEEF01ECF2F301F2F2F201 71 | D4D4D40100000004E3E3E301F6F4F401F4EDED01F5F5F5010000004A00040000 72 | 0000000000000000000000000000000000000000000000000000000000000000 73 | 0000000000000000000000000000000000000000000000000000000000000000 74 | 000000000000000011769C975C180000000120659B9C6B090000000000000000 75 | 0000000000000117DAFDFFFFFFF8C99299D1FDFFFFFFFFC30C00000000000000 76 | 00000000000001B0FEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF8D00000000000000 77 | 00000000000015FAFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEA05000000000000 78 | 0000000000003CFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFD14000000000000 79 | 0000000000003AFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFD13000000000000 80 | 00000000000019FCFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEE06000000000000 81 | 00000000000000C2FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA100000000000000 82 | 000000000000004EFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA2E00000000000000 83 | 00000000000000009FFFFFFFFFFFFFFFFFFFFFFFFFFFFF7F0000000000000000 84 | 000000000136511A07B8FFFFFFFFFFFFFFFFFFFFFFFC9D0225512C0000000000 85 | 0000000FAFFEFFF4460FD0FFFFFFFFFFFFFFFFFFFFB90661FAFFFA8B06000000 86 | 000001ABFFFFFFFFD40131F7FFFFFFFFFFFFFFFFEA220AEBFFFFFFFC8B000000 87 | 000038FEFFFFFFFFFD160089FFFFFFFFFFFFFFFF690034FFFFFFFFFFF51D0000 88 | 000090FFFFFFFFFFFE1B0012E7FFFFFFFFFFFFCB04003BFFFFFFFFFFFF6F0000 89 | 0000B4FFFFFFFFFFFA0F000051FEFFFFFFFFF83100002AFFFFFFFFFFFF9A0000 90 | 0000B7FFFFFFFFFFC1000000005FECFFFFE24A00000003E1FFFFFFFFFF9A0000 91 | 00009EFEFFFFFFFF4E002398AC6B134D46137CAE8F160071FFFFFFFFFF7E0000 92 | 000039FCFFFFFF980127EAFFFFFD7500009BFBFBF8D01006B3FFFFFFF5220000 93 | 00000055C3C5640200BAFFFFFFFFEE081BFCFFFFFFFE9A000978C9BA3F000000 94 | 000000000000000031FEFFFFFFFFFF365DFFFFFFFFFEF20F0000000000000000 95 | 00000000000000006CFFFFFFFFFFFF4E6FFFFFFFFFFEFB4C0000000000000000 96 | 000000000000000088FFFFFFFFFFFF4568FFFFFFFFFFFE600000000000000000 97 | 000000000000000088FFFFFFFFFFFD1D3DFFFFFFFFFFFF640000000000000000 98 | 000000000000000077FFFFFFFFFFC90008EAFFFFFFFFFF500000000000000000 99 | 000000000000000025F8FFFFFFFB52000074FFFFFFFFF1100000000000000000 100 | 0000000000000000008CFFFFF98F01000006ACFFFFFC6C000000000000000000 101 | 0000000000000000000253753F0100000000034C744000000000000000000000 102 | 0000000000000000000000000000000000000000000000000000000000000000 103 | 0000000000000000000000000000000000000000000000000000000000000000 104 | } 105 | windowopacity = -Inf 106 | moduleclassname = 'tmseform' 107 | object tlayouter1: tlayouter 108 | bounds_x = 72 109 | bounds_y = 360 110 | bounds_cx = 330 111 | bounds_cy = 23 112 | anchors = [an_left, an_right, an_bottom] 113 | optionsscale = [osc_expandy, osc_shrinky, osc_expandshrinkx, osc_expandshrinky] 114 | optionslayout = [lao_placex, lao_aligny] 115 | align_glue = wam_start 116 | place_mindist = 8 117 | place_maxdist = 8 118 | place_mode = wam_end 119 | dist_top = 4 120 | options = [spao_gluebottom] 121 | object tbutton2: tbutton 122 | optionswidget1 = [ow1_fontglyphheight, ow1_autoscale, ow1_autowidth] 123 | frame.localprops = [] 124 | frame.localprops1 = [] 125 | frame.template = commanderfo.tframecomp2 126 | bounds_x = 274 127 | bounds_y = 0 128 | bounds_cx = 56 129 | bounds_cy = 23 130 | bounds_cxmin = 50 131 | state = [as_localcaption] 132 | caption = '&Cancel' 133 | font.color = -1610612734 134 | font.name = 'stf_default' 135 | font.localprops = [flp_color] 136 | modalresult = mr_cancel 137 | reffontheight = 17 138 | end 139 | object tbutton1: tbutton 140 | optionswidget1 = [ow1_fontglyphheight, ow1_autoscale, ow1_autowidth] 141 | frame.localprops = [] 142 | frame.localprops1 = [] 143 | frame.template = commanderfo.tframecomp2 144 | taborder = 1 145 | bounds_x = 216 146 | bounds_y = 0 147 | bounds_cx = 50 148 | bounds_cy = 23 149 | bounds_cxmin = 50 150 | state = [as_default, as_localdefault, as_localcaption] 151 | caption = '&OK' 152 | font.color = -1610612734 153 | font.name = 'stf_default' 154 | font.localprops = [flp_color] 155 | modalresult = mr_ok 156 | reffontheight = 17 157 | end 158 | end 159 | object memo: tmemoedit 160 | frame.localprops = [] 161 | frame.localprops1 = [] 162 | frame.sbhorz.pagesize = 1 163 | frame.sbvert.pagesize = 1 164 | taborder = 1 165 | bounds_x = 2 166 | bounds_y = 8 167 | bounds_cx = 405 168 | bounds_cy = 345 169 | anchors = [an_left, an_top, an_right, an_bottom] 170 | font.color = -1610612734 171 | font.name = 'stf_default' 172 | font.localprops = [] 173 | reffontheight = 17 174 | end 175 | end 176 | -------------------------------------------------------------------------------- /src/msememodialog.pas: -------------------------------------------------------------------------------- 1 | { MSEgui Copyright (c) 1999-2016 by Martin Schreiber 2 | 3 | See the file COPYING.MSE, included in this distribution, 4 | for details about the copyright. 5 | 6 | This program is distributed in the hope that it will be useful, 7 | but WITHOUT ANY WARRANTY; without even the implied warranty of 8 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 9 | } 10 | unit msememodialog; 11 | {$ifdef FPC}{$mode objfpc}{$h+}{$endif} 12 | interface 13 | uses 14 | mseglob,mseguiglob,mseapplication,msestat,msemenus,msegui,msegraphics, 15 | msegraphutils,mseevent,mseclasses,mseforms,msedataedits,mseedit,msestrings, 16 | msetypes,msestatfile,msesimplewidgets,msewidgets,msedialog,classes,mclasses, 17 | msedropdownlist,msesplitter, mseact, mseificomp, mseificompglob, mseifiglob, 18 | msestream, sysutils; 19 | 20 | type 21 | tmemodialogcontroller = class(tstringdialogcontroller) 22 | protected 23 | function execute(var avalue: msestring): boolean; override; 24 | end; 25 | 26 | tmemodialogedit = class(tcustomdialogstringed) 27 | protected 28 | function createdialogcontroller: tstringdialogcontroller; override; 29 | public 30 | constructor create(aowner: tcomponent); override; 31 | published 32 | property textflags default defaulttextflagsnoycentered; 33 | property textflagsactive default defaulttextflagsactivenoycentered; 34 | end; 35 | 36 | tmsememodialogfo = class(tmseform) 37 | tlayouter1: tlayouter; 38 | tbutton2: tbutton; 39 | tbutton1: tbutton; 40 | memo: tmemoedit; 41 | public 42 | constructor create(const aowner: tcomponent; const readonly: boolean); 43 | reintroduce; 44 | end; 45 | 46 | tdialogdropdownbuttonframe = class(tdropdownmultibuttonframe) 47 | private 48 | function getbuttondialog: tdropdownbutton; 49 | procedure setbuttondialog(const avalue: tdropdownbutton); 50 | public 51 | constructor create(const aintf: icaptionframe; 52 | const buttonintf: ibutton); override; 53 | published 54 | property buttondialog: tdropdownbutton read getbuttondialog 55 | write setbuttondialog; 56 | end; 57 | 58 | tdialoghistorycontroller = class(thistorycontroller) 59 | protected 60 | function getbuttonframeclass: dropdownbuttonframeclassty; override; 61 | end; 62 | 63 | tmemodialoghistoryedit = class(thistoryedit,ibutton) 64 | private 65 | // function getframe: tellipsebuttonframe; 66 | // procedure setframe(const avalue: tellipsebuttonframe); 67 | protected 68 | function createdropdowncontroller: tcustomdropdowncontroller; override; 69 | // procedure internalcreateframe; override; 70 | // procedure dokeydown(var info: keyeventinfoty); override; 71 | // procedure mouseevent(var info: mouseeventinfoty); override; 72 | // procedure updatereadonlystate; override; 73 | //ibutton 74 | procedure buttonaction(var action: buttonactionty; 75 | const buttonindex: integer); override; 76 | 77 | procedure internalexecute; 78 | function execute(var avalue: msestring): boolean; virtual; 79 | procedure setexecresult(var avalue: msestring); virtual; 80 | // function iskeyexecute(const info: keyeventinfoty): boolean; virtual; 81 | public 82 | constructor create(aowner: tcomponent); override; 83 | // property frame: tellipsebuttonframe read getframe write setframe; 84 | end; 85 | 86 | function memodialog(var avalue: msestring; const readonly: boolean): modalresultty; 87 | 88 | implementation 89 | uses 90 | msestockobjects, 91 | msememodialog_mfm,mseeditglob,msekeyboard; 92 | 93 | function memodialog(var avalue: msestring; const readonly: boolean): modalresultty; 94 | var 95 | dia1: tmsememodialogfo; 96 | begin 97 | dia1:= tmsememodialogfo.create(nil,readonly); 98 | try 99 | dia1.memo.value:= avalue; 100 | result:= dia1.show(true); 101 | if result = mr_ok then begin 102 | avalue:= dia1.memo.value; 103 | end; 104 | finally 105 | dia1.free; 106 | end; 107 | end; 108 | 109 | { tmemodialogcontroller } 110 | 111 | function tmemodialogcontroller.execute(var avalue: msestring): boolean; 112 | begin 113 | result:= memodialog(avalue,not fowner.editor.canedit) = mr_ok; 114 | end; 115 | 116 | { tmemodialogedit } 117 | 118 | constructor tmemodialogedit.create(aowner: tcomponent); 119 | begin 120 | inherited; 121 | ftextflags:= defaulttextflagsnoycentered; 122 | ftextflagsactive:= defaulttextflagsactivenoycentered; 123 | updatetextflags(); 124 | end; 125 | 126 | function tmemodialogedit.createdialogcontroller: tstringdialogcontroller; 127 | begin 128 | result:= tmemodialogcontroller.create(self); 129 | end; 130 | 131 | 132 | { 133 | function tmemodialogedit.execute(var avalue: msestring): boolean; 134 | begin 135 | result:= memodialog(avalue) = mr_ok; 136 | end; 137 | } 138 | { tmemodialoghistoryedit } 139 | 140 | constructor tmemodialoghistoryedit.create(aowner: tcomponent); 141 | begin 142 | inherited; 143 | // internalcreateframe; 144 | end; 145 | 146 | procedure tmemodialoghistoryedit.buttonaction(var action: buttonactionty; 147 | const buttonindex: integer); 148 | begin 149 | if buttonindex = 1 then begin 150 | if action = ba_click then begin 151 | if canfocus and not setfocus then begin 152 | exit; 153 | end; 154 | internalexecute; 155 | end; 156 | end 157 | else begin 158 | inherited; 159 | end; 160 | end; 161 | { 162 | procedure tmemodialoghistoryedit.internalcreateframe; 163 | begin 164 | tellipsebuttonframe.create(iscrollframe(self),ibutton(self)); 165 | updatereadonlystate; 166 | end; 167 | } 168 | function tmemodialoghistoryedit.execute(var avalue: msestring): boolean; 169 | begin 170 | result:= memodialog(avalue,readonly) = mr_ok; 171 | end; 172 | 173 | procedure tmemodialoghistoryedit.setexecresult(var avalue: msestring); 174 | begin 175 | text:= avalue; 176 | end; 177 | 178 | procedure tmemodialoghistoryedit.internalexecute; 179 | var 180 | str1: msestring; 181 | begin 182 | str1:= text; 183 | if execute(str1) then begin 184 | setexecresult(str1); 185 | checkvalue; 186 | end; 187 | end; 188 | 189 | function tmemodialoghistoryedit.createdropdowncontroller: tcustomdropdowncontroller; 190 | begin 191 | result:= tdialoghistorycontroller.create(idropdownlist(self)); 192 | end; 193 | 194 | { tdialoghistorycontroller } 195 | 196 | function tdialoghistorycontroller.getbuttonframeclass: dropdownbuttonframeclassty; 197 | begin 198 | result:= tdialogdropdownbuttonframe; 199 | end; 200 | 201 | { tdialogdropdownbuttonframe } 202 | 203 | constructor tdialogdropdownbuttonframe.create(const aintf: icaptionframe; 204 | const buttonintf: ibutton); 205 | begin 206 | inherited; 207 | buttons.count:= 2; 208 | buttons[1].imagenr:= ord(stg_ellipsesmall); 209 | end; 210 | 211 | function tdialogdropdownbuttonframe.getbuttondialog: tdropdownbutton; 212 | begin 213 | result:= tdropdownbutton(buttons[1]); 214 | end; 215 | 216 | procedure tdialogdropdownbuttonframe.setbuttondialog(const avalue: tdropdownbutton); 217 | begin 218 | tdropdownbutton(buttons[1]).assign(avalue); 219 | end; 220 | 221 | { tmsememodialogfo } 222 | 223 | constructor tmsememodialogfo.create(const aowner: tcomponent; 224 | const readonly: boolean); 225 | begin 226 | inherited create(aowner); 227 | if readonly then begin 228 | caption:= 'Memo text'; 229 | end; 230 | memo.readonly:= readonly; 231 | end; 232 | 233 | end. 234 | -------------------------------------------------------------------------------- /src/msesigfftgui.pas: -------------------------------------------------------------------------------- 1 | { MSEgui Copyright (c) 20010-2013 by Martin Schreiber 2 | 3 | See the file COPYING.MSE, included in this distribution, 4 | for details about the copyright. 5 | 6 | This program is distributed in the hope that it will be useful, 7 | but WITHOUT ANY WARRANTY; without even the implied warranty of 8 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 9 | } 10 | 11 | // 12 | // experimental 13 | // 14 | 15 | unit msesigfftgui; 16 | {$ifdef FPC}{$mode objfpc}{$h+}{$endif} 17 | interface 18 | uses 19 | msesignal,msechart,classes,mclasses,msesigfft,msegui,msegraphutils,msemenus, 20 | msegraphics,mseguiglob,mseclasses,msetypes; 21 | 22 | type 23 | tsigscopefft = class; 24 | tscopesamplerfft = class(tsigsamplerfft) 25 | private 26 | fscope: tsigscopefft; 27 | protected 28 | procedure dobufferfull; override; 29 | public 30 | constructor create(const aowner: tsigscopefft); reintroduce; 31 | end; 32 | 33 | tsigscopefft = class(tchart) 34 | private 35 | fsampler: tscopesamplerfft; 36 | ffftfirst: integer; 37 | ffftcount: integer; 38 | fslave: tsigscopefft; 39 | procedure setsampler(const avalue: tscopesamplerfft); 40 | procedure setslave(const avalue: tsigscopefft); 41 | public 42 | constructor create(aowner: tcomponent); override; 43 | destructor destroy; override; 44 | published 45 | property sampler: tscopesamplerfft read fsampler write setsampler; 46 | property fftfirst: integer read ffftfirst write ffftfirst default 0; 47 | property fftcount: integer read ffftcount write ffftcount default 0; 48 | //0 -> all 49 | property slave: tsigscopefft read fslave write setslave; 50 | end; 51 | 52 | implementation 53 | uses 54 | sysutils; 55 | 56 | { tsigscopefft } 57 | 58 | constructor tsigscopefft.create(aowner: tcomponent); 59 | begin 60 | fsampler:= tscopesamplerfft.create(self); 61 | inherited; 62 | end; 63 | 64 | destructor tsigscopefft.destroy; 65 | begin 66 | fsampler.free; 67 | inherited; 68 | end; 69 | 70 | procedure tsigscopefft.setsampler(const avalue: tscopesamplerfft); 71 | begin 72 | fsampler.assign(avalue); 73 | end; 74 | 75 | procedure tsigscopefft.setslave(const avalue: tsigscopefft); 76 | var 77 | slave1: tsigscopefft; 78 | begin 79 | slave1:= avalue; 80 | while slave1 <> nil do begin 81 | if slave1 = self then begin 82 | raise exception.create(name+': recursive slave '+avalue.name+'.'); 83 | end; 84 | slave1:= slave1.slave; 85 | end; 86 | setlinkedvar(tmsecomponent(avalue),tmsecomponent(fslave)); 87 | end; 88 | 89 | { tscopesamplerfft } 90 | 91 | constructor tscopesamplerfft.create(const aowner: tsigscopefft); 92 | begin 93 | fscope:= aowner; 94 | inherited create(aowner); 95 | setsubcomponent(true); 96 | name:= 'sampler'; 97 | end; 98 | 99 | procedure tscopesamplerfft.dobufferfull; 100 | 101 | procedure handleslave(const asampler: tscopesamplerfft; 102 | const asig,afft: samplerbufferty); 103 | //todo: optimize slave handling, no additional buffer copy 104 | var 105 | buf1: samplerbufferty; 106 | int1: integer; 107 | int2: integer; 108 | //intmin3, int3min: integer; 109 | int3: integer = 0; 110 | float1 : double = 0.0; 111 | begin 112 | with asampler do begin 113 | 114 | if sso_fftmag in options then begin 115 | with fscope do begin 116 | if (ffftfirst = 0) and (ffftcount = 0) then begin 117 | buf1:= afft; 118 | end 119 | else begin 120 | int2:= ffftcount; 121 | if int2 = 0 then begin 122 | int2:= bigint; 123 | end; 124 | setlength(buf1,length(afft)); 125 | for int1:= 0 to high(buf1) do begin 126 | buf1[int1]:= copy(afft[int1],fftfirst,int2); 127 | end; 128 | end; 129 | end; 130 | end 131 | else begin 132 | buf1:= copy(asig); 133 | end; 134 | lockapplication; 135 | try 136 | with fscope.traces do begin 137 | for int1:= 0 to high(buf1) do begin 138 | if int1 >= count then begin 139 | break; 140 | end; 141 | 142 | items[int1].ydata:= realarty(buf1[int1]); 143 | 144 | { 145 | for int2:= 10 to 22000 - 1 do 146 | if items[int1].ydata[int2] > float1 then 147 | begin 148 | int3 := int2; 149 | float1 := items[int1].ydata[int2]; 150 | end; 151 | } 152 | // writeln(inttostr(items[int1].ydata[int2])); 153 | // writeln('+' + inttostr(int3) + '/' + inttostr(length(items[int1].ydata))); 154 | 155 | // writeln(' Freq = ' + inttostr(round(int3 / 1.494)) + ' Hz'); 156 | // writeln(' Freq = ' + inttostr(round(int3 / 1.494)) + ' Hz'); 157 | 158 | end; 159 | end; 160 | finally 161 | unlockapplication; 162 | end; 163 | end; 164 | end; //handleslave() 165 | var 166 | slave: tsigscopefft; 167 | begin 168 | inherited; 169 | slave:= self.fscope; 170 | while slave <> nil do begin 171 | handleslave(slave.fsampler,fsigbuffer,ffftbuffer); 172 | slave:= slave.slave; 173 | end; 174 | end; 175 | 176 | end. 177 | -------------------------------------------------------------------------------- /src/ovofile_dummy.pas: -------------------------------------------------------------------------------- 1 | { 2 | This file is part of OvoTag 3 | Copyright (C) 2011 Marco Caselli 4 | 5 | OvoTag is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU General Public License 7 | as published by the Free Software Foundation; either version 2 8 | of the License, or (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 | 19 | } 20 | {$I ovotag.inc} 21 | unit ovofile_Dummy; 22 | 23 | interface 24 | 25 | uses 26 | Classes, SysUtils, mse_ovobaseTag, mse_ovotag_Dummy; 27 | 28 | const 29 | DummyFileMask: string = ''; 30 | // DummyFileMask: string = '*.aac;*.m4a'; 31 | 32 | type 33 | 34 | { TDummyReader } 35 | 36 | TDummyReader = class(TTagReader) 37 | private 38 | fTags: TTags; 39 | protected 40 | function GetDuration: int64; override; 41 | function GetTags: TTags; override; 42 | public 43 | function LoadFromFile(AFileName: Tfilename): boolean; override; 44 | function SaveToFile(AFileName: Tfilename): boolean; override; 45 | end; 46 | 47 | implementation 48 | 49 | { TDummyReader } 50 | 51 | function TDummyReader.GetDuration: int64; 52 | begin 53 | Result := 0; 54 | end; 55 | 56 | function TDummyReader.GetTags: TTags; 57 | begin 58 | Result := fTags; 59 | end; 60 | 61 | function TDummyReader.LoadFromFile(AFileName: Tfilename): boolean; 62 | begin 63 | inherited LoadFromFile(AFileName); 64 | Result := false; 65 | fTags := TDummyTags.Create; 66 | end; 67 | 68 | function TDummyReader.SaveToFile(AFileName: Tfilename): boolean; 69 | begin 70 | Result:=False; 71 | end; 72 | 73 | initialization 74 | // Moved to Audiotag unit because this must be always registered 75 | // RegisterTagReader(DummyFileMask, TDummyReader); 76 | end. 77 | 78 | -------------------------------------------------------------------------------- /src/ovoid3v1genres.pas: -------------------------------------------------------------------------------- 1 | { 2 | This file is part of h0td0g 3 | Copyright (C) 2003-2008 George Poulios (geopoul@h0td0g.org) 4 | 5 | h0td0g is free software; you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation; either version 2 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | } 19 | 20 | {$I ovotag.inc} 21 | unit ovoID3v1Genres; 22 | 23 | interface 24 | 25 | const 26 | ID3_MaxGenre=125; 27 | ID3_MaxGenreExtended = 147; 28 | v1Genres:array[0..ID3_MaxGenreExtended] of string= 29 | ({ 0} 'Blues', 30 | { 1} 'Classic Rock', 31 | { 2} 'Country', 32 | { 3} 'Dance', 33 | { 4} 'Disco', 34 | { 5} 'Funk', 35 | { 6} 'Grunge', 36 | { 7} 'Hip-Hop', 37 | { 8} 'Jazz', 38 | { 9} 'Metal', 39 | { 10} 'New Age', 40 | { 11} 'Oldies', 41 | { 12} 'Other', 42 | { 13} 'Pop', 43 | { 14} 'R&B', 44 | { 15} 'Rap', 45 | { 16} 'Reggae', 46 | { 17} 'Rock', 47 | { 18} 'Techno', 48 | { 19} 'Industrial', 49 | { 20} 'Alternative', 50 | { 21} 'Ska', 51 | { 22} 'Death Metal', 52 | { 23} 'Pranks', 53 | { 24} 'Soundtrack', 54 | { 25} 'Euro-Techno', 55 | { 26} 'Ambient', 56 | { 27} 'Trip-Hop', 57 | { 28} 'Vocal', 58 | { 29} 'Jazz+Funk', 59 | { 30} 'Fusion', 60 | { 31} 'Trance', 61 | { 32} 'Classical', 62 | { 33} 'Instrumental', 63 | { 34} 'Acid', 64 | { 35} 'House', 65 | { 36} 'Game', 66 | { 37} 'Sound Clip', 67 | { 38} 'Gospel', 68 | { 39} 'Noise', 69 | { 40} 'AlternRock', 70 | { 41} 'Bass', 71 | { 42} 'Soul', 72 | { 43} 'Punk', 73 | { 44} 'Space', 74 | { 45} 'Meditative', 75 | { 46} 'Instrumental Pop', 76 | { 47} 'Instrumental Rock', 77 | { 48} 'Ethnic', 78 | { 49} 'Gothic', 79 | { 50} 'Darkwave', 80 | { 51} 'Techno-Industrial', 81 | { 52} 'Electronic', 82 | { 53} 'Pop-Folk', 83 | { 54} 'Eurodance', 84 | { 55} 'Dream', 85 | { 56} 'Southern Rock', 86 | { 57} 'Comedy', 87 | { 58} 'Cult', 88 | { 59} 'Gangsta', 89 | { 60} 'Top 40', 90 | { 61} 'Christian Rap', 91 | { 62} 'Pop/Funk', 92 | { 63} 'Jungle', 93 | { 64} 'Native American', 94 | { 65} 'Cabaret', 95 | { 66} 'New Wave', 96 | { 67} 'Psychedelic', 97 | { 68} 'Rave', 98 | { 69} 'Showtunes', 99 | { 70} 'Trailer', 100 | { 71} 'Lo-Fi', 101 | { 72} 'Tribal', 102 | { 73} 'Acid Punk', 103 | { 74} 'Acid Jazz', 104 | { 75} 'Polka', 105 | { 76} 'Retro', 106 | { 77} 'Musical', 107 | { 78} 'Rock & Roll', 108 | { 79} 'Hard Rock', 109 | {Nullsoft extensions:} 110 | { 80} 'Folk', 111 | { 81} 'Folk-Rock', 112 | { 82} 'National Folk', 113 | { 83} 'Swing', 114 | { 84} 'Fast Fusion', 115 | { 85} 'Bebob', 116 | { 86} 'Latin', 117 | { 87} 'Revival', 118 | { 88} 'Celtic', 119 | { 89} 'Bluegrass', 120 | { 90} 'Avantgarde', 121 | { 91} 'Gothic Rock', 122 | { 92} 'Progressive Rock', 123 | { 93} 'Psychedelic Rock', 124 | { 94} 'Symphonic Rock', 125 | { 95} 'Slow Rock', 126 | { 96} 'Big Band', 127 | { 97} 'Chorus', 128 | { 98} 'Easy Listening', 129 | { 99} 'Acoustic', 130 | {100} 'Humour', 131 | {101} 'Speech', 132 | {102} 'Chanson', 133 | {103} 'Opera', 134 | {104} 'Chamber Music', 135 | {105} 'Sonata', 136 | {106} 'Symphony', 137 | {107} 'Booty Bass', 138 | {108} 'Primus', 139 | {109} 'Porn Groove', 140 | {110} 'Satire', 141 | {111} 'Slow Jam', 142 | {112} 'Club', 143 | {113} 'Tango', 144 | {114} 'Samba', 145 | {115} 'Folklore', 146 | {116} 'Ballad', 147 | {117} 'Power Ballad', 148 | {118} 'Rhythmic Soul', 149 | {119} 'Freestyle', 150 | {120} 'Duet', 151 | {121} 'Punk Rock', 152 | {122} 'Drum Solo', 153 | {123} 'A capella', 154 | {124} 'Euro-House', 155 | {125} 'Dance Hall', 156 | {Nullsoft extensions 2:} 157 | {126} 'Goa', 158 | {127} 'Drum & Bass', 159 | {128} 'Club-House', 160 | {129} 'Hardcore', 161 | {130} 'Terror', 162 | {131} 'Indie', 163 | {132} 'BritPop', 164 | {133} 'Negerpunk', 165 | {134} 'Polsk Punk', 166 | {135} 'Beat', 167 | {136} 'Christian Gangsta Rap', 168 | {137} 'Heavy Metal', 169 | {138} 'Black Metal', 170 | {139} 'Crossover', 171 | {140} 'Contemporary Christian', 172 | {141} 'Christian Rock', 173 | {142} 'Merengue', 174 | {143} 'Salsa', 175 | {144} 'Thrash Metal', 176 | {145} 'Anime', 177 | {146} 'JPop', 178 | {147} 'Synthpop'); 179 | 180 | implementation 181 | 182 | end. 183 | -------------------------------------------------------------------------------- /src/ovosong.pas: -------------------------------------------------------------------------------- 1 | { 2 | This file is part of OvoTag 3 | Copyright (C) 2011 Marco Caselli 4 | 5 | OvoTag is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU General Public License 7 | as published by the Free Software Foundation; either version 2 8 | of the License, or (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 | 19 | } 20 | {$I ovotag.inc} 21 | unit ovosong; 22 | 23 | interface 24 | 25 | uses 26 | Classes, SysUtils, mse_ovobasetag; 27 | 28 | type 29 | TTagKind = (tkNone, tkAlbum, tkAlbumArtist, tkArtist, tkSong, tkYear, tkGenre, tkTrack); 30 | 31 | type 32 | { TSong } 33 | 34 | PSong = ^TSong; 35 | 36 | TSong = class 37 | private 38 | FExtraProperty: TObject; 39 | FFullName: string; 40 | FName: string; 41 | fFilePath: string; 42 | FFileName: string; 43 | FTagLoaded: boolean; 44 | FTags: TCommonTags; 45 | function GetTags: TCommonTags; 46 | function GetTitle: string; 47 | procedure SetExtraProperty(AValue: TObject); 48 | procedure SetFullName(const AValue: string); 49 | procedure SetName(const AValue: string); 50 | procedure SetTagLoaded(const AValue: boolean); 51 | public 52 | constructor Create(aFileName: string); virtual; 53 | destructor Destroy; override; 54 | procedure SetTags(const AValue: TCommonTags); 55 | Function LoadTags: boolean; 56 | public 57 | property FilePath: string read FFilePath; 58 | property FileName: TFileName read FFileName; 59 | property Title: string read GetTitle; 60 | property Tags: TCommonTags read GetTags; 61 | property TagLoaded: boolean read FTagLoaded write SetTagLoaded; 62 | property FullName: string read FFullName write SetFullName; 63 | property ExtraProperty :TObject read FExtraProperty write SetExtraProperty; 64 | end; 65 | 66 | function TagValue(Tags: TCommonTags; Kind: TTagKind): string; 67 | 68 | implementation 69 | 70 | { TSong } 71 | uses mse_ovoAudioTag; 72 | 73 | function TagValue(Tags: TCommonTags; Kind: TTagKind): string; 74 | begin 75 | case Kind of 76 | tkAlbum: Result := Tags.Album; 77 | tkAlbumArtist: Result := Tags.AlbumArtist; 78 | tkArtist: Result := Tags.Artist; 79 | tkSong: Result := Tags.Title; 80 | tkYear: Result := Tags.Year; 81 | tkGenre: Result := Tags.Genre; 82 | tkTrack: Result := tags.TrackString; 83 | tkNone: Result := ''; 84 | else 85 | Result :='' 86 | end; 87 | end; 88 | 89 | function TSong.GetTitle: string; 90 | begin 91 | if fTagLoaded and (FTags.Title <> '') then 92 | Result := FTags.Title 93 | else 94 | Result := FFileName; 95 | end; 96 | 97 | procedure TSong.SetExtraProperty(AValue: TObject); 98 | begin 99 | if FExtraProperty=AValue then Exit; 100 | FExtraProperty:=AValue; 101 | end; 102 | 103 | function TSong.GetTags: TCommonTags; 104 | begin 105 | if not FTagLoaded then 106 | mse_ovoAudioTag.LoadTags(Self); 107 | 108 | Result := FTags; 109 | 110 | end; 111 | 112 | procedure TSong.SetFullName(const AValue: string); 113 | begin 114 | if FFullName = AValue then 115 | exit; 116 | FFullName := AValue; 117 | end; 118 | 119 | procedure TSong.SetName(const AValue: string); 120 | begin 121 | if FName = AValue then 122 | exit; 123 | FName := AValue; 124 | end; 125 | 126 | procedure TSong.SetTagLoaded(const AValue: boolean); 127 | begin 128 | if FTagLoaded = AValue then 129 | exit; 130 | FTagLoaded := aValue; 131 | end; 132 | 133 | procedure TSong.SetTags(const AValue: TCommonTags); 134 | begin 135 | FTags := AValue; 136 | end; 137 | 138 | function TSong.LoadTags: boolean; 139 | begin 140 | Result := mse_ovoAudioTag.LoadTags(Self); 141 | 142 | end; 143 | 144 | constructor TSong.Create(aFileName: string); 145 | begin 146 | FFilePath := extractfilepath(aFileName); 147 | FFileName := ExtractFileName(AfileName); 148 | FFullName := aFileName; 149 | FTags.ID := -1; 150 | FTagLoaded := False; 151 | FExtraProperty := nil; 152 | end; 153 | 154 | destructor TSong.Destroy; 155 | begin 156 | if Assigned(FExtraProperty) then 157 | FExtraProperty.Free; 158 | inherited Destroy; 159 | end; 160 | 161 | end. 162 | -------------------------------------------------------------------------------- /src/ovotag.inc: -------------------------------------------------------------------------------- 1 | { 2 | This file is part of OvoTag 3 | Copyright (C) 2011 Marco Caselli 4 | 5 | OvoTag is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU General Public License 7 | as published by the Free Software Foundation; either version 2 8 | of the License, or (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 | 19 | } 20 | // Master include File for OvoTag library 21 | //if release is defined, try to be quiet and efficient... 22 | {$mode objfpc}{$H+} 23 | {$interfaces corba} 24 | 25 | {$IFDEF RELEASE} 26 | {$HINTS OFF} 27 | {$INLINE ON} 28 | {$ENDIF RELEASE} 29 | -------------------------------------------------------------------------------- /src/sound/bass/Ba1_SOL_G.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/bass/Ba1_SOL_G.mp3 -------------------------------------------------------------------------------- /src/sound/bass/Ba2_RE_D.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/bass/Ba2_RE_D.mp3 -------------------------------------------------------------------------------- /src/sound/bass/Ba3_LA_A.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/bass/Ba3_LA_A.mp3 -------------------------------------------------------------------------------- /src/sound/bass/Ba4_MI_E.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/bass/Ba4_MI_E.mp3 -------------------------------------------------------------------------------- /src/sound/drums/BD.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/drums/BD.mp3 -------------------------------------------------------------------------------- /src/sound/drums/HH.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/drums/HH.mp3 -------------------------------------------------------------------------------- /src/sound/drums/OH.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/drums/OH.mp3 -------------------------------------------------------------------------------- /src/sound/drums/SD.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/drums/SD.mp3 -------------------------------------------------------------------------------- /src/sound/guitar/1_MI_E.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/guitar/1_MI_E.mp3 -------------------------------------------------------------------------------- /src/sound/guitar/2_SI_B.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/guitar/2_SI_B.mp3 -------------------------------------------------------------------------------- /src/sound/guitar/3_SOL_G.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/guitar/3_SOL_G.mp3 -------------------------------------------------------------------------------- /src/sound/guitar/4_RE_D.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/guitar/4_RE_D.mp3 -------------------------------------------------------------------------------- /src/sound/guitar/5_LA_A.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/guitar/5_LA_A.mp3 -------------------------------------------------------------------------------- /src/sound/guitar/6_MI_E.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/guitar/6_MI_E.mp3 -------------------------------------------------------------------------------- /src/sound/guitar/A7_GUIT.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/guitar/A7_GUIT.mp3 -------------------------------------------------------------------------------- /src/sound/guitar/A_GUIT.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/guitar/A_GUIT.mp3 -------------------------------------------------------------------------------- /src/sound/guitar/Am7_GUIT.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/guitar/Am7_GUIT.mp3 -------------------------------------------------------------------------------- /src/sound/guitar/Am_GUIT.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/guitar/Am_GUIT.mp3 -------------------------------------------------------------------------------- /src/sound/guitar/B_GUIT.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/guitar/B_GUIT.mp3 -------------------------------------------------------------------------------- /src/sound/guitar/Bm_GUIT.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/guitar/Bm_GUIT.mp3 -------------------------------------------------------------------------------- /src/sound/guitar/C_GUIT.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/guitar/C_GUIT.mp3 -------------------------------------------------------------------------------- /src/sound/guitar/Cm_GUIT.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/guitar/Cm_GUIT.mp3 -------------------------------------------------------------------------------- /src/sound/guitar/D_GUIT.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/guitar/D_GUIT.mp3 -------------------------------------------------------------------------------- /src/sound/guitar/Dm_GUIT.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/guitar/Dm_GUIT.mp3 -------------------------------------------------------------------------------- /src/sound/guitar/E_GUIT.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/guitar/E_GUIT.mp3 -------------------------------------------------------------------------------- /src/sound/guitar/Em_GUIT.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/guitar/Em_GUIT.mp3 -------------------------------------------------------------------------------- /src/sound/guitar/F_GUIT.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/guitar/F_GUIT.mp3 -------------------------------------------------------------------------------- /src/sound/guitar/Fm_GUIT.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/guitar/Fm_GUIT.mp3 -------------------------------------------------------------------------------- /src/sound/guitar/G_GUIT.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/guitar/G_GUIT.mp3 -------------------------------------------------------------------------------- /src/sound/guitar/Gm_GUIT.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/guitar/Gm_GUIT.mp3 -------------------------------------------------------------------------------- /src/sound/piano/A_PIANO.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/piano/A_PIANO.mp3 -------------------------------------------------------------------------------- /src/sound/piano/Am_PIANO.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/piano/Am_PIANO.mp3 -------------------------------------------------------------------------------- /src/sound/piano/B_PIANO.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/piano/B_PIANO.mp3 -------------------------------------------------------------------------------- /src/sound/piano/Bm_PIANO.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/piano/Bm_PIANO.mp3 -------------------------------------------------------------------------------- /src/sound/piano/C_PIANO.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/piano/C_PIANO.mp3 -------------------------------------------------------------------------------- /src/sound/piano/Cm_PIANO.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/piano/Cm_PIANO.mp3 -------------------------------------------------------------------------------- /src/sound/piano/D_PIANO.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/piano/D_PIANO.mp3 -------------------------------------------------------------------------------- /src/sound/piano/Dm_PIANO.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/piano/Dm_PIANO.mp3 -------------------------------------------------------------------------------- /src/sound/piano/E_PIANO.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/piano/E_PIANO.mp3 -------------------------------------------------------------------------------- /src/sound/piano/Em_PIANO.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/piano/Em_PIANO.mp3 -------------------------------------------------------------------------------- /src/sound/piano/F_PIANO.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/piano/F_PIANO.mp3 -------------------------------------------------------------------------------- /src/sound/piano/Fm_PIANO.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/piano/Fm_PIANO.mp3 -------------------------------------------------------------------------------- /src/sound/piano/G_PIANO.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/piano/G_PIANO.mp3 -------------------------------------------------------------------------------- /src/sound/piano/Gm_PIANO.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/piano/Gm_PIANO.mp3 -------------------------------------------------------------------------------- /src/sound/song/test.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/song/test.mp3 -------------------------------------------------------------------------------- /src/sound/voice/de/1.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/voice/de/1.mp3 -------------------------------------------------------------------------------- /src/sound/voice/de/2.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/voice/de/2.mp3 -------------------------------------------------------------------------------- /src/sound/voice/de/3.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/voice/de/3.mp3 -------------------------------------------------------------------------------- /src/sound/voice/de/4.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/voice/de/4.mp3 -------------------------------------------------------------------------------- /src/sound/voice/de/and.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/voice/de/and.mp3 -------------------------------------------------------------------------------- /src/sound/voice/en/1.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/voice/en/1.mp3 -------------------------------------------------------------------------------- /src/sound/voice/en/2.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/voice/en/2.mp3 -------------------------------------------------------------------------------- /src/sound/voice/en/3.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/voice/en/3.mp3 -------------------------------------------------------------------------------- /src/sound/voice/en/4.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/voice/en/4.mp3 -------------------------------------------------------------------------------- /src/sound/voice/en/and.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/voice/en/and.mp3 -------------------------------------------------------------------------------- /src/sound/voice/es/1.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/voice/es/1.mp3 -------------------------------------------------------------------------------- /src/sound/voice/es/2.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/voice/es/2.mp3 -------------------------------------------------------------------------------- /src/sound/voice/es/3.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/voice/es/3.mp3 -------------------------------------------------------------------------------- /src/sound/voice/es/4.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/voice/es/4.mp3 -------------------------------------------------------------------------------- /src/sound/voice/es/and.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/voice/es/and.mp3 -------------------------------------------------------------------------------- /src/sound/voice/fr/1.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/voice/fr/1.mp3 -------------------------------------------------------------------------------- /src/sound/voice/fr/2.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/voice/fr/2.mp3 -------------------------------------------------------------------------------- /src/sound/voice/fr/3.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/voice/fr/3.mp3 -------------------------------------------------------------------------------- /src/sound/voice/fr/4.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/voice/fr/4.mp3 -------------------------------------------------------------------------------- /src/sound/voice/fr/and.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/voice/fr/and.mp3 -------------------------------------------------------------------------------- /src/sound/voice/it/1.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/voice/it/1.mp3 -------------------------------------------------------------------------------- /src/sound/voice/it/2.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/voice/it/2.mp3 -------------------------------------------------------------------------------- /src/sound/voice/it/3.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/voice/it/3.mp3 -------------------------------------------------------------------------------- /src/sound/voice/it/4.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/voice/it/4.mp3 -------------------------------------------------------------------------------- /src/sound/voice/it/and.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/voice/it/and.mp3 -------------------------------------------------------------------------------- /src/sound/voice/nl/1.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/voice/nl/1.mp3 -------------------------------------------------------------------------------- /src/sound/voice/nl/2.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/voice/nl/2.mp3 -------------------------------------------------------------------------------- /src/sound/voice/nl/3.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/voice/nl/3.mp3 -------------------------------------------------------------------------------- /src/sound/voice/nl/4.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/voice/nl/4.mp3 -------------------------------------------------------------------------------- /src/sound/voice/nl/and.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/voice/nl/and.mp3 -------------------------------------------------------------------------------- /src/sound/voice/pt/1.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/voice/pt/1.mp3 -------------------------------------------------------------------------------- /src/sound/voice/pt/2.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/voice/pt/2.mp3 -------------------------------------------------------------------------------- /src/sound/voice/pt/3.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/voice/pt/3.mp3 -------------------------------------------------------------------------------- /src/sound/voice/pt/4.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/voice/pt/4.mp3 -------------------------------------------------------------------------------- /src/sound/voice/pt/and.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/sound/voice/pt/and.mp3 -------------------------------------------------------------------------------- /src/spectrum1.mfm: -------------------------------------------------------------------------------- 1 | object spectrum1fo: tspectrum1fo 2 | frame.font.name = 'stf_default' 3 | frame.font.localprops = [] 4 | frame.localprops = [] 5 | frame.localprops1 = [] 6 | frame.grip_size = 8 7 | frame.grip_grip = stb_dens0 8 | frame.grip_options = [go_closebutton, go_buttonhints, go_vert] 9 | frame.grip_face.localprops = [] 10 | frame.grip_face.template = mainfo.tfacebutgray 11 | frame.grip_faceactive.localprops = [] 12 | frame.grip_faceactive.template = mainfo.tfacegreen 13 | visible = False 14 | bounds_x = 429 15 | bounds_y = 231 16 | bounds_cx = 442 17 | bounds_cy = 128 18 | bounds_cxmin = 442 19 | bounds_cymin = 128 20 | bounds_cxmax = 442 21 | bounds_cymax = 128 22 | container.color = -2147483645 23 | container.frame.localprops = [] 24 | container.frame.localprops1 = [] 25 | container.frame.sbhorz.options = [] 26 | container.frame.sbvert.options = [] 27 | container.face.localprops = [] 28 | container.face.template = mainfo.tfaceplayer 29 | container.bounds = ( 30 | 0 31 | 0 32 | 434 33 | 128 34 | ) 35 | dragdock.splitter_grip = stb_default 36 | dragdock.facetab = mainfo.tfacebutgray 37 | dragdock.faceactivetab = mainfo.tfaceplayerlight 38 | dragdock.caption = ' Spect ' 39 | dragdock.optionsdock = [od_savepos, od_savezorder, od_canmove, od_canfloat, od_candock, od_fixsize, od_captionhint] 40 | dragdock.bandgap = 1 41 | font.name = 'stf_default' 42 | font.localprops = [] 43 | statfile = mainfo.tstatfile1 44 | caption = 'Spectrum' 45 | icon.options = [bmo_masked] 46 | icon.origformat = 'png' 47 | icon.image = { 48 | 00000000020000001800000018000000B0020000000000000000000000000000 49 | 00000000000000000000000000000000000000000000006CCAC6CE01EFADC904 50 | DDBBCB0100000012D4C1CD01FF9EC604EAB1C90100000012D4C1CD01FF9EC604 51 | EAB1C90100000012D4C1CD01FF9EC604EAB1C9010000000CC0CCCF01DCBCCC04 52 | CEC4CD01D4C1CD01FF9EC604EAB1C9010000000CD4C1CD01FF9EC604EAB1C901 53 | D4C1CD01FF9EC604EAB1C9010000000CD4C1CD01FF9EC604EAB1C901D4C1CD01 54 | FF9EC604EAB1C901C0CCCF01DCBCCC04CEC4CD0100000006D4C1CD01FF9EC604 55 | EAB1C901D4C1CD01FF9EC604EAB1C902FF9EC604D4C1CD01C0CCCF01DCBCCC04 56 | CEC4CD01D4C1CD01FF9EC604EAB1C901D4C1CD01FF9EC604EAB1C902FF9EC604 57 | D4C1CD01D3C1CD01FF9EC604EAB1CA01D4C1CD01FF9EC604EAB1C901D4C1CD01 58 | FF9EC604EAB1C902FF9EC604D4C1CD02FF9EC604EAB1C901D4C1CD01FF9EC604 59 | EAB1C901D4C1CD01FF9EC604EAB1C902FF9EC604D4C1CD02FF9EC604EAB1C901 60 | D4C1CD01FF9EC604EAB1C901D4C1CD01FF9EC604EAB1C902FF9EC604D4C1CD02 61 | FF9EC604EAB1C901D4C1CD01FF9EC604EAB1C901D4C1CD01FF9EC604EAB1C902 62 | FF9EC604D4C1CD02FF9EC604EAB1C901D4C1CD01FF9EC604EAB1C901D4C1CD01 63 | FF9EC604EAB1C902FF9EC604D4C1CD02FF9EC604EAB1C901D4C1CD01FF9EC604 64 | EAB1C901D4C1CD01FF9EC604EAB1C902FF9EC604D4C1CD02FF9EC604EAB1C901 65 | D4C1CD01FF9EC604EAB1C901D4C1CD01FF9EC604EAB1C902FF9EC604D4C1CD02 66 | FF9EC604EAB1C901D4C1CD01FF9EC604EAB1C901D4C1CD01FF9EC604EAB1C902 67 | FF9EC604D4C1CD02FF9EC604EAB1C901D4C1CD01FF9EC604EAB1C901D4C1CD01 68 | FF9EC604EAB1C902FF9EC604D4C1CD02FF9EC604EAB1C901D4C1CD01FF9EC604 69 | EAB1C901D4C1CD01FF9EC604EAB1C902FF9EC604D4C1CD01D3C5CE01F2AFC904 70 | E3BBCB01D3C5CE01F2AFC904E3BBCB01D3C5CE01F2AFC904E3BBCB02F2AFC904 71 | D3C5CE010000000000000000000000000000000000F0030000F0030000F00300 72 | 00F00300C0FF0300C0FF0300C0FFFF00C0FFFF00FFFFFF00FFFFFF00FFFFFF00 73 | FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00 74 | FFFFFF00 75 | } 76 | windowopacity = -Inf 77 | oncreate = crea 78 | oneventloopstart = onformcreated 79 | onshow = onvisiblechange 80 | onhide = onvisiblechange 81 | moduleclassname = 'tdockform' 82 | object fond: tgroupbox 83 | bounds_x = 0 84 | bounds_y = 0 85 | bounds_cx = 434 86 | bounds_cy = 128 87 | anchors = [] 88 | object groupbox2: tgroupbox 89 | color = -2147483645 90 | frame.levelo = 1 91 | frame.leveli = 0 92 | frame.colorhighlight = -1610612733 93 | frame.hiddenedges = [edg_bottom] 94 | frame.captiontextflags = [tf_xcentered, tf_bottom] 95 | frame.captionpos = cp_topright 96 | frame.captionoffset = -50 97 | frame.localprops = [frl_levelo, frl_leveli, frl_colorframe, frl_colordkshadow, frl_colorlight, frl_colorhighlight, frl_colorclient] 98 | frame.localprops1 = [frl1_captionoffset, frl1_colorframedefault] 99 | bounds_x = 216 100 | bounds_y = 0 101 | bounds_cx = 216 102 | bounds_cy = 128 103 | anchors = [an_left] 104 | object tchartright: tchart 105 | color = -1879048187 106 | frame.colordkwidth = 0 107 | frame.colorhlwidth = 0 108 | frame.colorclient = -2147483645 109 | frame.optionsskin = [fso_flat] 110 | frame.localprops = [frl_colordkwidth, frl_colorhlwidth, frl_optionsskin, frl_colorclient] 111 | frame.localprops1 = [] 112 | hint = ' Right Frequency spectrum ' 113 | bounds_x = 2 114 | bounds_y = 1 115 | bounds_cx = 212 116 | bounds_cy = 129 117 | anchors = [an_left, an_top, an_bottom] 118 | traces.count = 1 119 | traces.chartkind = tck_bar 120 | traces.options = [cto_smooth] 121 | traces.xserstart = 0.02 122 | traces.xrange = 1 123 | traces.xserrange = 0.9 124 | traces.yrange = 1 125 | traces.bar_width = 18 126 | traces.items = < 127 | item 128 | color = -2147483647 129 | widthmm = 0.3 130 | xserrange = 0.9 131 | xserstart = 0.02 132 | xrange = 1 133 | yrange = 1 134 | chartkind = tck_bar 135 | options = [cto_smooth] 136 | bar_width = 18 137 | bar_face.fade_pos.count = 2 138 | bar_face.fade_pos.items = ( 139 | 0 140 | 1 141 | ) 142 | bar_face.fade_color.count = 2 143 | bar_face.fade_color.items = ( 144 | 11711154 145 | -1610612731 146 | ) 147 | bar_face.localprops = [] 148 | end> 149 | colorchart = -1879048187 150 | framechart.localprops = [] 151 | framechart.localprops1 = [] 152 | xrange = 1 153 | yrange = 1 154 | xdials.range = 1 155 | ydials.range = 1 156 | end 157 | end 158 | object groupbox1: tgroupbox 159 | color = -2147483645 160 | frame.levelo = 1 161 | frame.leveli = 0 162 | frame.colorhighlight = -1610612733 163 | frame.hiddenedges = [edg_bottom] 164 | frame.captiontextflags = [tf_xcentered, tf_bottom] 165 | frame.captionoffset = 50 166 | frame.localprops = [frl_levelo, frl_leveli, frl_colorframe, frl_colordkshadow, frl_colorlight, frl_colorhighlight, frl_colorclient] 167 | frame.localprops1 = [frl1_captionoffset, frl1_colorframedefault] 168 | taborder = 1 169 | bounds_x = 1 170 | bounds_y = 0 171 | bounds_cx = 216 172 | bounds_cy = 128 173 | anchors = [an_left] 174 | object tchartleft: tchart 175 | color = -1879048187 176 | frame.colordkwidth = 0 177 | frame.colorhlwidth = 0 178 | frame.colorclient = -2147483645 179 | frame.optionsskin = [fso_flat] 180 | frame.localprops = [frl_colordkwidth, frl_colorhlwidth, frl_optionsskin, frl_colorclient] 181 | frame.localprops1 = [] 182 | hint = ' Left Frequency spectrum ' 183 | bounds_x = 0 184 | bounds_y = 1 185 | bounds_cx = 212 186 | bounds_cy = 129 187 | anchors = [an_left, an_top, an_bottom] 188 | traces.count = 1 189 | traces.chartkind = tck_bar 190 | traces.options = [cto_smooth] 191 | traces.xserstart = 0.02 192 | traces.xrange = 1 193 | traces.xserrange = 0.9 194 | traces.yrange = 1 195 | traces.bar_width = 22 196 | traces.items = < 197 | item 198 | color = -2147483647 199 | widthmm = 0.3 200 | xserrange = 0.9 201 | xserstart = 0.02 202 | xrange = 1 203 | yrange = 1 204 | chartkind = tck_bar 205 | options = [cto_smooth] 206 | bar_width = 22 207 | bar_face.fade_pos.count = 2 208 | bar_face.fade_pos.items = ( 209 | 0 210 | 1 211 | ) 212 | bar_face.fade_color.count = 2 213 | bar_face.fade_color.items = ( 214 | 11711154 215 | -1610612731 216 | ) 217 | bar_face.localprops = [] 218 | end> 219 | colorchart = -1879048187 220 | xrange = 1 221 | yrange = 1 222 | xdials.range = 1 223 | ydials.range = 1 224 | end 225 | end 226 | end 227 | object Spect1: tbooleanedit 228 | color = -2147483645 229 | frame.hiddenedges = [edg_right, edg_top, edg_left, edg_bottom] 230 | frame.caption = 'Spectrum Player' 231 | frame.font.name = 'stf_default' 232 | frame.font.localprops = [] 233 | frame.localprops = [frl_hiddenedges, frl_colorclient] 234 | frame.localprops1 = [frl1_captiondist] 235 | frame.outerframe = ( 236 | 0 237 | 2 238 | 95 239 | 2 240 | ) 241 | face.localprops = [] 242 | face.template = mainfo.tfaceplayer 243 | taborder = 1 244 | hint = 'Enable Spectrum rendering' 245 | bounds_x = 150 246 | bounds_y = 4 247 | bounds_cx = 108 248 | bounds_cy = 19 249 | statfile = mainfo.tstatfile1 250 | colorglyph = -1610612728 251 | value = True 252 | end 253 | end 254 | -------------------------------------------------------------------------------- /src/spectrum1.pas: -------------------------------------------------------------------------------- 1 | unit spectrum1; 2 | 3 | {$ifdef FPC}{$mode objfpc}{$h+}{$endif} 4 | interface 5 | 6 | uses 7 | msetypes, 8 | mseglob, 9 | mseguiglob, 10 | mseguiintf, 11 | mseapplication, 12 | msestat, 13 | msemenus, 14 | msegui, 15 | msegraphics, 16 | msegraphutils, 17 | mseevent, 18 | mseclasses, 19 | mseforms, 20 | msedock, 21 | msegraphedits, 22 | SysUtils, 23 | mseificomp, 24 | mseificompglob, 25 | mseifiglob, 26 | msescrollbar, 27 | msesimplewidgets, 28 | msewidgets, 29 | msechart, 30 | msedispwidgets, 31 | mserichstring; 32 | 33 | type 34 | tspectrum1fo = class(tdockform) 35 | fond: tgroupbox; 36 | groupbox1: tgroupbox; 37 | tchartleft: tchart; 38 | groupbox2: tgroupbox; 39 | tchartright: tchart; 40 | Spect1: tbooleanedit; 41 | procedure onvisiblechange(const Sender: TObject); 42 | procedure onformcreated(const Sender: TObject); 43 | procedure onshowspec(const Sender: TObject; var avalue: Boolean; var accept: Boolean); 44 | procedure crea(const Sender: TObject); 45 | procedure changecolors(const Sender: TObject); 46 | procedure changesilver(const Sender: TObject); 47 | procedure resizespc(fontheight: integer); 48 | end; 49 | 50 | var 51 | spectrum1fo: tspectrum1fo; 52 | spectrum2fo: tspectrum1fo; 53 | spectrumrecfo: tspectrum1fo; 54 | 55 | implementation 56 | 57 | uses 58 | captionstrumpract, 59 | main, 60 | dockpanel1, 61 | songplayer, 62 | recorder, 63 | spectrum1_mfm; 64 | 65 | var 66 | boundchildspc: array of boundchild; 67 | 68 | procedure tspectrum1fo.resizespc(fontheight: integer); 69 | var 70 | i1, i2: integer; 71 | ratio: double; 72 | begin 73 | ratio := fontheight / 12; 74 | bounds_cxmax := 0; 75 | bounds_cxmin := 0; 76 | bounds_cymax := 0; 77 | bounds_cymin := 0; 78 | bounds_cxmax := roundmath(442 * ratio); 79 | bounds_cxmin := bounds_cxmax; 80 | bounds_cymax := roundmath(128 * ratio); 81 | bounds_cymin := bounds_cymax; 82 | font.Height := fontheight; 83 | frame.grip_size := roundmath(8 * ratio); 84 | 85 | tchartleft.traces[0].bar_width := roundmath(18 * ratio); 86 | tchartright.traces[0].bar_width := roundmath(18 * ratio); 87 | 88 | 89 | Spect1.frame.font.Height := fontheight; 90 | Spect1.frame.font.color := font.color; 91 | Spect1.left := roundmath(150 * ratio); 92 | Spect1.top := roundmath(3 * ratio); 93 | 94 | groupbox1.font.color := font.color; 95 | groupbox1.left := roundmath(1 * ratio); 96 | groupbox1.Width := roundmath(216 * ratio); 97 | groupbox2.left := roundmath(214 * ratio); 98 | groupbox2.Width := roundmath(218 * ratio); 99 | 100 | with groupbox1 do 101 | for i1 := 0 to childrencount - 1 do 102 | for i2 := 0 to length(boundchildspc) - 1 do 103 | if groupbox1.children[i1].Name = boundchildspc[i2].Name then 104 | begin 105 | groupbox1.children[i1].left := roundmath(boundchildspc[i2].left * ratio); 106 | groupbox1.children[i1].top := roundmath(boundchildspc[i2].top * ratio); 107 | groupbox1.children[i1].Width := roundmath(boundchildspc[i2].Width * ratio); 108 | groupbox1.children[i1].Height := roundmath(boundchildspc[i2].Height * ratio); 109 | end; 110 | 111 | with groupbox2 do 112 | for i1 := 0 to childrencount - 1 do 113 | for i2 := 0 to length(boundchildspc) - 1 do 114 | if groupbox2.children[i1].Name = boundchildspc[i2].Name then 115 | begin 116 | groupbox2.children[i1].left := roundmath(boundchildspc[i2].left * ratio); 117 | groupbox2.children[i1].top := roundmath(boundchildspc[i2].top * ratio); 118 | groupbox2.children[i1].Width := roundmath(boundchildspc[i2].Width * ratio); 119 | groupbox2.children[i1].Height := roundmath(boundchildspc[i2].Height * ratio); 120 | end; 121 | end; 122 | 123 | procedure tspectrum1fo.onvisiblechange(const Sender: TObject); 124 | begin 125 | if (isactivated = True) then 126 | begin 127 | if tag = 0 then 128 | if Visible then 129 | mainfo.tmainmenu1.menu.itembynames(['show', 'showspectrum1']).Caption := 130 | lang_mainfo[Ord(ma_hide)] + ': ' + 131 | lang_spectrum1fo[Ord(sp_spectrum1fo)] + ' ' + lang_commanderfo[Ord(co_nameplayers_hint)] 132 | else 133 | mainfo.tmainmenu1.menu.itembynames(['show', 'showspectrum1']).Caption := 134 | lang_mainfo[Ord(ma_tmainmenu1_show)] + ': ' + 135 | lang_spectrum1fo[Ord(sp_spectrum1fo)] + ' ' + lang_commanderfo[Ord(co_nameplayers_hint)]; 136 | 137 | if tag = 1 then 138 | if Visible then 139 | mainfo.tmainmenu1.menu.itembynames(['show', 'showspectrum2']).Caption := 140 | lang_mainfo[Ord(ma_hide)] + ': ' + 141 | lang_spectrum1fo[Ord(sp_spectrum1fo)] + ' ' + lang_commanderfo[Ord(co_nameplayers2_hint)] 142 | else 143 | mainfo.tmainmenu1.menu.itembynames(['show', 'showspectrum2']).Caption := 144 | lang_mainfo[Ord(ma_tmainmenu1_show)] + ': ' + 145 | lang_spectrum1fo[Ord(sp_spectrum1fo)] + ' ' + lang_commanderfo[Ord(co_nameplayers2_hint)]; 146 | 147 | if tag = 2 then 148 | if Visible then 149 | mainfo.tmainmenu1.menu.itembynames(['show', 'showspectrumrec']).Caption := 150 | lang_mainfo[Ord(ma_hide)] + ': ' + 151 | lang_spectrum1fo[Ord(sp_spectrum1fo)] + ' ' + lang_mainfo[Ord(ma_recorder)] 152 | else 153 | mainfo.tmainmenu1.menu.itembynames(['show', 'showspectrumrec']).Caption := 154 | lang_mainfo[Ord(ma_tmainmenu1_show)] + ': ' + 155 | lang_spectrum1fo[Ord(sp_spectrum1fo)] + ' ' + lang_mainfo[Ord(ma_recorder)]; 156 | 157 | 158 | if (norefresh = False) and (parentwidget <> nil) then 159 | begin 160 | 161 | if (parentwidget = mainfo.basedock) or 162 | (mainfo.basedock.dragdock.currentsplitdir = sd_tabed) then 163 | mainfo.updatelayoutstrum(); 164 | 165 | if (parentwidget = dockpanel1fo.basedock) or 166 | (dockpanel1fo.basedock.dragdock.currentsplitdir = sd_tabed) then 167 | if dockpanel1fo.Visible then 168 | dockpanel1fo.updatelayoutpan(); 169 | 170 | if (parentwidget = dockpanel2fo.basedock) or 171 | (dockpanel2fo.basedock.dragdock.currentsplitdir = sd_tabed) then 172 | if dockpanel2fo.Visible then 173 | dockpanel2fo.updatelayoutpan(); 174 | 175 | if (parentwidget = dockpanel3fo.basedock) or 176 | (dockpanel3fo.basedock.dragdock.currentsplitdir = sd_tabed) then 177 | if dockpanel3fo.Visible then 178 | dockpanel3fo.updatelayoutpan(); 179 | 180 | if (parentwidget = dockpanel4fo.basedock) or 181 | (dockpanel4fo.basedock.dragdock.currentsplitdir = sd_tabed) then 182 | if dockpanel4fo.Visible then 183 | dockpanel4fo.updatelayoutpan(); 184 | 185 | if (parentwidget = dockpanel5fo.basedock) or 186 | (dockpanel5fo.basedock.dragdock.currentsplitdir = sd_tabed) then 187 | if dockpanel5fo.Visible then 188 | dockpanel5fo.updatelayoutpan(); 189 | end; 190 | end; 191 | end; 192 | 193 | procedure tspectrum1fo.onformcreated(const Sender: TObject); 194 | begin 195 | tchartleft.traces[0].chartkind := tck_bar; 196 | tchartright.traces[0].chartkind := tck_bar; 197 | end; 198 | 199 | procedure tspectrum1fo.onshowspec(const Sender: TObject; var avalue: Boolean; var accept: Boolean); 200 | begin 201 | if avalue = False then 202 | if tag = 0 then 203 | songplayerfo.resetspectrum() 204 | else if tag = 1 then 205 | songplayer2fo.resetspectrum() 206 | else if tag = 2 then 207 | recorderfo.resetspectrum(); 208 | end; 209 | 210 | procedure tspectrum1fo.crea(const Sender: TObject); 211 | var 212 | x, i1, childn: integer; 213 | begin 214 | {$if defined(netbsd) or defined(darwin)} 215 | windowopacity := 1; 216 | {$else} 217 | windowopacity := 0; 218 | {$endif} 219 | 220 | childn := 0; 221 | 222 | setlength(boundchildspc, childrencount); 223 | childn := childrencount; 224 | 225 | 226 | for i1 := 0 to childrencount - 1 do 227 | begin 228 | boundchildspc[i1].left := children[i1].left; 229 | boundchildspc[i1].top := children[i1].top; 230 | boundchildspc[i1].Width := children[i1].Width; 231 | boundchildspc[i1].Height := children[i1].Height; 232 | boundchildspc[i1].Name := children[i1].Name; 233 | end; 234 | 235 | 236 | setlength(boundchildspc, groupbox1.childrencount + childn); 237 | 238 | 239 | with groupbox1 do 240 | for i1 := 0 to groupbox1.childrencount - 1 do 241 | begin 242 | boundchildspc[i1 + childn].left := children[i1].left; 243 | boundchildspc[i1 + childn].top := children[i1].top; 244 | boundchildspc[i1 + childn].Width := children[i1].Width; 245 | boundchildspc[i1 + childn].Height := children[i1].Height; 246 | boundchildspc[i1 + childn].Name := children[i1].Name; 247 | end; 248 | 249 | childn := length(boundchildspc); 250 | setlength(boundchildspc, length(boundchildspc) + groupbox2.childrencount); 251 | 252 | with groupbox2 do 253 | for i1 := 0 to groupbox2.childrencount - 1 do 254 | begin 255 | boundchildspc[i1 + childn].left := children[i1].left; 256 | boundchildspc[i1 + childn].top := children[i1].top; 257 | boundchildspc[i1 + childn].Width := children[i1].Width; 258 | boundchildspc[i1 + childn].Height := children[i1].Height; 259 | boundchildspc[i1 + childn].Name := children[i1].Name; 260 | end; 261 | end; 262 | 263 | procedure tspectrum1fo.changecolors(const Sender: TObject); 264 | begin 265 | end; 266 | 267 | procedure tspectrum1fo.changesilver(const Sender: TObject); 268 | begin 269 | end; 270 | 271 | end. 272 | 273 | -------------------------------------------------------------------------------- /src/splash.pas: -------------------------------------------------------------------------------- 1 | unit splash; 2 | 3 | {$ifdef FPC}{$mode objfpc}{$h+}{$endif} 4 | interface 5 | 6 | uses 7 | msetypes, 8 | mseglob, 9 | mseguiglob, 10 | mseguiintf, 11 | mseapplication, 12 | msestat, 13 | msemenus, 14 | msegui, 15 | msegraphics, 16 | msebitmap, 17 | msegraphutils, 18 | mseevent, 19 | mseclasses, 20 | msewidgets, 21 | mseforms, 22 | msesimplewidgets; 23 | 24 | type 25 | tsplashfo = class(tmseform) 26 | procedure oneventloop(const Sender: TObject); 27 | procedure oncrea(const sender: TObject); 28 | end; 29 | 30 | var 31 | splashfo: tsplashfo; 32 | 33 | implementation 34 | 35 | uses 36 | filelistform, 37 | main, 38 | aboutform, 39 | synthe, 40 | mseact, 41 | drums, 42 | uos_flat, 43 | songplayer, 44 | commander, 45 | config, 46 | configlayout, 47 | guitars, 48 | recorder, 49 | // {$if not defined(darwin)} 50 | imagedancer, 51 | // {$endif} 52 | infosd, 53 | piano, 54 | conflang, 55 | spectrum1, 56 | waveform, 57 | randomnote, 58 | equalizer, 59 | findmessage, 60 | dialogfiles, 61 | dockpanel1, 62 | splash_mfm; 63 | 64 | procedure tsplashfo.oneventloop(const Sender: TObject); 65 | begin 66 | // application.ProcessMessages; 67 | application.createform(tconfigfo, configfo); 68 | application.createform(tconfiglayoutfo, configlayoutfo); 69 | configlayoutfo.icon := configfo.icon; 70 | 71 | application.createform(tdrumsfo, drumsfo); 72 | 73 | drumsfo.dragdock.Caption := 'Dru'; 74 | application.createform(tsongplayerfo, songplayerfo); 75 | 76 | application.createform(tsongplayerfo, songplayer2fo); 77 | 78 | songplayerfo.tag := 0; 79 | songplayer2fo.tag := 1; 80 | 81 | songplayerfo.dragdock.Caption := 'Pl1'; 82 | songplayer2fo.dragdock.Caption := 'Pl2'; 83 | 84 | application.createform(tspectrum1fo, spectrum1fo); 85 | application.createform(tspectrum1fo, spectrum2fo); 86 | application.createform(tspectrum1fo, spectrumrecfo); 87 | 88 | spectrum1fo.tag := 0; 89 | spectrum2fo.tag := 1; 90 | 91 | spectrum1fo.dragdock.Caption := 'Sp1'; 92 | spectrum2fo.dragdock.Caption := 'Sp2'; 93 | 94 | spectrumrecfo.dragdock.Caption := 'SpR'; 95 | 96 | spectrumrecfo.tag := 2; 97 | 98 | application.createform(tequalizerfo, equalizerfo1); 99 | application.createform(tequalizerfo, equalizerfo2); 100 | application.createform(tequalizerfo, equalizerforec); 101 | 102 | equalizerfo1.dragdock.Caption := 'Eq1'; 103 | equalizerfo2.dragdock.Caption := 'Eq2'; 104 | equalizerforec.dragdock.Caption := 'EqR'; 105 | 106 | equalizerfo1.tag := 0; 107 | equalizerfo2.tag := 1; 108 | equalizerforec.tag := 2; 109 | 110 | application.createform(tfilelistfo, filelistfo); 111 | 112 | filelistfo.dragdock.Caption := 'Fil'; 113 | 114 | application.createform(twavefo, wavefo); 115 | wavefo.tag := 0; 116 | wavefo.dragdock.Caption := 'Wa1'; 117 | 118 | application.createform(twavefo, wavefo2); 119 | wavefo2.tag := 1; 120 | wavefo2.dragdock.Caption := 'Wa2'; 121 | 122 | application.createform(twavefo, waveforec); 123 | waveforec.tag := 2; 124 | waveforec.dragdock.Caption := 'WaR'; 125 | 126 | with waveforec do 127 | begin 128 | tmainmenu1.menu[1].state := [as_invisible, as_localinvisible]; 129 | tmainmenu1.menu[2].state := [as_invisible, as_localinvisible]; 130 | tmainmenu1.menu[3].state := [as_invisible, as_localinvisible]; 131 | tmainmenu1.menu[4].state := [as_invisible, as_localinvisible]; 132 | tmainmenu1.menu[5].state := [as_invisible, as_localinvisible]; 133 | tmainmenu1.menu[6].state := [as_invisible, as_localinvisible]; 134 | tmainmenu1.menu[7].state := [as_invisible, as_localinvisible]; 135 | tmainmenu1.menu[8].state := [as_invisible, as_localinvisible]; 136 | end; 137 | 138 | application.createform(tcommanderfo, commanderfo); 139 | commanderfo.dragdock.Caption := 'Com'; 140 | 141 | application.createform(trecorderfo, recorderfo); 142 | recorderfo.dragdock.Caption := 'Rec'; 143 | recorderfo.tag := 2; 144 | 145 | application.createform(tguitarsfo, guitarsfo); 146 | 147 | guitarsfo.dragdock.Caption := 'Gui'; 148 | 149 | application.createform(taboutfo, aboutfo); 150 | application.createform(tinfosdfo, infosdfo); 151 | application.createform(tinfosdfo, infosdfo2); 152 | 153 | infosdfo.dragdock.Caption := 'In1'; 154 | infosdfo.tag := 0; 155 | 156 | infosdfo2.dragdock.Caption := 'In2'; 157 | infosdfo2.tag := 1; 158 | 159 | application.createform(tdockpanel1fo, dockpanel1fo); 160 | application.createform(tdockpanel1fo, dockpanel2fo); 161 | application.createform(tdockpanel1fo, dockpanel3fo); 162 | application.createform(tdockpanel1fo, dockpanel4fo); 163 | application.createform(tdockpanel1fo, dockpanel5fo); 164 | 165 | dockpanel1fo.tag := 0; 166 | dockpanel2fo.tag := 1; 167 | dockpanel3fo.tag := 2; 168 | dockpanel4fo.tag := 3; 169 | dockpanel5fo.tag := 4; 170 | 171 | application.createform(trandomnotefo, randomnotefo); 172 | 173 | // {$if not defined(darwin)} 174 | application.createform(timagedancerfo, imagedancerfo); 175 | 176 | imagedancerfo.dragdock.Caption := 'Dan'; 177 | // {$endif} 178 | 179 | application.createform(tfindmessagefo, findmessagefo); 180 | application.createform(tdialogfilesfo, dialogfilesfo); 181 | 182 | application.createform(tconflangfo, conflangfo); 183 | 184 | dialogfilesfo.icon := equalizerfo1.icon; 185 | 186 | application.createform(tsynthefo, synthefo); 187 | application.createform(tpianofo, pianofo); 188 | pianofo.icon := synthefo.icon; 189 | pianofo.dragdock.Caption := 'Pia'; 190 | synthefo.dragdock.Caption := 'Noi'; 191 | 192 | application.createform(tmainfo, mainfo); 193 | conflangfo.icon := mainfo.icon; 194 | 195 | end; 196 | 197 | procedure tsplashfo.oncrea(const sender: TObject); 198 | begin 199 | {$if defined(netbsd) or defined(darwin)} 200 | container.face.image.options := [bmo_masked]; 201 | {$endif} 202 | 203 | end; 204 | 205 | end. 206 | 207 | -------------------------------------------------------------------------------- /src/status.mfm: -------------------------------------------------------------------------------- 1 | object statusfo: tstatusfo 2 | color = 4016708 3 | face.localprops = [] 4 | face.template = mainfo.tfaceplayer 5 | visible = False 6 | bounds_x = 442 7 | bounds_y = 259 8 | bounds_cx = 288 9 | bounds_cy = 60 10 | bounds_cxmin = 288 11 | bounds_cxmax = 288 12 | container.frame.localprops = [] 13 | container.frame.localprops1 = [] 14 | container.bounds = ( 15 | 0 16 | 0 17 | 288 18 | 60 19 | ) 20 | optionswindow = [wo_dialog, wo_windowcentermessage] 21 | font.name = 'stf_default' 22 | font.localprops = [] 23 | caption = 'Layout' 24 | icon.options = [bmo_masked, bmo_graymask] 25 | icon.origformat = 'png' 26 | windowopacity = -Inf 27 | moduleclassname = 'tmseform' 28 | object ok: tbutton 29 | optionswidget1 = [] 30 | color = -2147483645 31 | frame.optionsskin = [fso_flat] 32 | frame.localprops = [frl_optionsskin] 33 | frame.localprops1 = [] 34 | face.fade_pos.count = 2 35 | face.fade_pos.items = ( 36 | 0 37 | 1 38 | ) 39 | face.fade_color.count = 2 40 | face.fade_color.items = ( 41 | 15461355 42 | 10395294 43 | ) 44 | face.fade_direction = gd_down 45 | face.localprops = [fal_fadirection] 46 | taborder = 1 47 | bounds_x = 212 48 | bounds_y = 4 49 | bounds_cx = 72 50 | bounds_cy = 24 51 | bounds_cxmin = 35 52 | state = [as_default, as_localdefault, as_localcaption, as_localcolor, as_localonexecute] 53 | caption = '&Ok' 54 | onexecute = onok 55 | end 56 | object cancel: tbutton 57 | optionswidget1 = [] 58 | color = -2147483645 59 | frame.optionsskin = [fso_flat, fso_focusrect] 60 | frame.localprops = [frl_optionsskin] 61 | frame.localprops1 = [] 62 | face.fade_pos.count = 2 63 | face.fade_pos.items = ( 64 | 0 65 | 1 66 | ) 67 | face.fade_color.count = 2 68 | face.fade_color.items = ( 69 | 15461355 70 | 10395294 71 | ) 72 | face.fade_direction = gd_down 73 | face.localprops = [fal_fadirection] 74 | taborder = 2 75 | bounds_x = 212 76 | bounds_y = 30 77 | bounds_cx = 72 78 | bounds_cy = 24 79 | bounds_cxmin = 35 80 | state = [as_localcaption, as_localcolor] 81 | caption = '&Cancel' 82 | modalresult = mr_cancel 83 | end 84 | object layoutname: tstringedit 85 | frame.levelo = 0 86 | frame.localprops = [frl_levelo] 87 | frame.localprops1 = [] 88 | face.fade_pos.count = 2 89 | face.fade_pos.items = ( 90 | 0 91 | 1 92 | ) 93 | face.fade_color.count = 2 94 | face.fade_color.items = ( 95 | 16777215 96 | 13224393 97 | ) 98 | face.fade_direction = gd_down 99 | face.localprops = [fal_fadirection] 100 | visible = False 101 | bounds_x = 4 102 | bounds_y = 5 103 | bounds_cx = 204 104 | bounds_cy = 49 105 | font.height = 16 106 | font.name = 'stf_default' 107 | font.localprops = [flp_height] 108 | textflags = [tf_xcentered, tf_ycentered, tf_noselect] 109 | value = 'mylayout' 110 | reffontheight = 19 111 | end 112 | end 113 | -------------------------------------------------------------------------------- /src/status.pas: -------------------------------------------------------------------------------- 1 | unit status; 2 | 3 | {$ifdef FPC}{$mode objfpc}{$h+}{$endif} 4 | interface 5 | 6 | uses 7 | Classes, 8 | msegridsglob, 9 | msetypes, 10 | mseglob, 11 | mseguiglob, 12 | mseguiintf, 13 | mseapplication, 14 | msestat, 15 | msemenus, 16 | msegui, 17 | msegraphics, 18 | msegraphutils, 19 | mseevent, 20 | mseclasses, 21 | msewidgets, 22 | mseforms, 23 | mseact, 24 | msefileutils, 25 | msedataedits, 26 | msedropdownlist, 27 | mseedit, 28 | mseificomp, 29 | mseificompglob, 30 | mseifiglob, 31 | msestatfile, 32 | msestream, 33 | SysUtils, 34 | msesimplewidgets, 35 | msebitmap, 36 | msedatanodes, 37 | msefiledialogx, 38 | msegrids, 39 | mselistbrowser, 40 | msesys, 41 | msedispwidgets, 42 | mserichstring; 43 | 44 | type 45 | tstatusfo = class(tmseform) 46 | layoutname: tstringedit; 47 | ok: TButton; 48 | cancel: TButton; 49 | procedure onok(const Sender: TObject); 50 | procedure oncancel(const Sender: TObject); 51 | 52 | end; 53 | 54 | var 55 | statusfo: tstatusfo; 56 | typstat: shortint = 0; 57 | 58 | implementation 59 | 60 | uses 61 | status_mfm, 62 | main, 63 | filelistform, 64 | equalizer; 65 | 66 | procedure tstatusfo.oncancel(const Sender: TObject); 67 | begin 68 | Close; 69 | end; 70 | 71 | procedure tstatusfo.onok(const Sender: TObject); 72 | var 73 | ordir, dataeq: string; 74 | x: integer; 75 | asliders: tasliders; 76 | ds: char; 77 | begin 78 | 79 | ordir := filepath(statdirname) + directoryseparator; 80 | 81 | if typstat = 0 then 82 | begin 83 | // ordir := msestring(ExtractFilePath((ParamStr(0))) + 'layout' + directoryseparator); 84 | // ordir := filepath(statdirname) + directoryseparator; 85 | 86 | if layoutname.Value <> '' then 87 | begin 88 | ordir := ordir + utf8decode(RawByteString(statusfo.layoutname.Value) + '.lay'); 89 | mainfo.tstatfile1.writestat(utf8decode(RawByteString(ordir))); 90 | end; 91 | end; 92 | 93 | if typstat = 2 then 94 | begin 95 | // ordir := msestring(ExtractFilePath(ParamStr(0)) + 'list' + directoryseparator); 96 | if layoutname.Value <> '' then 97 | begin 98 | ordir := msestring(ordir + statusfo.layoutname.Value + '.lis'); 99 | filelistfo.tstatfile1.writestat((ordir)); 100 | filelistfo.Caption := statusfo.layoutname.Value; 101 | end; 102 | end; 103 | 104 | if (typstat = 3) then 105 | with equalizerfo1 do 106 | begin 107 | asliders[1] := tslider1; 108 | asliders[2] := tslider2; 109 | asliders[3] := tslider3; 110 | asliders[4] := tslider4; 111 | asliders[5] := tslider5; 112 | asliders[6] := tslider6; 113 | asliders[7] := tslider7; 114 | asliders[8] := tslider8; 115 | asliders[9] := tslider9; 116 | asliders[10] := tslider10; 117 | asliders[11] := tslider11; 118 | asliders[12] := tslider12; 119 | asliders[13] := tslider13; 120 | asliders[14] := tslider14; 121 | asliders[15] := tslider15; 122 | asliders[16] := tslider16; 123 | asliders[17] := tslider17; 124 | asliders[18] := tslider18; 125 | asliders[19] := tslider19; 126 | asliders[20] := tslider20; 127 | end; 128 | 129 | if (typstat = 4) then 130 | with equalizerfo2 do 131 | begin 132 | asliders[1] := tslider1; 133 | asliders[2] := tslider2; 134 | asliders[3] := tslider3; 135 | asliders[4] := tslider4; 136 | asliders[5] := tslider5; 137 | asliders[6] := tslider6; 138 | asliders[7] := tslider7; 139 | asliders[8] := tslider8; 140 | asliders[9] := tslider9; 141 | asliders[10] := tslider10; 142 | asliders[11] := tslider11; 143 | asliders[12] := tslider12; 144 | asliders[13] := tslider13; 145 | asliders[14] := tslider14; 146 | asliders[15] := tslider15; 147 | asliders[16] := tslider16; 148 | asliders[17] := tslider17; 149 | asliders[18] := tslider18; 150 | asliders[19] := tslider19; 151 | asliders[20] := tslider20; 152 | end; 153 | 154 | if (typstat = 5) then 155 | with equalizerforec do 156 | begin 157 | asliders[1] := tslider1; 158 | asliders[2] := tslider2; 159 | asliders[3] := tslider3; 160 | asliders[4] := tslider4; 161 | asliders[5] := tslider5; 162 | asliders[6] := tslider6; 163 | asliders[7] := tslider7; 164 | asliders[8] := tslider8; 165 | asliders[9] := tslider9; 166 | asliders[10] := tslider10; 167 | asliders[11] := tslider11; 168 | asliders[12] := tslider12; 169 | asliders[13] := tslider13; 170 | asliders[14] := tslider14; 171 | asliders[15] := tslider15; 172 | asliders[16] := tslider16; 173 | asliders[17] := tslider17; 174 | asliders[18] := tslider18; 175 | asliders[19] := tslider19; 176 | asliders[20] := tslider20; 177 | end; 178 | 179 | if (typstat = 3) or (typstat = 4) or (typstat = 5) then 180 | begin 181 | 182 | dataeq := ''; 183 | 184 | ds := decimalseparator; 185 | 186 | decimalseparator := '.'; 187 | 188 | for x := 1 to 20 do 189 | dataeq := dataeq + floattostrf(asliders[x].Value, ffFixed, 8, 4) + '|'; 190 | decimalseparator := ds; 191 | 192 | ordir := filepath(statdirname) + directoryseparator; 193 | 194 | //ordir := msestring(ExtractFilePath(ParamStr(0)) + 'equ' + directoryseparator); 195 | if statusfo.layoutname.Value <> '' then 196 | begin 197 | ordir := msestring(ordir + statusfo.layoutname.Value + '.equ'); 198 | 199 | with TStringList.Create do 200 | try 201 | Add(dataeq); 202 | SaveToFile(ordir); 203 | finally 204 | Free; 205 | end; 206 | end; 207 | end; 208 | 209 | Close; 210 | end; 211 | 212 | end. 213 | 214 | -------------------------------------------------------------------------------- /src/status_mfm.pas: -------------------------------------------------------------------------------- 1 | unit status_mfm; 2 | {$ifdef FPC}{$mode objfpc}{$h+}{$endif} 3 | 4 | interface 5 | 6 | implementation 7 | uses 8 | mseclasses,status; 9 | 10 | const 11 | objdata: record size: integer; data: array[0..1886] of byte end = 12 | (size: 1887; data: ( 13 | 84,80,70,48,9,116,115,116,97,116,117,115,102,111,8,115,116,97,116,117, 14 | 115,102,111,5,99,111,108,111,114,4,68,74,61,0,15,102,97,99,101,46, 15 | 108,111,99,97,108,112,114,111,112,115,11,0,13,102,97,99,101,46,116,101, 16 | 109,112,108,97,116,101,7,18,109,97,105,110,102,111,46,116,102,97,99,101, 17 | 112,108,97,121,101,114,7,118,105,115,105,98,108,101,8,8,98,111,117,110, 18 | 100,115,95,120,3,186,1,8,98,111,117,110,100,115,95,121,3,3,1,9, 19 | 98,111,117,110,100,115,95,99,120,3,32,1,9,98,111,117,110,100,115,95, 20 | 99,121,2,60,12,98,111,117,110,100,115,95,99,120,109,105,110,3,32,1, 21 | 12,98,111,117,110,100,115,95,99,120,109,97,120,3,32,1,26,99,111,110, 22 | 116,97,105,110,101,114,46,102,114,97,109,101,46,108,111,99,97,108,112,114, 23 | 111,112,115,11,0,27,99,111,110,116,97,105,110,101,114,46,102,114,97,109, 24 | 101,46,108,111,99,97,108,112,114,111,112,115,49,11,0,16,99,111,110,116, 25 | 97,105,110,101,114,46,98,111,117,110,100,115,1,2,0,2,0,3,32,1, 26 | 2,60,0,13,111,112,116,105,111,110,115,119,105,110,100,111,119,11,9,119, 27 | 111,95,100,105,97,108,111,103,22,119,111,95,119,105,110,100,111,119,99,101, 28 | 110,116,101,114,109,101,115,115,97,103,101,0,9,102,111,110,116,46,110,97, 29 | 109,101,6,11,115,116,102,95,100,101,102,97,117,108,116,15,102,111,110,116, 30 | 46,108,111,99,97,108,112,114,111,112,115,11,0,7,99,97,112,116,105,111, 31 | 110,6,6,76,97,121,111,117,116,12,105,99,111,110,46,111,112,116,105,111, 32 | 110,115,11,10,98,109,111,95,109,97,115,107,101,100,12,98,109,111,95,103, 33 | 114,97,121,109,97,115,107,0,15,105,99,111,110,46,111,114,105,103,102,111, 34 | 114,109,97,116,6,3,112,110,103,13,119,105,110,100,111,119,111,112,97,99, 35 | 105,116,121,5,0,0,0,0,0,0,0,128,255,255,15,109,111,100,117,108, 36 | 101,99,108,97,115,115,110,97,109,101,6,8,116,109,115,101,102,111,114,109, 37 | 0,7,116,98,117,116,116,111,110,2,111,107,14,111,112,116,105,111,110,115, 38 | 119,105,100,103,101,116,49,11,0,5,99,111,108,111,114,4,3,0,0,128, 39 | 17,102,114,97,109,101,46,111,112,116,105,111,110,115,115,107,105,110,11,8, 40 | 102,115,111,95,102,108,97,116,0,16,102,114,97,109,101,46,108,111,99,97, 41 | 108,112,114,111,112,115,11,15,102,114,108,95,111,112,116,105,111,110,115,115, 42 | 107,105,110,0,17,102,114,97,109,101,46,108,111,99,97,108,112,114,111,112, 43 | 115,49,11,0,19,102,97,99,101,46,102,97,100,101,95,112,111,115,46,99, 44 | 111,117,110,116,2,2,19,102,97,99,101,46,102,97,100,101,95,112,111,115, 45 | 46,105,116,101,109,115,1,2,0,2,1,0,21,102,97,99,101,46,102,97, 46 | 100,101,95,99,111,108,111,114,46,99,111,117,110,116,2,2,21,102,97,99, 47 | 101,46,102,97,100,101,95,99,111,108,111,114,46,105,116,101,109,115,1,4, 48 | 235,235,235,0,4,158,158,158,0,0,19,102,97,99,101,46,102,97,100,101, 49 | 95,100,105,114,101,99,116,105,111,110,7,7,103,100,95,100,111,119,110,15, 50 | 102,97,99,101,46,108,111,99,97,108,112,114,111,112,115,11,15,102,97,108, 51 | 95,102,97,100,105,114,101,99,116,105,111,110,0,8,116,97,98,111,114,100, 52 | 101,114,2,1,8,98,111,117,110,100,115,95,120,3,212,0,8,98,111,117, 53 | 110,100,115,95,121,2,4,9,98,111,117,110,100,115,95,99,120,2,72,9, 54 | 98,111,117,110,100,115,95,99,121,2,24,12,98,111,117,110,100,115,95,99, 55 | 120,109,105,110,2,35,5,115,116,97,116,101,11,10,97,115,95,100,101,102, 56 | 97,117,108,116,15,97,115,95,108,111,99,97,108,100,101,102,97,117,108,116, 57 | 15,97,115,95,108,111,99,97,108,99,97,112,116,105,111,110,13,97,115,95, 58 | 108,111,99,97,108,99,111,108,111,114,17,97,115,95,108,111,99,97,108,111, 59 | 110,101,120,101,99,117,116,101,0,7,99,97,112,116,105,111,110,6,3,38, 60 | 79,107,9,111,110,101,120,101,99,117,116,101,7,4,111,110,111,107,0,0, 61 | 7,116,98,117,116,116,111,110,6,99,97,110,99,101,108,14,111,112,116,105, 62 | 111,110,115,119,105,100,103,101,116,49,11,0,5,99,111,108,111,114,4,3, 63 | 0,0,128,17,102,114,97,109,101,46,111,112,116,105,111,110,115,115,107,105, 64 | 110,11,8,102,115,111,95,102,108,97,116,13,102,115,111,95,102,111,99,117, 65 | 115,114,101,99,116,0,16,102,114,97,109,101,46,108,111,99,97,108,112,114, 66 | 111,112,115,11,15,102,114,108,95,111,112,116,105,111,110,115,115,107,105,110, 67 | 0,17,102,114,97,109,101,46,108,111,99,97,108,112,114,111,112,115,49,11, 68 | 0,19,102,97,99,101,46,102,97,100,101,95,112,111,115,46,99,111,117,110, 69 | 116,2,2,19,102,97,99,101,46,102,97,100,101,95,112,111,115,46,105,116, 70 | 101,109,115,1,2,0,2,1,0,21,102,97,99,101,46,102,97,100,101,95, 71 | 99,111,108,111,114,46,99,111,117,110,116,2,2,21,102,97,99,101,46,102, 72 | 97,100,101,95,99,111,108,111,114,46,105,116,101,109,115,1,4,235,235,235, 73 | 0,4,158,158,158,0,0,19,102,97,99,101,46,102,97,100,101,95,100,105, 74 | 114,101,99,116,105,111,110,7,7,103,100,95,100,111,119,110,15,102,97,99, 75 | 101,46,108,111,99,97,108,112,114,111,112,115,11,15,102,97,108,95,102,97, 76 | 100,105,114,101,99,116,105,111,110,0,8,116,97,98,111,114,100,101,114,2, 77 | 2,8,98,111,117,110,100,115,95,120,3,212,0,8,98,111,117,110,100,115, 78 | 95,121,2,30,9,98,111,117,110,100,115,95,99,120,2,72,9,98,111,117, 79 | 110,100,115,95,99,121,2,24,12,98,111,117,110,100,115,95,99,120,109,105, 80 | 110,2,35,5,115,116,97,116,101,11,15,97,115,95,108,111,99,97,108,99, 81 | 97,112,116,105,111,110,13,97,115,95,108,111,99,97,108,99,111,108,111,114, 82 | 0,7,99,97,112,116,105,111,110,6,7,38,67,97,110,99,101,108,11,109, 83 | 111,100,97,108,114,101,115,117,108,116,7,9,109,114,95,99,97,110,99,101, 84 | 108,0,0,11,116,115,116,114,105,110,103,101,100,105,116,10,108,97,121,111, 85 | 117,116,110,97,109,101,12,102,114,97,109,101,46,108,101,118,101,108,111,2, 86 | 0,16,102,114,97,109,101,46,108,111,99,97,108,112,114,111,112,115,11,10, 87 | 102,114,108,95,108,101,118,101,108,111,0,17,102,114,97,109,101,46,108,111, 88 | 99,97,108,112,114,111,112,115,49,11,0,19,102,97,99,101,46,102,97,100, 89 | 101,95,112,111,115,46,99,111,117,110,116,2,2,19,102,97,99,101,46,102, 90 | 97,100,101,95,112,111,115,46,105,116,101,109,115,1,2,0,2,1,0,21, 91 | 102,97,99,101,46,102,97,100,101,95,99,111,108,111,114,46,99,111,117,110, 92 | 116,2,2,21,102,97,99,101,46,102,97,100,101,95,99,111,108,111,114,46, 93 | 105,116,101,109,115,1,4,255,255,255,0,4,201,201,201,0,0,19,102,97, 94 | 99,101,46,102,97,100,101,95,100,105,114,101,99,116,105,111,110,7,7,103, 95 | 100,95,100,111,119,110,15,102,97,99,101,46,108,111,99,97,108,112,114,111, 96 | 112,115,11,15,102,97,108,95,102,97,100,105,114,101,99,116,105,111,110,0, 97 | 7,118,105,115,105,98,108,101,8,8,98,111,117,110,100,115,95,120,2,4, 98 | 8,98,111,117,110,100,115,95,121,2,5,9,98,111,117,110,100,115,95,99, 99 | 120,3,204,0,9,98,111,117,110,100,115,95,99,121,2,49,11,102,111,110, 100 | 116,46,104,101,105,103,104,116,2,16,9,102,111,110,116,46,110,97,109,101, 101 | 6,11,115,116,102,95,100,101,102,97,117,108,116,15,102,111,110,116,46,108, 102 | 111,99,97,108,112,114,111,112,115,11,10,102,108,112,95,104,101,105,103,104, 103 | 116,0,9,116,101,120,116,102,108,97,103,115,11,12,116,102,95,120,99,101, 104 | 110,116,101,114,101,100,12,116,102,95,121,99,101,110,116,101,114,101,100,11, 105 | 116,102,95,110,111,115,101,108,101,99,116,0,5,118,97,108,117,101,6,8, 106 | 109,121,108,97,121,111,117,116,13,114,101,102,102,111,110,116,104,101,105,103, 107 | 104,116,2,19,0,0,0) 108 | ); 109 | 110 | initialization 111 | registerobjectdata(@objdata,tstatusfo,''); 112 | end. 113 | -------------------------------------------------------------------------------- /src/strumpract.pas: -------------------------------------------------------------------------------- 1 | program strumpract; 2 | 3 | {$ifdef FPC}{$mode objfpc}{$h+}{$endif} 4 | {$ifdef FPC} 5 | {$ifdef mswindows}{$apptype gui}{$endif} 6 | {$endif} 7 | {$ifdef mswindows} 8 | {$R dp.res} 9 | {$endif} 10 | 11 | {$PACKRECORDS C} 12 | 13 | uses 14 | {$ifdef FPC} {$ifdef unix} cthreads, BaseUnix, {$endif} {$endif} 15 | 16 | Classes, 17 | Math, 18 | SysUtils, 19 | msefileutils, 20 | msegui, 21 | uos_flat, 22 | main, 23 | splash; 24 | 25 | {$ifdef unix} 26 | var 27 | fs: TFileStream; 28 | ordir: string; 29 | {$endif} 30 | 31 | begin 32 | {$ifdef unix} 33 | ordir := filepath(statdirname); 34 | if not finddir(ordir) then 35 | createdir(ordir); 36 | 37 | ordir := ordir + directoryseparator + 'log.txt' ; 38 | 39 | fs := TFileStream.Create(ordir, fmOpenReadWrite or fmCreate); 40 | FpDup2(fs.Handle, StdErrorHandle); 41 | {$endif} 42 | 43 | SetExceptionMask(GetExceptionMask + [exZeroDivide] + [exInvalidOp] + 44 | [exDenormalized] + [exOverflow] + [exUnderflow] + [exPrecision]); 45 | 46 | application.createform(tsplashfo, splashfo); 47 | 48 | {$if defined(netbsd) or defined(darwin)} 49 | splashfo.windowopacity := 1; 50 | {$else} 51 | splashfo.windowopacity := 0.5; 52 | {$endif} 53 | 54 | application.run; 55 | 56 | uos_free(); 57 | 58 | {$ifdef unix} 59 | fs.Free; 60 | // if fileexists(ordir) then deletefile(ordir); 61 | {$endif} 62 | 63 | end. 64 | 65 | -------------------------------------------------------------------------------- /src/units/dummy.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/src/units/dummy.txt -------------------------------------------------------------------------------- /src/uos_define.inc: -------------------------------------------------------------------------------- 1 | { United Openlibraries of Sound (uos) 2 | License : modified LGPL. 3 | Fred van Stappen fiens@hotmail.com } 4 | 5 | // Compiler definition 6 | 7 | {.$DEFINE debug} // uncomment for debugging. For console applications. (Could not work with LCL nor GUI Windows). 8 | 9 | {.$DEFINE consoleapp} // if FPC version < 2.7.1 uncomment for console application 10 | {.$DEFINE library} // uncomment for building uos library (native and java) 11 | {.$DEFINE java} // uncomment for building uos java library 12 | {.$DEFINE fpgui} // uncomment if FPC version < 2.7.1 and using fpGUI widget 13 | {$DEFINE mse} // uncomment when using a mse project, msethreads and msetimers. 14 | // NOT YET for aarch64, use fpc threads insteed. 15 | {.$DEFINE usequeue} // uncomment to use Thread.Queue instead of Thread.Synchronize for fpc threads. 16 | 17 | {$DEFINE portaudio} // uncomment to enable portaudio In/Out sound port 18 | {$DEFINE sndfile} // uncomment to enable sndfile (wav, ogg, flac audio file) 19 | {$DEFINE mpg123} // uncomment to enable mpg123 (mp3 audio file) 20 | {$DEFINE xmp} // uncomment to enable xmp (mod, it, sp3 audio file) 21 | {.$DEFINE neaac} // uncomment to enable neaac (m4a audio file) 22 | {.$DEFINE opus} // uncomment to enable opus (opus audio file) 23 | {.$DEFINE cdrom} // uncomment to enable cdrom audio decoder (cda) 24 | 25 | {$DEFINE soundtouch} // uncomment to enable Soundtouch tempo/detect bpm plugin 26 | {.$DEFINE bs2b} // uncomment to enable bs2b stereo to binaural plugin 27 | 28 | {.$DEFINE webstream} // uncomment to enable Internet Audio Streaming 29 | 30 | {.$DEFINE shout} // uncomment to enable IceCast-Shout audio web server. 31 | 32 | {.$DEFINE noiseremoval} // uncomment to enable Noise Removal DSP 33 | 34 | {.$DEFINE synthesizer} // uncomment to enable Synthesizer 35 | 36 | -------------------------------------------------------------------------------- /src/uos_mseaudio.pas: -------------------------------------------------------------------------------- 1 | { MSEgui Copyright (c) 2010-2014 by Martin Schreiber 2 | 3 | See the file COPYING.MSE, included in this distribution, 4 | for details about the copyright. 5 | 6 | This program is distributed in the hope that it will be useful, 7 | but WITHOUT ANY WARRANTY; without even the implied warranty of 8 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 9 | } 10 | 11 | // Link to Portaudio and LibSnfile by FredvS 12 | 13 | unit uos_mseaudio; 14 | 15 | {$ifdef FPC}{$mode objfpc}{$h+}{$endif} 16 | interface 17 | 18 | uses 19 | Classes, 20 | mclasses, 21 | mseclasses, 22 | msethread, 23 | msetypes, 24 | uos_portaudio, 25 | uos_libsndfile, 26 | uos_mpg123, 27 | msesys, 28 | msestrings; 29 | 30 | type 31 | 32 | pa_sample_spec = record 33 | format: shortint; //**< The sample format */ 34 | rate: integer; //**< The sample rate. (e.g. 44100) */ 35 | channels: shortint; //**< Audio channels. (1 for mono, 2 for stereo, ...) */ 36 | end; 37 | ppa_sample_spec = ^pa_sample_spec; 38 | 39 | 40 | sampleformatty = (sfm_u8, sfm_8alaw, sfm_8ulaw, 41 | sfm_s16, sfm_s24, sfm_s32, sfm_f32, smf_s2432, 42 | sfm_s16le, sfm_s24le, sfm_s32le, sfm_f32le, smf_s2432le, 43 | sfm_s16be, sfm_s24be, sfm_s32be, sfm_f32be, smf_s2432be); 44 | 45 | const 46 | defaultsampleformat = sfm_f32; 47 | defaultsamplechannels = 2; 48 | defaultsamplerate = 44100; 49 | defaultlatency = 0.1; 50 | 51 | type 52 | 53 | toutstreamthread = class(tmsethread) 54 | end; 55 | 56 | sendeventty = procedure(var Data: Pointer) of object; 57 | //data = 58 | //bytearty (sfm_u8,sfm_8alaw,sfm_8ulaw, 59 | // sfm_s24,sfm_s24le,sfm_s24be) 60 | //smallintarty (sfm_s16,sfm_s16le,sfm_s16be) 61 | //integerarty (sfm_s32,smf_s2432,sfm_s32le,smf_s2432le, 62 | // sfm_s32be,smf_s2432be) 63 | //or singlearty (sfm_f32,sfm_f32le,sfm_f32be) 64 | 65 | erroreventty = procedure(const Sender: TObject; const errorcode: integer; const errortext: msestring) of object; 66 | 67 | tcustomaudioout = class(tmsecomponent) 68 | private 69 | fthread: toutstreamthread; 70 | fstacksizekb: integer; 71 | fonsend: sendeventty; 72 | fonerror: erroreventty; 73 | fserver: msestring; 74 | fdev: msestring; 75 | frate: integer; 76 | flatency: real; 77 | procedure setactive(const avalue: Boolean); 78 | protected 79 | factive: Boolean; 80 | fformat: sampleformatty; 81 | fappname: msestring; 82 | fstreamname: msestring; 83 | HandlePAIn: Pointer; 84 | HandlePAOut: Pointer; 85 | HandleSF: Pointer; 86 | HandleMP: Pointer; 87 | procedure initnames; virtual; 88 | procedure loaded; override; 89 | procedure run; virtual; 90 | procedure stop; virtual; 91 | function threadproc(Sender: tmsethread): integer; virtual; 92 | procedure raiseerror(const aerror: integer); 93 | procedure doerror(const aerror: integer); 94 | public 95 | fchannels: integer; 96 | constructor Create(aowner: TComponent); override; 97 | destructor Destroy; override; 98 | procedure flush(); 99 | procedure drain(); 100 | 101 | property active: Boolean read factive write setactive default False; 102 | property server: msestring read fserver write fserver; 103 | property dev: msestring read fdev write fdev; 104 | property appname: msestring read fappname write fappname; 105 | property streamname: msestring read fstreamname write fstreamname; 106 | property channels: integer read fchannels write fchannels default defaultsamplechannels; 107 | property format: sampleformatty read fformat write fformat default defaultsampleformat; 108 | property rate: integer read frate write frate default defaultsamplerate; 109 | property stacksizekb: integer read fstacksizekb write fstacksizekb default 0; 110 | property latency: real read flatency write flatency; 111 | //seconds, 0 -> server default 112 | property onsend: sendeventty read fonsend write fonsend; 113 | property onerror: erroreventty read fonerror write fonerror; 114 | end; 115 | 116 | taudioout = class(tcustomaudioout) 117 | published 118 | property active; 119 | property server; 120 | property dev; 121 | property appname; 122 | property streamname; 123 | property channels; 124 | property format; 125 | property rate; 126 | property latency; 127 | property stacksizekb; 128 | property onsend; 129 | property onerror; 130 | end; 131 | 132 | function uos_mseLoadLib(PA_FileName, SF_FileName, MP_FileName: string): integer; 133 | function uos_mseUnLoadLib(): integer; 134 | 135 | implementation 136 | 137 | uses 138 | SysUtils, 139 | msesysintf, 140 | mseapplication; 141 | 142 | function uos_mseLoadLib(PA_FileName, SF_FileName, MP_FileName: string): integer; 143 | begin 144 | if Pa_Load(PChar(PA_FileName)) then Pa_Initialize(); 145 | Sf_Load(SF_FileName); 146 | mp_Load(Mp_FileName); 147 | mpg123_init(); 148 | end; 149 | 150 | function uos_mseUnLoadLib(): integer; 151 | begin 152 | sf_Unload(); 153 | pa_unload(); 154 | mp_unload(); 155 | end; 156 | 157 | { tcustomaudioout } 158 | 159 | constructor tcustomaudioout.Create(aowner: TComponent); 160 | begin 161 | fchannels := defaultsamplechannels; 162 | fformat := defaultsampleformat; 163 | frate := defaultsamplerate; 164 | flatency := defaultlatency; 165 | inherited; 166 | end; 167 | 168 | destructor tcustomaudioout.Destroy; 169 | begin 170 | active := False; 171 | inherited; 172 | end; 173 | 174 | procedure tcustomaudioout.flush(); 175 | begin 176 | 177 | end; 178 | 179 | procedure tcustomaudioout.drain(); 180 | begin 181 | 182 | end; 183 | 184 | procedure tcustomaudioout.setactive(const avalue: Boolean); 185 | begin 186 | if factive <> avalue then 187 | if componentstate * [csloading, csdesigning] = [] then 188 | begin 189 | if not avalue then 190 | stop 191 | else 192 | begin 193 | run; 194 | end; 195 | end 196 | else 197 | factive := avalue; 198 | end; 199 | 200 | procedure tcustomaudioout.stop; 201 | begin 202 | if fthread <> nil then 203 | begin 204 | fthread.terminate; 205 | application.waitforthread(fthread); 206 | FreeAndNil(fthread); 207 | sleep(20); 208 | if Assigned(HandlePAIn) then 209 | begin 210 | Pa_StopStream(HandlePAIn); 211 | Pa_CloseStream(HandlePAIn); 212 | end; 213 | if Assigned(HandlePAOut) then 214 | begin 215 | Pa_StopStream(HandlePAOut); 216 | Pa_CloseStream(HandlePAOut); 217 | end; 218 | if Assigned(HandleSF) then 219 | sf_close(HandleSF); 220 | 221 | if Assigned(HandleMP) then 222 | begin 223 | mpg123_close(HandleMP); 224 | mpg123_delete(HandleMP); 225 | end; 226 | end; 227 | factive := False; 228 | end; 229 | 230 | procedure tcustomaudioout.run; 231 | begin 232 | fthread := toutstreamthread.Create( 233 | {$ifdef FPC} 234 | @ 235 | {$endif} 236 | threadproc, False, fstacksizekb); 237 | sleep(20); 238 | factive := True; 239 | end; 240 | 241 | procedure tcustomaudioout.initnames; 242 | begin 243 | 244 | end; 245 | 246 | procedure tcustomaudioout.loaded; 247 | begin 248 | inherited; 249 | if not (csdesigning in componentstate) then 250 | begin 251 | initnames; 252 | if factive and (fthread = nil) then 253 | run; 254 | end; 255 | end; 256 | 257 | function tcustomaudioout.threadproc(Sender: tmsethread): integer; 258 | var 259 | Data: Pointer; 260 | datasize: integer; 261 | begin 262 | Result := 0; 263 | if canevent(tmethod(fonsend)) then 264 | begin 265 | factive := True; 266 | datasize := 4; // (float 32 bit) 267 | 268 | while not Sender.terminated do 269 | begin 270 | Data := nil; 271 | fonsend(Data); 272 | 273 | if Data <> nil then 274 | if Assigned(HandlePAOut) then 275 | Pa_WriteStream(HandlePAOut, @Data, length(bytearty(Data)) * datasize); 276 | end; 277 | end; 278 | end; 279 | 280 | procedure tcustomaudioout.raiseerror(const aerror: integer); 281 | begin 282 | raise Exception.Create('Error'); 283 | end; 284 | 285 | procedure tcustomaudioout.doerror(const aerror: integer); 286 | begin 287 | application.lock; 288 | try 289 | if canevent(tmethod(fonerror)) then // fonerror(self,aerror,pa_strerror(aerror)); 290 | ; 291 | finally 292 | application.unlock; 293 | end; 294 | end; 295 | 296 | end. 297 | 298 | -------------------------------------------------------------------------------- /src/uos_soundtouch.pas: -------------------------------------------------------------------------------- 1 | {This unit is part of United Openlibraries of Sound (uos)} 2 | 3 | {This is the Dynamic loading + Unix compatible version of SoundTouch Pascal Wrapper 4 | from Sandro Cumerlato . 5 | of the original C version of Olli Parviainen . 6 | 7 | Added BPMdetect method too. 8 | Load library with St_load() and release with St_unload(). 9 | License : modified LGPL. 10 | Fred van Stappen / fiens@hotmail.com} 11 | 12 | unit uos_soundtouch; 13 | 14 | {$mode objfpc}{$H+} 15 | 16 | {$PACKRECORDS C} 17 | 18 | interface 19 | 20 | uses 21 | ctypes, DynLibs; 22 | 23 | const 24 | libst= 25 | 26 | {$IFDEF darwin} 27 | 'libSoundTouchDLL.dylib'; 28 | {$ELSE} 29 | {$IFDEF unix} 30 | 'libSoundTouch.so.1'; 31 | {$ELSE} 32 | {$if defined(cpu64)} 33 | 'SoundTouch_x64.dll'; 34 | {$else} 35 | 'SoundTouch.dll'; 36 | {$endif} 37 | {$ENDIF} 38 | {$ENDIF} 39 | 40 | {$IF not DEFINED(windows)} 41 | type 42 | THandle = pointer; 43 | {$endif} 44 | 45 | type 46 | Tt_bs2bdp = ^Tt_bs2bd; 47 | Tt_bs2bd = packed record 48 | level : CInt32; 49 | srate : CInt32; 50 | a0_lo : CDouble; 51 | b1_lo : CDouble; 52 | a0_hi : CDouble; 53 | a1_hi : CDouble; 54 | b1_hi : CDouble; 55 | gain : CDouble; 56 | lfs : packed record 57 | asis : array[0..1] of cdouble; 58 | lo : array[0..1] of cdouble; 59 | hi : array[0..1] of cdouble; 60 | end; 61 | end; 62 | 63 | var 64 | bpm_createInstance: function(chan: CInt32; sampleRate : CInt32): THandle; cdecl; 65 | bpm_destroyInstance: procedure(h: THandle); cdecl; 66 | bpm_getBpm: function(h: THandle): cfloat; cdecl; 67 | bpm_putSamples: procedure(h: THandle; const samples: pcfloat; 68 | numSamples: cardinal); cdecl; 69 | 70 | soundtouch_clear: procedure(h: THandle); cdecl; 71 | soundtouch_createInstance: function(): THandle; cdecl; 72 | soundtouch_flush: procedure(h: THandle); cdecl; 73 | soundtouch_getSetting: function(h: THandle; settingId: integer): integer; cdecl; 74 | soundtouch_getVersionId: function(): cardinal; cdecl; 75 | soundtouch_getVersionString2: procedure(VersionString: PAnsiChar; 76 | bufferSize: integer); cdecl; 77 | soundtouch_getVersionString: function(): PAnsiChar; cdecl; 78 | soundtouch_isEmpty: function(h: THandle): integer; cdecl; 79 | soundtouch_numSamples: function(h: THandle): cardinal; cdecl; 80 | soundtouch_numUnprocessedSamples: function(h: THandle): cardinal; cdecl; 81 | soundtouch_putSamples: procedure(h: THandle; const samples: pcfloat; 82 | numSamples: cardinal); cdecl; 83 | soundtouch_receiveSamples: function(h: THandle; outBuffer: pcfloat; 84 | maxSamples: cardinal): cardinal; cdecl; 85 | soundtouch_setChannels: procedure(h: THandle; numChannels: cardinal); cdecl; 86 | soundtouch_setPitch: procedure(h: THandle; newPitch: single); cdecl; 87 | soundtouch_setPitchOctaves: procedure(h: THandle; newPitch: single); cdecl; 88 | soundtouch_setPitchSemiTones: procedure(h: THandle; newPitch: single); cdecl; 89 | soundtouch_setRate: procedure(h: THandle; newRate: single); cdecl; 90 | soundtouch_setRateChange: procedure(h: THandle; newRate: single); cdecl; 91 | soundtouch_setSampleRate: procedure(h: THandle; srate: cardinal); cdecl; 92 | soundtouch_destroyInstance: procedure(h: THandle); cdecl; 93 | soundtouch_setSetting: function(h: THandle; settingId: integer; Value: integer): boolean; cdecl; 94 | soundtouch_setTempo: procedure(h: THandle; newTempo: single); cdecl; 95 | soundtouch_setTempoChange: procedure(h: THandle; newTempo: single); cdecl; 96 | 97 | LibHandle:TLibHandle=dynlibs.NilHandle; // this will hold our handle for the lib 98 | ReferenceCounter : cardinal = 0; // Reference counter 99 | 100 | function ST_IsLoaded : boolean; inline; 101 | function ST_Load(const libfilename: string): boolean; // load the lib 102 | procedure ST_Unload(); // unload and frees the lib from memory : do not forget to call it before close application. 103 | 104 | implementation 105 | 106 | function ST_IsLoaded: boolean; 107 | begin 108 | Result := (LibHandle <> dynlibs.NilHandle); 109 | end; 110 | 111 | function ST_Load(const libfilename: string): boolean; 112 | var 113 | thelib: string; 114 | begin 115 | Result := False; 116 | if LibHandle<>0 then 117 | begin 118 | Inc(ReferenceCounter); 119 | result:=true 120 | end else begin 121 | if Length(libfilename) = 0 then thelib := libst else thelib := libfilename; 122 | LibHandle:=DynLibs.SafeLoadLibrary(thelib); // obtain the handle we want. 123 | if LibHandle <> DynLibs.NilHandle then 124 | begin 125 | try 126 | Pointer(soundtouch_createInstance) := 127 | GetProcAddress(LibHandle, 'soundtouch_createInstance'); 128 | if Pointer(soundtouch_createInstance) = nil then // not the SoundTouchDLL library. 129 | begin 130 | ST_Unload; 131 | result := false end 132 | else 133 | begin 134 | Pointer(soundtouch_clear) := 135 | GetProcAddress(LibHandle, 'soundtouch_clear'); 136 | Pointer(soundtouch_destroyInstance) := 137 | GetProcAddress(LibHandle, 'soundtouch_destroyInstance'); 138 | Pointer(soundtouch_flush) := 139 | GetProcAddress(LibHandle, 'soundtouch_flush'); 140 | Pointer(soundtouch_getSetting) := 141 | GetProcAddress(LibHandle, 'soundtouch_getSetting'); 142 | Pointer(soundtouch_getVersionId) := 143 | GetProcAddress(LibHandle, 'soundtouch_getVersionId'); 144 | Pointer(soundtouch_getVersionString2) := 145 | GetProcAddress(LibHandle, 'soundtouch_getVersionString2'); 146 | Pointer(soundtouch_getVersionString) := 147 | GetProcAddress(LibHandle, 'soundtouch_getVersionString'); 148 | Pointer(soundtouch_isEmpty) := 149 | GetProcAddress(LibHandle, 'soundtouch_isEmpty'); 150 | Pointer(soundtouch_numSamples) := 151 | GetProcAddress(LibHandle, 'soundtouch_numSamples'); 152 | Pointer(soundtouch_numUnprocessedSamples) := 153 | GetProcAddress(LibHandle, 'soundtouch_numUnprocessedSamples'); 154 | Pointer(soundtouch_putSamples) := 155 | GetProcAddress(LibHandle, 'soundtouch_putSamples'); 156 | Pointer(soundtouch_receiveSamples) := 157 | GetProcAddress(LibHandle, 'soundtouch_receiveSamples'); 158 | Pointer(soundtouch_setChannels) := 159 | GetProcAddress(LibHandle, 'soundtouch_setChannels'); 160 | Pointer(soundtouch_setPitch) := 161 | GetProcAddress(LibHandle, 'soundtouch_setPitch'); 162 | Pointer(soundtouch_setPitchOctaves) := 163 | GetProcAddress(LibHandle, 'soundtouch_setPitchOctaves'); 164 | Pointer(soundtouch_setPitchSemiTones) := 165 | GetProcAddress(LibHandle, 'soundtouch_setPitchSemiTones'); 166 | Pointer(soundtouch_setRate) := 167 | GetProcAddress(LibHandle, 'soundtouch_setRate'); 168 | Pointer(soundtouch_setRateChange) := 169 | GetProcAddress(LibHandle, 'soundtouch_setRateChange'); 170 | Pointer(soundtouch_setSampleRate) := 171 | GetProcAddress(LibHandle, 'soundtouch_setSampleRate'); 172 | Pointer(soundtouch_setSetting) := 173 | GetProcAddress(LibHandle, 'soundtouch_setSetting'); 174 | Pointer(soundtouch_setTempo) := 175 | GetProcAddress(LibHandle, 'soundtouch_setTempo'); 176 | Pointer(soundtouch_setTempoChange) := 177 | GetProcAddress(LibHandle, 'soundtouch_setTempoChange'); 178 | 179 | Pointer(bpm_createInstance) := 180 | GetProcAddress(LibHandle, 'bpm_createInstance'); 181 | Pointer(bpm_destroyInstance) := 182 | GetProcAddress(LibHandle, 'bpm_destroyInstance'); 183 | Pointer(bpm_getBpm) := 184 | GetProcAddress(LibHandle, 'bpm_getBpm'); 185 | Pointer(bpm_putSamples) := 186 | GetProcAddress(LibHandle, 'bpm_putSamples'); 187 | 188 | Result := St_IsLoaded; 189 | ReferenceCounter:=1; 190 | 191 | end; 192 | 193 | except 194 | ST_Unload; 195 | end; 196 | end; 197 | end; 198 | end; 199 | 200 | procedure ST_Unload; 201 | begin 202 | // < Reference counting 203 | if ReferenceCounter > 0 then 204 | dec(ReferenceCounter); 205 | if ReferenceCounter > 0 then 206 | exit; 207 | // > 208 | 209 | if LibHandle <> DynLibs.NilHandle then 210 | begin 211 | DynLibs.UnloadLibrary(LibHandle); 212 | LibHandle := DynLibs.NilHandle; 213 | end; 214 | end; 215 | 216 | end. 217 | -------------------------------------------------------------------------------- /src/win_mixer.pas: -------------------------------------------------------------------------------- 1 | { Thanks to PCurtis and Engkin @Lazarus forum } 2 | 3 | { FredvS fiens@hotmail.com 2021 } 4 | 5 | unit win_mixer; 6 | 7 | {$mode objfpc}{$H+} 8 | {$PACKRECORDS C} 9 | 10 | interface 11 | 12 | uses 13 | Windows, 14 | ctypes, 15 | SysUtils, 16 | ActiveX, 17 | ComObj; 18 | 19 | const 20 | CLASS_IMMDeviceEnumerator : TGUID = '{BCDE0395-E52F-467C-8E3D-C4579291692E}'; 21 | IID_IMMDeviceEnumerator : TGUID = '{A95664D2-9614-4F35-A746-DE8DB63617E6}'; 22 | IID_IAudioEndpointVolume : TGUID = '{5CDF2C82-841E-4546-9722-0CF74078229A}'; 23 | 24 | type 25 | PAUDIO_VOLUME_NOTIFICATION_DATA = ^AUDIO_VOLUME_NOTIFICATION_DATA; 26 | AUDIO_VOLUME_NOTIFICATION_DATA = record 27 | guidEventContext: TGUID; 28 | bMuted: BOOL; 29 | fMasterVolume: Single; 30 | nChannels: UINT; 31 | afChannelVolumes: Single; 32 | end; 33 | 34 | IAudioEndpointVolumeCallback = interface(IUnknown) 35 | ['{657804FA-D6AD-4496-8A60-352752AF4F89}'] 36 | function OnNotify(pNotify: PAUDIO_VOLUME_NOTIFICATION_DATA): HRESULT; stdcall; 37 | end; 38 | 39 | IAudioEndpointVolumeCallbackEx = interface(IUnknown) 40 | ['{CD3ADF09-CBA1-4854-B364-B1FF03FF941B}'] 41 | procedure RegisterCallback; 42 | procedure UnregisterCallback; 43 | end; 44 | 45 | IAudioEndpointVolume = interface(IUnknown) 46 | ['{5CDF2C82-841E-4546-9722-0CF74078229A}'] 47 | function RegisterControlChangeNotify(AudioEndPtVol: IAudioEndpointVolumeCallback): HRESULT; stdcall; 48 | function UnregisterControlChangeNotify(AudioEndPtVol: IAudioEndpointVolumeCallback): HRESULT; stdcall; 49 | function GetChannelCount(out PInteger): HRESULT; stdcall; 50 | function SetMasterVolumeLevel(fLevelDB: single; pguidEventContext: PGUID): HRESULT; stdcall; 51 | function SetMasterVolumeLevelScalar(fLevelDB: single; pguidEventContext: PGUID): HRESULT; stdcall; 52 | function GetMasterVolumeLevel(out fLevelDB: single): HRESULT; stdcall; 53 | function GetMasterVolumeLevelScaler(out fLevelDB: single): HRESULT; stdcall; 54 | function SetChannelVolumeLevel(nChannel: Integer; fLevelDB: double; pguidEventContext: PGUID): HRESULT; stdcall; 55 | function SetChannelVolumeLevelScalar(nChannel: Integer; fLevelDB: double; pguidEventContext: PGUID): HRESULT; stdcall; 56 | function GetChannelVolumeLevel(nChannel: Integer; out fLevelDB: double): HRESULT; stdcall; 57 | function GetChannelVolumeLevelScalar(nChannel: Integer; out fLevel: double): HRESULT; stdcall; 58 | function SetMute(bMute: Boolean; pguidEventContext: PGUID): HRESULT; stdcall; 59 | function GetMute(out bMute: Boolean): HRESULT; stdcall; 60 | function GetVolumeStepInfo(pnStep: Integer; out pnStepCount: Integer): HRESULT; stdcall; 61 | function VolumeStepUp(pguidEventContext: PGUID): HRESULT; stdcall; 62 | function VolumeStepDown(pguidEventContext: PGUID): HRESULT; stdcall; 63 | function QueryHardwareSupport(out pdwHardwareSupportMask): HRESULT; stdcall; 64 | function GetVolumeRange(out pflVolumeMindB: double; out pflVolumeMaxdB: double; out pflVolumeIncrementdB: double): HRESULT; stdcall; 65 | end; 66 | 67 | IAudioMeterInformation = interface(IUnknown) 68 | ['{C02216F6-8C67-4B5B-9D00-D008E73E0064}'] 69 | end; 70 | 71 | IPropertyStore = interface(IUnknown) 72 | end; 73 | 74 | IMMDevice = interface(IUnknown) 75 | ['{D666063F-1587-4E43-81F1-B948E807363F}'] 76 | function Activate(const refId: TGUID; dwClsCtx: DWORD; pActivationParams: PInteger; out pEndpointVolume: IAudioEndpointVolume): HRESULT; stdCall; 77 | function OpenPropertyStore(stgmAccess: DWORD; out ppProperties: IPropertyStore): HRESULT; stdcall; 78 | function GetId(out ppstrId: PLPWSTR): HRESULT; stdcall; 79 | function GetState(out State: Integer): HRESULT; stdcall; 80 | end; 81 | 82 | IMMDeviceCollection = interface(IUnknown) 83 | ['{0BD7A1BE-7A1A-44DB-8397-CC5392387B5E}'] 84 | end; 85 | 86 | IMMNotificationClient = interface(IUnknown) 87 | ['{7991EEC9-7E89-4D85-8390-6C703CEC60C0}'] 88 | end; 89 | 90 | IMMDeviceEnumerator = interface(IUnknown) 91 | ['{A95664D2-9614-4F35-A746-DE8DB63617E6}'] 92 | function EnumAudioEndpoints(dataFlow: TOleEnum; deviceState: SYSUINT; DevCollection: IMMDeviceCollection): HRESULT; stdcall; 93 | function GetDefaultAudioEndpoint(EDF: SYSUINT; ER: SYSUINT; out Dev :IMMDevice ): HRESULT; stdcall; 94 | function GetDevice(pwstrId: pointer; out Dev: IMMDevice): HRESULT; stdcall; 95 | function RegisterEndpointNotificationCallback(pClient: IMMNotificationClient): HRESULT; stdcall; 96 | end; 97 | 98 | const 99 | WM_VOLNOTIFY = WM_USER + 1; 100 | 101 | type 102 | Tproc = procedure; 103 | 104 | TEndpointVolumeCallback = class(TInterfacedObject, IAudioEndpointVolumeCallback, 105 | IAudioEndpointVolumeCallbackEx) 106 | FDeviceEnumerator: IMMDeviceEnumerator; 107 | FMMDevice: IMMDevice; 108 | FAudioEndpointVolume: IAudioEndpointVolume; 109 | FCallback: TProc; 110 | function OnNotify(pNotify: PAUDIO_VOLUME_NOTIFICATION_DATA): HRESULT; stdcall; 111 | procedure RegisterCallback; 112 | procedure UnregisterCallback; 113 | constructor Create(ACallBack: TProc); 114 | destructor Destroy;override; 115 | end; 116 | 117 | procedure WINmixerSetCallBack(callback: Tproc); // Assign a procedure as callback for master-mixer 118 | 119 | function WINmixerGetVolume(chan:integer): integer; // chan 0 = left, chan 1 = right 120 | 121 | procedure WINmixerSetVolume(chan, volume :integer); // chan 0 = left, chan 1 = right volume 122 | // volume from 0 to 100 123 | 124 | var 125 | wm_MasterVolLeft, wm_MasterVolRight : integer; 126 | wm_MasterMuted : boolean; 127 | 128 | implementation 129 | 130 | var 131 | AEndpoint: IAudioEndpointVolumeCallbackEx = nil; 132 | 133 | function RoundMath(aV:double):int64;overload; 134 | begin 135 | if aV>=0 then 136 | result:=Trunc(aV+0.5) 137 | else 138 | result:=Trunc(aV-0.5); 139 | end; 140 | 141 | function RoundMath(aV:single):int64;overload; 142 | begin 143 | if aV>=0 then 144 | result:=Trunc(aV+0.5) 145 | else 146 | result:=Trunc(aV-0.5); 147 | end; 148 | 149 | procedure WINmixerSetVolume(chan, volume :integer); // chan 0 = left, chan 1 = right volume 150 | var 151 | pEndpointVolume: IAudioEndpointVolume; 152 | LDeviceEnumerator: IMMDeviceEnumerator; 153 | Dev: IMMDevice; 154 | avol : single; 155 | begin 156 | OleCheck(CoCreateInstance(CLASS_IMMDeviceEnumerator, nil, 157 | CLSCTX_INPROC_SERVER, IID_IMMDeviceEnumerator, LDeviceEnumerator)); 158 | OleCheck(LDeviceEnumerator.GetDefaultAudioEndpoint(0, 0, Dev)); 159 | 160 | OleCheck(Dev.Activate(IID_IAudioEndpointVolume, CLSCTX_INPROC_SERVER, nil, pEndpointVolume)); 161 | avol := volume/100; 162 | (pEndpointVolume.SetMasterVolumeLevelScalar(avol, @GUID_NULL)); 163 | end; 164 | 165 | function WINmixerGetVolume(chan:integer): integer; // chan 0 = left, chan 1 = right 166 | var 167 | pEndpointVolume: IAudioEndpointVolume; 168 | LDeviceEnumerator: IMMDeviceEnumerator; 169 | Dev: IMMDevice; 170 | avol : single; 171 | begin 172 | OleCheck(CoCreateInstance(CLASS_IMMDeviceEnumerator, nil, CLSCTX_INPROC_SERVER, 173 | IID_IMMDeviceEnumerator, LDeviceEnumerator)); 174 | OleCheck(LDeviceEnumerator.GetDefaultAudioEndpoint(0, 0, dev)); 175 | OleCheck(Dev.Activate(IID_IAudioEndpointVolume, CLSCTX_INPROC_SERVER, nil, pEndpointVolume)); 176 | 177 | (pEndpointVolume.GetMasterVolumeLevelScaler(avol)); 178 | 179 | result := roundmath(avol * 100); 180 | end; 181 | 182 | procedure WINmixerSetCallBack(callback: Tproc); 183 | begin 184 | AEndpoint := TEndpointVolumeCallback.create(Callback); 185 | end; 186 | 187 | constructor TEndpointVolumeCallback.Create(ACallBack: TProc); 188 | begin 189 | inherited Create; 190 | FCallback := ACallBack; 191 | OleCheck(CoCreateInstance(CLASS_IMMDeviceEnumerator, nil, CLSCTX_INPROC_SERVER, 192 | IID_IMMDeviceEnumerator, FDeviceEnumerator)); 193 | OleCheck(FDeviceEnumerator.GetDefaultAudioEndpoint(0, 0, FMMDevice)); 194 | OleCheck(FMMDevice.Activate(IID_IAudioEndpointVolume, CLSCTX_INPROC_SERVER, nil, FAudioEndpointVolume)); 195 | 196 | RegisterCallback; 197 | end; 198 | 199 | destructor TEndpointVolumeCallback.Destroy; 200 | begin 201 | inherited Destroy; 202 | end; 203 | 204 | procedure TEndpointVolumeCallback.RegisterCallback; 205 | begin 206 | OleCheck(FAudioEndpointVolume.RegisterControlChangeNotify(self)); 207 | end; 208 | 209 | procedure TEndpointVolumeCallback.UnregisterCallback; 210 | begin 211 | OleCheck(FAudioEndpointVolume.UnregisterControlChangeNotify(Self)); 212 | end; 213 | 214 | function TEndpointVolumeCallback.OnNotify(pNotify: PAUDIO_VOLUME_NOTIFICATION_DATA): HRESULT; stdcall; 215 | begin 216 | wm_MasterVolLeft := roundmath(100 * pNotify^.fMasterVolume); 217 | wm_MasterVolRight := wm_MasterVolLeft; // todo 218 | wm_MasterMuted := pNotify^.bMuted; 219 | 220 | FCallBack; 221 | Result := 0; 222 | end; 223 | 224 | initialization 225 | CoInitialize(nil); 226 | 227 | finalization 228 | if AEndpoint <> nil then AEndpoint.UnregisterCallback; 229 | CoUninitialize; 230 | AEndpoint := nil; 231 | 232 | end. -------------------------------------------------------------------------------- /strumpract.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fredvs/strumpract/750bbccb8cdb4618f5001f72243f714baf913dec/strumpract.png --------------------------------------------------------------------------------