Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import argparse | |
import numpy as np | |
import sound_driver as sd | |
import pyaudio | |
import wave | |
def generalized_coltrane_change(n,n0,t,nsamp=12): | |
sg={0:"C",1:"Db",2:"D",3:"Eb",4:"E",5:"F",6:"Gb",7:"G",8:"Ab",9:"A",10:"Bb",11:"B"} | |
print "GCC: for","n_k=",n,"and","t_k=",t |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import numpy as np | |
import pyaudio | |
import sys | |
import matplotlib | |
import matplotlib.pyplot as plt | |
import pylab | |
def harmony(freq, length, rate, tone): | |
samp=(2*np.pi)*freq/rate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module testf | |
contains | |
subroutine printint(i) | |
implicit none | |
integer, intent(in) :: i | |
write(*,*) i | |
end subroutine printint | |
end module testf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#simple julia wrapper of fortran 90 subroutine printint in testf module | |
function calltestf(ia) | |
ia = Int32[ia] | |
product = ccall((:__testf_MOD_printint, "testf.so"),Int32,(Ptr{Int32},),ia) | |
return product | |
end | |
calltestf(7) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function call_ioint(ia) | |
ia = Int32[ia] | |
ib = Int32[0] | |
product = ccall((:__testf_MOD_ioint, "testf.so"),Int32,(Ptr{Int32},Ptr{Int32}),ia,ib) | |
println(ia) | |
println(ib) | |
return product | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
subroutine ioint(i,j) | |
implicit none | |
integer, intent(in) :: i | |
integer, intent(out) :: j | |
j=i+3 | |
end subroutine ioint |
OlderNewer