Merge remote-tracking branch 'origin/stable-0.4-test' into stable-0.4
Conflicts: include/song.h src/core/song.cpp
@@ -15,7 +15,7 @@ INCLUDE(FindPkgConfig)
|
||||
|
||||
SET(VERSION_MAJOR "0")
|
||||
SET(VERSION_MINOR "4")
|
||||
SET(VERSION_PATCH "13")
|
||||
SET(VERSION_PATCH "15")
|
||||
#SET(VERSION_SUFFIX "")
|
||||
SET(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
|
||||
IF(VERSION_SUFFIX)
|
||||
@@ -30,7 +30,6 @@ OPTION(WANT_ALSA "Include ALSA (Advanced Linux Sound Architecture) support" ON)
|
||||
OPTION(WANT_CALF "Include CALF LADSPA plugins" ON)
|
||||
OPTION(WANT_CAPS "Include C* Audio Plugin Suite (LADSPA plugins)" ON)
|
||||
OPTION(WANT_CMT "Include Computer Music Toolkit LADSPA plugins" ON)
|
||||
OPTION(WANT_FFTW3F "Include SpectrumAnalyzer and ZynAddSubFX plugin" ON)
|
||||
OPTION(WANT_JACK "Include JACK (Jack Audio Connection Kit) support" ON)
|
||||
OPTION(WANT_OGGVORBIS "Include OGG/Vorbis support" ON)
|
||||
OPTION(WANT_PULSEAUDIO "Include PulseAudio support" ON)
|
||||
@@ -261,16 +260,7 @@ ENDIF(WANT_JACK)
|
||||
|
||||
|
||||
# check for FFTW3F-library
|
||||
IF(WANT_FFTW3F)
|
||||
PKG_CHECK_MODULES(FFTW3F fftw3f>=3.0.0)
|
||||
IF(FFTW3F_FOUND)
|
||||
SET(LMMS_HAVE_FFTW3F TRUE)
|
||||
SET(STATUS_FFTW3F "OK")
|
||||
ELSE(FFTW3F_FOUND)
|
||||
SET(STATUS_FFTW3F "not found, libfftw3-dev (or similiar) "
|
||||
"is highly recommended")
|
||||
ENDIF(FFTW3F_FOUND)
|
||||
ENDIF(WANT_FFTW3F)
|
||||
PKG_CHECK_MODULES(FFTW3F REQUIRED fftw3f>=3.0.0)
|
||||
|
||||
|
||||
# check for Fluidsynth
|
||||
@@ -615,13 +605,11 @@ MESSAGE(
|
||||
"* Stk Mallets : ${STATUS_STK}\n"
|
||||
"* VST-instrument hoster : ${STATUS_VST}\n"
|
||||
"* VST-effect hoster : ${STATUS_VST}\n"
|
||||
"* SpectrumAnalyzer : ${STATUS_FFTW3F}\n"
|
||||
"* CALF LADSPA plugins : ${STATUS_CALF}\n"
|
||||
"* CAPS LADSPA plugins : ${STATUS_CAPS}\n"
|
||||
"* CMT LADSPA plugins : ${STATUS_CMT}\n"
|
||||
"* TAP LADSPA plugins : ${STATUS_TAP}\n"
|
||||
"* SWH LADSPA plugins : ${STATUS_SWH}\n"
|
||||
"* ZynAddSubFX : ${STATUS_FFTW3F}\n"
|
||||
)
|
||||
|
||||
MESSAGE(
|
||||
|
||||
4
README
@@ -1,7 +1,7 @@
|
||||
Linux MultiMedia Studio 0.4.13
|
||||
Linux MultiMedia Studio 0.4.15
|
||||
===============================
|
||||
|
||||
Copyright (c) 2004-2012 by LMMS-developers
|
||||
Copyright (c) 2004-2013 by LMMS-developers
|
||||
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
MINGW=/opt/mingw32
|
||||
export PATH=$PATH:$MINGW/bin
|
||||
export CFLAGS="-march=pentium3 -mtune=generic -mpreferred-stack-boundary=5 -fno-tree-vectorize"
|
||||
#export CFLAGS="-march=pentium3 -mtune=generic -mpreferred-stack-boundary=5 -fno-tree-vectorize"
|
||||
export CFLAGS="-march=pentium3 -mtune=generic -mpreferred-stack-boundary=5"
|
||||
export CXXFLAGS="$CFLAGS"
|
||||
cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/modules/Win32Toolchain.cmake -DCMAKE_MODULE_PATH=`pwd`/../cmake/modules/
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
MINGW=/opt/mingw64
|
||||
export PATH=$PATH:$MINGW/bin
|
||||
export CFLAGS="-fno-tree-vectorize"
|
||||
#export CFLAGS="-fno-tree-vectorize"
|
||||
export CXXFLAGS="$CFLAGS"
|
||||
cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/modules/Win64Toolchain.cmake -DCMAKE_MODULE_PATH=`pwd`/../cmake/modules/
|
||||
|
||||
|
||||
@@ -539,7 +539,7 @@ If you're interested in translating LMMS in another language or want to imp
|
||||
</message>
|
||||
<message>
|
||||
<source>6add9</source>
|
||||
<translation>madd9</translation>
|
||||
<translation>6add9</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>m6</source>
|
||||
|
||||
BIN
data/locale/gl.qm
Normal file
6469
data/locale/gl.ts
Normal file
@@ -3,7 +3,7 @@
|
||||
<multimediaproject creator="Linux MultiMedia Studio (LMMS)" creatorversion="0.1.2-cvs20060123" type="channelsettings" version="1.0" >
|
||||
<head/>
|
||||
<channelsettings>
|
||||
<channeltrack surpos="134219776" fxch="0" baseoct="4" vol="100" name="Default" basetone="9" tab="1" >
|
||||
<channeltrack surpos="134219776" fxch="0" baseoct="4" vol="100" name="alien_strings" basetone="9" tab="1" >
|
||||
<bitinvader sampleLength="128" interpolation="1" version="0.1" normalize="0" sampleShape="PKaOPeKT5r6uR+G9CtejvczMTL2PwvW8CtejvAAAAAAK16M8CtejPI/C9TzMzEw9j8J1PY/CdT2PwnU9j8J1PY/CdT2PwnU9j8J1PczMTD2PwvU8CtejPArXIzwK1yO8CtejvI/C9bzMzEy9KVyPvQrXo73sUbi9rkfhvY/C9b2PwvW9uB4FvpqZGb4K1yO+CtcjvnsULr7sUTi+XI9Cvs3MTL7NzEy+zcxMvs3MTL7NzEy+PgpXvq5HYb6uR2G+rkdhvh6Fa76PwnW+j8J1vo/Cdb6PwnW+j8J1vo/Cdb6PwnW+j8J1vo/Cdb6PwnW+j8J1vo/Cdb6PwnW+HoVrvq5HYb4+Cle+zcxMvlyPQr57FC6+CtcjvpqZGb64HgW+rkfhvc3MzL3sUbi9KVyPvczMTL0K1yO9j8L1vArXI7wK1yM8CtejPI/C9TyPwvU8CtcjPSlcjz3sUbg9rkfhPY/C9T24HgU+mpkZPgrXIz57FC4+7FE4PlyPQj7NzEw+PgpXPh6Faz64HoU+KVyPPuJ6lD5SuJ4+exSuPuxRuD5cj8I+hevRPq5H4T7Xo/A+j8L1PgAAAD+4HgU/zMwMP+F6FD8+Chc/9igcP2ZmJj/XozA/MzMzP5DCNT9I4To/XI9CP3A9Sj/NzEw/KVxPP4XrUT/helQ/9ihcP2ZmZj8=" />
|
||||
<eldata fres="0.21" ftype="0" fcut="3840" fwet="1" >
|
||||
<elvol lfosyncmode="0" lpdel="0" amt="1" rel="0.33" ctlenvamt="0" latt="0" sus="0.49" lspd="0.7311" att="0.4" pdel="0" lamt="0" dec="0.897" userwavefile="" x100="1" lshp="0" hold="0" />
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<multimediaproject creator="Linux MultiMedia Studio (LMMS)" creatorversion="0.1.2-cvs20060123" type="channelsettings" version="1.0" >
|
||||
<head/>
|
||||
<channelsettings>
|
||||
<channeltrack surpos="134219776" fxch="0" baseoct="5" vol="100" name="Default" basetone="9" tab="1" >
|
||||
<channeltrack surpos="134219776" fxch="0" baseoct="5" vol="100" name="beehive" basetone="9" tab="1" >
|
||||
<bitinvader sampleLength="30" interpolation="1" version="0.1" normalize="1" sampleShape="AAAAAPMEtT56glo/eoJaP/IEtT72BLW+eoJav3iCWr/vBLW+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAI/CdT3NzEw+rkfhPlK4Hj97FC4/pHA9P1yPQj89Clc/rkdhP65HYT/Xo3A/j8J1P0jhej8AAIA/" />
|
||||
<eldata fres="0.43" ftype="1" fcut="1120" fwet="1" >
|
||||
<elvol lfosyncmode="0" lpdel="0" amt="1" rel="0.65" ctlenvamt="0" latt="0" sus="0" lspd="0.1" att="0.496" pdel="0" lamt="0" dec="0.499" userwavefile="" x100="0" lshp="0" hold="0" />
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<multimediaproject creator="Linux MultiMedia Studio (LMMS)" creatorversion="0.1.2-cvs20060123" type="channelsettings" version="1.0" >
|
||||
<head/>
|
||||
<channelsettings>
|
||||
<channeltrack surpos="134219776" fxch="0" baseoct="5" vol="100" name="Default" basetone="9" tab="0" >
|
||||
<channeltrack surpos="134219776" fxch="0" baseoct="5" vol="100" name="bell" basetone="9" tab="0" >
|
||||
<bitinvader sampleLength="8" interpolation="1" version="0.1" normalize="0" sampleShape="AAAAAPMENT8AAIA/8wQ1Py69u7P1BDW/AACAv+8ENb8=" />
|
||||
<eldata fres="0.43" ftype="0" fcut="1280" fwet="0" >
|
||||
<elvol lfosyncmode="0" lpdel="0" amt="1" rel="0.351" ctlenvamt="0" latt="0" sus="0.499" lspd="0.1" att="0" pdel="0" lamt="0" dec="0.499" userwavefile="" x100="0" lshp="0" hold="0" />
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<multimediaproject creator="Linux MultiMedia Studio (LMMS)" creatorversion="0.1.4" type="channelsettings" version="1.0" >
|
||||
<head/>
|
||||
<channelsettings>
|
||||
<channeltrack surpos="134219776" fxch="0" baseoct="4" vol="100" name="Default" basetone="9" tab="0" >
|
||||
<channeltrack surpos="134219776" fxch="0" baseoct="4" vol="100" name="cello" basetone="9" tab="0" >
|
||||
<bitinvader sampleLength="128" interpolation="1" version="0.1" normalize="1" sampleShape="xUHivbW52r2yLVm+IY2QvlbDqr5qnbS+bhe3vm5Bt74UH4q+NgEbvlF9KL7+kX6+ILePviYNk74+YZ++W4utvighlL65edy9rZnWPeoZdT45f5w+VgurPjr5nD55STw+qsHUPIoBRbyeyc491VlqPszNZT7coW09IAEQvgYzg75QAai+fAO+vixDlr5++b692JHrPfYlez7W9Wo+vNFdPRRhCr7gOXC+JN+Rvui5c76P4Ue9IYUQPuepcz4vi5c+WCesPiNFkT6CycA9tiHbvao9Vb4GT4O+tZVavkuxJb2ygdg9Y1UxPuBZcD7EDWI+QumgPXQJur2WFUu+CWOEvkThob5y9bi+iEPEvo+Fx75vb7e+RrGivi2Zlr60KVq+8oF4vWjhsz1+0T4+dqk6PsoBZT2jUdG9qMVTvh9zj75dc66+MuuYvv7J/r3TwWk9hClCPjIjmT40UZo+FbkKPii5k72VcUq+ED2Ivi7/lr6+YV++KaEUvS7xFj4G7YI+NCmaPj4Bnz7evW4+luFKPf+R/73AwV++H2ePvlV1qr5owbO+VFmqvlY9q756rby+RK2hvgAtAL5+Kb894oVxPtgRbD4YYYw9/oH/vfdpe75Bc6C+WE2svvJZeb5F8SK9G5UNPvbFej5Ep6E+HhWPPrah2j2YWcy97ml3vtz1bb4=" />
|
||||
<eldata fres="0.5" ftype="0" fcut="16000" fwet="0" >
|
||||
<elvol lfosyncmode="0" lpdel="0" amt="1" rel="0.727" ctlenvamt="0" latt="0" sus="0" lspd="0.1" att="0.517" pdel="0" lamt="0" dec="0" userwavefile="" x100="0" lshp="0" hold="0" />
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<multimediaproject creator="Linux MultiMedia Studio (LMMS)" creatorversion="0.1.2-cvs20060123" type="channelsettings" version="1.0" >
|
||||
<head/>
|
||||
<channelsettings>
|
||||
<channeltrack surpos="134219776" fxch="0" baseoct="5" vol="100" name="Default" basetone="9" tab="0" >
|
||||
<channeltrack surpos="134219776" fxch="0" baseoct="5" vol="100" name="drama" basetone="9" tab="0" >
|
||||
<bitinvader sampleLength="128" interpolation="1" version="0.1" normalize="0" sampleShape="kNtHv4tFRb+EOUK/ftM+v3Y1O79vaTe/Z3Mzv19tL79Xdyu/T4Mnv0e1I79ACSC/OaEcvzNnGb8tbRa/J70TvyNNEb8eNQ+/G10NvxjRC78Vlwq/E58JvxLxCL8Rgwi/EU8IvxFZCL8RkQi/Eu0IvxN3Cb8UHwq/FucKvxexC78ZlQy/G3cNvx1bDr8fRw+/ICsQvyLxEL8jsxG/JWcSvyYHE78ngRO/KOETvygpFL8pWRS/KXEUvylnFL8pSxS/KBUUvyjHE78naxO/JusSvyVhEr8jvRG/IgkRvyFDEL8fdw+/HaMOvxu9Db8azQy/GN8LvxbnCr8U6wm/Eu8IvxD5B78O/wa/DAUGvwoXBb8IKwS/B0MDvwVbAr8DdwG/AZsAv/+N/7787f2++Vn8vvbF+r7yQfm+8NX3vu119r7qDfW+553zvuRB8r7i2fC+34nvvtwp7r7Zvey+12HrvtQZ6r7Szei+z23nvswV5r7KzeS+x1XjvsTZ4b7BXeC+vs3evrtF3b63mdu+tBHavrGF2L6u9da+q2XVvqjN076kMdK+oZnQvp7lzr6aLc2+l33LvpO9yb6Q8ce+jCXGvoldxL6FmcK+gsHAvn7tvr56Cb2+d027vnNxub5vpbe+bMm1vmj1s75kIbK+YVGwvl2Frr5Zpay+Vs2qvlINqb4=" />
|
||||
<eldata fres="0.43" ftype="6" fcut="1120" fwet="0" >
|
||||
<elvol lfosyncmode="0" lpdel="0" amt="1" rel="0.351" ctlenvamt="0" latt="0" sus="0" lspd="0.7311" att="0.058" pdel="0" lamt="0" dec="0.499" userwavefile="" x100="1" lshp="0" hold="0" />
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<multimediaproject creator="Linux MultiMedia Studio (LMMS)" creatorversion="0.1.2-cvs20060123" type="channelsettings" version="1.0" >
|
||||
<head/>
|
||||
<channelsettings>
|
||||
<channeltrack surpos="134219776" fxch="0" baseoct="5" vol="100" name="Default" basetone="9" tab="1" >
|
||||
<channeltrack surpos="134219776" fxch="0" baseoct="5" vol="100" name="epiano" basetone="9" tab="1" >
|
||||
<bitinvader sampleLength="30" interpolation="1" version="0.1" normalize="1" sampleShape="AAAAAPMEtT56glo/eoJaP/IEtT72BLW+eoJav3iCWr/vBLW+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" />
|
||||
<eldata fres="0.43" ftype="0" fcut="1280" fwet="0" >
|
||||
<elvol lfosyncmode="0" lpdel="0" amt="1" rel="0.351" ctlenvamt="0" latt="0" sus="0.499" lspd="0.1" att="0" pdel="0" lamt="0" dec="0.499" userwavefile="" x100="0" lshp="0" hold="0.22" />
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<multimediaproject creator="Linux MultiMedia Studio (LMMS)" creatorversion="0.1.4" type="channelsettings" version="1.0" >
|
||||
<head/>
|
||||
<channelsettings>
|
||||
<channeltrack surpos="134219776" fxch="0" baseoct="4" vol="100" name="Default" basetone="9" tab="0" >
|
||||
<channeltrack surpos="134219776" fxch="0" baseoct="4" vol="100" name="soft_pad" basetone="9" tab="0" >
|
||||
<bitinvader sampleLength="128" interpolation="1" version="0.1" normalize="0" sampleShape="4lVxvqJBUb6xfVi+j0VHvkFRIL7UGeq9Z2GzvV4hr72iwdC98Kn3vQjdA77+2f697NH1vQuFBb5JhSS+nEVOvuDRb77vXXe+v0lfvmqlNL4eCQ++Ar0Avh6tDr5cKS6+lWVKvqjZU76RVUi+X2kvvighFL71Qfq9pMHRvURhor2CAUG9OAGcu2xxNj2O2cY9NbEaPqjNUz4O+4Y+Q1+hPmgLtD52B7s+bbG2PlzJrT5Vf6o+aDu0Ppdbyz7SO+k+BPsBPxTCCT8WCws/ECUIPwgcBD8AOQA/7Af2PsWJ4j6Ff8I+NVWaPtaBaj5+ST8+gMk/Pst5ZT4ax4w+QEGgPkpBpT47cZ0+Ia2QPg7Thj4EC4I+9k17PsphZT50BTo+75n3PbRxWj24Ady7jFFGvRrZjL0gSZC9x1FjvZzBzbwc4Y08DWmGPcGx4D0YUQw+IKEPPvzJ/T2fkc89YGmwPV5Brz2KKcU9sKHXPZqhzD06EZ09YuEwPZpBTTz7gf27bAG2vGPBMb1Syai9HkUPvp15Tr72vXq+BN+Bvtida76KFUW+UjkpvlOFKb6JVUS+0JlnvvzVfb70JXq+v6VfvnwpPr5MaSa+QGUgvk5hJ75dsS6+WDUsvjxVHr4XeQu+8XH4vdOR6b3S0ei95qnyvQotBb48nR2+jr1Gvvr9fL4=" />
|
||||
<eldata fres="0.5" ftype="0" fcut="9120" fwet="1" >
|
||||
<elvol lfosyncmode="0" lpdel="0" amt="1" rel="0.727" ctlenvamt="1" latt="0" sus="0" lspd="0.1" att="0.657" pdel="0" lamt="0" dec="0" userwavefile="" x100="0" lshp="0" hold="0" />
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<multimediaproject creator="Linux MultiMedia Studio (LMMS)" creatorversion="0.1.2-cvs20060123" type="channelsettings" version="1.0" >
|
||||
<head/>
|
||||
<channelsettings>
|
||||
<channeltrack surpos="134219776" fxch="0" baseoct="5" vol="100" name="Default" basetone="9" tab="1" >
|
||||
<channeltrack surpos="134219776" fxch="0" baseoct="5" vol="100" name="spacefx" basetone="9" tab="1" >
|
||||
<bitinvader sampleLength="68" interpolation="0" version="0.1" normalize="0" sampleShape="W/iCvqwtgL2mPdg+iodDP+wPEz9vmss5NYLSvr5Zp764oRs9I/l+PjGqND73GnY9WMfrPUu8ej6Rqlk+PSsXO54U/L10nDk97x62Pmty2z4tfu49K3SIvvHCjb7lk/090lz+Pl543T6v5qQ8QySRvjVzN75K9Es+qUf9Pr9J8D7l4AY+KxKgvlRRD78AQsa+9qL8PTwnFj+X3yc/b+W2PlNf0zsVwCq+fEhGvtRdQL4b0Bu+nLoCvc53Fz63MJY+ch6qPq4daj76RsO87J6ovjZj8L6GTpO+gpDEPXm/tT5TBo4+iBUcvXS8nr608KW+QNtwvf8ioz5qDgY/iTKrPksJMr70uhu/nh8Xv01bA74=" />
|
||||
<eldata fres="0.43" ftype="4" fcut="1120" fwet="1" >
|
||||
<elvol lfosyncmode="0" lpdel="0" amt="0" rel="0.65" ctlenvamt="0" latt="0" sus="0" lspd="0.7311" att="0.496" pdel="0" lamt="1" dec="0.499" userwavefile="" x100="1" lshp="0" hold="0" />
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<multimediaproject creator="Linux MultiMedia Studio (LMMS)" creatorversion="0.1.4" type="channelsettings" version="1.0" >
|
||||
<head/>
|
||||
<channelsettings>
|
||||
<channeltrack surpos="134219776" fxch="0" baseoct="7" vol="100" name="Default" basetone="9" tab="0" >
|
||||
<channeltrack surpos="134219776" fxch="0" baseoct="7" vol="100" name="subbass" basetone="9" tab="0" >
|
||||
<bitinvader sampleLength="128" interpolation="1" version="0.1" normalize="1" sampleShape="2kpgviIPhz3VQAM+oJkyu8pZrr5y/Ta/5nhxv9QFf7+cp3a//hNovwSBTb+OOR+/s2TIvruEJL5Oy2I9DDSIPmge7D4MVx0/pyQ5P5aHTz8Qp2M/XIhxP/SJdT/mnnI/vbltP2jiZj+x51o/F5pJP9gINj84YiE/iLIJP/+T3D5WAaQ+bGVePt5p8j06A3o81CG5vQSrP77SmIm+xamuvjpD1L5u/vu+wEURv+w7Ib878Su/XHgxv3ClM7+oLzS/HPIyv4ZlLr/YxSW/wR0avzoZDb+KHv++RRrjvoILxr7yV6e+DyCFvhxUO74+g8a9lA3luyFIqz0CcTM+qPOIPq+Rtj68guA++kkDP1jHFD8MlyQ/vC4yP8h7PT/ZxEY/uqdNP9osUT9WVlE/Ct5PP56cTj8xiU0/zBpLPzCMRj9S4UA/EWU7P7zTNT8MlC4/AWwkP/B3Fz/0qQg/ZfLxPrRG0j5sRbM+YtmUPgeFaz7TSik+YFjFPaeVzTw4qT69Je/yvQgvRb4juYm+LTGxvrwJ176QXPm+WKkLv5mbGL924iO/Fsstv16RNr9kaD6/HV9Fv3NZS7+CQFC/wBJUvxubVr/NUle/VvdVvwo8U78WaFC/qfpNv4QBS79SKUa/ykU/vwxcN7+UOy+/upQmv4KdHL+EJRG/OqYEv9Ya774=" />
|
||||
<eldata fres="1.13" ftype="0" fcut="4960" fwet="1" >
|
||||
<elvol lfosyncmode="0" lpdel="0" amt="0" rel="0.1" ctlenvamt="0" latt="0" sus="0.499" lspd="0.1" att="0" pdel="0" lamt="0" dec="0.499" userwavefile="" x100="0" lshp="0" hold="0.499" />
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<multimediaproject creator="Linux MultiMedia Studio (LMMS)" creatorversion="0.1.2-cvs20060123" type="channelsettings" version="1.0" >
|
||||
<head/>
|
||||
<channelsettings>
|
||||
<channeltrack surpos="134219776" fxch="0" baseoct="5" vol="100" name="Default" basetone="9" tab="1" >
|
||||
<channeltrack surpos="134219776" fxch="0" baseoct="5" vol="100" name="sweep_pad" basetone="9" tab="1" >
|
||||
<bitinvader sampleLength="8" interpolation="0" version="0.1" normalize="0" sampleShape="+MrwPiRn7r4WUV6/xEkNv429tL6ofBA+P7uAPtTiwD4=" />
|
||||
<eldata fres="0.43" ftype="0" fcut="1280" fwet="1" >
|
||||
<elvol lfosyncmode="0" lpdel="0" amt="1" rel="0.351" ctlenvamt="0" latt="0" sus="0.499" lspd="0.1" att="0.164" pdel="0" lamt="0" dec="0.499" userwavefile="" x100="0" lshp="0" hold="0.499" />
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<multimediaproject creator="Linux MultiMedia Studio (LMMS)" creatorversion="0.1.4" type="channelsettings" version="1.0" >
|
||||
<head/>
|
||||
<channelsettings>
|
||||
<channeltrack surpos="134219776" fxch="0" baseoct="4" vol="100" name="Default" basetone="9" tab="1" >
|
||||
<channeltrack surpos="134219776" fxch="0" baseoct="4" vol="100" name="toy_piano" basetone="9" tab="1" >
|
||||
<bitinvader sampleLength="128" interpolation="1" version="0.1" normalize="0" sampleShape="cAE4OuAB8DkIAYS6gAFAugABALmgAdC5AAEAuiABEDp4Abw6UAEoOggBhLogAZC6gAHAuAgBhLpAASC7oAFQugABgDqAAUA5gAHAOJABSLpaAa27gAFAvHLBuLxBgSC9xCFive4hd72LYUW9GCEMvUZBI70UMYq9+YH8vZIpSb7DkWG+S4Elvnwhvr044Zu9MbGYvQlRhL2JkcS9UjEpvrABWL7rgXW+EhWJvgYFg765sVy+ftk+vj9pH74dUQ6+W2ktvrmxXL4G1YK+J0mTvhuNjb7owXO+0DFovsYRY76teVa+31lvvg2Nhr7iQXG+ujldvgmphL4G7YK+IDkQvjpBHb3sAfa7dsE6PeQB8j0CMQE+SAGkPSWBkjxSAam7PNGdPWt5NT6dWU4+zhlnPgLJgD6uyVY+eWE8PsBBYD7bSW0+5glzPhGdiD4DeYE+23ltPi9Jlz5hebA+Fh2LPpGRSD7RmWg+Gu2MPgYBgz6+2V4+vglfPvD5dz7haXA+cgk5Pi15Fj4lmRI+VvGqPbRB2rzcMe69O2kdvsOh4b3jYXG9J1GTvS1hFr0PYQc9KAGUuyYBk71Voaq9XNGtvWrxtL0CKQG+c2E5vn4hP76RYUi+8Ul4viDZj74RmYi+dBE6vgr5BL4wIRi+q5HVvYeBw7wOAYe8gEFAvamR1L0=" />
|
||||
<eldata fres="0.5" ftype="0" fcut="9120" fwet="0" >
|
||||
<elvol lfosyncmode="0" lpdel="0" amt="1" rel="0.727" ctlenvamt="1" latt="0" sus="0.717" lspd="0.1" att="0" pdel="0" lamt="0" dec="0.673" userwavefile="" x100="0" lshp="0" hold="0.37" />
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<multimediaproject creator="Linux MultiMedia Studio (LMMS)" creatorversion="0.1.2-cvs20060123" type="channelsettings" version="1.0" >
|
||||
<head/>
|
||||
<channelsettings>
|
||||
<channeltrack surpos="134219776" fxch="0" baseoct="6" vol="100" name="Default" basetone="9" tab="0" >
|
||||
<channeltrack surpos="134219776" fxch="0" baseoct="6" vol="100" name="wah_synth" basetone="9" tab="0" >
|
||||
<bitinvader sampleLength="56" interpolation="1" version="0.1" normalize="1" sampleShape="AAAAAKJN5T2H3GM+VxqpPgMm3j5BMwg/CJ0fP/MENT89Ctc+XI/CPlyPwj57FK4+CtejPpqZmT4pXI8+rkdhPq5HYT7NzEw+zcxMPo/CdT4pXI8+CtejPgrXoz57FK4+7FG4PlyPwj6H3GM+nE3lPS69u7OzTeW9k9xjvlYaqb4DJt6+rkfhvq5H4b49Cte+zczMvs3MzL5cj8K+exSuvnsUrr57FK6+CtejvpqZmb4pXI++KVyPvilcj74pXI++KVyPvilcj74pXI++CtejvuxRuL5cj8K+gtxjvpBN5b0=" />
|
||||
<eldata fres="0.21" ftype="6" fcut="2720" fwet="1" >
|
||||
<elvol lfosyncmode="0" lpdel="0" amt="1" rel="0.528" ctlenvamt="0" latt="0" sus="0" lspd="0.7311" att="0" pdel="0" lamt="0" dec="0.897" userwavefile="" x100="1" lshp="0" hold="0.234" />
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<multimedia-project version="1.0" creator="Linux MultiMedia Studio (LMMS)" creatorversion="0.4.0-svn20071123" type="instrumenttracksettings" >
|
||||
<head/>
|
||||
<instrumenttracksettings>
|
||||
<instrumenttrack width="250" x="583" y="240" fxch="0" height="470" surpos-x="0" surpos-y="0" visible="1" basenote="75" name="Default" vol="102" tab="0" >
|
||||
<instrumenttrack width="250" x="583" y="240" fxch="0" height="470" surpos-x="0" surpos-y="0" visible="1" basenote="75" name="Oh Synth" vol="102" tab="0" >
|
||||
<lb302 db24="1" vcf_res="1.045" vcf_dec="0.42" vco_detune="-16" dead="0" vcf_cut="0.15" vcf_mod="0.61" dist="0" slide_dec="0.57" slide="0" shape="3" />
|
||||
<eldata fres="0.5" ftype="0" fcut="14000" fwet="0" >
|
||||
<elvol lspd_denominator="4" pdel="0" userwavefile="" dec="0.5" lamt="0" syncmode="0" latt="0" rel="0.1" sus="0.5" amt="0" x100="0" att="0" lpdel="0" hold="0.5" lshp="0" lspd="0.1" ctlenvamt="0" lspd_numerator="4" />
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<!DOCTYPE multimedia-project>
|
||||
<multimedia-project version="1.0" creator="Linux MultiMedia Studio (LMMS)" creatorversion="0.4.0-rc3" type="instrumenttracksettings" >
|
||||
<head/>
|
||||
<instrumenttracksettings muted="0" type="0" name="Default preset" >
|
||||
<instrumenttracksettings muted="0" type="0" name="STrash" >
|
||||
<instrumenttrack pan="0" fxch="0" pitch="0" basenote="81" vol="88" >
|
||||
<instrument name="lb302" >
|
||||
<lb302 db24="0" vcf_res="1.01" vcf_dec="0.1" dead="0" vcf_cut="0.18" vcf_mod="1" dist="1" slide_dec="0.5" slide="1" shape="0" />
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<multimediaproject creator="Linux MultiMedia Studio (LMMS)" creatorversion="0.1.4-cvs20060209" type="channelsettings" version="1.0" >
|
||||
<head/>
|
||||
<channelsettings>
|
||||
<channeltrack surpos="134219776" fxch="0" baseoct="4" vol="100" name="Default" basetone="9" tab="0" >
|
||||
<channeltrack surpos="134219776" fxch="0" baseoct="4" vol="100" name="organ_blues" basetone="9" tab="0" >
|
||||
<organic harmonic4="3" wavetype1="0" harmonic5="4" wavetype2="0" vol0="100" harmonic6="5" wavetype3="0" vol1="100" num_osc="8" harmonic7="6" wavetype4="0" vol2="100" wavetype5="0" vol3="0" detune0="0" wavetype6="0" vol4="0" detune1="0" wavetype7="0" vol5="0" detune2="0" vol6="0" detune3="0" vol7="0" detune4="0" pan0="0" detune5="0" pan1="0" detune6="0" pan2="0" detune7="0" pan3="0" pan4="0" pan5="0" harmonic0="0.5" vol="100" pan6="0" harmonic1="0.75" foldback="0" pan7="0" harmonic2="1" harmonic3="2" wavetype0="0" />
|
||||
<eldata fres="0.5" ftype="0" fcut="16000" fwet="0" >
|
||||
<elvol lfosyncmode="0" lpdel="0" amt="0" rel="0.1" ctlenvamt="0" latt="0" sus="0.499" lspd="0.1" att="0" pdel="0" lamt="0" dec="0.499" userwavefile="" x100="0" lshp="0" hold="0.499" />
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<multimediaproject creator="Linux MultiMedia Studio (LMMS)" creatorversion="0.1.4-cvs20060209" type="channelsettings" version="1.0" >
|
||||
<head/>
|
||||
<channelsettings>
|
||||
<channeltrack surpos="134219776" fxch="0" baseoct="4" vol="24" name="Default" basetone="9" tab="0" >
|
||||
<channeltrack surpos="134219776" fxch="0" baseoct="4" vol="24" name="organ_risingsun" basetone="9" tab="0" >
|
||||
<organic harmonic4="3" wavetype1="0" harmonic5="4" wavetype2="0" vol0="100" harmonic6="5" wavetype3="0" vol1="77" num_osc="8" harmonic7="6" wavetype4="0" vol2="100" wavetype5="0" vol3="73" detune0="0" wavetype6="0" vol4="55" detune1="0" wavetype7="0" vol5="47" detune2="1" vol6="73" detune3="0" vol7="100" detune4="0" pan0="0" detune5="0" pan1="0" detune6="0" pan2="0" detune7="0" pan3="0" pan4="0" pan5="0" harmonic0="0.5" vol="166" pan6="0" harmonic1="0.75" foldback="0" pan7="0" harmonic2="1" harmonic3="2" wavetype0="0" />
|
||||
<eldata fres="0.5" ftype="0" fcut="16000" fwet="0" >
|
||||
<elvol lfosyncmode="0" lpdel="0" amt="0" rel="0.1" ctlenvamt="0" latt="0" sus="0.499" lspd="0.1" att="0" pdel="0" lamt="0" dec="0.499" userwavefile="" x100="0" lshp="0" hold="0.499" />
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<multimediaproject creator="Linux MultiMedia Studio (LMMS)" creatorversion="0.1.4-cvs20060209" type="channelsettings" version="1.0" >
|
||||
<head/>
|
||||
<channelsettings>
|
||||
<channeltrack surpos="134219776" fxch="0" baseoct="4" vol="100" name="Default" basetone="9" tab="0" >
|
||||
<channeltrack surpos="134219776" fxch="0" baseoct="4" vol="100" name="organ_swish" basetone="9" tab="0" >
|
||||
<organic harmonic4="3" wavetype1="0" harmonic5="4" wavetype2="0" vol0="5" harmonic6="5" wavetype3="0" vol1="64" num_osc="8" harmonic7="6" wavetype4="0" vol2="66" wavetype5="0" vol3="67" detune0="3" wavetype6="0" vol4="32" detune1="0" wavetype7="0" vol5="32" detune2="1" vol6="4" detune3="1" vol7="0" detune4="0" pan0="0" detune5="40" pan1="0" detune6="0" pan2="0" detune7="0" pan3="0" pan4="0" pan5="0" harmonic0="0.5" vol="100" pan6="0" harmonic1="0.75" foldback="0" pan7="0" harmonic2="1" harmonic3="2" wavetype0="0" />
|
||||
<eldata fres="0.5" ftype="0" fcut="16000" fwet="0" >
|
||||
<elvol lfosyncmode="0" lpdel="0" amt="1" rel="0.471" ctlenvamt="0" latt="0" sus="0.313" lspd="0.1" att="0.241" pdel="0" lamt="0" dec="0.499" userwavefile="" x100="0" lshp="0" hold="0.499" />
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<multimediaproject creator="Linux MultiMedia Studio (LMMS)" creatorversion="0.1.4-cvs20060209" type="channelsettings" version="1.0" >
|
||||
<head/>
|
||||
<channelsettings>
|
||||
<channeltrack surpos="134219776" fxch="0" baseoct="5" vol="100" name="Default" basetone="0" tab="1" >
|
||||
<channeltrack surpos="134219776" fxch="0" baseoct="5" vol="100" name="pad_ethereal" basetone="0" tab="1" >
|
||||
<organic harmonic4="3" wavetype1="3" harmonic5="4" wavetype2="3" vol0="79" harmonic6="5" wavetype3="3" vol1="72" num_osc="8" harmonic7="6" wavetype4="0" vol2="31" wavetype5="0" vol3="77" detune0="0" wavetype6="4" vol4="0" detune1="0" wavetype7="0" vol5="13" detune2="0" vol6="20" detune3="0" vol7="69" detune4="0" pan0="0" detune5="0" pan1="0" detune6="0" pan2="0" detune7="0" pan3="0" pan4="0" pan5="0" harmonic0="0.5" vol="100" pan6="0" harmonic1="0.75" foldback="0" pan7="0" harmonic2="1" harmonic3="2" wavetype0="3" />
|
||||
<eldata fres="0.89" ftype="0" fcut="5600" fwet="1" >
|
||||
<elvol lfosyncmode="0" lpdel="0" amt="1" rel="0.404" ctlenvamt="0" latt="0" sus="0.329" lspd="0.1" att="0.247" pdel="0" lamt="0" dec="0.702" userwavefile="" x100="0" lshp="0" hold="0.329" />
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<multimediaproject creator="Linux MultiMedia Studio (LMMS)" creatorversion="0.1.4-cvs20060209" type="channelsettings" version="1.0" >
|
||||
<head/>
|
||||
<channelsettings>
|
||||
<channeltrack surpos="134219776" fxch="0" baseoct="5" vol="100" name="Default" basetone="9" tab="0" >
|
||||
<channeltrack surpos="134219776" fxch="0" baseoct="5" vol="100" name="pad_rich" basetone="9" tab="0" >
|
||||
<organic harmonic4="3" wavetype1="2" harmonic5="4" wavetype2="5" vol0="100" harmonic6="5" wavetype3="1" vol1="100" num_osc="8" harmonic7="6" wavetype4="2" vol2="100" wavetype5="5" vol3="100" detune0="1" wavetype6="0" vol4="100" detune1="0" wavetype7="0" vol5="100" detune2="0" vol6="100" detune3="0" vol7="0" detune4="0" pan0="0" detune5="0" pan1="0" detune6="0" pan2="0" detune7="0" pan3="0" pan4="0" pan5="0" harmonic0="0.5" vol="100" pan6="0" harmonic1="0.75" foldback="0.26" pan7="0" harmonic2="1" harmonic3="2" wavetype0="4" />
|
||||
<eldata fres="1.19" ftype="0" fcut="320" fwet="1" >
|
||||
<elvol lfosyncmode="0" lpdel="0" amt="1" rel="0.708" ctlenvamt="0" latt="0" sus="0.039" lspd="0.1" att="0.363" pdel="0" lamt="0" dec="0.499" userwavefile="" x100="0" lshp="0" hold="0.499" />
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<multimediaproject creator="Linux MultiMedia Studio (LMMS)" creatorversion="0.1.4-cvs20060209" type="channelsettings" version="1.0" >
|
||||
<head/>
|
||||
<channelsettings>
|
||||
<channeltrack surpos="134219776" fxch="0" baseoct="5" vol="100" name="Default" basetone="9" tab="1" >
|
||||
<channeltrack surpos="134219776" fxch="0" baseoct="5" vol="100" name="pad_sweep" basetone="9" tab="1" >
|
||||
<organic harmonic4="3" wavetype1="1" harmonic5="4" wavetype2="1" vol0="37" harmonic6="5" wavetype3="0" vol1="81" num_osc="8" harmonic7="6" wavetype4="5" vol2="100" wavetype5="0" vol3="24" detune0="0" wavetype6="0" vol4="52" detune1="0" wavetype7="0" vol5="0" detune2="0" vol6="0" detune3="0" vol7="0" detune4="0" pan0="0" detune5="0" pan1="0" detune6="0" pan2="0" detune7="0" pan3="0" pan4="0" pan5="0" harmonic0="0.5" vol="200" pan6="6" harmonic1="0.75" foldback="0.06" pan7="0" harmonic2="1" harmonic3="2" wavetype0="1" />
|
||||
<eldata fres="0.37" ftype="0" fcut="960" fwet="1" >
|
||||
<elvol lfosyncmode="0" lpdel="0" amt="1" rel="0.576" ctlenvamt="0" latt="0" sus="0" lspd="0.1" att="0.345" pdel="0" lamt="0" dec="0.499" userwavefile="" x100="0" lshp="0" hold="0.116" />
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<multimediaproject creator="Linux MultiMedia Studio (LMMS)" creatorversion="0.1.4-cvs20060209" type="channelsettings" version="1.0" >
|
||||
<head/>
|
||||
<channelsettings>
|
||||
<channeltrack surpos="134219776" fxch="0" baseoct="4" vol="100" name="Default" basetone="9" tab="0" >
|
||||
<channeltrack surpos="134219776" fxch="0" baseoct="4" vol="100" name="puresine" basetone="9" tab="0" >
|
||||
<organic harmonic4="3" wavetype1="0" harmonic5="4" wavetype2="0" vol0="0" harmonic6="5" wavetype3="0" vol1="1" num_osc="8" harmonic7="6" wavetype4="0" vol2="100" wavetype5="0" vol3="5" detune0="0" wavetype6="0" vol4="1" detune1="0" wavetype7="0" vol5="0" detune2="0" vol6="0" detune3="0" vol7="0" detune4="0" pan0="0" detune5="0" pan1="0" detune6="0" pan2="0" detune7="0" pan3="0" pan4="0" pan5="0" harmonic0="0.5" vol="200" pan6="0" harmonic1="0.75" foldback="0" pan7="0" harmonic2="1" harmonic3="2" wavetype0="0" />
|
||||
<eldata fres="0.5" ftype="0" fcut="16000" fwet="0" >
|
||||
<elvol lfosyncmode="0" lpdel="0" amt="0" rel="0.1" ctlenvamt="0" latt="0" sus="0.499" lspd="0.1" att="0" pdel="0" lamt="0" dec="0.499" userwavefile="" x100="0" lshp="0" hold="0.499" />
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<multimediaproject creator="Linux MultiMedia Studio (LMMS)" creatorversion="0.1.4-cvs20060209" type="channelsettings" version="1.0" >
|
||||
<head/>
|
||||
<channelsettings>
|
||||
<channeltrack surpos="134219776" fxch="0" baseoct="4" vol="100" name="Default" basetone="9" tab="2" >
|
||||
<channeltrack surpos="134219776" fxch="0" baseoct="4" vol="100" name="sequencer_64" basetone="9" tab="2" >
|
||||
<organic harmonic4="3" wavetype1="3" harmonic5="4" wavetype2="3" vol0="100" harmonic6="5" wavetype3="0" vol1="100" num_osc="8" harmonic7="6" wavetype4="0" vol2="100" wavetype5="0" vol3="1" detune0="0" wavetype6="0" vol4="5" detune1="0" wavetype7="0" vol5="10" detune2="0" vol6="33" detune3="0" vol7="23" detune4="0" pan0="-20" detune5="0" pan1="20" detune6="0" pan2="0" detune7="0" pan3="0" pan4="0" pan5="0" harmonic0="0.5" vol="70" pan6="0" harmonic1="0.75" foldback="0.75" pan7="0" harmonic2="1" harmonic3="2" wavetype0="3" />
|
||||
<eldata fres="0.5" ftype="0" fcut="16000" fwet="0" >
|
||||
<elvol lfosyncmode="0" lpdel="0" amt="1" rel="0.169" ctlenvamt="0" latt="0" sus="0" lspd="0.1" att="0" pdel="0" lamt="0" dec="0" userwavefile="" x100="0" lshp="0" hold="0.171" />
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<!DOCTYPE multimedia-project>
|
||||
<multimedia-project version="1.0" creator="Linux MultiMedia Studio (LMMS)" creatorversion="0.4.0-rc3" type="instrumenttracksettings" >
|
||||
<head/>
|
||||
<instrumenttracksettings muted="0" type="0" name="Default preset" >
|
||||
<instrumenttracksettings muted="0" type="0" name="SBass" >
|
||||
<instrumenttrack pan="0" fxch="0" pitch="0" basenote="81" vol="200" >
|
||||
<instrument name="tripleoscillator" >
|
||||
<tripleoscillator phoffset2="0" userwavefile0="" finer0="0" userwavefile1="" finer1="-4" userwavefile2="" finer2="2" coarse0="0" coarse1="0" coarse2="0" finel0="0" finel1="4" modalgo1="0" modalgo2="0" finel2="-2" pan0="0" modalgo3="2" pan1="0" stphdetun0="0" pan2="0" stphdetun1="0" wavetype0="3" stphdetun2="0" wavetype1="5" wavetype2="5" vol0="33" vol1="33" phoffset0="0" phoffset1="0" vol2="33" />
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<!DOCTYPE multimedia-project>
|
||||
<multimedia-project version="1.0" creator="Linux MultiMedia Studio (LMMS)" creatorversion="0.4.0-rc3" type="instrumenttracksettings" >
|
||||
<head/>
|
||||
<instrumenttracksettings muted="0" type="0" name="Default preset" >
|
||||
<instrumenttracksettings muted="0" type="0" name="SBass2" >
|
||||
<instrumenttrack pan="0" fxch="0" pitch="0" basenote="81" vol="175" >
|
||||
<instrument name="tripleoscillator" >
|
||||
<tripleoscillator phoffset2="240" userwavefile0="" finer0="0" userwavefile1="" finer1="-2" userwavefile2="" finer2="2" coarse0="0" coarse1="0" coarse2="0" finel0="0" finel1="2" modalgo1="0" modalgo2="0" finel2="-2" pan0="0" modalgo3="2" pan1="0" stphdetun0="0" pan2="0" stphdetun1="0" wavetype0="2" stphdetun2="0" wavetype1="1" wavetype2="0" vol0="33" vol1="33" phoffset0="0" phoffset1="120" vol2="33" />
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<!DOCTYPE multimedia-project>
|
||||
<multimedia-project version="1.0" creator="Linux MultiMedia Studio (LMMS)" creatorversion="0.4.0-rc3" type="instrumenttracksettings" >
|
||||
<head/>
|
||||
<instrumenttracksettings muted="0" type="0" name="Default preset" >
|
||||
<instrumenttracksettings muted="0" type="0" name="SEGuitar" >
|
||||
<instrumenttrack pan="0" fxch="0" pitch="0" basenote="69" vol="200" >
|
||||
<instrument name="tripleoscillator" >
|
||||
<tripleoscillator phoffset2="0" userwavefile0="" finer0="-2" userwavefile1="" finer1="2" userwavefile2="" finer2="0" coarse0="0" coarse1="0" coarse2="0" finel0="0" finel1="-2" modalgo1="1" modalgo2="0" finel2="-2" pan0="0" modalgo3="2" pan1="0" stphdetun0="0" pan2="0" stphdetun1="0" wavetype0="5" stphdetun2="0" wavetype1="5" wavetype2="5" vol0="33" vol1="33" phoffset0="0" phoffset1="0" vol2="33" />
|
||||
|
||||
465
data/presets/ZynAddSubFX/Plucked/progressive-house-pluck.xiz
Normal file
@@ -0,0 +1,465 @@
|
||||
<!DOCTYPE ZynAddSubFX-data>
|
||||
<ZynAddSubFX-data version-revision="1" version-minor="4" version-major="2" ZynAddSubFX-author="Nasca Octavian Paul">
|
||||
<INFORMATION/>
|
||||
<BASE_PARAMETERS>
|
||||
<par value="16" name="max_midi_parts"/>
|
||||
<par value="16" name="max_kit_items_per_instrument"/>
|
||||
<par value="4" name="max_system_effects"/>
|
||||
<par value="8" name="max_insertion_effects"/>
|
||||
<par value="3" name="max_instrument_effects"/>
|
||||
<par value="8" name="max_addsynth_voices"/>
|
||||
</BASE_PARAMETERS>
|
||||
<INSTRUMENT>
|
||||
<INFO>
|
||||
<string name="name">Analog Piano 3</string>
|
||||
<string name="author"></string>
|
||||
<string name="comments"></string>
|
||||
<par value="0" name="type"/>
|
||||
</INFO>
|
||||
<INSTRUMENT_KIT>
|
||||
<par value="0" name="kit_mode"/>
|
||||
<par_bool value="no" name="drum_mode"/>
|
||||
<INSTRUMENT_KIT_ITEM id="0">
|
||||
<par_bool value="yes" name="enabled"/>
|
||||
<string name="name">Analog Piano 3</string>
|
||||
<par_bool value="no" name="muted"/>
|
||||
<par value="0" name="min_key"/>
|
||||
<par value="127" name="max_key"/>
|
||||
<par value="0" name="send_to_instrument_effect"/>
|
||||
<par_bool value="yes" name="add_enabled"/>
|
||||
<ADD_SYNTH_PARAMETERS>
|
||||
<par_bool value="yes" name="stereo"/>
|
||||
<AMPLITUDE_PARAMETERS>
|
||||
<par value="90" name="volume"/>
|
||||
<par value="64" name="panning"/>
|
||||
<par value="64" name="velocity_sensing"/>
|
||||
<par value="0" name="punch_strength"/>
|
||||
<par value="60" name="punch_time"/>
|
||||
<par value="64" name="punch_stretch"/>
|
||||
<par value="72" name="punch_velocity_sensing"/>
|
||||
<par value="0" name="harmonic_randomness_grouping"/>
|
||||
<AMPLITUDE_ENVELOPE>
|
||||
<par_bool value="no" name="free_mode"/>
|
||||
<par value="4" name="env_points"/>
|
||||
<par value="2" name="env_sustain"/>
|
||||
<par value="0" name="env_stretch"/>
|
||||
<par_bool value="yes" name="forced_release"/>
|
||||
<par_bool value="no" name="linear_envelope"/>
|
||||
<par value="0" name="A_dt"/>
|
||||
<par value="88" name="D_dt"/>
|
||||
<par value="63" name="R_dt"/>
|
||||
<par value="64" name="A_val"/>
|
||||
<par value="64" name="D_val"/>
|
||||
<par value="0" name="S_val"/>
|
||||
<par value="64" name="R_val"/>
|
||||
</AMPLITUDE_ENVELOPE>
|
||||
<AMPLITUDE_LFO>
|
||||
<par_real value="0.629921" name="freq"/>
|
||||
<par value="0" name="intensity"/>
|
||||
<par value="64" name="start_phase"/>
|
||||
<par value="0" name="lfo_type"/>
|
||||
<par value="0" name="randomness_amplitude"/>
|
||||
<par value="0" name="randomness_frequency"/>
|
||||
<par value="0" name="delay"/>
|
||||
<par value="64" name="stretch"/>
|
||||
<par_bool value="no" name="continous"/>
|
||||
</AMPLITUDE_LFO>
|
||||
</AMPLITUDE_PARAMETERS>
|
||||
<FREQUENCY_PARAMETERS>
|
||||
<par value="8192" name="detune"/>
|
||||
<par value="0" name="coarse_detune"/>
|
||||
<par value="1" name="detune_type"/>
|
||||
<par value="64" name="bandwidth"/>
|
||||
<FREQUENCY_ENVELOPE>
|
||||
<par_bool value="no" name="free_mode"/>
|
||||
<par value="3" name="env_points"/>
|
||||
<par value="1" name="env_sustain"/>
|
||||
<par value="0" name="env_stretch"/>
|
||||
<par_bool value="no" name="forced_release"/>
|
||||
<par_bool value="no" name="linear_envelope"/>
|
||||
<par value="50" name="A_dt"/>
|
||||
<par value="10" name="D_dt"/>
|
||||
<par value="60" name="R_dt"/>
|
||||
<par value="64" name="A_val"/>
|
||||
<par value="64" name="D_val"/>
|
||||
<par value="64" name="S_val"/>
|
||||
<par value="64" name="R_val"/>
|
||||
</FREQUENCY_ENVELOPE>
|
||||
<FREQUENCY_LFO>
|
||||
<par_real value="0.614173" name="freq"/>
|
||||
<par value="26" name="intensity"/>
|
||||
<par value="64" name="start_phase"/>
|
||||
<par value="0" name="lfo_type"/>
|
||||
<par value="0" name="randomness_amplitude"/>
|
||||
<par value="0" name="randomness_frequency"/>
|
||||
<par value="0" name="delay"/>
|
||||
<par value="64" name="stretch"/>
|
||||
<par_bool value="no" name="continous"/>
|
||||
</FREQUENCY_LFO>
|
||||
</FREQUENCY_PARAMETERS>
|
||||
<FILTER_PARAMETERS>
|
||||
<par value="26" name="velocity_sensing_amplitude"/>
|
||||
<par value="64" name="velocity_sensing"/>
|
||||
<FILTER>
|
||||
<par value="0" name="category"/>
|
||||
<par value="2" name="type"/>
|
||||
<par value="53" name="freq"/>
|
||||
<par value="42" name="q"/>
|
||||
<par value="0" name="stages"/>
|
||||
<par value="64" name="freq_track"/>
|
||||
<par value="64" name="gain"/>
|
||||
</FILTER>
|
||||
<FILTER_ENVELOPE>
|
||||
<par_bool value="no" name="free_mode"/>
|
||||
<par value="4" name="env_points"/>
|
||||
<par value="2" name="env_sustain"/>
|
||||
<par value="0" name="env_stretch"/>
|
||||
<par_bool value="yes" name="forced_release"/>
|
||||
<par_bool value="no" name="linear_envelope"/>
|
||||
<par value="0" name="A_dt"/>
|
||||
<par value="44" name="D_dt"/>
|
||||
<par value="60" name="R_dt"/>
|
||||
<par value="46" name="A_val"/>
|
||||
<par value="127" name="D_val"/>
|
||||
<par value="64" name="S_val"/>
|
||||
<par value="64" name="R_val"/>
|
||||
</FILTER_ENVELOPE>
|
||||
<FILTER_LFO>
|
||||
<par_real value="0.629921" name="freq"/>
|
||||
<par value="0" name="intensity"/>
|
||||
<par value="64" name="start_phase"/>
|
||||
<par value="0" name="lfo_type"/>
|
||||
<par value="0" name="randomness_amplitude"/>
|
||||
<par value="0" name="randomness_frequency"/>
|
||||
<par value="0" name="delay"/>
|
||||
<par value="64" name="stretch"/>
|
||||
<par_bool value="no" name="continous"/>
|
||||
</FILTER_LFO>
|
||||
</FILTER_PARAMETERS>
|
||||
<RESONANCE>
|
||||
<par_bool value="no" name="enabled"/>
|
||||
</RESONANCE>
|
||||
<VOICE id="0">
|
||||
<par_bool value="yes" name="enabled"/>
|
||||
<par value="0" name="type"/>
|
||||
<par value="1" name="unison_size"/>
|
||||
<par value="60" name="unison_frequency_spread"/>
|
||||
<par value="64" name="unison_stereo_spread"/>
|
||||
<par value="64" name="unison_vibratto"/>
|
||||
<par value="64" name="unison_vibratto_speed"/>
|
||||
<par value="0" name="unison_invert_phase"/>
|
||||
<par value="0" name="delay"/>
|
||||
<par_bool value="yes" name="resonance"/>
|
||||
<par value="-1" name="ext_oscil"/>
|
||||
<par value="-1" name="ext_fm_oscil"/>
|
||||
<par value="64" name="oscil_phase"/>
|
||||
<par value="64" name="oscil_fm_phase"/>
|
||||
<par_bool value="no" name="filter_enabled"/>
|
||||
<par_bool value="no" name="filter_bypass"/>
|
||||
<par value="0" name="fm_enabled"/>
|
||||
<OSCIL>
|
||||
<par value="0" name="harmonic_mag_type"/>
|
||||
<par value="4" name="base_function"/>
|
||||
<par value="51" name="base_function_par"/>
|
||||
<par value="0" name="base_function_modulation"/>
|
||||
<par value="64" name="base_function_modulation_par1"/>
|
||||
<par value="64" name="base_function_modulation_par2"/>
|
||||
<par value="32" name="base_function_modulation_par3"/>
|
||||
<par value="0" name="modulation"/>
|
||||
<par value="64" name="modulation_par1"/>
|
||||
<par value="64" name="modulation_par2"/>
|
||||
<par value="32" name="modulation_par3"/>
|
||||
<par value="64" name="wave_shaping"/>
|
||||
<par value="0" name="wave_shaping_function"/>
|
||||
<par value="0" name="filter_type"/>
|
||||
<par value="64" name="filter_par1"/>
|
||||
<par value="64" name="filter_par2"/>
|
||||
<par value="0" name="filter_before_wave_shaping"/>
|
||||
<par value="0" name="spectrum_adjust_type"/>
|
||||
<par value="64" name="spectrum_adjust_par"/>
|
||||
<par value="0" name="rand"/>
|
||||
<par value="0" name="amp_rand_type"/>
|
||||
<par value="64" name="amp_rand_power"/>
|
||||
<par value="0" name="harmonic_shift"/>
|
||||
<par_bool value="no" name="harmonic_shift_first"/>
|
||||
<par value="0" name="adaptive_harmonics"/>
|
||||
<par value="128" name="adaptive_harmonics_base_frequency"/>
|
||||
<par value="100" name="adaptive_harmonics_power"/>
|
||||
<HARMONICS>
|
||||
<HARMONIC id="1">
|
||||
<par value="127" name="mag"/>
|
||||
<par value="64" name="phase"/>
|
||||
</HARMONIC>
|
||||
</HARMONICS>
|
||||
</OSCIL>
|
||||
<AMPLITUDE_PARAMETERS>
|
||||
<par value="32" name="panning"/>
|
||||
<par value="100" name="volume"/>
|
||||
<par_bool value="no" name="volume_minus"/>
|
||||
<par value="127" name="velocity_sensing"/>
|
||||
<par_bool value="no" name="amp_envelope_enabled"/>
|
||||
<par_bool value="no" name="amp_lfo_enabled"/>
|
||||
</AMPLITUDE_PARAMETERS>
|
||||
<FREQUENCY_PARAMETERS>
|
||||
<par_bool value="no" name="fixed_freq"/>
|
||||
<par value="0" name="fixed_freq_et"/>
|
||||
<par value="7095" name="detune"/>
|
||||
<par value="0" name="coarse_detune"/>
|
||||
<par value="0" name="detune_type"/>
|
||||
<par_bool value="no" name="freq_envelope_enabled"/>
|
||||
<par_bool value="no" name="freq_lfo_enabled"/>
|
||||
</FREQUENCY_PARAMETERS>
|
||||
</VOICE>
|
||||
<VOICE id="1">
|
||||
<par_bool value="yes" name="enabled"/>
|
||||
<par value="0" name="type"/>
|
||||
<par value="1" name="unison_size"/>
|
||||
<par value="60" name="unison_frequency_spread"/>
|
||||
<par value="64" name="unison_stereo_spread"/>
|
||||
<par value="64" name="unison_vibratto"/>
|
||||
<par value="64" name="unison_vibratto_speed"/>
|
||||
<par value="0" name="unison_invert_phase"/>
|
||||
<par value="0" name="delay"/>
|
||||
<par_bool value="yes" name="resonance"/>
|
||||
<par value="0" name="ext_oscil"/>
|
||||
<par value="-1" name="ext_fm_oscil"/>
|
||||
<par value="64" name="oscil_phase"/>
|
||||
<par value="64" name="oscil_fm_phase"/>
|
||||
<par_bool value="no" name="filter_enabled"/>
|
||||
<par_bool value="no" name="filter_bypass"/>
|
||||
<par value="0" name="fm_enabled"/>
|
||||
<OSCIL>
|
||||
<par value="0" name="harmonic_mag_type"/>
|
||||
<par value="0" name="base_function"/>
|
||||
<par value="64" name="base_function_par"/>
|
||||
<par value="0" name="base_function_modulation"/>
|
||||
<par value="64" name="base_function_modulation_par1"/>
|
||||
<par value="64" name="base_function_modulation_par2"/>
|
||||
<par value="32" name="base_function_modulation_par3"/>
|
||||
<par value="0" name="modulation"/>
|
||||
<par value="64" name="modulation_par1"/>
|
||||
<par value="64" name="modulation_par2"/>
|
||||
<par value="32" name="modulation_par3"/>
|
||||
<par value="64" name="wave_shaping"/>
|
||||
<par value="0" name="wave_shaping_function"/>
|
||||
<par value="0" name="filter_type"/>
|
||||
<par value="64" name="filter_par1"/>
|
||||
<par value="64" name="filter_par2"/>
|
||||
<par value="0" name="filter_before_wave_shaping"/>
|
||||
<par value="0" name="spectrum_adjust_type"/>
|
||||
<par value="64" name="spectrum_adjust_par"/>
|
||||
<par value="64" name="rand"/>
|
||||
<par value="0" name="amp_rand_type"/>
|
||||
<par value="64" name="amp_rand_power"/>
|
||||
<par value="0" name="harmonic_shift"/>
|
||||
<par_bool value="no" name="harmonic_shift_first"/>
|
||||
<par value="0" name="adaptive_harmonics"/>
|
||||
<par value="128" name="adaptive_harmonics_base_frequency"/>
|
||||
<par value="100" name="adaptive_harmonics_power"/>
|
||||
<HARMONICS>
|
||||
<HARMONIC id="1">
|
||||
<par value="127" name="mag"/>
|
||||
<par value="64" name="phase"/>
|
||||
</HARMONIC>
|
||||
</HARMONICS>
|
||||
</OSCIL>
|
||||
<AMPLITUDE_PARAMETERS>
|
||||
<par value="96" name="panning"/>
|
||||
<par value="100" name="volume"/>
|
||||
<par_bool value="no" name="volume_minus"/>
|
||||
<par value="127" name="velocity_sensing"/>
|
||||
<par_bool value="no" name="amp_envelope_enabled"/>
|
||||
<par_bool value="no" name="amp_lfo_enabled"/>
|
||||
</AMPLITUDE_PARAMETERS>
|
||||
<FREQUENCY_PARAMETERS>
|
||||
<par_bool value="no" name="fixed_freq"/>
|
||||
<par value="0" name="fixed_freq_et"/>
|
||||
<par value="8514" name="detune"/>
|
||||
<par value="0" name="coarse_detune"/>
|
||||
<par value="0" name="detune_type"/>
|
||||
<par_bool value="no" name="freq_envelope_enabled"/>
|
||||
<par_bool value="no" name="freq_lfo_enabled"/>
|
||||
</FREQUENCY_PARAMETERS>
|
||||
</VOICE>
|
||||
<VOICE id="2">
|
||||
<par_bool value="yes" name="enabled"/>
|
||||
<par value="0" name="type"/>
|
||||
<par value="1" name="unison_size"/>
|
||||
<par value="60" name="unison_frequency_spread"/>
|
||||
<par value="64" name="unison_stereo_spread"/>
|
||||
<par value="64" name="unison_vibratto"/>
|
||||
<par value="64" name="unison_vibratto_speed"/>
|
||||
<par value="0" name="unison_invert_phase"/>
|
||||
<par value="0" name="delay"/>
|
||||
<par_bool value="yes" name="resonance"/>
|
||||
<par value="0" name="ext_oscil"/>
|
||||
<par value="-1" name="ext_fm_oscil"/>
|
||||
<par value="64" name="oscil_phase"/>
|
||||
<par value="64" name="oscil_fm_phase"/>
|
||||
<par_bool value="no" name="filter_enabled"/>
|
||||
<par_bool value="no" name="filter_bypass"/>
|
||||
<par value="0" name="fm_enabled"/>
|
||||
<OSCIL>
|
||||
<par value="0" name="harmonic_mag_type"/>
|
||||
<par value="0" name="base_function"/>
|
||||
<par value="64" name="base_function_par"/>
|
||||
<par value="0" name="base_function_modulation"/>
|
||||
<par value="64" name="base_function_modulation_par1"/>
|
||||
<par value="64" name="base_function_modulation_par2"/>
|
||||
<par value="32" name="base_function_modulation_par3"/>
|
||||
<par value="0" name="modulation"/>
|
||||
<par value="64" name="modulation_par1"/>
|
||||
<par value="64" name="modulation_par2"/>
|
||||
<par value="32" name="modulation_par3"/>
|
||||
<par value="64" name="wave_shaping"/>
|
||||
<par value="0" name="wave_shaping_function"/>
|
||||
<par value="0" name="filter_type"/>
|
||||
<par value="64" name="filter_par1"/>
|
||||
<par value="64" name="filter_par2"/>
|
||||
<par value="0" name="filter_before_wave_shaping"/>
|
||||
<par value="0" name="spectrum_adjust_type"/>
|
||||
<par value="64" name="spectrum_adjust_par"/>
|
||||
<par value="64" name="rand"/>
|
||||
<par value="0" name="amp_rand_type"/>
|
||||
<par value="64" name="amp_rand_power"/>
|
||||
<par value="0" name="harmonic_shift"/>
|
||||
<par_bool value="no" name="harmonic_shift_first"/>
|
||||
<par value="0" name="adaptive_harmonics"/>
|
||||
<par value="128" name="adaptive_harmonics_base_frequency"/>
|
||||
<par value="100" name="adaptive_harmonics_power"/>
|
||||
<HARMONICS>
|
||||
<HARMONIC id="1">
|
||||
<par value="127" name="mag"/>
|
||||
<par value="64" name="phase"/>
|
||||
</HARMONIC>
|
||||
</HARMONICS>
|
||||
</OSCIL>
|
||||
<AMPLITUDE_PARAMETERS>
|
||||
<par value="0" name="panning"/>
|
||||
<par value="100" name="volume"/>
|
||||
<par_bool value="no" name="volume_minus"/>
|
||||
<par value="127" name="velocity_sensing"/>
|
||||
<par_bool value="no" name="amp_envelope_enabled"/>
|
||||
<par_bool value="no" name="amp_lfo_enabled"/>
|
||||
</AMPLITUDE_PARAMETERS>
|
||||
<FREQUENCY_PARAMETERS>
|
||||
<par_bool value="no" name="fixed_freq"/>
|
||||
<par value="0" name="fixed_freq_et"/>
|
||||
<par value="9890" name="detune"/>
|
||||
<par value="0" name="coarse_detune"/>
|
||||
<par value="0" name="detune_type"/>
|
||||
<par_bool value="no" name="freq_envelope_enabled"/>
|
||||
<par_bool value="no" name="freq_lfo_enabled"/>
|
||||
</FREQUENCY_PARAMETERS>
|
||||
</VOICE>
|
||||
<VOICE id="3">
|
||||
<par_bool value="no" name="enabled"/>
|
||||
</VOICE>
|
||||
<VOICE id="4">
|
||||
<par_bool value="no" name="enabled"/>
|
||||
</VOICE>
|
||||
<VOICE id="5">
|
||||
<par_bool value="no" name="enabled"/>
|
||||
</VOICE>
|
||||
<VOICE id="6">
|
||||
<par_bool value="no" name="enabled"/>
|
||||
</VOICE>
|
||||
<VOICE id="7">
|
||||
<par_bool value="no" name="enabled"/>
|
||||
</VOICE>
|
||||
</ADD_SYNTH_PARAMETERS>
|
||||
<par_bool value="no" name="sub_enabled"/>
|
||||
<par_bool value="no" name="pad_enabled"/>
|
||||
</INSTRUMENT_KIT_ITEM>
|
||||
<INSTRUMENT_KIT_ITEM id="1">
|
||||
<par_bool value="no" name="enabled"/>
|
||||
</INSTRUMENT_KIT_ITEM>
|
||||
<INSTRUMENT_KIT_ITEM id="2">
|
||||
<par_bool value="no" name="enabled"/>
|
||||
</INSTRUMENT_KIT_ITEM>
|
||||
<INSTRUMENT_KIT_ITEM id="3">
|
||||
<par_bool value="no" name="enabled"/>
|
||||
</INSTRUMENT_KIT_ITEM>
|
||||
<INSTRUMENT_KIT_ITEM id="4">
|
||||
<par_bool value="no" name="enabled"/>
|
||||
</INSTRUMENT_KIT_ITEM>
|
||||
<INSTRUMENT_KIT_ITEM id="5">
|
||||
<par_bool value="no" name="enabled"/>
|
||||
</INSTRUMENT_KIT_ITEM>
|
||||
<INSTRUMENT_KIT_ITEM id="6">
|
||||
<par_bool value="no" name="enabled"/>
|
||||
</INSTRUMENT_KIT_ITEM>
|
||||
<INSTRUMENT_KIT_ITEM id="7">
|
||||
<par_bool value="no" name="enabled"/>
|
||||
</INSTRUMENT_KIT_ITEM>
|
||||
<INSTRUMENT_KIT_ITEM id="8">
|
||||
<par_bool value="no" name="enabled"/>
|
||||
</INSTRUMENT_KIT_ITEM>
|
||||
<INSTRUMENT_KIT_ITEM id="9">
|
||||
<par_bool value="no" name="enabled"/>
|
||||
</INSTRUMENT_KIT_ITEM>
|
||||
<INSTRUMENT_KIT_ITEM id="10">
|
||||
<par_bool value="no" name="enabled"/>
|
||||
</INSTRUMENT_KIT_ITEM>
|
||||
<INSTRUMENT_KIT_ITEM id="11">
|
||||
<par_bool value="no" name="enabled"/>
|
||||
</INSTRUMENT_KIT_ITEM>
|
||||
<INSTRUMENT_KIT_ITEM id="12">
|
||||
<par_bool value="no" name="enabled"/>
|
||||
</INSTRUMENT_KIT_ITEM>
|
||||
<INSTRUMENT_KIT_ITEM id="13">
|
||||
<par_bool value="no" name="enabled"/>
|
||||
</INSTRUMENT_KIT_ITEM>
|
||||
<INSTRUMENT_KIT_ITEM id="14">
|
||||
<par_bool value="no" name="enabled"/>
|
||||
</INSTRUMENT_KIT_ITEM>
|
||||
<INSTRUMENT_KIT_ITEM id="15">
|
||||
<par_bool value="no" name="enabled"/>
|
||||
</INSTRUMENT_KIT_ITEM>
|
||||
</INSTRUMENT_KIT>
|
||||
<INSTRUMENT_EFFECTS>
|
||||
<INSTRUMENT_EFFECT id="0">
|
||||
<EFFECT>
|
||||
<par value="2" name="type"/>
|
||||
<par value="0" name="preset"/>
|
||||
<EFFECT_PARAMETERS>
|
||||
<par_no id="0">
|
||||
<par value="34" name="par"/>
|
||||
</par_no>
|
||||
<par_no id="1">
|
||||
<par value="64" name="par"/>
|
||||
</par_no>
|
||||
<par_no id="2">
|
||||
<par value="20" name="par"/>
|
||||
</par_no>
|
||||
<par_no id="3">
|
||||
<par value="64" name="par"/>
|
||||
</par_no>
|
||||
<par_no id="4">
|
||||
<par value="30" name="par"/>
|
||||
</par_no>
|
||||
<par_no id="5">
|
||||
<par value="59" name="par"/>
|
||||
</par_no>
|
||||
</EFFECT_PARAMETERS>
|
||||
</EFFECT>
|
||||
<par value="0" name="route"/>
|
||||
<par_bool value="no" name="bypass"/>
|
||||
</INSTRUMENT_EFFECT>
|
||||
<INSTRUMENT_EFFECT id="1">
|
||||
<EFFECT>
|
||||
<par value="0" name="type"/>
|
||||
</EFFECT>
|
||||
<par value="0" name="route"/>
|
||||
<par_bool value="no" name="bypass"/>
|
||||
</INSTRUMENT_EFFECT>
|
||||
<INSTRUMENT_EFFECT id="2">
|
||||
<EFFECT>
|
||||
<par value="0" name="type"/>
|
||||
</EFFECT>
|
||||
<par value="0" name="route"/>
|
||||
<par_bool value="no" name="bypass"/>
|
||||
</INSTRUMENT_EFFECT>
|
||||
</INSTRUMENT_EFFECTS>
|
||||
</INSTRUMENT>
|
||||
</ZynAddSubFX-data>
|
||||
BIN
data/projects/Demos/Shovon-ProgressiveHousePluckDemo.mmpz
Normal file
|
Before Width: | Height: | Size: 1006 B After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1006 B After Width: | Height: | Size: 974 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 985 B After Width: | Height: | Size: 974 B |
|
Before Width: | Height: | Size: 860 B After Width: | Height: | Size: 556 B |
|
Before Width: | Height: | Size: 852 B After Width: | Height: | Size: 547 B |
|
Before Width: | Height: | Size: 894 B After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1012 B After Width: | Height: | Size: 726 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 709 B |
|
Before Width: | Height: | Size: 1006 B After Width: | Height: | Size: 1.0 KiB |
@@ -224,6 +224,13 @@ sf2InstrumentView knob {
|
||||
qproperty-lineWidth: 2;
|
||||
}
|
||||
|
||||
opl2instrumentView knob {
|
||||
color: rgb(128,128,128);
|
||||
qproperty-outerColor: rgb(255,255,255);
|
||||
qproperty-innerRadius: 2;
|
||||
qproperty-outerRadius: 9;
|
||||
qproperty-lineWidth: 2;
|
||||
}
|
||||
/* Notes:
|
||||
|
||||
lcd-spinbox colors: (12, 250, 150), (37, 57, 42)
|
||||
|
||||
@@ -37,7 +37,7 @@ class AudioPort
|
||||
{
|
||||
public:
|
||||
AudioPort( const QString & _name, bool _has_effect_chain = true );
|
||||
~AudioPort();
|
||||
virtual ~AudioPort();
|
||||
|
||||
inline sampleFrame * firstBuffer()
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* AutomatableModelView.h - class AutomatableModelView
|
||||
*
|
||||
* Copyright (c) 2008-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2008-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -56,15 +56,6 @@ public:
|
||||
return( modelUntyped() ? modelUntyped()->value<T>() : 0 );
|
||||
}
|
||||
|
||||
inline void setValue( const float _value )
|
||||
{
|
||||
if( modelUntyped() )
|
||||
{
|
||||
modelUntyped()->setValue( _value );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
inline void setDescription( const QString & _desc )
|
||||
{
|
||||
m_description = _desc;
|
||||
@@ -101,6 +92,7 @@ public slots:
|
||||
void execConnectionDialog();
|
||||
void removeConnection();
|
||||
void editSongGlobalAutomation();
|
||||
void removeSongGlobalAutomation();
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* AutomationPattern.h - declaration of class AutomationPattern, which contains
|
||||
* all information about an automation pattern
|
||||
*
|
||||
* Copyright (c) 2008-2010 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2008-2013 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2006-2008 Javier Serrano Polo <jasp00/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
@@ -71,7 +71,7 @@ public:
|
||||
|
||||
inline bool hasAutomation() const
|
||||
{
|
||||
return m_hasAutomation;
|
||||
return m_timeMap.isEmpty() == false;
|
||||
}
|
||||
|
||||
float valueAt( const midiTime & _time ) const;
|
||||
@@ -109,6 +109,8 @@ public slots:
|
||||
|
||||
|
||||
private:
|
||||
void cleanObjects();
|
||||
|
||||
AutomationTrack * m_autoTrack;
|
||||
QVector<jo_id_t> m_idsToResolve;
|
||||
objectVector m_objects;
|
||||
|
||||
@@ -55,6 +55,7 @@ private:
|
||||
lcdSpinBox * m_outputChannelSpinBox;
|
||||
lcdSpinBox * m_fixedOutputVelocitySpinBox;
|
||||
lcdSpinBox * m_outputProgramSpinBox;
|
||||
lcdSpinBox * m_fixedOutputNoteSpinBox;
|
||||
QToolButton * m_wpBtn;
|
||||
|
||||
} ;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* InstrumentTrack.h - declaration of class InstrumentTrack, a track + window
|
||||
* which holds an instrument-plugin
|
||||
*
|
||||
* Copyright (c) 2004-2010 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2004-2012 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -80,6 +80,11 @@ public:
|
||||
// silence all running notes played by this track
|
||||
void silenceAllNotes();
|
||||
|
||||
bool isSustainPedalPressed() const
|
||||
{
|
||||
return m_sustainPedalPressed;
|
||||
}
|
||||
|
||||
f_cnt_t beatLen( notePlayHandle * _n ) const;
|
||||
|
||||
|
||||
@@ -215,6 +220,7 @@ private:
|
||||
|
||||
notePlayHandle * m_notes[NumKeys];
|
||||
int m_runningMidiNotes[NumKeys];
|
||||
bool m_sustainPedalPressed;
|
||||
|
||||
IntModel m_baseNoteModel;
|
||||
|
||||
|
||||
87
include/LcdWidget.h
Normal file
@@ -0,0 +1,87 @@
|
||||
/*
|
||||
* LcdWidget.h - a widget for displaying numbers in LCD style
|
||||
*
|
||||
* Copyright (c) 2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public
|
||||
* License along with this program (see COPYING); if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _LCD_WIDGET_H
|
||||
#define _LCD_WIDGET_H
|
||||
|
||||
#include <QtCore/QMap>
|
||||
#include <QtGui/QWidget>
|
||||
|
||||
#include "export.h"
|
||||
|
||||
class EXPORT LcdWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
LcdWidget( int numDigits, QWidget* parent, const QString& name = QString::null );
|
||||
|
||||
LcdWidget( int numDigits, const QString& style, QWidget* parent, const QString& name = QString::null );
|
||||
|
||||
virtual ~LcdWidget();
|
||||
|
||||
void setValue( int value );
|
||||
void setLabel( const QString& label );
|
||||
|
||||
void addTextForValue( int value, const QString& text )
|
||||
{
|
||||
m_textForValue[value] = text;
|
||||
update();
|
||||
}
|
||||
|
||||
|
||||
public slots:
|
||||
virtual void setMarginWidth( int _width );
|
||||
|
||||
|
||||
protected:
|
||||
virtual void paintEvent( QPaintEvent * _me );
|
||||
|
||||
virtual void updateSize();
|
||||
|
||||
int cellHeight() const
|
||||
{
|
||||
return m_cellHeight;
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
|
||||
static const int charsPerPixmap = 12;
|
||||
|
||||
QMap<int, QString> m_textForValue;
|
||||
|
||||
QString m_display;
|
||||
|
||||
QString m_label;
|
||||
QPixmap* m_lcdPixmap;
|
||||
|
||||
int m_cellWidth;
|
||||
int m_cellHeight;
|
||||
int m_numDigits;
|
||||
int m_marginWidth;
|
||||
|
||||
} ;
|
||||
|
||||
#endif
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* main_window.h - declaration of class MainWindow, the main window of LMMS
|
||||
*
|
||||
* Copyright (c) 2004-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2004-2013 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -106,7 +106,7 @@ public slots:
|
||||
void aboutLMMS( void );
|
||||
void help( void );
|
||||
void toggleAutomationEditorWin( void );
|
||||
void toggleBBEditorWin( void );
|
||||
void toggleBBEditorWin( bool forceShow = false );
|
||||
void toggleSongEditorWin( void );
|
||||
void toggleProjectNotesWin( void );
|
||||
void toggleFxMixerWin( void );
|
||||
@@ -132,7 +132,7 @@ private:
|
||||
|
||||
void finalize( void );
|
||||
|
||||
void toggleWindow( QWidget * _w );
|
||||
void toggleWindow( QWidget *window, bool forceShow = false );
|
||||
|
||||
|
||||
QMdiArea * m_workspace;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* MidiAlsaSeq.h - ALSA-sequencer-client
|
||||
*
|
||||
* Copyright (c) 2005-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2005-2013 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -31,6 +31,7 @@
|
||||
#include <alsa/asoundlib.h>
|
||||
#endif
|
||||
|
||||
#include <QtCore/QMutex>
|
||||
#include <QtCore/QThread>
|
||||
#include <QtCore/QTimer>
|
||||
|
||||
@@ -130,6 +131,7 @@ private:
|
||||
virtual void run();
|
||||
|
||||
#ifdef LMMS_HAVE_ALSA
|
||||
QMutex m_seqMutex;
|
||||
snd_seq_t * m_seqHandle;
|
||||
struct Ports
|
||||
{
|
||||
|
||||
@@ -56,6 +56,8 @@ class MidiPort : public Model, public SerializingObject
|
||||
m_fixedInputVelocityModel);
|
||||
mapPropertyFromModel(int,fixedOutputVelocity,setFixedOutputVelocity,
|
||||
m_fixedOutputVelocityModel);
|
||||
mapPropertyFromModel(int,fixedOutputNote,setFixedOutputNote,
|
||||
m_fixedOutputNoteModel);
|
||||
mapPropertyFromModel(int,outputProgram,setOutputProgram,
|
||||
m_outputProgramModel);
|
||||
mapPropertyFromModel(bool,isReadable,setReadable,m_readableModel);
|
||||
@@ -155,6 +157,7 @@ private:
|
||||
IntModel m_outputControllerModel;
|
||||
IntModel m_fixedInputVelocityModel;
|
||||
IntModel m_fixedOutputVelocityModel;
|
||||
IntModel m_fixedOutputNoteModel;
|
||||
IntModel m_outputProgramModel;
|
||||
BoolModel m_readableModel;
|
||||
BoolModel m_writableModel;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* RemotePlugin.h - base class providing RPC like mechanisms
|
||||
*
|
||||
* Copyright (c) 2008-2010 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2008-2012 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -27,6 +27,7 @@
|
||||
|
||||
#include "export.h"
|
||||
#include "midi.h"
|
||||
#include "VST_sync_shm.h"
|
||||
|
||||
#include <vector>
|
||||
#include <cstdio>
|
||||
@@ -115,7 +116,7 @@ typedef int32_t key_t;
|
||||
|
||||
// sometimes we need to exchange bigger messages (e.g. for VST parameter dumps)
|
||||
// so set a usable value here
|
||||
const int SHM_FIFO_SIZE = 64000;
|
||||
const int SHM_FIFO_SIZE = 512*1024;
|
||||
|
||||
|
||||
// implements a FIFO inside a shared memory segment
|
||||
@@ -284,7 +285,7 @@ public:
|
||||
// recursive lock
|
||||
inline void lock()
|
||||
{
|
||||
if( !isInvalid() && ++m_lockDepth == 1 )
|
||||
if( !isInvalid() && __sync_add_and_fetch( &m_lockDepth, 1 ) == 1 )
|
||||
{
|
||||
#ifdef USE_QT_SEMAPHORES
|
||||
m_dataSem.acquire();
|
||||
@@ -297,16 +298,13 @@ public:
|
||||
// recursive unlock
|
||||
inline void unlock()
|
||||
{
|
||||
if( m_lockDepth > 0 )
|
||||
if( __sync_sub_and_fetch( &m_lockDepth, 1) <= 0 )
|
||||
{
|
||||
if( --m_lockDepth == 0 )
|
||||
{
|
||||
#ifdef USE_QT_SEMAPHORES
|
||||
m_dataSem.release();
|
||||
m_dataSem.release();
|
||||
#else
|
||||
sem_post( m_dataSem );
|
||||
sem_post( m_dataSem );
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -418,7 +416,8 @@ private:
|
||||
return;
|
||||
}
|
||||
lock();
|
||||
while( _len > m_data->endPtr - m_data->startPtr )
|
||||
while( isInvalid() == false &&
|
||||
_len > m_data->endPtr - m_data->startPtr )
|
||||
{
|
||||
unlock();
|
||||
#ifndef LMMS_BUILD_WIN32
|
||||
@@ -439,7 +438,7 @@ private:
|
||||
|
||||
void write( const void * _buf, int _len )
|
||||
{
|
||||
if( isInvalid() )
|
||||
if( isInvalid() || _len > SHM_FIFO_SIZE )
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -484,7 +483,7 @@ private:
|
||||
sem_t * m_dataSem;
|
||||
sem_t * m_messageSem;
|
||||
#endif
|
||||
int m_lockDepth;
|
||||
volatile int m_lockDepth;
|
||||
|
||||
} ;
|
||||
|
||||
@@ -509,12 +508,8 @@ enum RemoteMessageIDs
|
||||
IdSaveSettingsToFile,
|
||||
IdLoadSettingsFromString,
|
||||
IdLoadSettingsFromFile,
|
||||
IdLoadChunkFromPresetFile,
|
||||
IdRotateProgram,
|
||||
IdLoadPrograms,
|
||||
IdSavePreset,
|
||||
IdSetParameter,
|
||||
IdLoadPresetFromFile,
|
||||
IdSavePresetFile,
|
||||
IdLoadPresetFile,
|
||||
IdDebugMessage,
|
||||
IdUserBase = 64
|
||||
} ;
|
||||
@@ -552,8 +547,7 @@ public:
|
||||
|
||||
message & addInt( int _i )
|
||||
{
|
||||
char buf[128];
|
||||
buf[0] = 0;
|
||||
char buf[32];
|
||||
sprintf( buf, "%d", _i );
|
||||
data.push_back( std::string( buf ) );
|
||||
return *this;
|
||||
@@ -561,8 +555,7 @@ public:
|
||||
|
||||
message & addFloat( float _f )
|
||||
{
|
||||
char buf[128];
|
||||
buf[0] = 0;
|
||||
char buf[32];
|
||||
sprintf( buf, "%f", _f );
|
||||
data.push_back( std::string( buf ) );
|
||||
return *this;
|
||||
@@ -615,7 +608,7 @@ public:
|
||||
m_out = out;
|
||||
}
|
||||
|
||||
void sendMessage( const message & _m );
|
||||
int sendMessage( const message & _m );
|
||||
message receiveMessage();
|
||||
|
||||
inline bool isInvalid() const
|
||||
@@ -819,7 +812,9 @@ class RemotePluginClient : public RemotePluginBase
|
||||
public:
|
||||
RemotePluginClient( key_t _shm_in, key_t _shm_out );
|
||||
virtual ~RemotePluginClient();
|
||||
|
||||
#ifdef USE_QT_SHMEM
|
||||
sncVST * getQtVSTshm();
|
||||
#endif
|
||||
virtual bool processMessage( const message & _m );
|
||||
|
||||
virtual void process( const sampleFrame * _in_buf,
|
||||
@@ -887,7 +882,9 @@ private:
|
||||
|
||||
#ifdef USE_QT_SHMEM
|
||||
QSharedMemory m_shmObj;
|
||||
QSharedMemory m_shmQtID;
|
||||
#endif
|
||||
sncVST * m_SncVSTplug;
|
||||
float * m_shm;
|
||||
|
||||
int m_inputCount;
|
||||
@@ -934,19 +931,21 @@ RemotePluginBase::~RemotePluginBase()
|
||||
|
||||
|
||||
|
||||
void RemotePluginBase::sendMessage( const message & _m )
|
||||
int RemotePluginBase::sendMessage( const message & _m )
|
||||
{
|
||||
m_out->lock();
|
||||
m_out->writeInt( _m.id );
|
||||
m_out->writeInt( _m.data.size() );
|
||||
int j = 0;
|
||||
int j = 8;
|
||||
for( unsigned int i = 0; i < _m.data.size(); ++i )
|
||||
{
|
||||
m_out->writeString( _m.data[i] );
|
||||
j += _m.data[i].size();
|
||||
j += 4 + _m.data[i].size();
|
||||
}
|
||||
m_out->unlock();
|
||||
m_out->messageSent();
|
||||
|
||||
return j;
|
||||
}
|
||||
|
||||
|
||||
@@ -1013,13 +1012,60 @@ RemotePluginClient::RemotePluginClient( key_t _shm_in, key_t _shm_out ) :
|
||||
RemotePluginBase( new shmFifo( _shm_in ), new shmFifo( _shm_out ) ),
|
||||
#ifdef USE_QT_SHMEM
|
||||
m_shmObj(),
|
||||
m_shmQtID( "/usr/bin/lmms" ),
|
||||
#endif
|
||||
m_SncVSTplug( NULL ),
|
||||
m_shm( NULL ),
|
||||
m_inputCount( 0 ),
|
||||
m_outputCount( 0 ),
|
||||
m_sampleRate( 44100 ),
|
||||
m_bufferSize( 0 )
|
||||
{
|
||||
#ifdef USE_QT_SHMEM
|
||||
if( m_shmQtID.attach( QSharedMemory::ReadOnly ) )
|
||||
{
|
||||
m_SncVSTplug = (sncVST *) m_shmQtID.data();
|
||||
m_bufferSize = m_SncVSTplug->m_bufferSize;
|
||||
m_sampleRate = m_SncVSTplug->m_sampleRate;
|
||||
return;
|
||||
}
|
||||
#else
|
||||
key_t key;
|
||||
int m_shmID;
|
||||
|
||||
if( ( key = ftok( VST_SNC_SHM_KEY_FILE, 'R' ) ) == -1 )
|
||||
{
|
||||
perror( "RemotePluginClient::ftok" );
|
||||
}
|
||||
else
|
||||
{ // connect to shared memory segment
|
||||
if( ( m_shmID = shmget( key, 0, 0 ) ) == -1 )
|
||||
{
|
||||
perror( "RemotePluginClient::shmget" );
|
||||
}
|
||||
else
|
||||
{ // attach segment
|
||||
m_SncVSTplug = (sncVST *)shmat(m_shmID, 0, 0);
|
||||
if( m_SncVSTplug == (sncVST *)( -1 ) )
|
||||
{
|
||||
perror( "RemotePluginClient::shmat" );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_bufferSize = m_SncVSTplug->m_bufferSize;
|
||||
m_sampleRate = m_SncVSTplug->m_sampleRate;
|
||||
|
||||
// detach segment
|
||||
if( shmdt(m_SncVSTplug) == -1 )
|
||||
{
|
||||
perror("RemotePluginClient::shmdt");
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
// if attaching shared memory fails
|
||||
sendMessage( IdSampleRateInformation );
|
||||
sendMessage( IdBufferSizeInformation );
|
||||
}
|
||||
@@ -1029,6 +1075,9 @@ RemotePluginClient::RemotePluginClient( key_t _shm_in, key_t _shm_out ) :
|
||||
|
||||
RemotePluginClient::~RemotePluginClient()
|
||||
{
|
||||
#ifdef USE_QT_SHMEM
|
||||
m_shmQtID.detach();
|
||||
#endif
|
||||
sendMessage( IdQuit );
|
||||
|
||||
#ifndef USE_QT_SHMEM
|
||||
@@ -1038,6 +1087,14 @@ RemotePluginClient::~RemotePluginClient()
|
||||
|
||||
|
||||
|
||||
#ifdef USE_QT_SHMEM
|
||||
sncVST * RemotePluginClient::getQtVSTshm()
|
||||
{
|
||||
return m_SncVSTplug;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
bool RemotePluginClient::processMessage( const message & _m )
|
||||
{
|
||||
@@ -1107,13 +1164,15 @@ void RemotePluginClient::setShmKey( key_t _key, int _size )
|
||||
{
|
||||
#ifdef USE_QT_SHMEM
|
||||
m_shmObj.setKey( QString::number( _key ) );
|
||||
if( m_shmObj.attach() )
|
||||
if( m_shmObj.attach() || m_shmObj.error() == QSharedMemory::NoError )
|
||||
{
|
||||
m_shm = (float *) m_shmObj.data();
|
||||
}
|
||||
else
|
||||
{
|
||||
debugMessage( "failed getting shared memory\n" );
|
||||
char buf[64];
|
||||
sprintf( buf, "failed getting shared memory: %d\n", m_shmObj.error() );
|
||||
debugMessage( buf );
|
||||
}
|
||||
#else
|
||||
if( m_shm != NULL )
|
||||
|
||||
70
include/TimeDisplayWidget.h
Normal file
@@ -0,0 +1,70 @@
|
||||
/*
|
||||
* TimeDisplayWidget.h - widget for displaying current playback time
|
||||
*
|
||||
* Copyright (c) 2014 Ruben Ibarra
|
||||
* Copyright (c) 2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public
|
||||
* License along with this program (see COPYING); if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _TIME_DISPLAY_WIDGET
|
||||
#define _TIME_DISPLAY_WIDGET
|
||||
|
||||
#include <QtGui/QWidget>
|
||||
#include <QtGui/QHBoxLayout>
|
||||
|
||||
#include "LcdWidget.h"
|
||||
|
||||
|
||||
class TimeDisplayWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
TimeDisplayWidget();
|
||||
virtual ~TimeDisplayWidget();
|
||||
|
||||
|
||||
protected:
|
||||
virtual void mousePressEvent( QMouseEvent* mouseEvent );
|
||||
|
||||
|
||||
private slots:
|
||||
void updateTime();
|
||||
|
||||
|
||||
private:
|
||||
enum DisplayModes
|
||||
{
|
||||
MinutesSeconds,
|
||||
BarsTicks,
|
||||
DisplayModeCount
|
||||
};
|
||||
typedef DisplayModes DisplayMode;
|
||||
|
||||
void setDisplayMode( DisplayMode displayMode );
|
||||
|
||||
DisplayMode m_displayMode;
|
||||
QHBoxLayout m_spinBoxesLayout;
|
||||
LcdWidget m_majorLCD;
|
||||
LcdWidget m_minorLCD;
|
||||
LcdWidget m_milliSecondsLCD;
|
||||
|
||||
} ;
|
||||
|
||||
#endif
|
||||
58
include/VST_sync_shm.h
Normal file
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
* VST_sync_shm.h - type declarations needed for VST to lmms host sync
|
||||
*
|
||||
* Copyright (c) 2004-2013 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public
|
||||
* License along with this program (see COPYING); if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _VST_SYNC_SHM_H
|
||||
#define _VST_SYNC_SHM_H
|
||||
|
||||
// VST sync frequency (in ms), how often will be VST plugin synced
|
||||
// keep it power of two if possible (not used by now)
|
||||
//#define VST_SNC_TIMER 1
|
||||
|
||||
// When defined, latency should be subtracted from song PPQ position
|
||||
//#define VST_SNC_LATENCY
|
||||
|
||||
// define file for ftok as shared memory shmget key
|
||||
#define VST_SNC_SHM_KEY_FILE "/dev/null"
|
||||
//#define VST_SNC_SHM_RND_KEY 3561653564469
|
||||
|
||||
struct sncVST
|
||||
{
|
||||
bool isPlayin;
|
||||
float ppqPos;
|
||||
int timeSigNumer;
|
||||
int timeSigDenom;
|
||||
bool isCycle;
|
||||
bool hasSHM;
|
||||
float cycleStart;
|
||||
float cycleEnd;
|
||||
int m_bufferSize;
|
||||
int m_sampleRate;
|
||||
int m_bpm;
|
||||
|
||||
#ifdef VST_SNC_LATENCY
|
||||
float m_latency;
|
||||
#endif
|
||||
} ;
|
||||
|
||||
#endif
|
||||
@@ -114,8 +114,14 @@ const int kEffectMagic = CCONST( 'V', 's', 't', 'P' );
|
||||
const int kVstLangEnglish = 1;
|
||||
const int kVstMidiType = 1;
|
||||
const int kVstParameterUsesFloatStep = 1 << 2;
|
||||
const int kVstPpqPosValid = 1 << 9;
|
||||
const int kVstTempoValid = 1 << 10;
|
||||
const int kVstBarsValid = 1 << 11;
|
||||
const int kVstCyclePosValid = 1 << 12;
|
||||
const int kVstTimeSigValid = 1 << 13;
|
||||
const int kVstTransportPlaying = 1 << 1;
|
||||
const int kVstTransportCycleActive = 1 << 2;
|
||||
const int kVstTransportChanged = 1;
|
||||
|
||||
|
||||
class RemoteVstPlugin;
|
||||
@@ -267,12 +273,18 @@ public:
|
||||
double samplePos;
|
||||
// 08
|
||||
double sampleRate;
|
||||
// unconfirmed 10 18
|
||||
char empty1[8 + 8];
|
||||
// unconfirmed 10
|
||||
char empty1[8];
|
||||
// 18
|
||||
double ppqPos;
|
||||
// 20?
|
||||
double tempo;
|
||||
// unconfirmed 28 30 38
|
||||
char empty2[8 + 8 + 8];
|
||||
// 28
|
||||
double barStartPos;
|
||||
// 30?
|
||||
double cycleStartPos;
|
||||
// 38?
|
||||
double cycleEndPos;
|
||||
// 40?
|
||||
int timeSigNumerator;
|
||||
// 44?
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* export_project_dialog.h - declaration of class exportProjectDialog which is
|
||||
* responsible for exporting project
|
||||
*
|
||||
* Copyright (c) 2004-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2004-2012 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -28,17 +28,17 @@
|
||||
#define _EXPORT_PROJECT_DIALOG_H
|
||||
|
||||
#include <QtGui/QDialog>
|
||||
|
||||
#include <vector>
|
||||
#include "ui_export_project.h"
|
||||
|
||||
class ProjectRenderer;
|
||||
#include "ProjectRenderer.h"
|
||||
|
||||
|
||||
class exportProjectDialog : public QDialog, public Ui::ExportProjectDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
exportProjectDialog( const QString & _file_name, QWidget * _parent );
|
||||
exportProjectDialog( const QString & _file_name, QWidget * _parent, bool multi_export );
|
||||
virtual ~exportProjectDialog();
|
||||
|
||||
|
||||
@@ -50,12 +50,25 @@ protected:
|
||||
private slots:
|
||||
void startBtnClicked( void );
|
||||
void updateTitleBar( int );
|
||||
|
||||
void render(ProjectRenderer* renderer);
|
||||
void multiRender();
|
||||
ProjectRenderer* prepRender();
|
||||
void popRender();
|
||||
void accept();
|
||||
|
||||
private:
|
||||
QString m_fileName;
|
||||
ProjectRenderer * m_renderer;
|
||||
QString m_dirName;
|
||||
QString m_fileExtension;
|
||||
typedef QVector<ProjectRenderer*> RenderVector;
|
||||
RenderVector m_renderers;
|
||||
bool m_multiExport;
|
||||
|
||||
typedef QVector<track*> TrackVector;
|
||||
TrackVector m_unmuted;
|
||||
TrackVector m_unmutedBB;
|
||||
ProjectRenderer::ExportFileFormats m_ft;
|
||||
TrackVector m_tracksToRender;
|
||||
} ;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* fader.h - fader-widget used in FX-mixer - partly taken from Hydrogen
|
||||
*
|
||||
* Copyright (c) 2008-2011 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2008-2012 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -74,23 +74,25 @@ public:
|
||||
private:
|
||||
virtual void contextMenuEvent( QContextMenuEvent * _me );
|
||||
virtual void mousePressEvent( QMouseEvent *ev );
|
||||
virtual void mouseDoubleClickEvent( QMouseEvent* mouseEvent );
|
||||
virtual void mouseMoveEvent( QMouseEvent *ev );
|
||||
virtual void mouseReleaseEvent( QMouseEvent * _me );
|
||||
virtual void wheelEvent( QWheelEvent *ev );
|
||||
virtual void paintEvent( QPaintEvent *ev );
|
||||
|
||||
inline uint knob_y() const
|
||||
int knobPosY() const
|
||||
{
|
||||
float fRange = m_model->maxValue() - m_model->minValue();
|
||||
float realVal = m_model->value() - m_model->minValue();
|
||||
// uint knob_y = (uint)( 116.0 - ( 86.0 * ( m_model->value() / fRange ) ) );
|
||||
return (uint)( 116.0 - ( 86.0 * ( realVal / fRange ) ) );
|
||||
|
||||
return height() - ( ( height() - m_knob.height() ) * ( realVal / fRange ) );
|
||||
}
|
||||
|
||||
FloatModel * m_model;
|
||||
|
||||
void setPeak( float fPeak, float &targetPeak, float &persistentPeak, QTime &lastPeakTime );
|
||||
int calculateDisplayPeak( float fPeak );
|
||||
|
||||
float m_fPeakValue_L;
|
||||
float m_fPeakValue_R;
|
||||
float m_persistentPeak_L;
|
||||
@@ -105,6 +107,9 @@ private:
|
||||
QPixmap m_leds;
|
||||
QPixmap m_knob;
|
||||
|
||||
int m_moveStartPoint;
|
||||
float m_startValue;
|
||||
|
||||
static textFloat * s_textFloat;
|
||||
void updateTextFloat();
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* fft_helpers.h - some functions around FFT analysis
|
||||
*
|
||||
* Copyright (c) 2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2008-2012 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -29,8 +29,6 @@
|
||||
#include "lmmsconfig.h"
|
||||
#include "export.h"
|
||||
|
||||
#ifdef LMMS_HAVE_FFTW3F
|
||||
|
||||
#include <fftw3.h>
|
||||
|
||||
const int FFT_BUFFER_SIZE = 2048;
|
||||
@@ -85,5 +83,3 @@ int EXPORT calc13octaveband31( float * _absspec_buffer, float * _subbands,
|
||||
float EXPORT signalpower(float *timesignal, int num_values);
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -112,6 +112,8 @@ protected:
|
||||
virtual void paintEvent( QPaintEvent * _me );
|
||||
virtual void wheelEvent( QWheelEvent * _me );
|
||||
|
||||
virtual float getValue( const QPoint & _p );
|
||||
|
||||
private slots:
|
||||
virtual void enterValue();
|
||||
void displayHelp();
|
||||
@@ -128,7 +130,6 @@ private:
|
||||
|
||||
void drawKnob( QPainter * _p );
|
||||
void setPosition( const QPoint & _p );
|
||||
float getValue( const QPoint & _p );
|
||||
bool updateAngle();
|
||||
|
||||
inline float pageSize() const
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
* lcd_spinbox.h - class lcdSpinBox, an improved QLCDNumber
|
||||
*
|
||||
* Copyright (c) 2005-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* Copyright (c) 2005-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
@@ -26,32 +26,20 @@
|
||||
#ifndef _LCD_SPINBOX_H
|
||||
#define _LCD_SPINBOX_H
|
||||
|
||||
#include <QtCore/QMap>
|
||||
#include <QtGui/QWidget>
|
||||
|
||||
#include "LcdWidget.h"
|
||||
#include "AutomatableModelView.h"
|
||||
|
||||
|
||||
class EXPORT lcdSpinBox : public QWidget, public IntModelView
|
||||
class EXPORT lcdSpinBox : public LcdWidget, public IntModelView
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
lcdSpinBox( int _num_digits, QWidget * _parent, const QString & _name =
|
||||
QString::null );
|
||||
lcdSpinBox( int numDigits, QWidget* parent, const QString& name = QString::null );
|
||||
|
||||
lcdSpinBox( int _num_digits, const QString & _lcd_style,
|
||||
QWidget * _parent, const QString & _name = QString::null );
|
||||
lcdSpinBox( int numDigits, const QString& style, QWidget* parent, const QString& name = QString::null );
|
||||
|
||||
virtual ~lcdSpinBox();
|
||||
|
||||
void setLabel( const QString & _txt );
|
||||
|
||||
inline void addTextForValue( int _val, const QString & _text )
|
||||
{
|
||||
m_textForValue[_val] = _text;
|
||||
update();
|
||||
}
|
||||
|
||||
virtual void modelChanged()
|
||||
{
|
||||
ModelView::modelChanged();
|
||||
@@ -60,8 +48,6 @@ public:
|
||||
|
||||
|
||||
public slots:
|
||||
virtual void setEnabled( bool _on );
|
||||
virtual void setMarginWidth( int _width );
|
||||
virtual void update();
|
||||
|
||||
|
||||
@@ -71,26 +57,8 @@ protected:
|
||||
virtual void mouseMoveEvent( QMouseEvent * _me );
|
||||
virtual void mouseReleaseEvent( QMouseEvent * _me );
|
||||
virtual void wheelEvent( QWheelEvent * _we );
|
||||
virtual void paintEvent( QPaintEvent * _me );
|
||||
|
||||
virtual void updateSize();
|
||||
|
||||
private:
|
||||
|
||||
static const int charsPerPixmap = 12;
|
||||
|
||||
QMap<int, QString> m_textForValue;
|
||||
|
||||
QString m_display;
|
||||
|
||||
QString m_label;
|
||||
QPixmap * m_lcdPixmap;
|
||||
|
||||
int m_cellWidth;
|
||||
int m_cellHeight;
|
||||
int m_numDigits;
|
||||
int m_marginWidth;
|
||||
|
||||
QPoint m_origMousePos;
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* midi.h - constants, structs etc. concerning MIDI
|
||||
*
|
||||
* Copyright (c) 2005-2010 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2005-2013 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -81,10 +81,41 @@ enum MidiMetaEvents
|
||||
} ;
|
||||
|
||||
|
||||
enum MidiStandardControllers
|
||||
{
|
||||
MidiControllerBankSelect = 0,
|
||||
MidiControllerModulationWheel = 1,
|
||||
MidiControllerBreathController = 2,
|
||||
MidiControllerFootController = 4,
|
||||
MidiControllerPortamentoTime = 5,
|
||||
MidiControllerMainVolume = 7,
|
||||
MidiControllerBalance = 8,
|
||||
MidiControllerPan = 10,
|
||||
MidiControllerEffectControl1 = 12,
|
||||
MidiControllerEffectControl2 = 13,
|
||||
MidiControllerSustain = 64,
|
||||
MidiControllerPortamento = 65,
|
||||
MidiControllerSostenuto = 66,
|
||||
MidiControllerSoftPedal = 67,
|
||||
MidiControllerLegatoFootswitch = 68,
|
||||
// Channel Mode Messages are controllers too...
|
||||
MidiControllerAllSoundOff = 120,
|
||||
MidiControllerResetAllControllers = 121,
|
||||
MidiControllerLocalControl = 122,
|
||||
MidiControllerAllNotesOff = 123,
|
||||
MidiControllerOmniOn = 124,
|
||||
MidiControllerOmniOff = 125,
|
||||
MidiControllerMonoOn = 126,
|
||||
MidiControllerPolyOn = 127,
|
||||
|
||||
};
|
||||
|
||||
const int MidiChannelCount = 16;
|
||||
const int MidiControllerCount = 128;
|
||||
const int MidiProgramCount = 128;
|
||||
const int MidiMaxVelocity = 127;
|
||||
const int MidiMaxControllerValue = 127;
|
||||
const int MidiMaxNote = 127;
|
||||
|
||||
const int MidiMaxPanning = 127;
|
||||
const int MidiMinPanning = -128;
|
||||
@@ -101,7 +132,8 @@ struct midiEvent
|
||||
m_metaEvent( MidiMetaInvalid ),
|
||||
m_channel( _channel ),
|
||||
m_sysExData( NULL ),
|
||||
m_sourcePort( _sourcePort )
|
||||
m_sourcePort( _sourcePort ),
|
||||
m_fromMidiPort( false )
|
||||
{
|
||||
m_data.m_param[0] = _param1;
|
||||
m_data.m_param[1] = _param2;
|
||||
@@ -113,7 +145,8 @@ struct midiEvent
|
||||
m_metaEvent( MidiMetaInvalid ),
|
||||
m_channel( 0 ),
|
||||
m_sysExData( _sysex_data ),
|
||||
m_sourcePort( NULL )
|
||||
m_sourcePort( NULL ),
|
||||
m_fromMidiPort( false )
|
||||
{
|
||||
m_data.m_sysExDataLen = _data_len;
|
||||
}
|
||||
@@ -124,7 +157,8 @@ struct midiEvent
|
||||
m_channel( _copy.m_channel ),
|
||||
m_data( _copy.m_data ),
|
||||
m_sysExData( _copy.m_sysExData ),
|
||||
m_sourcePort( _copy.m_sourcePort )
|
||||
m_sourcePort( _copy.m_sourcePort ),
|
||||
m_fromMidiPort( _copy.m_fromMidiPort )
|
||||
{
|
||||
}
|
||||
|
||||
@@ -148,6 +182,16 @@ struct midiEvent
|
||||
return m_data.m_param[0];
|
||||
}
|
||||
|
||||
inline uint8_t controllerNumber() const
|
||||
{
|
||||
return m_data.m_param[0];
|
||||
}
|
||||
|
||||
inline uint8_t controllerValue() const
|
||||
{
|
||||
return m_data.m_param[1];
|
||||
}
|
||||
|
||||
inline Sint16 velocity() const
|
||||
{
|
||||
return m_data.m_param[1];
|
||||
@@ -181,6 +225,15 @@ struct midiEvent
|
||||
( (float)( PanningRight - PanningLeft ) ) );
|
||||
}
|
||||
|
||||
void setFromMidiPort( bool enabled )
|
||||
{
|
||||
m_fromMidiPort = enabled;
|
||||
}
|
||||
|
||||
bool isFromMidiPort() const
|
||||
{
|
||||
return m_fromMidiPort;
|
||||
}
|
||||
|
||||
MidiEventTypes m_type; // MIDI event type
|
||||
MidiMetaEvents m_metaEvent; // Meta event (mostly unused)
|
||||
@@ -195,6 +248,10 @@ struct midiEvent
|
||||
const char * m_sysExData;
|
||||
const void * m_sourcePort;
|
||||
|
||||
|
||||
private:
|
||||
bool m_fromMidiPort;
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
@@ -77,10 +77,10 @@ public:
|
||||
const float _freq,
|
||||
const bool _looped = false );
|
||||
|
||||
void visualize( QPainter & _p, const QRect & _dr, const QRect & _clip );
|
||||
inline void visualize( QPainter & _p, const QRect & _dr )
|
||||
void visualize( QPainter & _p, const QRect & _dr, const QRect & _clip, f_cnt_t _from_frame = 0, f_cnt_t _to_frame = 0 );
|
||||
inline void visualize( QPainter & _p, const QRect & _dr, f_cnt_t _from_frame = 0, f_cnt_t _to_frame = 0 )
|
||||
{
|
||||
visualize( _p, _dr, _dr );
|
||||
visualize( _p, _dr, _dr, _from_frame, _to_frame );
|
||||
}
|
||||
|
||||
inline const QString & audioFile() const
|
||||
@@ -132,6 +132,16 @@ public:
|
||||
return m_frequency;
|
||||
}
|
||||
|
||||
sample_rate_t sampleRate() const
|
||||
{
|
||||
return m_sampleRate;
|
||||
}
|
||||
|
||||
int sampleLength() const
|
||||
{
|
||||
return double( m_endFrame - m_startFrame ) / m_sampleRate * 1000;
|
||||
}
|
||||
|
||||
inline void setFrequency( float _freq )
|
||||
{
|
||||
m_varLock.lock();
|
||||
|
||||
@@ -105,8 +105,11 @@ private slots:
|
||||
void toggleDisableChActInd( bool _disabled );
|
||||
void toggleManualChPiano( bool _enabled );
|
||||
void toggleSmoothScroll( bool _enabled );
|
||||
void toggleAutoSave( bool _enabled );
|
||||
void toggleOneInstrumentTrackWindow( bool _enabled );
|
||||
void toggleCompactTrackButtons( bool _enabled );
|
||||
void toggleSyncVSTPlugins( bool _enabled );
|
||||
void toggleAnimateAFP( bool _enabled );
|
||||
|
||||
|
||||
private:
|
||||
@@ -152,8 +155,11 @@ private:
|
||||
bool m_disableChActInd;
|
||||
bool m_manualChPiano;
|
||||
bool m_smoothScroll;
|
||||
bool m_enableAutoSave;
|
||||
bool m_oneInstrumentTrackWindow;
|
||||
bool m_compactTrackButtons;
|
||||
bool m_syncVSTPlugins;
|
||||
bool m_animateAFP;
|
||||
|
||||
typedef QMap<QString, AudioDevice::setupWidget *> AswMap;
|
||||
typedef QMap<QString, MidiClient::setupWidget *> MswMap;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* song.h - class song - the root of the model-tree
|
||||
*
|
||||
* Copyright (c) 2004-2011 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2004-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -25,13 +25,14 @@
|
||||
#ifndef _SONG_H
|
||||
#define _SONG_H
|
||||
|
||||
#include <QtCore/QSharedMemory>
|
||||
#include <QtCore/QVector>
|
||||
|
||||
#include "track_container.h"
|
||||
#include "AutomatableModel.h"
|
||||
#include "Controller.h"
|
||||
#include "MeterModel.h"
|
||||
|
||||
#include "VST_sync_shm.h"
|
||||
|
||||
class AutomationTrack;
|
||||
class pattern;
|
||||
@@ -94,7 +95,46 @@ public:
|
||||
|
||||
void processNextBuffer();
|
||||
|
||||
inline int getMilliseconds() const
|
||||
{
|
||||
return m_elapsedMilliSeconds;
|
||||
}
|
||||
inline void setMilliSeconds( float _ellapsedMilliSeconds )
|
||||
{
|
||||
m_elapsedMilliSeconds = (_ellapsedMilliSeconds);
|
||||
}
|
||||
inline int getTacts() const
|
||||
{
|
||||
return currentTact();
|
||||
}
|
||||
|
||||
inline int ticksPerTact() const
|
||||
{
|
||||
return DefaultTicksPerTact *
|
||||
m_timeSigModel.getNumerator() /
|
||||
m_timeSigModel.getDenominator();
|
||||
}
|
||||
|
||||
// Returns the beat position inside the bar, 0-based
|
||||
inline int getBeat() const
|
||||
{
|
||||
return (currentTick() - currentTact()*ticksPerTact()) /
|
||||
(ticksPerTact() / m_timeSigModel.getNumerator() );
|
||||
}
|
||||
// the remainder after bar and beat are removed
|
||||
inline int getBeatTicks() const
|
||||
{
|
||||
return (currentTick() - currentTact()*ticksPerTact()) %
|
||||
(ticksPerTact() / m_timeSigModel.getNumerator() );
|
||||
}
|
||||
inline int getTicks() const
|
||||
{
|
||||
return currentTick();
|
||||
}
|
||||
inline bool isTempoAutomated()
|
||||
{
|
||||
return m_tempoModel.isAutomated();
|
||||
}
|
||||
inline bool isPaused() const
|
||||
{
|
||||
return m_paused;
|
||||
@@ -117,6 +157,11 @@ public:
|
||||
return m_exporting;
|
||||
}
|
||||
|
||||
inline void setExportLoop( bool exportLoop )
|
||||
{
|
||||
m_exportLoop = exportLoop;
|
||||
}
|
||||
|
||||
inline bool isRecording() const
|
||||
{
|
||||
return m_recording;
|
||||
@@ -126,8 +171,16 @@ public:
|
||||
|
||||
inline bool isExportDone() const
|
||||
{
|
||||
return m_exporting == true &&
|
||||
m_playPos[Mode_PlaySong].getTact() >= length() + 1;
|
||||
if ( m_exportLoop )
|
||||
{
|
||||
return m_exporting == true &&
|
||||
m_playPos[Mode_PlaySong].getTact() >= length();
|
||||
}
|
||||
else
|
||||
{
|
||||
return m_exporting == true &&
|
||||
m_playPos[Mode_PlaySong].getTact() >= length() + 1;
|
||||
}
|
||||
}
|
||||
|
||||
inline PlayModes playMode() const
|
||||
@@ -212,7 +265,8 @@ public slots:
|
||||
void stop();
|
||||
|
||||
void importProject();
|
||||
void exportProject();
|
||||
void exportProject(bool multiExport=false);
|
||||
void exportProjectTracks();
|
||||
|
||||
void startExport();
|
||||
void stopExport();
|
||||
@@ -240,6 +294,8 @@ private slots:
|
||||
|
||||
void updateFramesPerTick();
|
||||
|
||||
void updateSampleRateSHM();
|
||||
|
||||
|
||||
|
||||
private:
|
||||
@@ -248,13 +304,6 @@ private:
|
||||
virtual ~song();
|
||||
|
||||
|
||||
inline int ticksPerTact() const
|
||||
{
|
||||
return DefaultTicksPerTact *
|
||||
m_timeSigModel.getNumerator() /
|
||||
m_timeSigModel.getDenominator();
|
||||
}
|
||||
|
||||
inline tact_t currentTact() const
|
||||
{
|
||||
return m_playPos[m_playMode].getTact();
|
||||
@@ -287,6 +336,7 @@ private:
|
||||
|
||||
volatile bool m_recording;
|
||||
volatile bool m_exporting;
|
||||
volatile bool m_exportLoop;
|
||||
volatile bool m_playing;
|
||||
volatile bool m_paused;
|
||||
|
||||
@@ -300,6 +350,25 @@ private:
|
||||
pattern * m_patternToPlay;
|
||||
bool m_loopPattern;
|
||||
|
||||
double m_elapsedMilliSeconds;
|
||||
tick_t m_elapsedTicks;
|
||||
tact_t m_elapsedTacts;
|
||||
|
||||
enum Actions
|
||||
{
|
||||
ActionStop,
|
||||
ActionPlaySong,
|
||||
ActionPlayTrack,
|
||||
ActionPlayBB,
|
||||
ActionPlayPattern,
|
||||
ActionPause,
|
||||
ActionResumeFromPause
|
||||
} ;
|
||||
QVector<Actions> m_actions;
|
||||
|
||||
int m_shmID;
|
||||
sncVST * m_SncVSTplug;
|
||||
QSharedMemory m_shmQtID;
|
||||
|
||||
friend class engine;
|
||||
friend class songEditor;
|
||||
|
||||
@@ -59,6 +59,13 @@ const int TRACK_OP_WIDTH = 78;
|
||||
const int DEFAULT_SETTINGS_WIDGET_WIDTH_COMPACT = 96;
|
||||
const int TRACK_OP_WIDTH_COMPACT = 60;
|
||||
|
||||
/*! The minimum track height in pixels
|
||||
*
|
||||
* Tracks can be resized by shift-dragging anywhere inside the track
|
||||
* display. This sets the minimum size in pixels for a track.
|
||||
*/
|
||||
const Uint16 MINIMAL_TRACK_HEIGHT = 8;
|
||||
const Uint16 DEFAULT_TRACK_HEIGHT = 32;
|
||||
|
||||
const int TCO_BORDER_WIDTH = 1;
|
||||
|
||||
@@ -435,6 +442,13 @@ public:
|
||||
|
||||
using Model::dataChanged;
|
||||
|
||||
inline int getHeight() {
|
||||
return ( m_height >= MINIMAL_TRACK_HEIGHT ? m_height : DEFAULT_TRACK_HEIGHT );
|
||||
}
|
||||
inline void setHeight( int _height ) {
|
||||
m_height = _height;
|
||||
}
|
||||
|
||||
|
||||
public slots:
|
||||
virtual void setName( const QString & _new_name )
|
||||
@@ -450,6 +464,7 @@ private:
|
||||
trackContainer * m_trackContainer;
|
||||
TrackTypes m_type;
|
||||
QString m_name;
|
||||
int m_height;
|
||||
|
||||
BoolModel m_mutedModel;
|
||||
BoolModel m_soloModel;
|
||||
|
||||
@@ -2,7 +2,7 @@ lmmsicon ICON data/lmms.ico
|
||||
#include <windows.h>
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 0,4,13,0
|
||||
FILEVERSION 0,4,15,0
|
||||
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||
FILEOS VOS_NT_WINDOWS32
|
||||
FILETYPE VFT_APP
|
||||
@@ -17,7 +17,7 @@ BEGIN
|
||||
VALUE "CompanyName", "LMMS Developers\0"
|
||||
VALUE "FileDescription", "Linux MultiMedia Studio\0"
|
||||
VALUE "FileVersion", "@VERSION@\0"
|
||||
VALUE "LegalCopyright", "Copyright (c) 2004-2012 LMMS Developers\0"
|
||||
VALUE "LegalCopyright", "Copyright (c) 2004-2013 LMMS Developers\0"
|
||||
VALUE "OriginalFilename", "lmms.exe\0"
|
||||
VALUE "ProductName", "LMMS\0"
|
||||
VALUE "ProductVersion", "@VERSION@\0"
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
#cmakedefine LMMS_HOST_X86_64
|
||||
|
||||
#cmakedefine LMMS_HAVE_ALSA
|
||||
#cmakedefine LMMS_HAVE_FFTW3F
|
||||
#cmakedefine LMMS_HAVE_FLUIDSYNTH
|
||||
#cmakedefine LMMS_HAVE_JACK
|
||||
#cmakedefine LMMS_HAVE_OGGVORBIS
|
||||
|
||||
@@ -2,6 +2,7 @@ ADD_SUBDIRECTORY(audio_file_processor)
|
||||
ADD_SUBDIRECTORY(bass_booster)
|
||||
ADD_SUBDIRECTORY(bit_invader)
|
||||
ADD_SUBDIRECTORY(flp_import)
|
||||
ADD_SUBDIRECTORY(HydrogenImport)
|
||||
ADD_SUBDIRECTORY(kicker)
|
||||
ADD_SUBDIRECTORY(ladspa_browser)
|
||||
ADD_SUBDIRECTORY(ladspa_effect)
|
||||
@@ -9,6 +10,7 @@ ADD_SUBDIRECTORY(lb302)
|
||||
#ADD_SUBDIRECTORY(lb303)
|
||||
ADD_SUBDIRECTORY(midi_import)
|
||||
ADD_SUBDIRECTORY(organic)
|
||||
ADD_SUBDIRECTORY(opl2)
|
||||
ADD_SUBDIRECTORY(papu)
|
||||
ADD_SUBDIRECTORY(patman)
|
||||
ADD_SUBDIRECTORY(peak_controller_effect)
|
||||
|
||||
4
plugins/HydrogenImport/CMakeLists.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
INCLUDE(BuildPlugin)
|
||||
|
||||
BUILD_PLUGIN(hydrogenimport HydrogenImport.cpp HydrogenImport.h local_file_mgr.cpp LocalFileMng.h)
|
||||
|
||||
404
plugins/HydrogenImport/HydrogenImport.cpp
Normal file
@@ -0,0 +1,404 @@
|
||||
#include <QtXml/QDomDocument>
|
||||
#include <QtCore/QDir>
|
||||
#include <QtGui/QApplication>
|
||||
#include <QtGui/QMessageBox>
|
||||
#include <QtGui/QProgressDialog>
|
||||
#include <QTextStream>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "LocalFileMng.h"
|
||||
#include "HydrogenImport.h"
|
||||
#include "song.h"
|
||||
#include "engine.h"
|
||||
#include "Instrument.h"
|
||||
#include "InstrumentTrack.h"
|
||||
#include "note.h"
|
||||
#include "pattern.h"
|
||||
#include "track.h"
|
||||
#include "bb_track.h"
|
||||
#include "bb_track_container.h"
|
||||
#include "Instrument.h"
|
||||
|
||||
#define MAX_LAYERS 4
|
||||
extern "C"
|
||||
{
|
||||
|
||||
Plugin::Descriptor PLUGIN_EXPORT hydrogenimport_plugin_descriptor =
|
||||
{
|
||||
STRINGIFY( PLUGIN_NAME ),
|
||||
"Hydrogen Import",
|
||||
QT_TRANSLATE_NOOP( "pluginBrowser",
|
||||
"Filter for importing Hydrogen files into LMMS" ),
|
||||
"frank mather",
|
||||
0x0100,
|
||||
Plugin::ImportFilter,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
QString filename;
|
||||
class NoteKey
|
||||
{
|
||||
public:
|
||||
enum Key {
|
||||
C = 0,
|
||||
Cs,
|
||||
D,
|
||||
Ef,
|
||||
E,
|
||||
F,
|
||||
Fs,
|
||||
G,
|
||||
Af,
|
||||
A,
|
||||
Bf,
|
||||
B,
|
||||
};
|
||||
|
||||
static int stringToNoteKey( const QString& str )
|
||||
{
|
||||
int m_key;
|
||||
|
||||
|
||||
QString sKey = str.left( str.length() - 1 );
|
||||
QString sOct = str.mid( str.length() - 1, str.length() );
|
||||
|
||||
if ( sKey.endsWith( "-" ) )
|
||||
{
|
||||
sKey.replace( "-", "" );
|
||||
sOct.insert( 0, "-" );
|
||||
}
|
||||
int nOctave = sOct.toInt();
|
||||
|
||||
if ( sKey == "C" )
|
||||
{
|
||||
m_key = NoteKey::C;
|
||||
}
|
||||
else if ( sKey == "Cs" )
|
||||
{
|
||||
m_key = NoteKey::Cs;
|
||||
}
|
||||
else if ( sKey == "D" )
|
||||
{
|
||||
m_key = NoteKey::D;
|
||||
}
|
||||
else if ( sKey == "Ef" )
|
||||
{
|
||||
m_key = NoteKey::Ef;
|
||||
}
|
||||
else if ( sKey == "E" )
|
||||
{
|
||||
m_key = NoteKey::E;
|
||||
}
|
||||
else if ( sKey == "F" )
|
||||
{
|
||||
m_key = NoteKey::F;
|
||||
}
|
||||
else if ( sKey == "Fs" )
|
||||
{
|
||||
m_key = NoteKey::Fs;
|
||||
}
|
||||
else if ( sKey == "G" )
|
||||
{
|
||||
m_key = NoteKey::G;
|
||||
}
|
||||
else if ( sKey == "Af" )
|
||||
{
|
||||
m_key = NoteKey::Af;
|
||||
}
|
||||
else if ( sKey == "A" )
|
||||
{
|
||||
m_key = NoteKey::A;
|
||||
}
|
||||
else if ( sKey == "Bf" )
|
||||
{
|
||||
m_key = NoteKey::Bf;
|
||||
}
|
||||
else if ( sKey == "B" ) {
|
||||
m_key = NoteKey::B;
|
||||
}
|
||||
return m_key + (nOctave*12)+57;
|
||||
}
|
||||
|
||||
};
|
||||
HydrogenImport::HydrogenImport( const QString & _file ) :
|
||||
ImportFilter( _file, &hydrogenimport_plugin_descriptor )
|
||||
{
|
||||
filename = _file;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
HydrogenImport::~HydrogenImport()
|
||||
{
|
||||
}
|
||||
Instrument * ins;
|
||||
bool HydrogenImport::readSong()
|
||||
{
|
||||
QHash<QString, InstrumentTrack *> drum_track;
|
||||
QHash<QString, int> pattern_length;
|
||||
QHash<QString, int> pattern_id;
|
||||
|
||||
song *s = engine::getSong();
|
||||
int song_num_tracks = s->tracks().size();
|
||||
if ( QFile( filename ).exists() == false )
|
||||
{
|
||||
printf( "Song file not found \n" );
|
||||
return false;
|
||||
}
|
||||
QDomDocument doc = LocalFileMng::openXmlDocument( filename );
|
||||
QDomNodeList nodeList = doc.elementsByTagName( "song" );
|
||||
|
||||
if( nodeList.isEmpty() )
|
||||
{
|
||||
printf( "Error reading song: song node not found\n" );
|
||||
return NULL;
|
||||
}
|
||||
QDomNode songNode = nodeList.at( 0 );
|
||||
|
||||
QString m_sSongVersion = LocalFileMng::readXmlString( songNode , "version", "Unknown version" );
|
||||
|
||||
|
||||
|
||||
|
||||
float fBpm = LocalFileMng::readXmlFloat( songNode, "bpm", 120 );
|
||||
float fVolume = LocalFileMng::readXmlFloat( songNode, "volume", 0.5 );
|
||||
float fMetronomeVolume = LocalFileMng::readXmlFloat( songNode, "metronomeVolume", 0.5 );
|
||||
QString sName( LocalFileMng::readXmlString( songNode, "name", "Untitled Song" ) );
|
||||
QString sAuthor( LocalFileMng::readXmlString( songNode, "author", "Unknown Author" ) );
|
||||
QString sNotes( LocalFileMng::readXmlString( songNode, "notes", "..." ) );
|
||||
QString sLicense( LocalFileMng::readXmlString( songNode, "license", "Unknown license" ) );
|
||||
bool bLoopEnabled = LocalFileMng::readXmlBool( songNode, "loopEnabled", false );
|
||||
QString sMode = LocalFileMng::readXmlString( songNode, "mode", "pattern" );
|
||||
|
||||
|
||||
float fHumanizeTimeValue = LocalFileMng::readXmlFloat( songNode, "humanize_time", 0.0 );
|
||||
float fHumanizeVelocityValue = LocalFileMng::readXmlFloat( songNode, "humanize_velocity", 0.0 );
|
||||
float fSwingFactor = LocalFileMng::readXmlFloat( songNode, "swing_factor", 0.0 );
|
||||
|
||||
|
||||
QDomNode instrumentListNode = songNode.firstChildElement( "instrumentList" );
|
||||
if ( ( ! instrumentListNode.isNull() ) )
|
||||
{
|
||||
|
||||
int instrumentList_count = 0;
|
||||
QDomNode instrumentNode;
|
||||
instrumentNode = instrumentListNode.firstChildElement( "instrument" );
|
||||
while ( ! instrumentNode.isNull() )
|
||||
{
|
||||
instrumentList_count++;
|
||||
QString sId = LocalFileMng::readXmlString( instrumentNode, "id", "" ); // instrument id
|
||||
QString sDrumkit = LocalFileMng::readXmlString( instrumentNode, "drumkit", "" ); // drumkit
|
||||
QString sName = LocalFileMng::readXmlString( instrumentNode, "name", "" ); // name
|
||||
float fVolume = LocalFileMng::readXmlFloat( instrumentNode, "volume", 1.0 ); // volume
|
||||
bool bIsMuted = LocalFileMng::readXmlBool( instrumentNode, "isMuted", false ); // is muted
|
||||
float fPan_L = LocalFileMng::readXmlFloat( instrumentNode, "pan_L", 0.5 ); // pan L
|
||||
float fPan_R = LocalFileMng::readXmlFloat( instrumentNode, "pan_R", 0.5 ); // pan R
|
||||
float fFX1Level = LocalFileMng::readXmlFloat( instrumentNode, "FX1Level", 0.0 ); // FX level
|
||||
float fFX2Level = LocalFileMng::readXmlFloat( instrumentNode, "FX2Level", 0.0 ); // FX level
|
||||
float fFX3Level = LocalFileMng::readXmlFloat( instrumentNode, "FX3Level", 0.0 ); // FX level
|
||||
float fFX4Level = LocalFileMng::readXmlFloat( instrumentNode, "FX4Level", 0.0 ); // FX level
|
||||
float fGain = LocalFileMng::readXmlFloat( instrumentNode, "gain", 1.0, false, false ); // instrument gain
|
||||
|
||||
|
||||
int fAttack = LocalFileMng::readXmlInt( instrumentNode, "Attack", 0, false, false ); // Attack
|
||||
int fDecay = LocalFileMng::readXmlInt( instrumentNode, "Decay", 0, false, false ); // Decay
|
||||
float fSustain = LocalFileMng::readXmlFloat( instrumentNode, "Sustain", 1.0, false, false ); // Sustain
|
||||
int fRelease = LocalFileMng::readXmlInt( instrumentNode, "Release", 1000, false, false ); // Release
|
||||
|
||||
float fRandomPitchFactor = LocalFileMng::readXmlFloat( instrumentNode, "randomPitchFactor", 0.0f, false, false );
|
||||
|
||||
bool bFilterActive = LocalFileMng::readXmlBool( instrumentNode, "filterActive", false );
|
||||
float fFilterCutoff = LocalFileMng::readXmlFloat( instrumentNode, "filterCutoff", 1.0f, false );
|
||||
float fFilterResonance = LocalFileMng::readXmlFloat( instrumentNode, "filterResonance", 0.0f, false );
|
||||
QString sMuteGroup = LocalFileMng::readXmlString( instrumentNode, "muteGroup", "-1", false );
|
||||
QString sMidiOutChannel = LocalFileMng::readXmlString( instrumentNode, "midiOutChannel", "-1", false, false );
|
||||
QString sMidiOutNote = LocalFileMng::readXmlString( instrumentNode, "midiOutNote", "60", false, false );
|
||||
int nMuteGroup = sMuteGroup.toInt();
|
||||
bool isStopNote = LocalFileMng::readXmlBool( instrumentNode, "isStopNote", false );
|
||||
int nMidiOutChannel = sMidiOutChannel.toInt();
|
||||
int nMidiOutNote = sMidiOutNote.toInt();
|
||||
|
||||
if ( sId.isEmpty() ) {
|
||||
printf( "Empty ID for instrument. skipping \n" );
|
||||
instrumentNode = (QDomNode) instrumentNode.nextSiblingElement( "instrument" );
|
||||
continue;
|
||||
}
|
||||
QDomNode filenameNode = instrumentNode.firstChildElement( "filename" );
|
||||
|
||||
if ( ! filenameNode.isNull() )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
unsigned nLayer = 0;
|
||||
QDomNode layerNode = instrumentNode.firstChildElement( "layer" );
|
||||
while ( ! layerNode.isNull() )
|
||||
{
|
||||
if ( nLayer >= MAX_LAYERS )
|
||||
{
|
||||
printf( "nLayer >= MAX_LAYERS" );
|
||||
continue;
|
||||
}
|
||||
QString sFilename = LocalFileMng::readXmlString( layerNode, "filename", "" );
|
||||
bool sIsModified = LocalFileMng::readXmlBool( layerNode, "ismodified", false );
|
||||
QString sMode = LocalFileMng::readXmlString( layerNode, "smode", "forward" );
|
||||
unsigned sStartframe = LocalFileMng::readXmlInt( layerNode, "startframe", 0 );
|
||||
unsigned sLoopFrame = LocalFileMng::readXmlInt( layerNode, "loopframe", 0 );
|
||||
int sLoops = LocalFileMng::readXmlInt( layerNode, "loops", 0 );
|
||||
unsigned sEndframe = LocalFileMng::readXmlInt( layerNode, "endframe", 0 );
|
||||
bool sUseRubber = LocalFileMng::readXmlInt( layerNode, "userubber", 0, false );
|
||||
float sRubberDivider = LocalFileMng::readXmlFloat( layerNode, "rubberdivider", 0.0 );
|
||||
int sRubberCsettings = LocalFileMng::readXmlInt( layerNode, "rubberCsettings", 1 );
|
||||
int sRubberPitch = LocalFileMng::readXmlFloat( layerNode, "rubberPitch", 0.0 );
|
||||
|
||||
float fMin = LocalFileMng::readXmlFloat( layerNode, "min", 0.0 );
|
||||
float fMax = LocalFileMng::readXmlFloat( layerNode, "max", 1.0 );
|
||||
float fGain = LocalFileMng::readXmlFloat( layerNode, "gain", 1.0 );
|
||||
float fPitch = LocalFileMng::readXmlFloat( layerNode, "pitch", 0.0, false, false );
|
||||
if ( nLayer == 0 )
|
||||
{
|
||||
drum_track[sId] = ( InstrumentTrack * ) track::create( track::InstrumentTrack,engine::getBBTrackContainer() );
|
||||
drum_track[sId]->volumeModel()->setValue( fVolume * 100 );
|
||||
drum_track[sId]->panningModel()->setValue( ( fPan_R - fPan_L ) * 100 );
|
||||
ins = drum_track[sId]->loadInstrument( "audiofileprocessor" );
|
||||
ins->loadFile( sFilename );
|
||||
}
|
||||
nLayer++;
|
||||
layerNode = ( QDomNode ) layerNode.nextSiblingElement( "layer" );
|
||||
}
|
||||
}
|
||||
|
||||
instrumentNode = (QDomNode) instrumentNode.nextSiblingElement( "instrument" );
|
||||
}
|
||||
if ( instrumentList_count == 0 )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
QDomNode patterns = songNode.firstChildElement( "patternList" );
|
||||
int pattern_count = 0;
|
||||
int nbb = engine::getBBTrackContainer()->numOfBBs();
|
||||
QDomNode patternNode = patterns.firstChildElement( "pattern" );
|
||||
int pn = 1;
|
||||
while ( !patternNode.isNull() )
|
||||
{
|
||||
if ( pn > 0 )
|
||||
{
|
||||
pattern_count++;
|
||||
s->addBBTrack();
|
||||
pn = 0;
|
||||
}
|
||||
QString sName; // name
|
||||
sName = LocalFileMng::readXmlString( patternNode, "name", sName );
|
||||
|
||||
QString sCategory = ""; // category
|
||||
sCategory = LocalFileMng::readXmlString( patternNode, "category", sCategory ,false ,false );
|
||||
int nSize = -1;
|
||||
nSize = LocalFileMng::readXmlInt( patternNode, "size", nSize, false, false );
|
||||
pattern_length[sName] = nSize;
|
||||
QDomNode pNoteListNode = patternNode.firstChildElement( "noteList" );
|
||||
if ( ! pNoteListNode.isNull() ) {
|
||||
QDomNode noteNode = pNoteListNode.firstChildElement( "note" );
|
||||
while ( ! noteNode.isNull() ) {
|
||||
unsigned nPosition = LocalFileMng::readXmlInt( noteNode, "position", 0 );
|
||||
float fLeadLag = LocalFileMng::readXmlFloat( noteNode, "leadlag", 0.0 , false , false );
|
||||
float fVelocity = LocalFileMng::readXmlFloat( noteNode, "velocity", 0.8f );
|
||||
float fPan_L = LocalFileMng::readXmlFloat( noteNode, "pan_L", 0.5 );
|
||||
float fPan_R = LocalFileMng::readXmlFloat( noteNode, "pan_R", 0.5 );
|
||||
int nLength = LocalFileMng::readXmlInt( noteNode, "length", -1, true );
|
||||
float nPitch = LocalFileMng::readXmlFloat( noteNode, "pitch", 0.0, false, false );
|
||||
QString sKey = LocalFileMng::readXmlString( noteNode, "key", "C0", false, false );
|
||||
QString nNoteOff = LocalFileMng::readXmlString( noteNode, "note_off", "false", false, false );
|
||||
|
||||
QString instrId = LocalFileMng::readXmlString( noteNode, "instrument", 0,false, false );
|
||||
int i = pattern_count - 1 + nbb;
|
||||
pattern_id[sName] = pattern_count - 1;
|
||||
pattern *p = dynamic_cast<pattern *>( drum_track[instrId]->getTCO( i ) );
|
||||
note n;
|
||||
n.setPos( nPosition );
|
||||
if ( (nPosition + 48) <= nSize )
|
||||
{
|
||||
n.setLength( 48 );
|
||||
}
|
||||
else
|
||||
{
|
||||
n.setLength( nSize - nPosition );
|
||||
}
|
||||
n.setVolume( fVelocity * 100 );
|
||||
n.setPanning( ( fPan_R - fPan_L ) * 100 );
|
||||
n.setKey( NoteKey::stringToNoteKey( sKey ) );
|
||||
p->addNote( n,false );
|
||||
pn = pn + 1;
|
||||
noteNode = ( QDomNode ) noteNode.nextSiblingElement( "note" );
|
||||
}
|
||||
}
|
||||
patternNode = ( QDomNode ) patternNode.nextSiblingElement( "pattern" );
|
||||
}
|
||||
// Pattern sequence
|
||||
QDomNode patternSequenceNode = songNode.firstChildElement( "patternSequence" );
|
||||
QDomNode groupNode = patternSequenceNode.firstChildElement( "group" );
|
||||
int pos = 0;
|
||||
while ( !groupNode.isNull() )
|
||||
{
|
||||
int best_length = 0;
|
||||
QDomNode patternId = groupNode.firstChildElement( "patternID" );
|
||||
while ( !patternId.isNull() )
|
||||
{
|
||||
QString patId = patternId.firstChild().nodeValue();
|
||||
patternId = ( QDomNode ) patternId.nextSiblingElement( "patternID" );
|
||||
|
||||
int i = pattern_id[patId]+song_num_tracks;
|
||||
track *t = ( bbTrack * ) s->tracks().at( i );
|
||||
trackContentObject *tco = t->createTCO( pos );
|
||||
tco->movePosition( pos );
|
||||
|
||||
|
||||
if ( pattern_length[patId] > best_length )
|
||||
{
|
||||
best_length = pattern_length[patId];
|
||||
}
|
||||
}
|
||||
pos = pos + best_length;
|
||||
groupNode = groupNode.nextSiblingElement( "group" );
|
||||
}
|
||||
|
||||
if ( pattern_count == 0 )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
bool HydrogenImport::tryImport( trackContainer * _tc )
|
||||
{
|
||||
if( openFile() == false )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return readSong();
|
||||
}
|
||||
|
||||
|
||||
|
||||
extern "C"
|
||||
{
|
||||
|
||||
// necessary for getting instance out of shared lib
|
||||
Plugin * PLUGIN_EXPORT lmms_plugin_main( Model *, void * _data )
|
||||
{
|
||||
return new HydrogenImport( QString::fromUtf8(
|
||||
static_cast<const char *>( _data ) ) );
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
27
plugins/HydrogenImport/HydrogenImport.h
Normal file
@@ -0,0 +1,27 @@
|
||||
#ifndef _HYDROGEN_IMPORT_H
|
||||
#define _HYDROGEN_IMPORT_H
|
||||
|
||||
#include <QtCore/QString>
|
||||
#include <QtCore/QPair>
|
||||
#include <QtCore/QVector>
|
||||
|
||||
#include "ImportFilter.h"
|
||||
|
||||
|
||||
class HydrogenImport : public ImportFilter
|
||||
{
|
||||
public:
|
||||
HydrogenImport( const QString & _file );
|
||||
bool readSong();
|
||||
|
||||
virtual ~HydrogenImport();
|
||||
|
||||
virtual PluginView * instantiateView( QWidget * )
|
||||
{
|
||||
return( NULL );
|
||||
}
|
||||
private:
|
||||
virtual bool tryImport( trackContainer * _tc );
|
||||
};
|
||||
#endif
|
||||
|
||||
29
plugins/HydrogenImport/LocalFileMng.h
Normal file
@@ -0,0 +1,29 @@
|
||||
#ifndef LFILEMNG_H
|
||||
#define LFILEMNG_H
|
||||
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <QDomDocument>
|
||||
|
||||
class LocalFileMng
|
||||
{
|
||||
public:
|
||||
LocalFileMng();
|
||||
~LocalFileMng();
|
||||
std::vector<QString> getallPatternList(){
|
||||
return m_allPatternList;
|
||||
}
|
||||
|
||||
static QString readXmlString( QDomNode , const QString& nodeName, const QString& defaultValue, bool bCanBeEmpty = false, bool bShouldExists = true , bool tinyXmlCompatMode = false);
|
||||
static float readXmlFloat( QDomNode , const QString& nodeName, float defaultValue, bool bCanBeEmpty = false, bool bShouldExists = true , bool tinyXmlCompatMode = false);
|
||||
static int readXmlInt( QDomNode , const QString& nodeName, int defaultValue, bool bCanBeEmpty = false, bool bShouldExists = true , bool tinyXmlCompatMode = false);
|
||||
static bool readXmlBool( QDomNode , const QString& nodeName, bool defaultValue, bool bShouldExists = true , bool tinyXmlCompatMode = false );
|
||||
static void convertFromTinyXMLString( QByteArray* str );
|
||||
static bool checkTinyXMLCompatMode( const QString& filename );
|
||||
static QDomDocument openXmlDocument( const QString& filename );
|
||||
std::vector<QString> m_allPatternList;
|
||||
};
|
||||
#endif //LFILEMNG_H
|
||||
|
||||
234
plugins/HydrogenImport/local_file_mgr.cpp
Normal file
@@ -0,0 +1,234 @@
|
||||
#include <cstdlib>
|
||||
#include <cassert>
|
||||
#include <sys/stat.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include <QDir>
|
||||
#include <QApplication>
|
||||
#include <QVector>
|
||||
#include <QDomDocument>
|
||||
#include <QLocale>
|
||||
#include <QTextCodec>
|
||||
|
||||
#include <algorithm>
|
||||
#include "LocalFileMng.h"
|
||||
|
||||
|
||||
/* New QtXml based methods */
|
||||
|
||||
QString LocalFileMng::readXmlString( QDomNode node , const QString& nodeName, const QString& defaultValue, bool bCanBeEmpty, bool bShouldExists, bool tinyXmlCompatMode)
|
||||
{
|
||||
QDomElement element = node.firstChildElement( nodeName );
|
||||
|
||||
if( !node.isNull() && !element.isNull() ){
|
||||
if( !element.text().isEmpty() ){
|
||||
return element.text();
|
||||
} else {
|
||||
if ( !bCanBeEmpty ) {
|
||||
//_WARNINGLOG( "Using default value in " + nodeName );
|
||||
}
|
||||
return defaultValue;
|
||||
}
|
||||
} else {
|
||||
if( bShouldExists ){
|
||||
//_WARNINGLOG( "'" + nodeName + "' node not found" );
|
||||
|
||||
}
|
||||
return defaultValue;
|
||||
}
|
||||
}
|
||||
|
||||
float LocalFileMng::readXmlFloat( QDomNode node , const QString& nodeName, float defaultValue, bool bCanBeEmpty, bool bShouldExists, bool tinyXmlCompatMode)
|
||||
{
|
||||
QLocale c_locale = QLocale::c();
|
||||
QDomElement element = node.firstChildElement( nodeName );
|
||||
|
||||
if( !node.isNull() && !element.isNull() ){
|
||||
if( !element.text().isEmpty() ){
|
||||
return c_locale.toFloat(element.text());
|
||||
} else {
|
||||
if ( !bCanBeEmpty ) {
|
||||
//_WARNINGLOG( "Using default value in " + nodeName );
|
||||
}
|
||||
return defaultValue;
|
||||
}
|
||||
} else {
|
||||
if( bShouldExists ){
|
||||
//_WARNINGLOG( "'" + nodeName + "' node not found" );
|
||||
}
|
||||
return defaultValue;
|
||||
}
|
||||
}
|
||||
|
||||
int LocalFileMng::readXmlInt( QDomNode node , const QString& nodeName, int defaultValue, bool bCanBeEmpty, bool bShouldExists, bool tinyXmlCompatMode)
|
||||
{
|
||||
QLocale c_locale = QLocale::c();
|
||||
QDomElement element = node.firstChildElement( nodeName );
|
||||
|
||||
if( !node.isNull() && !element.isNull() ){
|
||||
if( !element.text().isEmpty() ){
|
||||
return c_locale.toInt( element.text() );
|
||||
} else {
|
||||
if ( !bCanBeEmpty ) {
|
||||
//_WARNINGLOG( "Using default value in " + nodeName );
|
||||
}
|
||||
return defaultValue;
|
||||
}
|
||||
} else {
|
||||
if( bShouldExists ){
|
||||
//_WARNINGLOG( "'" + nodeName + "' node not found" );
|
||||
}
|
||||
return defaultValue;
|
||||
}
|
||||
}
|
||||
|
||||
bool LocalFileMng::readXmlBool( QDomNode node , const QString& nodeName, bool defaultValue, bool bShouldExists, bool tinyXmlCompatMode)
|
||||
{
|
||||
QDomElement element = node.firstChildElement( nodeName );
|
||||
|
||||
if( !node.isNull() && !element.isNull() ){
|
||||
if( !element.text().isEmpty() ){
|
||||
if( element.text() == "true"){
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
//_WARNINGLOG( "Using default value in " + nodeName );
|
||||
return defaultValue;
|
||||
}
|
||||
} else {
|
||||
if( bShouldExists ){
|
||||
//_WARNINGLOG( "'" + nodeName + "' node not found" );
|
||||
}
|
||||
return defaultValue;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Convert (in-place) an XML escape sequence into a literal byte,
|
||||
* rather than the character it actually refers to.
|
||||
*/
|
||||
void LocalFileMng::convertFromTinyXMLString( QByteArray* str )
|
||||
{
|
||||
/* When TinyXML encountered a non-ASCII character, it would
|
||||
* simply write the character as "&#xx;" -- where "xx" is
|
||||
* the hex character code. However, this doesn't respect
|
||||
* any encodings (e.g. UTF-8, UTF-16). In XML, &#xx; literally
|
||||
* means "the Unicode character # xx." However, in a UTF-8
|
||||
* sequence, this could be an escape character that tells
|
||||
* whether we have a 2, 3, or 4-byte UTF-8 sequence.
|
||||
*
|
||||
* For example, the UTF-8 sequence 0xD184 was being written
|
||||
* by TinyXML as "Ñ„". However, this is the UTF-8
|
||||
* sequence for the cyrillic small letter EF (which looks
|
||||
* kind of like a thorn or a greek phi). This letter, in
|
||||
* XML, should be saved as ф, or even literally
|
||||
* (no escaping). As a consequence, when Ñ is read
|
||||
* by an XML parser, it will be interpreted as capital N
|
||||
* with a tilde (~). Then „ will be interpreted as
|
||||
* an unknown or control character.
|
||||
*
|
||||
* So, when we know that TinyXML wrote the file, we can
|
||||
* simply exchange these hex sequences to literal bytes.
|
||||
*/
|
||||
int pos = 0;
|
||||
|
||||
pos = str->indexOf("&#x");
|
||||
while( pos != -1 ) {
|
||||
if( isxdigit(str->at(pos+3))
|
||||
&& isxdigit(str->at(pos+4))
|
||||
&& (str->at(pos+5) == ';') ) {
|
||||
char w1 = str->at(pos+3);
|
||||
char w2 = str->at(pos+4);
|
||||
|
||||
w1 = tolower(w1) - 0x30; // '0' = 0x30
|
||||
if( w1 > 9 ) w1 -= 0x27; // '9' = 0x39, 'a' = 0x61
|
||||
w1 = (w1 & 0xF);
|
||||
|
||||
w2 = tolower(w2) - 0x30; // '0' = 0x30
|
||||
if( w2 > 9 ) w2 -= 0x27; // '9' = 0x39, 'a' = 0x61
|
||||
w2 = (w2 & 0xF);
|
||||
|
||||
char ch = (w1 << 4) | w2;
|
||||
(*str)[pos] = ch;
|
||||
++pos;
|
||||
str->remove(pos, 5);
|
||||
}
|
||||
pos = str->indexOf("&#x");
|
||||
}
|
||||
}
|
||||
|
||||
bool LocalFileMng::checkTinyXMLCompatMode( const QString& filename )
|
||||
{
|
||||
/*
|
||||
Check if filename was created with TinyXml or QtXml
|
||||
TinyXML: return true
|
||||
QtXml: return false
|
||||
*/
|
||||
|
||||
QFile file( filename );
|
||||
|
||||
if ( !file.open(QIODevice::ReadOnly) )
|
||||
return false;
|
||||
|
||||
QString line = file.readLine();
|
||||
file.close();
|
||||
if ( line.startsWith( "<?xml" )){
|
||||
return false;
|
||||
} else {
|
||||
//_WARNINGLOG( QString("File '%1' is being read in "
|
||||
// "TinyXML compatability mode")
|
||||
// .arg(filename) );
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
QDomDocument LocalFileMng::openXmlDocument( const QString& filename )
|
||||
{
|
||||
bool TinyXMLCompat = LocalFileMng::checkTinyXMLCompatMode( filename );
|
||||
|
||||
QDomDocument doc;
|
||||
QFile file( filename );
|
||||
|
||||
if ( !file.open(QIODevice::ReadOnly) )
|
||||
return QDomDocument();
|
||||
|
||||
if( TinyXMLCompat ) {
|
||||
QString enc = QTextCodec::codecForLocale()->name();
|
||||
if( enc == QString("System") ) {
|
||||
enc = "UTF-8";
|
||||
}
|
||||
QByteArray line;
|
||||
QByteArray buf = QString("<?xml version='1.0' encoding='%1' ?>\n")
|
||||
.arg( enc )
|
||||
.toLocal8Bit();
|
||||
|
||||
//_INFOLOG( QString("Using '%1' encoding for TinyXML file").arg(enc) );
|
||||
|
||||
while( !file.atEnd() ) {
|
||||
line = file.readLine();
|
||||
LocalFileMng::convertFromTinyXMLString( &line );
|
||||
buf += line;
|
||||
}
|
||||
|
||||
if( ! doc.setContent( buf ) ) {
|
||||
file.close();
|
||||
return QDomDocument();
|
||||
}
|
||||
|
||||
} else {
|
||||
if( ! doc.setContent( &file ) ) {
|
||||
file.close();
|
||||
return QDomDocument();
|
||||
}
|
||||
}
|
||||
file.close();
|
||||
|
||||
return doc;
|
||||
}
|
||||
|
||||
@@ -115,6 +115,11 @@ void audioFileProcessor::playNote( notePlayHandle * _n,
|
||||
applyRelease( _working_buffer, _n );
|
||||
instrumentTrack()->processAudioBuffer( _working_buffer,
|
||||
frames,_n );
|
||||
emit isPlaying( _n->totalFramesPlayed() * _n->frequency() / m_sampleBuffer.frequency() );
|
||||
}
|
||||
else
|
||||
{
|
||||
emit isPlaying( 0 );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -260,22 +265,6 @@ void audioFileProcessor::loopPointChanged( void )
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class audioFileKnob : public knob
|
||||
{
|
||||
public:
|
||||
audioFileKnob( QWidget * _parent ) :
|
||||
knob( knobStyled, _parent )
|
||||
{
|
||||
setFixedSize( 37, 47 );
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
QPixmap * AudioFileProcessorView::s_artwork = NULL;
|
||||
|
||||
|
||||
@@ -347,7 +336,7 @@ AudioFileProcessorView::AudioFileProcessorView( Instrument * _instrument,
|
||||
"Otherwise it will be amplified up or down (your "
|
||||
"actual sample-file isn't touched!)" ) );
|
||||
|
||||
m_startKnob = new audioFileKnob( this );
|
||||
m_startKnob = new AudioFileProcessorWaveView::knob( this );
|
||||
m_startKnob->move( 68, 108 );
|
||||
m_startKnob->setHintText( tr( "Startpoint:" )+" ", "" );
|
||||
m_startKnob->setWhatsThis(
|
||||
@@ -357,7 +346,7 @@ AudioFileProcessorView::AudioFileProcessorView( Instrument * _instrument,
|
||||
"which AudioFileProcessor returns if a note is longer "
|
||||
"than the sample between the start and end-points." ) );
|
||||
|
||||
m_endKnob = new audioFileKnob( this );
|
||||
m_endKnob = new AudioFileProcessorWaveView::knob( this );
|
||||
m_endKnob->move( 119, 108 );
|
||||
m_endKnob->setHintText( tr( "Endpoint:" )+" ", "" );
|
||||
m_endKnob->setWhatsThis(
|
||||
@@ -367,6 +356,18 @@ AudioFileProcessorView::AudioFileProcessorView( Instrument * _instrument,
|
||||
"AudioFileProcessor returns if a note is longer than "
|
||||
"the sample between the start and end-points." ) );
|
||||
|
||||
m_waveView = new AudioFileProcessorWaveView( this, 245, 75, castModel<audioFileProcessor>()->m_sampleBuffer );
|
||||
m_waveView->move( 2, 172 );
|
||||
m_waveView->setKnobs(
|
||||
dynamic_cast<AudioFileProcessorWaveView::knob *>( m_startKnob ),
|
||||
dynamic_cast<AudioFileProcessorWaveView::knob *>( m_endKnob )
|
||||
);
|
||||
|
||||
connect( castModel<audioFileProcessor>(), SIGNAL( isPlaying( f_cnt_t ) ),
|
||||
m_waveView, SLOT( isPlaying( f_cnt_t ) ) );
|
||||
|
||||
qRegisterMetaType<f_cnt_t>( "f_cnt_t" );
|
||||
|
||||
setAcceptDrops( TRUE );
|
||||
}
|
||||
|
||||
@@ -464,26 +465,6 @@ void AudioFileProcessorView::paintEvent( QPaintEvent * )
|
||||
|
||||
p.setPen( QColor( 255, 255, 255 ) );
|
||||
p.drawText( 8, 99, file_name );
|
||||
|
||||
p.drawPixmap( 2, 172, m_graph );
|
||||
|
||||
|
||||
p.setPen( QColor( 0xFF, 0xAA, 0x00 ) );
|
||||
const QRect graph_rect( 4, 174, 241, 70 );
|
||||
const f_cnt_t frames = qMax( a->m_sampleBuffer.frames(),
|
||||
static_cast<f_cnt_t>( 1 ) );
|
||||
const int start_frame_x = a->m_sampleBuffer.startFrame() *
|
||||
graph_rect.width() / frames;
|
||||
const int end_frame_x = a->m_sampleBuffer.endFrame() *
|
||||
graph_rect.width() / frames;
|
||||
|
||||
p.drawLine( start_frame_x + graph_rect.x(), graph_rect.y(),
|
||||
start_frame_x + graph_rect.x(),
|
||||
graph_rect.height() + graph_rect.y() );
|
||||
p.drawLine( end_frame_x + graph_rect.x(), graph_rect.y(),
|
||||
end_frame_x + graph_rect.x(),
|
||||
graph_rect.height() + graph_rect.y() );
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -491,13 +472,7 @@ void AudioFileProcessorView::paintEvent( QPaintEvent * )
|
||||
|
||||
void AudioFileProcessorView::sampleUpdated( void )
|
||||
{
|
||||
m_graph = QPixmap( 245, 75 );
|
||||
m_graph.fill( Qt::transparent );
|
||||
QPainter p( &m_graph );
|
||||
p.setPen( QColor( 64, 255, 160 ) );
|
||||
castModel<audioFileProcessor>()->m_sampleBuffer.
|
||||
visualize( p, QRect( 2, 2, m_graph.width() - 4,
|
||||
m_graph.height() - 4 ) );
|
||||
m_waveView->update();
|
||||
update();
|
||||
}
|
||||
|
||||
@@ -535,6 +510,515 @@ void AudioFileProcessorView::modelChanged( void )
|
||||
|
||||
|
||||
|
||||
AudioFileProcessorWaveView::AudioFileProcessorWaveView( QWidget * _parent, int _w, int _h, sampleBuffer & _buf ) :
|
||||
QWidget( _parent ),
|
||||
m_sampleBuffer( _buf ),
|
||||
m_graph( QPixmap( _w - 2 * s_padding, _h - 2 * s_padding ) ),
|
||||
m_from( 0 ),
|
||||
m_to( m_sampleBuffer.frames() ),
|
||||
m_last_from( 0 ),
|
||||
m_last_to( 0 ),
|
||||
m_startKnob( 0 ),
|
||||
m_endKnob( 0 ),
|
||||
m_isDragging( false ),
|
||||
m_reversed( false ),
|
||||
m_framesPlayed( 0 ),
|
||||
m_animation(configManager::inst()->value("ui", "animateafp").toInt())
|
||||
{
|
||||
setFixedSize( _w, _h );
|
||||
setMouseTracking( true );
|
||||
|
||||
if( m_sampleBuffer.frames() > 1 )
|
||||
{
|
||||
const f_cnt_t marging = ( m_sampleBuffer.endFrame() - m_sampleBuffer.startFrame() ) * 0.1;
|
||||
m_from = qMax( 0, m_sampleBuffer.startFrame() - marging );
|
||||
m_to = qMin( m_sampleBuffer.endFrame() + marging, m_sampleBuffer.frames() );
|
||||
}
|
||||
|
||||
update();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void AudioFileProcessorWaveView::isPlaying( f_cnt_t _frames_played )
|
||||
{
|
||||
const f_cnt_t nb_frames = m_sampleBuffer.endFrame() - m_sampleBuffer.startFrame();
|
||||
if( nb_frames < 1 )
|
||||
{
|
||||
m_framesPlayed = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_framesPlayed = _frames_played % nb_frames;
|
||||
}
|
||||
update();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void AudioFileProcessorWaveView::enterEvent( QEvent * _e )
|
||||
{
|
||||
QApplication::setOverrideCursor( Qt::OpenHandCursor );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void AudioFileProcessorWaveView::leaveEvent( QEvent * _e )
|
||||
{
|
||||
while( QApplication::overrideCursor() )
|
||||
{
|
||||
QApplication::restoreOverrideCursor();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void AudioFileProcessorWaveView::mousePressEvent( QMouseEvent * _me )
|
||||
{
|
||||
m_isDragging = true;
|
||||
m_draggingLastPoint = _me->pos();
|
||||
|
||||
if( isCloseTo( _me->x(), m_startFrameX ) )
|
||||
{
|
||||
m_draggingType = sample_start;
|
||||
}
|
||||
else if( isCloseTo( _me->x(), m_endFrameX ) )
|
||||
{
|
||||
m_draggingType = sample_end;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_draggingType = wave;
|
||||
QApplication::setOverrideCursor( Qt::ClosedHandCursor );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void AudioFileProcessorWaveView::mouseReleaseEvent( QMouseEvent * _me )
|
||||
{
|
||||
m_isDragging = false;
|
||||
if( m_draggingType == wave )
|
||||
{
|
||||
QApplication::restoreOverrideCursor();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void AudioFileProcessorWaveView::mouseMoveEvent( QMouseEvent * _me )
|
||||
{
|
||||
if( ! m_isDragging )
|
||||
{
|
||||
const bool is_size_cursor =
|
||||
QApplication::overrideCursor()->shape() == Qt::SizeHorCursor;
|
||||
|
||||
if( isCloseTo( _me->x(), m_startFrameX ) ||
|
||||
isCloseTo( _me->x(), m_endFrameX ) )
|
||||
{
|
||||
if( ! is_size_cursor )
|
||||
{
|
||||
QApplication::setOverrideCursor( Qt::SizeHorCursor );
|
||||
}
|
||||
}
|
||||
else if( is_size_cursor )
|
||||
{
|
||||
QApplication::restoreOverrideCursor();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
const int step = _me->x() - m_draggingLastPoint.x();
|
||||
switch( m_draggingType )
|
||||
{
|
||||
case sample_start:
|
||||
slideSamplePointByPx( start, step );
|
||||
break;
|
||||
case sample_end:
|
||||
slideSamplePointByPx( end, step );
|
||||
break;
|
||||
default:
|
||||
if( qAbs( _me->y() - m_draggingLastPoint.y() )
|
||||
< 2 * qAbs( _me->x() - m_draggingLastPoint.x() ) )
|
||||
{
|
||||
slide( step );
|
||||
}
|
||||
else
|
||||
{
|
||||
zoom( _me->y() < m_draggingLastPoint.y() );
|
||||
}
|
||||
}
|
||||
|
||||
m_draggingLastPoint = _me->pos();
|
||||
update();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void AudioFileProcessorWaveView::wheelEvent( QWheelEvent * _we )
|
||||
{
|
||||
zoom( _we->delta() > 0 );
|
||||
update();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void AudioFileProcessorWaveView::paintEvent( QPaintEvent * _pe )
|
||||
{
|
||||
QPainter p( this );
|
||||
|
||||
p.drawPixmap( s_padding, s_padding, m_graph );
|
||||
|
||||
p.setPen( QColor( 0xFF, 0xFF, 0x00 ) );
|
||||
const QRect graph_rect( s_padding, s_padding, width() - 2 * s_padding, height() - 2 * s_padding );
|
||||
const f_cnt_t frames = m_to - m_from;
|
||||
m_startFrameX = graph_rect.x() + ( m_sampleBuffer.startFrame() - m_from ) *
|
||||
double( graph_rect.width() ) / frames;
|
||||
m_endFrameX = graph_rect.x() + ( m_sampleBuffer.endFrame() - m_from ) *
|
||||
double( graph_rect.width() ) / frames;
|
||||
|
||||
p.drawLine( m_startFrameX, graph_rect.y(),
|
||||
m_startFrameX,
|
||||
graph_rect.height() + graph_rect.y() );
|
||||
p.drawLine( m_endFrameX, graph_rect.y(),
|
||||
m_endFrameX,
|
||||
graph_rect.height() + graph_rect.y() );
|
||||
|
||||
if( m_endFrameX - m_startFrameX > 2 )
|
||||
{
|
||||
p.fillRect(
|
||||
m_startFrameX + 1,
|
||||
graph_rect.y(),
|
||||
m_endFrameX - m_startFrameX - 1,
|
||||
graph_rect.height() + graph_rect.y(),
|
||||
QColor( 255, 255, 0, 70 )
|
||||
);
|
||||
|
||||
if( m_framesPlayed && m_animation)
|
||||
{
|
||||
const int played_width_px = m_framesPlayed
|
||||
/ double( m_sampleBuffer.endFrame() - m_sampleBuffer.startFrame() )
|
||||
* ( m_endFrameX - m_startFrameX );
|
||||
QLinearGradient g( m_startFrameX + 1, 0, m_startFrameX + 1 + played_width_px, 0 );
|
||||
const QColor c( 0, 120, 255, 180 );
|
||||
g.setColorAt( 0, Qt::transparent );
|
||||
g.setColorAt( 0.8, c );
|
||||
g.setColorAt( 1, c );
|
||||
p.fillRect(
|
||||
m_startFrameX + 1,
|
||||
graph_rect.y(),
|
||||
played_width_px,
|
||||
graph_rect.height() + graph_rect.y(),
|
||||
g
|
||||
);
|
||||
p.setPen( QColor( 0, 255, 255 ) );
|
||||
p.drawLine(
|
||||
m_startFrameX + 1 + played_width_px,
|
||||
graph_rect.y(),
|
||||
m_startFrameX + 1 + played_width_px,
|
||||
graph_rect.height() + graph_rect.y()
|
||||
);
|
||||
m_framesPlayed = 0;
|
||||
}
|
||||
}
|
||||
|
||||
QLinearGradient g( 0, 0, width() * 0.7, 0 );
|
||||
const QColor c( 0, 0, 150, 180 );
|
||||
g.setColorAt( 0, c );
|
||||
g.setColorAt( 0.4, c );
|
||||
g.setColorAt( 1, Qt::transparent );
|
||||
p.fillRect( s_padding, s_padding, m_graph.width(), 14, g );
|
||||
|
||||
p.setPen( QColor( 255, 255, 20 ) );
|
||||
p.setFont( pointSize<8>( font() ) );
|
||||
|
||||
QString length_text;
|
||||
const int length = m_sampleBuffer.sampleLength();
|
||||
|
||||
if( length > 20000 )
|
||||
{
|
||||
length_text = QString::number( length / 1000 ) + "s";
|
||||
}
|
||||
else if( length > 2000 )
|
||||
{
|
||||
length_text = QString::number( ( length / 100 ) / 10.0 ) + "s";
|
||||
}
|
||||
else
|
||||
{
|
||||
length_text = QString::number( length ) + "ms";
|
||||
}
|
||||
|
||||
p.drawText(
|
||||
s_padding + 2,
|
||||
s_padding + 10,
|
||||
tr( "Sample length:" ) + " " + length_text
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void AudioFileProcessorWaveView::updateGraph()
|
||||
{
|
||||
if( m_to == 1 )
|
||||
{
|
||||
m_to = m_sampleBuffer.frames() * 0.7;
|
||||
slideSamplePointToFrames( end, m_to * 0.7 );
|
||||
}
|
||||
|
||||
if( m_from > m_sampleBuffer.startFrame() )
|
||||
{
|
||||
m_from = m_sampleBuffer.startFrame();
|
||||
}
|
||||
|
||||
if( m_to < m_sampleBuffer.endFrame() )
|
||||
{
|
||||
m_to = m_sampleBuffer.endFrame();
|
||||
}
|
||||
|
||||
if( m_sampleBuffer.reversed() != m_reversed )
|
||||
{
|
||||
reverse();
|
||||
}
|
||||
else if( m_last_from == m_from && m_last_to == m_to )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
m_last_from = m_from;
|
||||
m_last_to = m_to;
|
||||
|
||||
m_graph.fill( Qt::transparent );
|
||||
QPainter p( &m_graph );
|
||||
p.setPen( QColor( 64, 255, 160 ) );
|
||||
m_sampleBuffer.visualize(
|
||||
p,
|
||||
QRect( 0, 0, m_graph.width(), m_graph.height() ),
|
||||
m_from, m_to
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void AudioFileProcessorWaveView::zoom( const bool _out )
|
||||
{
|
||||
const f_cnt_t start = m_sampleBuffer.startFrame();
|
||||
const f_cnt_t end = m_sampleBuffer.endFrame();
|
||||
const f_cnt_t frames = m_sampleBuffer.frames();
|
||||
const f_cnt_t d_from = start - m_from;
|
||||
const f_cnt_t d_to = m_to - end;
|
||||
|
||||
const f_cnt_t step = qMax( 1, qMax( d_from, d_to ) / 10 );
|
||||
const f_cnt_t step_from = ( _out ? - step : step );
|
||||
const f_cnt_t step_to = ( _out ? step : - step );
|
||||
|
||||
const double comp_ratio = double( qMin( d_from, d_to ) )
|
||||
/ qMax( 1, qMax( d_from, d_to ) );
|
||||
|
||||
f_cnt_t new_from;
|
||||
f_cnt_t new_to;
|
||||
|
||||
if( ( _out && d_from < d_to ) || ( ! _out && d_to < d_from ) )
|
||||
{
|
||||
new_from = qBound( 0, m_from + step_from, start );
|
||||
new_to = qBound(
|
||||
end,
|
||||
m_to + f_cnt_t( step_to * ( new_from == m_from ? 1 : comp_ratio ) ),
|
||||
frames
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
new_to = qBound( end, m_to + step_to, frames );
|
||||
new_from = qBound(
|
||||
0,
|
||||
m_from + f_cnt_t( step_from * ( new_to == m_to ? 1 : comp_ratio ) ),
|
||||
start
|
||||
);
|
||||
}
|
||||
|
||||
if( double( new_to - new_from ) / m_sampleBuffer.sampleRate() > 0.05 )
|
||||
{
|
||||
m_from = new_from;
|
||||
m_to = new_to;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void AudioFileProcessorWaveView::slide( int _px )
|
||||
{
|
||||
const double fact = qAbs( double( _px ) / width() );
|
||||
f_cnt_t step = ( m_to - m_from ) * fact;
|
||||
if( _px > 0 )
|
||||
{
|
||||
step = -step;
|
||||
}
|
||||
|
||||
f_cnt_t step_from = qBound( 0, m_from + step, m_sampleBuffer.frames() ) - m_from;
|
||||
f_cnt_t step_to = qBound( m_from + 1, m_to + step, m_sampleBuffer.frames() ) - m_to;
|
||||
|
||||
step = qAbs( step_from ) < qAbs( step_to ) ? step_from : step_to;
|
||||
|
||||
m_from += step;
|
||||
m_to += step;
|
||||
slideSampleByFrames( step );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void AudioFileProcessorWaveView::setKnobs( knob * _start, knob * _end )
|
||||
{
|
||||
m_startKnob = _start;
|
||||
m_endKnob = _end;
|
||||
|
||||
m_startKnob->setWaveView( this );
|
||||
m_startKnob->setRelatedKnob( m_endKnob );
|
||||
|
||||
m_endKnob->setWaveView( this );
|
||||
m_endKnob->setRelatedKnob( m_startKnob );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void AudioFileProcessorWaveView::slideSamplePointByPx( knobType _point, int _px )
|
||||
{
|
||||
slideSamplePointByFrames(
|
||||
_point,
|
||||
f_cnt_t( ( double( _px ) / width() ) * ( m_to - m_from ) )
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void AudioFileProcessorWaveView::slideSamplePointByFrames( knobType _point, f_cnt_t _frames, bool _slide_to )
|
||||
{
|
||||
knob * knob = _point == start ? m_startKnob : m_endKnob;
|
||||
if( ! knob )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
const double v = double( _frames ) / m_sampleBuffer.frames();
|
||||
if( _slide_to )
|
||||
{
|
||||
knob->slideTo( v );
|
||||
}
|
||||
else
|
||||
{
|
||||
knob->slideBy( v );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void AudioFileProcessorWaveView::slideSampleByFrames( f_cnt_t _frames )
|
||||
{
|
||||
if( m_sampleBuffer.frames() <= 1 )
|
||||
{
|
||||
return;
|
||||
}
|
||||
const double v = double( _frames ) / m_sampleBuffer.frames();
|
||||
if(m_startKnob) {
|
||||
m_startKnob->slideBy( v, false );
|
||||
}
|
||||
if(m_endKnob) {
|
||||
m_endKnob->slideBy( v, false );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void AudioFileProcessorWaveView::reverse()
|
||||
{
|
||||
slideSampleByFrames(
|
||||
m_sampleBuffer.frames()
|
||||
- m_sampleBuffer.endFrame()
|
||||
- m_sampleBuffer.startFrame()
|
||||
);
|
||||
|
||||
const f_cnt_t from = m_from;
|
||||
m_from = m_sampleBuffer.frames() - m_to;
|
||||
m_to = m_sampleBuffer.frames() - from;
|
||||
|
||||
m_reversed = ! m_reversed;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void AudioFileProcessorWaveView::knob::slideTo( double _v, bool _check_bound )
|
||||
{
|
||||
if( _check_bound && ! checkBound( _v ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
model()->setValue( _v );
|
||||
emit sliderMoved( model()->value() );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
float AudioFileProcessorWaveView::knob::getValue( const QPoint & _p )
|
||||
{
|
||||
const double dec_fact = ! m_waveView ? 1 :
|
||||
double( m_waveView->m_to - m_waveView->m_from )
|
||||
/ m_waveView->m_sampleBuffer.frames();
|
||||
const float inc = ::knob::getValue( _p ) * dec_fact;
|
||||
const float next = model()->value() - inc;
|
||||
|
||||
if( ! checkBound( next ) )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return inc;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
bool AudioFileProcessorWaveView::knob::checkBound( double _v ) const
|
||||
{
|
||||
if( ! m_relatedKnob || ! m_waveView )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if( ( m_relatedKnob->model()->value() - _v > 0 ) !=
|
||||
( m_relatedKnob->model()->value() - model()->value() > 0 ) )
|
||||
return false;
|
||||
|
||||
const double d1 = qAbs( m_relatedKnob->model()->value() - model()->value() )
|
||||
* ( m_waveView->m_sampleBuffer.frames() )
|
||||
/ m_waveView->m_sampleBuffer.sampleRate();
|
||||
|
||||
const double d2 = qAbs( m_relatedKnob->model()->value() - _v )
|
||||
* ( m_waveView->m_sampleBuffer.frames() )
|
||||
/ m_waveView->m_sampleBuffer.sampleRate();
|
||||
|
||||
return d1 < d2 || d2 > 0.02;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
extern "C"
|
||||
{
|
||||
|
||||
@@ -76,6 +76,10 @@ private slots:
|
||||
void loopPointChanged();
|
||||
|
||||
|
||||
signals:
|
||||
void isPlaying( f_cnt_t _frames_played );
|
||||
|
||||
|
||||
private:
|
||||
typedef sampleBuffer::handleState handleState;
|
||||
|
||||
@@ -87,13 +91,15 @@ private:
|
||||
BoolModel m_reverseModel;
|
||||
BoolModel m_loopModel;
|
||||
|
||||
|
||||
friend class AudioFileProcessorView;
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
class AudioFileProcessorWaveView;
|
||||
|
||||
|
||||
class AudioFileProcessorView : public InstrumentView
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -118,7 +124,7 @@ private:
|
||||
|
||||
static QPixmap * s_artwork;
|
||||
|
||||
QPixmap m_graph;
|
||||
AudioFileProcessorWaveView * m_waveView;
|
||||
knob * m_ampKnob;
|
||||
knob * m_startKnob;
|
||||
knob * m_endKnob;
|
||||
@@ -130,5 +136,134 @@ private:
|
||||
|
||||
|
||||
|
||||
class AudioFileProcessorWaveView : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
protected:
|
||||
virtual void enterEvent( QEvent * _e );
|
||||
virtual void leaveEvent( QEvent * _e );
|
||||
virtual void mousePressEvent( QMouseEvent * _me );
|
||||
virtual void mouseReleaseEvent( QMouseEvent * _me );
|
||||
virtual void mouseMoveEvent( QMouseEvent * _me );
|
||||
virtual void wheelEvent( QWheelEvent * _we );
|
||||
virtual void paintEvent( QPaintEvent * _pe );
|
||||
|
||||
|
||||
public:
|
||||
enum knobType
|
||||
{
|
||||
start,
|
||||
end,
|
||||
} ;
|
||||
|
||||
class knob : public ::knob
|
||||
{
|
||||
const AudioFileProcessorWaveView * m_waveView;
|
||||
const knob * m_relatedKnob;
|
||||
|
||||
|
||||
public:
|
||||
knob( QWidget * _parent ) :
|
||||
::knob( knobStyled, _parent ),
|
||||
m_waveView( 0 ),
|
||||
m_relatedKnob( 0 )
|
||||
{
|
||||
setFixedSize( 37, 47 );
|
||||
}
|
||||
|
||||
void setWaveView( const AudioFileProcessorWaveView * _wv )
|
||||
{
|
||||
m_waveView = _wv;
|
||||
}
|
||||
|
||||
void setRelatedKnob( const knob * _knob )
|
||||
{
|
||||
m_relatedKnob = _knob;
|
||||
}
|
||||
|
||||
void slideBy( double _v, bool _check_bound = true )
|
||||
{
|
||||
slideTo( model()->value() + _v, _check_bound );
|
||||
}
|
||||
|
||||
void slideTo( double _v, bool _check_bound = true );
|
||||
|
||||
|
||||
protected:
|
||||
float getValue( const QPoint & _p );
|
||||
|
||||
|
||||
private:
|
||||
bool checkBound( double _v ) const;
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
public slots:
|
||||
void update()
|
||||
{
|
||||
updateGraph();
|
||||
QWidget::update();
|
||||
}
|
||||
|
||||
void isPlaying( f_cnt_t _frames_played );
|
||||
|
||||
|
||||
private:
|
||||
static const int s_padding = 2;
|
||||
|
||||
enum draggingType
|
||||
{
|
||||
wave,
|
||||
sample_start,
|
||||
sample_end,
|
||||
} ;
|
||||
|
||||
sampleBuffer & m_sampleBuffer;
|
||||
QPixmap m_graph;
|
||||
f_cnt_t m_from;
|
||||
f_cnt_t m_to;
|
||||
f_cnt_t m_last_from;
|
||||
f_cnt_t m_last_to;
|
||||
knob * m_startKnob;
|
||||
knob * m_endKnob;
|
||||
f_cnt_t m_startFrameX;
|
||||
f_cnt_t m_endFrameX;
|
||||
bool m_isDragging;
|
||||
QPoint m_draggingLastPoint;
|
||||
draggingType m_draggingType;
|
||||
bool m_reversed;
|
||||
f_cnt_t m_framesPlayed;
|
||||
bool m_animation;
|
||||
|
||||
public:
|
||||
AudioFileProcessorWaveView( QWidget * _parent, int _w, int _h, sampleBuffer & _buf );
|
||||
void setKnobs( knob * _start, knob * _end );
|
||||
|
||||
|
||||
private:
|
||||
void zoom( const bool _out = false );
|
||||
void slide( int _px );
|
||||
void slideSamplePointByPx( knobType _point, int _px );
|
||||
void slideSamplePointByFrames( knobType _point, f_cnt_t _frames, bool _slide_to = false );
|
||||
void slideSampleByFrames( f_cnt_t _frames );
|
||||
|
||||
void slideSamplePointToFrames( knobType _point, f_cnt_t _frames )
|
||||
{
|
||||
slideSamplePointByFrames( _point, _frames, true );
|
||||
}
|
||||
|
||||
void updateGraph();
|
||||
void reverse();
|
||||
|
||||
static bool isCloseTo( int _a, int _b )
|
||||
{
|
||||
return qAbs( _a - _b ) < 3;
|
||||
}
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -62,7 +62,7 @@ OutputPersonality * op = NULL;
|
||||
#include "error.c"
|
||||
#include "hash.c"
|
||||
#include "html.c"
|
||||
#include "malloc.c"
|
||||
#include "ur_malloc.c"
|
||||
#include "output.c"
|
||||
#include "parse.c"
|
||||
#include "util.c"
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
|
||||
#include "malloc.h"
|
||||
#include "ur_malloc.h"
|
||||
#include "defs.h"
|
||||
#include "error.h"
|
||||
#include "attr.h"
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
#include "defs.h"
|
||||
#include "parse.h"
|
||||
#include "util.h"
|
||||
#include "malloc.h"
|
||||
#include "ur_malloc.h"
|
||||
#include "main.h"
|
||||
#include "error.h"
|
||||
#include "word.h"
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
|
||||
#include "error.h"
|
||||
#include "main.h"
|
||||
#include "malloc.h"
|
||||
#include "ur_malloc.h"
|
||||
|
||||
|
||||
typedef struct _hi {
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
#include "malloc.h"
|
||||
#include "ur_malloc.h"
|
||||
#include "defs.h"
|
||||
#include "error.h"
|
||||
#include "main.h"
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
#include "malloc.h"
|
||||
#include "ur_malloc.h"
|
||||
#include "defs.h"
|
||||
#include "error.h"
|
||||
#include "output.h"
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
|
||||
#include "defs.h"
|
||||
#include "parse.h"
|
||||
#include "malloc.h"
|
||||
#include "ur_malloc.h"
|
||||
#include "main.h"
|
||||
#include "error.h"
|
||||
#include "word.h"
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
#endif
|
||||
|
||||
#include "error.h"
|
||||
#include "malloc.h"
|
||||
#include "ur_malloc.h"
|
||||
|
||||
static unsigned long count=0;
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
|
||||
#include "defs.h"
|
||||
#include "parse.h"
|
||||
#include "malloc.h"
|
||||
#include "ur_malloc.h"
|
||||
#include "main.h"
|
||||
#include "error.h"
|
||||
#include "word.h"
|
||||
|
||||
@@ -1,35 +1,31 @@
|
||||
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
ADD_DEFINITIONS(-DFFTW3)
|
||||
IF(LMMS_HAVE_FFTW3F)
|
||||
INCLUDE_DIRECTORIES(${FFTW3F_INCLUDE_DIRS})
|
||||
INCLUDE_DIRECTORIES(${FFTW3F_INCLUDE_DIRS} ${CMAKE_BINARY_DIR})
|
||||
LINK_DIRECTORIES(${FFTW3F_LIBRARY_DIRS})
|
||||
LINK_LIBRARIES(-lfftw3f)
|
||||
ENDIF(LMMS_HAVE_FFTW3F)
|
||||
INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR})
|
||||
|
||||
FILE(GLOB PLUGIN_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/*.c)
|
||||
FOREACH(_item ${PLUGIN_SOURCES})
|
||||
GET_FILENAME_COMPONENT(_plugin "${_item}" NAME_WE)
|
||||
IF(NOT "${_plugin}" STREQUAL "mbeq_1197" OR LMMS_HAVE_FFTW3F)
|
||||
ADD_LIBRARY(${_plugin} MODULE ${_item})
|
||||
INSTALL(TARGETS ${_plugin} LIBRARY DESTINATION ${PLUGIN_DIR}/ladspa)
|
||||
SET_TARGET_PROPERTIES(${_plugin} PROPERTIES PREFIX "")
|
||||
SET_TARGET_PROPERTIES(${_plugin} PROPERTIES COMPILE_FLAGS "-O3 -Wall -fomit-frame-pointer -fstrength-reduce -funroll-loops -ffast-math -c -fno-strict-aliasing")
|
||||
IF(LMMS_BUILD_WIN32)
|
||||
ADD_CUSTOM_COMMAND(TARGET ${_plugin} POST_BUILD COMMAND ${STRIP} ${CMAKE_CURRENT_BINARY_DIR}/${_plugin}.dll)
|
||||
ELSE(LMMS_BUILD_WIN32)
|
||||
SET_TARGET_PROPERTIES(${_plugin} PROPERTIES COMPILE_FLAGS "${COMPILE_FLAGS} -fPIC -DPIC")
|
||||
ENDIF(LMMS_BUILD_WIN32)
|
||||
IF(LMMS_BUILD_APPLE)
|
||||
SET_TARGET_PROPERTIES(${_plugin} PROPERTIES LINK_FLAGS "${LINK_FLAGS} -Bsymbolic -lm")
|
||||
ELSE(LMMS_BUILD_APPLE)
|
||||
SET_TARGET_PROPERTIES(${_plugin} PROPERTIES LINK_FLAGS "${LINK_FLAGS} -shared -Wl,-no-undefined -Wl,-Bsymbolic -lm")
|
||||
ENDIF(LMMS_BUILD_APPLE)
|
||||
IF(LMMS_BUILD_LINUX)
|
||||
SET_TARGET_PROPERTIES(${_plugin} PROPERTIES LINK_FLAGS "${LINK_FLAGS} -nostartfiles")
|
||||
ENDIF(LMMS_BUILD_LINUX)
|
||||
ENDIF(NOT "${_plugin}" STREQUAL "mbeq_1197" OR LMMS_HAVE_FFTW3F)
|
||||
|
||||
ADD_LIBRARY(${_plugin} MODULE ${_item})
|
||||
INSTALL(TARGETS ${_plugin} LIBRARY DESTINATION ${PLUGIN_DIR}/ladspa)
|
||||
SET_TARGET_PROPERTIES(${_plugin} PROPERTIES PREFIX "")
|
||||
SET_TARGET_PROPERTIES(${_plugin} PROPERTIES COMPILE_FLAGS "-O3 -Wall -fomit-frame-pointer -fstrength-reduce -funroll-loops -ffast-math -c -fno-strict-aliasing")
|
||||
IF(LMMS_BUILD_WIN32)
|
||||
ADD_CUSTOM_COMMAND(TARGET ${_plugin} POST_BUILD COMMAND ${STRIP} ${CMAKE_CURRENT_BINARY_DIR}/${_plugin}.dll)
|
||||
ELSE(LMMS_BUILD_WIN32)
|
||||
SET_TARGET_PROPERTIES(${_plugin} PROPERTIES COMPILE_FLAGS "${COMPILE_FLAGS} -fPIC -DPIC")
|
||||
ENDIF(LMMS_BUILD_WIN32)
|
||||
IF(LMMS_BUILD_APPLE)
|
||||
SET_TARGET_PROPERTIES(${_plugin} PROPERTIES LINK_FLAGS "${LINK_FLAGS} -Bsymbolic -lm")
|
||||
ELSE(LMMS_BUILD_APPLE)
|
||||
SET_TARGET_PROPERTIES(${_plugin} PROPERTIES LINK_FLAGS "${LINK_FLAGS} -shared -Wl,-no-undefined -Wl,-Bsymbolic -lm")
|
||||
ENDIF(LMMS_BUILD_APPLE)
|
||||
IF(LMMS_BUILD_LINUX)
|
||||
SET_TARGET_PROPERTIES(${_plugin} PROPERTIES LINK_FLAGS "${LINK_FLAGS} -nostartfiles")
|
||||
ENDIF(LMMS_BUILD_LINUX)
|
||||
ENDFOREACH(_item ${PLUGIN_SOURCES})
|
||||
|
||||
|
||||
|
||||
3
plugins/opl2/CMakeLists.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
INCLUDE(BuildPlugin)
|
||||
|
||||
BUILD_PLUGIN(OPL2 opl2instrument.cpp opl2instrument.h opl.h kemuopl.h adlibemu.c adlibemu.h fmopl.c fmopl.h temuopl.cpp temuopl.h MOCFILES opl2instrument.h EMBEDDED_RESOURCES ${CMAKE_CURRENT_SOURCE_DIR}/*.png)
|
||||
62
plugins/opl2/README
Normal file
@@ -0,0 +1,62 @@
|
||||
Snatched from AdPlug 2.2.1:
|
||||
adlibemu.c
|
||||
adlibemu.h
|
||||
fmopl.c
|
||||
fmopl.h
|
||||
kemuopl.h
|
||||
opl.h
|
||||
temuopl.cpp
|
||||
temuopl.h
|
||||
mididata.h
|
||||
|
||||
1.2.2 Sound generation section
|
||||
------------------------------
|
||||
|
||||
The Sound generation section is responsible for generating the OPL's
|
||||
sound, according to the input of the Playback section. This sound is
|
||||
either routed back to the application for it to do something with it or
|
||||
routed directly to a specific audio hardware.
|
||||
|
||||
The following headers provide the interface to the sound generation
|
||||
section: `emuopl.h', `temuopl.h', `kemuopl.h', `realopl.h',
|
||||
`silentopl.h', `analopl.h' and `diskopl.h'. All classes inside these
|
||||
headers are derived from the abstract base class `Copl', declared
|
||||
inside the file `opl.h', which provides the common interface for the
|
||||
Backend layer of the Playback section. This interface is not meant for
|
||||
the Frontend layer (i.e. your application). Your application, however,
|
||||
has to call special methods of these classes in order to route the data
|
||||
back, if there is any.
|
||||
|
||||
`emuopl.h' provides the class `CEmuopl', which implements a virtual
|
||||
OPL emulator, which automatically selects the best available OPL chip
|
||||
emulation and type for each replayer.
|
||||
|
||||
`temuopl.h' provides the class `CTEmuopl', which is a wrapper class
|
||||
around Tatsuyuki Satoh's fmopl OPL2 emulator, which generates wave
|
||||
audio data to be routed back to the application.
|
||||
|
||||
`kemuopl.h' provides the class `CKemuopl', which is a wrapper class
|
||||
around Ken Silverman's adlibemu OPL2 emulator, which generates wave
|
||||
audio data to be routed back to the application.
|
||||
|
||||
`realopl.h' provides the class `CRealopl', which outputs to a real
|
||||
hardware OPL2 or OPL3 chip. No data is routed back to the application.
|
||||
This class is currently only working on x86 hardware.
|
||||
|
||||
`silentopl.h' provides the class `CSilentopl', which is a dummy
|
||||
OPL2/3, which generates nothing. All data sent to it is forgotten
|
||||
immediately. No data is routed back to the application.
|
||||
|
||||
`analopl.h' provides the class `CAnalopl', which is the same as `CRealopl',
|
||||
but also provides a 9-channel loudness pseudo-analyzer interface for
|
||||
the application. The loudness data is the only data routed back to the
|
||||
application.
|
||||
|
||||
`diskopl.h' provides the class `CDiskopl', which is an OPL3 emulator
|
||||
that does not output any sound to the soundcard, but instead writes all
|
||||
received OPL commands to a file in the RdosPlay RAW format.
|
||||
|
||||
|
||||
Patches can be found at:
|
||||
http://cd.textfiles.com/soundsensations/SYNTH/
|
||||
(list at http://cd.textfiles.com/soundsensations/NEWMENU/SYNTH.BBS )
|
||||
600
plugins/opl2/adlibemu.c
Normal file
@@ -0,0 +1,600 @@
|
||||
/*
|
||||
* ADLIBEMU.C
|
||||
* Copyright (C) 1998-2001 Ken Silverman
|
||||
* Ken Silverman's official web site: "http://www.advsys.net/ken"
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
/*
|
||||
This file is a digital Adlib emulator for OPL2 and possibly OPL3
|
||||
|
||||
Features that could be added in a future version:
|
||||
- Amplitude and Frequency Vibrato Bits (not hard, but a big speed hit)
|
||||
- Global Keyboard Split Number Bit (need to research this one some more)
|
||||
- 2nd Adlib chip for OPL3 (simply need to make my cell array bigger)
|
||||
- Advanced connection modes of OPL3 (Just need to add more "docell" cases)
|
||||
- L/R Stereo bits of OPL3 (Need adlibgetsample to return stereo)
|
||||
|
||||
Features that aren't worth supporting:
|
||||
- Anything related to adlib timers&interrupts (Sorry - I always used IRQ0)
|
||||
- Composite sine wave mode (CSM) (Supported only on ancient cards)
|
||||
|
||||
I'm not sure about a few things in my code:
|
||||
- Attack curve. What function is this anyway? I chose to use an order-3
|
||||
polynomial to approximate but this doesn't seem right.
|
||||
- Attack/Decay/Release constants - my constants may not be exact
|
||||
- What should ADJUSTSPEED be?
|
||||
- Haven't verified that Global Keyboard Split Number Bit works yet
|
||||
- Some of the drums don't always sound right. It's pretty hard to guess
|
||||
the exact waveform of drums when you look at random data which is
|
||||
slightly randomized due to digital ADC recording.
|
||||
- Adlib seems to have a lot more treble than my emulator does. I'm not
|
||||
sure if this is simply unfixable due to the sound blaster's different
|
||||
filtering on FM and digital playback or if it's a serious bug in my
|
||||
code.
|
||||
*/
|
||||
|
||||
#include <math.h>
|
||||
#include <string.h>
|
||||
|
||||
#if !defined(max) && !defined(__cplusplus)
|
||||
#define max(a,b) (((a) > (b)) ? (a) : (b))
|
||||
#endif
|
||||
#if !defined(min) && !defined(__cplusplus)
|
||||
#define min(a,b) (((a) < (b)) ? (a) : (b))
|
||||
#endif
|
||||
|
||||
#define PI 3.141592653589793
|
||||
#define MAXCELLS 18
|
||||
#define WAVPREC 2048
|
||||
|
||||
static float AMPSCALE=(8192.0);
|
||||
#define FRQSCALE (49716/512.0)
|
||||
|
||||
//Constants for Ken's Awe32, on a PII-266 (Ken says: Use these for KSM's!)
|
||||
#define MODFACTOR 4.0 //How much of modulator cell goes into carrier
|
||||
#define MFBFACTOR 1.0 //How much feedback goes back into modulator
|
||||
#define ADJUSTSPEED 0.75 //0<=x<=1 Simulate finite rate of change of state
|
||||
|
||||
//Constants for Ken's Awe64G, on a P-133
|
||||
//#define MODFACTOR 4.25 //How much of modulator cell goes into carrier
|
||||
//#define MFBFACTOR 0.5 //How much feedback goes back into modulator
|
||||
//#define ADJUSTSPEED 0.85 //0<=x<=1 Simulate finite rate of change of state
|
||||
|
||||
typedef struct
|
||||
{
|
||||
float val, t, tinc, vol, sustain, amp, mfb;
|
||||
float a0, a1, a2, a3, decaymul, releasemul;
|
||||
short *waveform;
|
||||
long wavemask;
|
||||
void (*cellfunc)(void *, float);
|
||||
unsigned char flags, dum0, dum1, dum2;
|
||||
} celltype;
|
||||
|
||||
static long numspeakers, bytespersample;
|
||||
static float recipsamp;
|
||||
static celltype cell[MAXCELLS];
|
||||
static signed short wavtable[WAVPREC*3];
|
||||
static float kslmul[4] = {0.0,0.5,0.25,1.0};
|
||||
static float frqmul[16] = {.5,1,2,3,4,5,6,7,8,9,10,10,12,12,15,15}, nfrqmul[16];
|
||||
static unsigned char adlibreg[256], ksl[8][16];
|
||||
static unsigned char modulatorbase[9] = {0,1,2,8,9,10,16,17,18};
|
||||
static unsigned char odrumstat = 0;
|
||||
static unsigned char base2cell[22] = {0,1,2,0,1,2,0,0,3,4,5,3,4,5,0,0,6,7,8,6,7,8};
|
||||
|
||||
float lvol[9] = {1,1,1,1,1,1,1,1,1}; //Volume multiplier on left speaker
|
||||
float rvol[9] = {1,1,1,1,1,1,1,1,1}; //Volume multiplier on right speaker
|
||||
long lplc[9] = {0,0,0,0,0,0,0,0,0}; //Samples to delay on left speaker
|
||||
long rplc[9] = {0,0,0,0,0,0,0,0,0}; //Samples to delay on right speaker
|
||||
|
||||
long nlvol[9], nrvol[9];
|
||||
long nlplc[9], nrplc[9];
|
||||
long rend = 0;
|
||||
#define FIFOSIZ 256
|
||||
static float *rptr[9], *nrptr[9];
|
||||
static float rbuf[9][FIFOSIZ*2];
|
||||
static float snd[FIFOSIZ*2];
|
||||
|
||||
#ifndef USING_ASM
|
||||
#define _inline
|
||||
#endif
|
||||
|
||||
#ifdef USING_ASM
|
||||
static _inline void ftol (float f, long *a)
|
||||
{
|
||||
_asm
|
||||
{
|
||||
mov eax, a
|
||||
fld f
|
||||
fistp dword ptr [eax]
|
||||
}
|
||||
}
|
||||
#else
|
||||
static void ftol(float f, long *a) {
|
||||
*a=f;
|
||||
}
|
||||
#endif
|
||||
|
||||
#define ctc ((celltype *)c) //A rare attempt to make code easier to read!
|
||||
void docell4 (void *c, float modulator) { }
|
||||
void docell3 (void *c, float modulator)
|
||||
{
|
||||
long i;
|
||||
|
||||
ftol(ctc->t+modulator,&i);
|
||||
ctc->t += ctc->tinc;
|
||||
ctc->val += (ctc->amp*ctc->vol*((float)ctc->waveform[i&ctc->wavemask])-ctc->val)*ADJUSTSPEED;
|
||||
}
|
||||
void docell2 (void *c, float modulator)
|
||||
{
|
||||
long i;
|
||||
|
||||
ftol(ctc->t+modulator,&i);
|
||||
|
||||
if (*(long *)&ctc->amp <= 0x37800000)
|
||||
{
|
||||
ctc->amp = 0;
|
||||
ctc->cellfunc = docell4;
|
||||
}
|
||||
ctc->amp *= ctc->releasemul;
|
||||
|
||||
ctc->t += ctc->tinc;
|
||||
ctc->val += (ctc->amp*ctc->vol*((float)ctc->waveform[i&ctc->wavemask])-ctc->val)*ADJUSTSPEED;
|
||||
}
|
||||
void docell1 (void *c, float modulator)
|
||||
{
|
||||
long i;
|
||||
|
||||
ftol(ctc->t+modulator,&i);
|
||||
|
||||
if ((*(long *)&ctc->amp) <= (*(long *)&ctc->sustain))
|
||||
{
|
||||
if (ctc->flags&32)
|
||||
{
|
||||
ctc->amp = ctc->sustain;
|
||||
ctc->cellfunc = docell3;
|
||||
}
|
||||
else
|
||||
ctc->cellfunc = docell2;
|
||||
}
|
||||
else
|
||||
ctc->amp *= ctc->decaymul;
|
||||
|
||||
ctc->t += ctc->tinc;
|
||||
ctc->val += (ctc->amp*ctc->vol*((float)ctc->waveform[i&ctc->wavemask])-ctc->val)*ADJUSTSPEED;
|
||||
}
|
||||
void docell0 (void *c, float modulator)
|
||||
{
|
||||
long i;
|
||||
|
||||
ftol(ctc->t+modulator,&i);
|
||||
|
||||
ctc->amp = ((ctc->a3*ctc->amp + ctc->a2)*ctc->amp + ctc->a1)*ctc->amp + ctc->a0;
|
||||
if ((*(long *)&ctc->amp) > 0x3f800000)
|
||||
{
|
||||
ctc->amp = 1;
|
||||
ctc->cellfunc = docell1;
|
||||
}
|
||||
|
||||
ctc->t += ctc->tinc;
|
||||
ctc->val += (ctc->amp*ctc->vol*((float)ctc->waveform[i&ctc->wavemask])-ctc->val)*ADJUSTSPEED;
|
||||
}
|
||||
|
||||
|
||||
static long waveform[8] = {WAVPREC,WAVPREC>>1,WAVPREC,(WAVPREC*3)>>2,0,0,(WAVPREC*5)>>2,WAVPREC<<1};
|
||||
static long wavemask[8] = {WAVPREC-1,WAVPREC-1,(WAVPREC>>1)-1,(WAVPREC>>1)-1,WAVPREC-1,((WAVPREC*3)>>2)-1,WAVPREC>>1,WAVPREC-1};
|
||||
static long wavestart[8] = {0,WAVPREC>>1,0,WAVPREC>>2,0,0,0,WAVPREC>>3};
|
||||
static float attackconst[4] = {1/2.82624,1/2.25280,1/1.88416,1/1.59744};
|
||||
static float decrelconst[4] = {1/39.28064,1/31.41608,1/26.17344,1/22.44608};
|
||||
void cellon (long i, long j, celltype *c, unsigned char iscarrier)
|
||||
{
|
||||
long frn, oct, toff;
|
||||
float f;
|
||||
|
||||
frn = ((((long)adlibreg[i+0xb0])&3)<<8) + (long)adlibreg[i+0xa0];
|
||||
oct = ((((long)adlibreg[i+0xb0])>>2)&7);
|
||||
toff = (oct<<1) + ((frn>>9)&((frn>>8)|(((adlibreg[8]>>6)&1)^1)));
|
||||
if (!(adlibreg[j+0x20]&16)) toff >>= 2;
|
||||
|
||||
f = pow(2.0,(adlibreg[j+0x60]>>4)+(toff>>2)-1)*attackconst[toff&3]*recipsamp;
|
||||
c->a0 = .0377*f; c->a1 = 10.73*f+1; c->a2 = -17.57*f; c->a3 = 7.42*f;
|
||||
f = -7.4493*decrelconst[toff&3]*recipsamp;
|
||||
c->decaymul = pow(2.0,f*pow(2.0,(adlibreg[j+0x60]&15)+(toff>>2)));
|
||||
c->releasemul = pow(2.0,f*pow(2.0,(adlibreg[j+0x80]&15)+(toff>>2)));
|
||||
c->wavemask = wavemask[adlibreg[j+0xe0]&7];
|
||||
c->waveform = &wavtable[waveform[adlibreg[j+0xe0]&7]];
|
||||
if (!(adlibreg[1]&0x20)) c->waveform = &wavtable[WAVPREC];
|
||||
c->t = wavestart[adlibreg[j+0xe0]&7];
|
||||
c->flags = adlibreg[j+0x20];
|
||||
c->cellfunc = docell0;
|
||||
c->tinc = (float)(frn<<oct)*nfrqmul[adlibreg[j+0x20]&15];
|
||||
c->vol = pow(2.0,((float)(adlibreg[j+0x40]&63) +
|
||||
(float)kslmul[adlibreg[j+0x40]>>6]*ksl[oct][frn>>6]) * -.125 - 14);
|
||||
c->sustain = pow(2.0,(float)(adlibreg[j+0x80]>>4) * -.5);
|
||||
if (!iscarrier) c->amp = 0;
|
||||
c->mfb = pow(2.0,((adlibreg[i+0xc0]>>1)&7)+5)*(WAVPREC/2048.0)*MFBFACTOR;
|
||||
if (!(adlibreg[i+0xc0]&14)) c->mfb = 0;
|
||||
c->val = 0;
|
||||
}
|
||||
|
||||
//This function (and bug fix) written by Chris Moeller
|
||||
void cellfreq (signed long i, signed long j, celltype *c)
|
||||
{
|
||||
long frn, oct;
|
||||
|
||||
frn = ((((long)adlibreg[i+0xb0])&3)<<8) + (long)adlibreg[i+0xa0];
|
||||
oct = ((((long)adlibreg[i+0xb0])>>2)&7);
|
||||
|
||||
c->tinc = (float)(frn<<oct)*nfrqmul[adlibreg[j+0x20]&15];
|
||||
c->vol = pow(2.0,((float)(adlibreg[j+0x40]&63) +
|
||||
(float)kslmul[adlibreg[j+0x40]>>6]*ksl[oct][frn>>6]) * -.125 - 14);
|
||||
}
|
||||
|
||||
static long initfirstime = 0;
|
||||
void adlibinit (long dasamplerate, long danumspeakers, long dabytespersample)
|
||||
{
|
||||
long i, j, frn, oct;
|
||||
|
||||
memset((void *)adlibreg,0,sizeof(adlibreg));
|
||||
memset((void *)cell,0,sizeof(celltype)*MAXCELLS);
|
||||
memset((void *)rbuf,0,sizeof(rbuf));
|
||||
rend = 0; odrumstat = 0;
|
||||
|
||||
for(i=0;i<MAXCELLS;i++)
|
||||
{
|
||||
cell[i].cellfunc = docell4;
|
||||
cell[i].amp = 0;
|
||||
cell[i].vol = 0;
|
||||
cell[i].t = 0;
|
||||
cell[i].tinc = 0;
|
||||
cell[i].wavemask = 0;
|
||||
cell[i].waveform = &wavtable[WAVPREC];
|
||||
}
|
||||
|
||||
numspeakers = danumspeakers;
|
||||
bytespersample = dabytespersample;
|
||||
|
||||
recipsamp = 1.0 / (float)dasamplerate;
|
||||
for(i=15;i>=0;i--) nfrqmul[i] = frqmul[i]*recipsamp*FRQSCALE*(WAVPREC/2048.0);
|
||||
|
||||
if (!initfirstime)
|
||||
{
|
||||
initfirstime = 1;
|
||||
|
||||
for(i=0;i<(WAVPREC>>1);i++)
|
||||
{
|
||||
wavtable[i] =
|
||||
wavtable[(i<<1) +WAVPREC] = (signed short)(16384*sin((float)((i<<1) )*PI*2/WAVPREC));
|
||||
wavtable[(i<<1)+1+WAVPREC] = (signed short)(16384*sin((float)((i<<1)+1)*PI*2/WAVPREC));
|
||||
}
|
||||
for(i=0;i<(WAVPREC>>3);i++)
|
||||
{
|
||||
wavtable[i+(WAVPREC<<1)] = wavtable[i+(WAVPREC>>3)]-16384;
|
||||
wavtable[i+((WAVPREC*17)>>3)] = wavtable[i+(WAVPREC>>2)]+16384;
|
||||
}
|
||||
|
||||
//[table in book]*8/3
|
||||
ksl[7][0] = 0; ksl[7][1] = 24; ksl[7][2] = 32; ksl[7][3] = 37;
|
||||
ksl[7][4] = 40; ksl[7][5] = 43; ksl[7][6] = 45; ksl[7][7] = 47;
|
||||
ksl[7][8] = 48; for(i=9;i<16;i++) ksl[7][i] = i+41;
|
||||
for(j=6;j>=0;j--)
|
||||
for(i=0;i<16;i++)
|
||||
{
|
||||
oct = (long)ksl[j+1][i]-8; if (oct < 0) oct = 0;
|
||||
ksl[j][i] = (unsigned char)oct;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for(i=0;i<9;i++)
|
||||
{
|
||||
frn = ((((long)adlibreg[i+0xb0])&3)<<8) + (long)adlibreg[i+0xa0];
|
||||
oct = ((((long)adlibreg[i+0xb0])>>2)&7);
|
||||
cell[i].tinc = (float)(frn<<oct)*nfrqmul[adlibreg[modulatorbase[i]+0x20]&15];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void adlib0 (long i, long v)
|
||||
{
|
||||
unsigned char tmp = adlibreg[i];
|
||||
adlibreg[i] = v;
|
||||
|
||||
if (i == 0xbd)
|
||||
{
|
||||
if ((v&16) > (odrumstat&16)) //BassDrum
|
||||
{
|
||||
cellon(6,16,&cell[6],0);
|
||||
cellon(6,19,&cell[15],1);
|
||||
cell[15].vol *= 2;
|
||||
}
|
||||
if ((v&8) > (odrumstat&8)) //Snare
|
||||
{
|
||||
cellon(16,20,&cell[16],0);
|
||||
cell[16].tinc *= 2*(nfrqmul[adlibreg[17+0x20]&15] / nfrqmul[adlibreg[20+0x20]&15]);
|
||||
if (((adlibreg[20+0xe0]&7) >= 3) && ((adlibreg[20+0xe0]&7) <= 5)) cell[16].vol = 0;
|
||||
cell[16].vol *= 2;
|
||||
}
|
||||
if ((v&4) > (odrumstat&4)) //TomTom
|
||||
{
|
||||
cellon(8,18,&cell[8],0);
|
||||
cell[8].vol *= 2;
|
||||
}
|
||||
if ((v&2) > (odrumstat&2)) //Cymbal
|
||||
{
|
||||
cellon(17,21,&cell[17],0);
|
||||
|
||||
cell[17].wavemask = wavemask[5];
|
||||
cell[17].waveform = &wavtable[waveform[5]];
|
||||
cell[17].tinc *= 16; cell[17].vol *= 2;
|
||||
|
||||
//cell[17].waveform = &wavtable[WAVPREC]; cell[17].wavemask = 0;
|
||||
//if (((adlibreg[21+0xe0]&7) == 0) || ((adlibreg[21+0xe0]&7) == 6))
|
||||
// cell[17].waveform = &wavtable[(WAVPREC*7)>>2];
|
||||
//if (((adlibreg[21+0xe0]&7) == 2) || ((adlibreg[21+0xe0]&7) == 3))
|
||||
// cell[17].waveform = &wavtable[(WAVPREC*5)>>2];
|
||||
}
|
||||
if ((v&1) > (odrumstat&1)) //Hihat
|
||||
{
|
||||
cellon(7,17,&cell[7],0);
|
||||
if (((adlibreg[17+0xe0]&7) == 1) || ((adlibreg[17+0xe0]&7) == 4) ||
|
||||
((adlibreg[17+0xe0]&7) == 5) || ((adlibreg[17+0xe0]&7) == 7)) cell[7].vol = 0;
|
||||
if ((adlibreg[17+0xe0]&7) == 6) { cell[7].wavemask = 0; cell[7].waveform = &wavtable[(WAVPREC*7)>>2]; }
|
||||
}
|
||||
|
||||
odrumstat = v;
|
||||
}
|
||||
else if (((unsigned)(i-0x40) < (unsigned)22) && ((i&7) < 6))
|
||||
{
|
||||
if ((i&7) < 3) // Modulator
|
||||
cellfreq(base2cell[i-0x40],i-0x40,&cell[base2cell[i-0x40]]);
|
||||
else // Carrier
|
||||
cellfreq(base2cell[i-0x40],i-0x40,&cell[base2cell[i-0x40]+9]);
|
||||
}
|
||||
else if ((unsigned)(i-0xa0) < (unsigned)9)
|
||||
{
|
||||
cellfreq(i-0xa0,modulatorbase[i-0xa0],&cell[i-0xa0]);
|
||||
cellfreq(i-0xa0,modulatorbase[i-0xa0]+3,&cell[i-0xa0+9]);
|
||||
}
|
||||
else if ((unsigned)(i-0xb0) < (unsigned)9)
|
||||
{
|
||||
if ((v&32) > (tmp&32))
|
||||
{
|
||||
cellon(i-0xb0,modulatorbase[i-0xb0],&cell[i-0xb0],0);
|
||||
cellon(i-0xb0,modulatorbase[i-0xb0]+3,&cell[i-0xb0+9],1);
|
||||
}
|
||||
else if ((v&32) < (tmp&32))
|
||||
cell[i-0xb0].cellfunc = cell[i-0xb0+9].cellfunc = docell2;
|
||||
cellfreq(i-0xb0,modulatorbase[i-0xb0],&cell[i-0xb0]);
|
||||
cellfreq(i-0xb0,modulatorbase[i-0xb0]+3,&cell[i-0xb0+9]);
|
||||
}
|
||||
|
||||
//outdata(i,v);
|
||||
}
|
||||
|
||||
#ifdef USING_ASM
|
||||
static long fpuasm;
|
||||
static float fakeadd = 8388608.0+128.0;
|
||||
static _inline void clipit8 (float f, long a)
|
||||
{
|
||||
_asm
|
||||
{
|
||||
mov edi, a
|
||||
fld dword ptr f
|
||||
fadd dword ptr fakeadd
|
||||
fstp dword ptr fpuasm
|
||||
mov eax, fpuasm
|
||||
test eax, 0x007fff00
|
||||
jz short skipit
|
||||
shr eax, 16
|
||||
xor eax, -1
|
||||
skipit: mov byte ptr [edi], al
|
||||
}
|
||||
}
|
||||
|
||||
static _inline void clipit16 (float f, long a)
|
||||
{
|
||||
_asm
|
||||
{
|
||||
mov eax, a
|
||||
fld dword ptr f
|
||||
fist word ptr [eax]
|
||||
cmp word ptr [eax], 0x8000
|
||||
jne short skipit2
|
||||
fst dword ptr [fpuasm]
|
||||
cmp fpuasm, 0x80000000
|
||||
sbb word ptr [eax], 0
|
||||
skipit2: fstp st
|
||||
}
|
||||
}
|
||||
#else
|
||||
static void clipit8(float f,unsigned char *a) {
|
||||
f/=256.0;
|
||||
f+=128.0;
|
||||
if (f>254.5) *a=255;
|
||||
else if (f<0.5) *a=0;
|
||||
else *a=f;
|
||||
}
|
||||
|
||||
static void clipit16(float f,short *a) {
|
||||
if (f>32766.5) *a=32767;
|
||||
else if (f<-32767.5) *a=-32768;
|
||||
else *a=f;
|
||||
}
|
||||
#endif
|
||||
|
||||
void adlibsetvolume(int i) {
|
||||
AMPSCALE=i;
|
||||
}
|
||||
|
||||
void adlibgetsample (unsigned char *sndptr, long numbytes)
|
||||
{
|
||||
long i, j, k=0, ns, endsamples, rptrs, numsamples;
|
||||
celltype *cptr;
|
||||
float f;
|
||||
short *sndptr2=(short *)sndptr;
|
||||
|
||||
numsamples = (numbytes>>(numspeakers+bytespersample-2));
|
||||
|
||||
if (bytespersample == 1) f = AMPSCALE/256.0; else f = AMPSCALE;
|
||||
if (numspeakers == 1)
|
||||
{
|
||||
nlvol[0] = lvol[0]*f;
|
||||
for(i=0;i<9;i++) rptr[i] = &rbuf[0][0];
|
||||
rptrs = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
rptrs = 0;
|
||||
for(i=0;i<9;i++)
|
||||
{
|
||||
if ((!i) || (lvol[i] != lvol[i-1]) || (rvol[i] != rvol[i-1]) ||
|
||||
(lplc[i] != lplc[i-1]) || (rplc[i] != rplc[i-1]))
|
||||
{
|
||||
nlvol[rptrs] = lvol[i]*f;
|
||||
nrvol[rptrs] = rvol[i]*f;
|
||||
nlplc[rptrs] = rend-min(max(lplc[i],0),FIFOSIZ);
|
||||
nrplc[rptrs] = rend-min(max(rplc[i],0),FIFOSIZ);
|
||||
rptrs++;
|
||||
}
|
||||
rptr[i] = &rbuf[rptrs-1][0];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//CPU time used to be somewhat less when emulator was only mono!
|
||||
// Because of no delay fifos!
|
||||
|
||||
for(ns=0;ns<numsamples;ns+=endsamples)
|
||||
{
|
||||
endsamples = min(FIFOSIZ*2-rend,FIFOSIZ);
|
||||
endsamples = min(endsamples,numsamples-ns);
|
||||
|
||||
for(i=0;i<9;i++)
|
||||
nrptr[i] = &rptr[i][rend];
|
||||
for(i=0;i<rptrs;i++)
|
||||
memset((void *)&rbuf[i][rend],0,endsamples*sizeof(float));
|
||||
|
||||
if (adlibreg[0xbd]&0x20)
|
||||
{
|
||||
//BassDrum (j=6)
|
||||
if (cell[15].cellfunc != docell4)
|
||||
{
|
||||
if (adlibreg[0xc6]&1)
|
||||
{
|
||||
for(i=0;i<endsamples;i++)
|
||||
{
|
||||
(cell[15].cellfunc)((void *)&cell[15],0.0);
|
||||
nrptr[6][i] += cell[15].val;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for(i=0;i<endsamples;i++)
|
||||
{
|
||||
(cell[6].cellfunc)((void *)&cell[6],cell[6].val*cell[6].mfb);
|
||||
(cell[15].cellfunc)((void *)&cell[15],cell[6].val*WAVPREC*MODFACTOR);
|
||||
nrptr[6][i] += cell[15].val;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Snare/Hihat (j=7), Cymbal/TomTom (j=8)
|
||||
if ((cell[7].cellfunc != docell4) || (cell[8].cellfunc != docell4) || (cell[16].cellfunc != docell4) || (cell[17].cellfunc != docell4))
|
||||
{
|
||||
for(i=0;i<endsamples;i++)
|
||||
{
|
||||
k = k*1664525+1013904223;
|
||||
(cell[16].cellfunc)((void *)&cell[16],k&((WAVPREC>>1)-1)); //Snare
|
||||
(cell[7].cellfunc)((void *)&cell[7],k&(WAVPREC-1)); //Hihat
|
||||
(cell[17].cellfunc)((void *)&cell[17],k&((WAVPREC>>3)-1)); //Cymbal
|
||||
(cell[8].cellfunc)((void *)&cell[8],0.0); //TomTom
|
||||
nrptr[7][i] += cell[7].val + cell[16].val;
|
||||
nrptr[8][i] += cell[8].val + cell[17].val;
|
||||
}
|
||||
}
|
||||
}
|
||||
for(j=9-1;j>=0;j--)
|
||||
{
|
||||
if ((adlibreg[0xbd]&0x20) && (j >= 6) && (j < 9)) continue;
|
||||
|
||||
cptr = &cell[j]; k = j;
|
||||
if (adlibreg[0xc0+k]&1)
|
||||
{
|
||||
if ((cptr[9].cellfunc == docell4) && (cptr->cellfunc == docell4)) continue;
|
||||
for(i=0;i<endsamples;i++)
|
||||
{
|
||||
(cptr->cellfunc)((void *)cptr,cptr->val*cptr->mfb);
|
||||
(cptr->cellfunc)((void *)&cptr[9],0);
|
||||
nrptr[j][i] += cptr[9].val + cptr->val;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (cptr[9].cellfunc == docell4) continue;
|
||||
for(i=0;i<endsamples;i++)
|
||||
{
|
||||
(cptr->cellfunc)((void *)cptr,cptr->val*cptr->mfb);
|
||||
(cptr[9].cellfunc)((void *)&cptr[9],cptr->val*WAVPREC*MODFACTOR);
|
||||
nrptr[j][i] += cptr[9].val;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (numspeakers == 1)
|
||||
{
|
||||
if (bytespersample == 1)
|
||||
{
|
||||
for(i=endsamples-1;i>=0;i--)
|
||||
clipit8(nrptr[0][i]*nlvol[0],sndptr+1);
|
||||
}
|
||||
else
|
||||
{
|
||||
for(i=endsamples-1;i>=0;i--)
|
||||
clipit16(nrptr[0][i]*nlvol[0],sndptr2+i);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
memset((void *)snd,0,endsamples*sizeof(float)*2);
|
||||
for(j=0;j<rptrs;j++)
|
||||
{
|
||||
for(i=0;i<endsamples;i++)
|
||||
{
|
||||
snd[(i<<1) ] += rbuf[j][(nlplc[j]+i)&(FIFOSIZ*2-1)]*nlvol[j];
|
||||
snd[(i<<1)+1] += rbuf[j][(nrplc[j]+i)&(FIFOSIZ*2-1)]*nrvol[j];
|
||||
}
|
||||
nlplc[j] += endsamples;
|
||||
nrplc[j] += endsamples;
|
||||
}
|
||||
|
||||
if (bytespersample == 1)
|
||||
{
|
||||
for(i=(endsamples<<1)-1;i>=0;i--)
|
||||
clipit8(snd[i],sndptr+i);
|
||||
}
|
||||
else
|
||||
{
|
||||
for(i=(endsamples<<1)-1;i>=0;i--)
|
||||
clipit16(snd[i],sndptr2+i);
|
||||
}
|
||||
}
|
||||
|
||||
sndptr = sndptr+(numspeakers*endsamples);
|
||||
sndptr2 = sndptr2+(numspeakers*endsamples);
|
||||
rend = ((rend+endsamples)&(FIFOSIZ*2-1));
|
||||
}
|
||||
}
|
||||