The Zizula Forum
August 16, 2017, 09:37:57 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Looking for best Canvas Printing and Picture Framing studio in Dubai, then visit: www.pickframes.com
 
   Home   Help Arcade Search Calendar Login Register  
Del.icio.us Digg FURL FaceBook Stumble Upon Reddit SlashDot Ask BlinkBits BlinkList Co.mments Delirious Google Bookmarks Linkagogo Ma.gnolia MSN Live Netscape Netvouz Newsvine RawSugar Rojo Smarking Socializer Sphinn Spurl Squidoo Tailrank Technorati Yahoo My Web

Pages: [1]   Go Down
  Print  
Author Topic: python csound vst generator. hard codes all the paremeters into the csound inst  (Read 1579 times)
edexter
Moderator
Full Member
*****

Karma: 22
Offline Offline

Posts: 177



View Profile WWW
« on: June 08, 2011, 09:01:23 PM »

import sys

#this is an attempt to auto-generate a csound vst instrument all as one instrument
#This is run after the initial dump and would not have to be run later.
#this is a first draft as all one command line.  You may have to play with the path
#the files are in to get it to work it is beta.  Requires the name of all the
#vst paremters to be in a file on one line.

#infile = open('dump.txt','r')
infile = open(sys.argv[1][:-3] + 'spr','r')
orcoutfile = open(sys.argv[1][:-3] + 'orc','w')

orcoutfile.write("instr 1\n")
orcoutfile.write('vstinit ')
orcoutfile.write(sys.argv[1])
orcoutfile.write("\n")
orcoutfile.write("imidichannel init 0\n")
orcoutfile.write("vstnote gigpianoteq, imidichannel, p4, p5, p3\n")
#outfile
#print line
p = 0
for line in infile:
    #print line
    n = line.split()
    #print n
    for roun in n:
    #for n in line.split():
    #if line.startswith('  Parameter'):
        #par = line.split(': ')
        p = p + 1
        orcoutfile.write("vstparamset gipianoteq, ")
        orcoutfile.write(str(p))
        orcoutfile.write(', p')
        orcoutfile.write(str(p + 5))
        orcoutfile.write('\n')
        #out_par = par[1][:-2]
        #out_par = out_par.replace(' ','_')
        #outfile.write(out_par)
        #outfile.write(' ')
orcoutfile.write("""ablankinput     init            0
aleft, aright   vstaudio        gipianoteq, ablankinput, ablankinput
                outs            aleft, aright
                endin""")


   
Logged

http://dextracker.blogspot.com/ The number one spot for dex tracker audio software on the internet.
edexter
Moderator
Full Member
*****

Karma: 22
Offline Offline

Posts: 177



View Profile WWW
« Reply #1 on: June 08, 2011, 09:04:33 PM »

This is beta and the manual shows that vst instruments are done as two instruments.  I haven't tried to get sound of it yet.  The plan is to make this current series part of the ifn tools collection of command line utilities.  I tested this on 2.6 should work on just about any version of python.  would be glad to know how it works for you if you want to post.
Logged

http://dextracker.blogspot.com/ The number one spot for dex tracker audio software on the internet.
Pages: [1]   Go Up
  Print  

 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines | Sitemap Valid XHTML 1.0! Valid CSS!