diff --git a/libm65/genjtms3.f90 b/libm65/genjtms3.f90 index 315d95662..b5c889cb9 100644 --- a/libm65/genjtms3.f90 +++ b/libm65/genjtms3.f90 @@ -129,14 +129,14 @@ subroutine genjtms3(msg28,iwave,nwave) fac=32767.0/wmax iwave(1:nsam)=fac*wave(1:nsam) - nwave=nsam +! nwave=nsam -! nblk=30*48000/nsam -! do n=2,nblk -! i0=(n-1)*nsam -! iwave(i0+1:i0+nsam)=iwave(1:nsam) -! enddo -! nwave=i0+nsam + nblk=30*48000/nsam + do n=2,nblk + i0=(n-1)*nsam + iwave(i0+1:i0+nsam)=iwave(1:nsam) + enddo + nwave=i0+nsam ! Compute the spectrum ! nfft=nsam diff --git a/libm65/makepings.f90 b/libm65/makepings.f90 new file mode 100644 index 000000000..eb96fa93e --- /dev/null +++ b/libm65/makepings.f90 @@ -0,0 +1,29 @@ +subroutine makepings(iwave,nwave) + + parameter (NFSAMPLE=48000) + integer*2 iwave(nwave) + real*8 t + + iping0=-999 + dt=1.0/NFSAMPLE + do i=1,nwave + iping=i/(3*NFSAMPLE) + if(iping.ne.iping0) then + ip=mod(iping,3) + w=0.015*(4-ip) + ig=(iping-1)/3 + amp=sqrt((3.0-ig)/3.0) + t0=dt*(iping+0.5)*(3*NFSAMPLE) + iping0=iping + endif + t=(i*dt-t0)/w + if(t.lt.0.d0 .and. t.lt.10.0) then + fac=0. + else + fac=2.718*t*dexp(-t) + endif + iwave(i)=nint(fac*amp*iwave(i)) + enddo + + return +end subroutine makepings diff --git a/mainwindow.cpp b/mainwindow.cpp index 0439019a9..aefb24c8e 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -1168,7 +1168,7 @@ void MainWindow::guiUpdate() ba2msg(ba,msgsent); int len1=28; genjtms3_(message,iwave,&nwave,len1); - +// makepings_(iwave,&nwave); if(m_restart) { QFile f("jtms3_tx.log"); f.open(QIODevice::WriteOnly | QIODevice::Text | QIODevice::Append); diff --git a/mainwindow.h b/mainwindow.h index a7c20248a..b4cf634e7 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -239,6 +239,8 @@ extern "C" { void genjtms3_(char* message, short iwave[], int* nwave, int len1); + void makepings_(short iwave[], int* nwave); + void gen65_(char* msg, int* mode65, double* samfac, int* nsendingsh, char* msgsent, short iwave[], int* nwave, int len1, int len2);