Friday, May 23, 2008
another csound routines beta...
I have added
csd_countlines_in_each_instrument(from_file):
and two routines to get numbers usable by a graphics interface or graphing program
def float_to_int(float_number):
def Float_Precision(float_number, precision):
the last two are listed in module graphmath.py
I was looking up float to integer + example python on the internet and got an example that was down right scary so I will post the entire 4 lines I have done here
x = str(float_number)
x2 = x.split('.')
returnnumber = int(x2[0])
return return_number
This is required first
prev version
The rest of the new stuff is here
New csound stuff
this is untested and probily has major bugs.. I would like to hear about needed routines suggestions.. suggested use if for gui's and for publication graphics with a package such as mathplotlib. You will probily need wxpython in order to get this to work if there are problems check dex tracker for it's needed files.
The april version of python magazine may have some intresting stuff for grids and spreadsheets and it can be found here. (I am not sure about thier policy on back issues.)
python mag march 2008
csd_countlines_in_each_instrument(from_file):
and two routines to get numbers usable by a graphics interface or graphing program
def float_to_int(float_number):
def Float_Precision(float_number, precision):
the last two are listed in module graphmath.py
I was looking up float to integer + example python on the internet and got an example that was down right scary so I will post the entire 4 lines I have done here
x = str(float_number)
x2 = x.split('.')
returnnumber = int(x2[0])
return return_number
This is required first
prev version
The rest of the new stuff is here
New csound stuff
this is untested and probily has major bugs.. I would like to hear about needed routines suggestions.. suggested use if for gui's and for publication graphics with a package such as mathplotlib. You will probily need wxpython in order to get this to work if there are problems check dex tracker for it's needed files.
The april version of python magazine may have some intresting stuff for grids and spreadsheets and it can be found here. (I am not sure about thier policy on back issues.)
python mag march 2008
Labels: csound routines, python
Monday, July 16, 2007
A new version of csound routines is out includes an autoit script and some popen code to run awk programs. Also included is a script to control gvim It is a working version of loading an orc into a csd. https://sourceforge.net/project/showfiles.php?group_id=156455&package_id=202823 The code that is required to control gvim is listed below
from win32com.client.dynamic import Dispatch
def load_instrument_vim(csdfile, orcfile, tagname):
csdfile2 = re.sub(r"\\",r"/",csdfile) #replace \ with /
orcfile2 = re.sub(r"\\",r"/",orcfile) #re[lace \ with /
vim = Dispatch('Vim.Application')
os.path = 'c:\dex_tracker'
vim.SendKeys(':e '+ csdfile + '')
vim.SendKeys('/' + tagname + '')
vim.SendKeys('/;')
vim.SendKeys(':r ' + orcfile2 +'')
vim.SendKeys(':w')
It should reqire pywin. This is a much better example of the ole com control than is listed on the gvim website and it is very easy to write scripts for
from win32com.client.dynamic import Dispatch
def load_instrument_vim(csdfile, orcfile, tagname):
csdfile2 = re.sub(r"\\",r"/",csdfile) #replace \ with /
orcfile2 = re.sub(r"\\",r"/",orcfile) #re[lace \ with /
vim = Dispatch('Vim.Application')
os.path = 'c:\dex_tracker'
vim.SendKeys(':e '+ csdfile + '
vim.SendKeys('/' + tagname + '
vim.SendKeys('/;
vim.SendKeys(':r ' + orcfile2 +'
vim.SendKeys(':w
It should reqire pywin. This is a much better example of the ole com control than is listed on the gvim website and it is very easy to write scripts for
Labels: autoit, awk, csound, csound routines, gvim
Monday, November 20, 2006
Stable Score Editor for Csound!!!!!!!!!!!!!!!!!!!!!!!!!!!!
New csound routines available. Now includes stable score editor!!!!!! I started to write a utility to edit the header of a score file (it is in the comment line so you don't have to worry about what csound will do). https://sourceforge.net/project/showfiles.php?group_id=156455&package_id=202823 You would add it to your Dex Tracker Directory. If you want a copy of dex tracker you would click on downloads on the top
Labels: csound, csound routines, dex tracker, python