problems with midi programming in python

2006-07-05 Thread sreekant
Hi folks I hope someone here might be able to help. I scavenged some info and even code from the net and am trying to write a module that reads a text file and spits out a midi file. So far I managed to make it work to the level of reading a text file with appropriate notes, octaves, transposi

Re: problems with midi programming in python

2006-07-05 Thread [EMAIL PROTECTED]
sreekant wrote: > Hi folks > > I hope someone here might be able to help. I scavenged some info and > even code from the net and am trying to write a module that reads a text > file and spits out a midi file. > > So far I managed to make it work to the level of reading a text file > with appropriat

Re: problems with midi programming in python

2006-07-05 Thread Simon Forman
Not related to your actual question, but note: > if len(result) == 0: empty lists test as False, so this can just be > if not result: and > result[len(result)-1] -= 128 you can index lists with negative ints, backwards from the end of the list, so this can be >

Re: problems with midi programming in python

2006-07-05 Thread sreekant
Total godsend. Had to reverse the list but now it works perfectly. Not only it solved the problem of longer notes but also that of rests. If you don't terribly mind, during the development of this particular program , I would love to ask for help. If that is ok with you, please reply to sreekan

Re: problems with midi programming in python

2006-07-05 Thread sreekant
Simon Forman wrote: > Not related to your actual question, but note: > >> if len(result) == 0: > > empty lists test as False, so this can just be > >> if not result: > > > > and > >> result[len(result)-1] -= 128 > > you can index lists with negative ints, backwards fro