Fortraneries/SoundBrotching/panoramix.f90

36 lines
756 B
Fortran
Raw Normal View History

2022-02-08 09:17:22 +11:00
program panoramix
2022-04-01 07:14:11 +11:00
use soundbrotch
! ------------------------------------------------------
2022-02-08 09:17:22 +11:00
implicit none
2022-04-01 07:14:11 +11:00
integer :: left, right
integer :: errcode
integer :: nblus
real :: value, phi, ka
2022-02-08 09:17:22 +11:00
2022-04-01 07:14:11 +11:00
call soundbrotch_version()
nblus = 0
do
read (*, *, iostat=errcode) left, right
if (errcode .NE. 0) then
write(0, *) 'EOF ? ', errcode
exit
endif
! *** NON WORKING CODE ***
phi = real(nblus) / 20000.0
ka = sin(phi)
value = (real(left)+real(right)) / 2.05
left = int(value*ka)
right = int(value*(1.0-ka))
print *, left, right
nblus = nblus + 1
enddo
2022-02-08 09:17:22 +11:00
end program