|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
Adding comments in scores generated with PythonHi,
A thing that has been annoying me for some time in Blue, is that Python objects seem to remove empty lines and lines starting with a semicolon. I would find it useful if this didn't happen, because empty lines would help to see the structure in my scores, and one could use lines starting with a semicolon to display the value of variables in the Python code that are not used directly in the score, or to just add some text e.g. to show where a section of a new type begins. AFAIK there is no use to remove these lines. But I suppose this happens anyway because Blue has to process the generated score. Would it be possible anyway to preserve these lines? And does anybody know of a workaround to display the value of a variable? I sometimes use an i-statement with an amplitude of 0 so I can put the value in the other p-fields, but if the score is long this is hard to find. Greetings, -- Mark _________________________________________ When you get lemons, you make lemonade. When you get hardware, you make software. ------------------------------------------------------------------------------ The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your production scanning environment may not be a perfect world - but thanks to Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 Series Scanner you'll get full speed at 300 dpi even with all image processing features enabled. http://p.sf.net/sfu/kodak-com _______________________________________________ Bluemusic-users mailing list Bluemusic-users@... https://lists.sourceforge.net/lists/listinfo/bluemusic-users |
|
|
Re: Adding comments in scores generated with PythonHi Mark,
There currently isn't a way to get comments into a generated CSD from blue. The reason for this is that blue will parse all the notes generated from a SoundObject and create Note objects so that it can further operations like scaling, applying noteProcessors, etc. Ultimately, the CSD is to blue like a MIDI file is to Cubase. All of the information required for performance is there, but none of the information is there in the MIDI that is captured in the environment for Cubase. As for the value of a variable, I would normally just use "print variableName" and look at the console output. This is usually enough for debugging for myself. You could print the entire score to the console or to a file, or use the infoTab method from ScriptingUtils like this: from ScriptingUtils import * ... testData = "xxx" ... infoTabs(testData, "tab name") (ScriptingUtils comes with blue). As for seeing structure of a piece, I guess I'm not quite understanding using the generated output versus the visual score timeline for organizing the score. Could you elaborate on your usage a bit so I can understand better? Thanks! steven On Sat, May 9, 2009 at 10:50 PM, Mark Van Peteghem <Mark.Van.Peteghem@...> wrote: > Hi, > > A thing that has been annoying me for some time in Blue, is that Python > objects seem to remove empty lines and lines starting with a semicolon. > I would find it useful if this didn't happen, because empty lines would > help to see the structure in my scores, and one could use lines starting > with a semicolon to display the value of variables in the Python code > that are not used directly in the score, or to just add some text e.g. > to show where a section of a new type begins. > > AFAIK there is no use to remove these lines. But I suppose this happens > anyway because Blue has to process the generated score. Would it be > possible anyway to preserve these lines? > > And does anybody know of a workaround to display the value of a > variable? I sometimes use an i-statement with an amplitude of 0 so I can > put the value in the other p-fields, but if the score is long this is > hard to find. > > > Greetings, > > -- > Mark > _________________________________________ > When you get lemons, you make lemonade. > When you get hardware, you make software. > > > ------------------------------------------------------------------------------ > The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your > production scanning environment may not be a perfect world - but thanks to > Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 > Series Scanner you'll get full speed at 300 dpi even with all image > processing features enabled. http://p.sf.net/sfu/kodak-com > _______________________________________________ > Bluemusic-users mailing list > Bluemusic-users@... > https://lists.sourceforge.net/lists/listinfo/bluemusic-users > ------------------------------------------------------------------------------ The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your production scanning environment may not be a perfect world - but thanks to Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 Series Scanner you'll get full speed at 300 dpi even with all image processing features enabled. http://p.sf.net/sfu/kodak-com _______________________________________________ Bluemusic-users mailing list Bluemusic-users@... https://lists.sourceforge.net/lists/listinfo/bluemusic-users |
|
|
Re: Adding comments in scores generated with PythonSteven Yi wrote:
> Hi Mark, > > There currently isn't a way to get comments into a generated CSD from > blue. The reason for this is that blue will parse all the notes > generated from a SoundObject and create Note objects so that it can > further operations like scaling, applying noteProcessors, etc. > Ultimately, the CSD is to blue like a MIDI file is to Cubase. All of > the information required for performance is there, but none of the > information is there in the MIDI that is captured in the environment > for Cubase. > > As for the value of a variable, I would normally just use "print > variableName" and look at the console output. This is usually enough > for debugging for myself. This works of course from a CSound instrument, but not in a python script, it doesn't appear in the CSound console output - or does the output of a python script end up somewhere else? > You could print the entire score to the > console or to a file, or use the infoTab method from ScriptingUtils > like this: > > from ScriptingUtils import * > ... > testData = "xxx" > ... > > infoTabs(testData, "tab name") > > (ScriptingUtils comes with blue). are not used as p-fields, but as input for an algorithm. Although it would be easier to have the values of such variables in comments in the score, so we could see where in the score it has a certain value. But if it would a lot of work to change Blue for this feature, I don't think it is worth the trouble. > As for seeing structure of a piece, > I guess I'm not quite understanding using the generated output versus > the visual score timeline for organizing the score. Could you > elaborate on your usage a bit so I can understand better? > I have the habit of generating the csd file to screen to see what my script generated, at least when I use only one script. I tried to add an empty line after a block of notes that belong together, typically at the end of a function call, but of course the empty line is removed there. Using the infotabs from ScriptingUtils solves this problem. Thanks for the help. > On Sat, May 9, 2009 at 10:50 PM, Mark Van Peteghem > <Mark.Van.Peteghem@...> wrote: > >> Hi, >> >> A thing that has been annoying me for some time in Blue, is that Python >> objects seem to remove empty lines and lines starting with a semicolon. >> I would find it useful if this didn't happen, because empty lines would >> help to see the structure in my scores, and one could use lines starting >> with a semicolon to display the value of variables in the Python code >> that are not used directly in the score, or to just add some text e.g. >> to show where a section of a new type begins. >> >> AFAIK there is no use to remove these lines. But I suppose this happens >> anyway because Blue has to process the generated score. Would it be >> possible anyway to preserve these lines? >> >> And does anybody know of a workaround to display the value of a >> variable? I sometimes use an i-statement with an amplitude of 0 so I can >> put the value in the other p-fields, but if the score is long this is >> hard to find. >> >> >> Greetings, >> >> -- >> Mark >> _________________________________________ >> When you get lemons, you make lemonade. >> When you get hardware, you make software. >> >> >> ------------------------------------------------------------------------------ >> The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your >> production scanning environment may not be a perfect world - but thanks to >> Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 >> Series Scanner you'll get full speed at 300 dpi even with all image >> processing features enabled. http://p.sf.net/sfu/kodak-com >> _______________________________________________ >> Bluemusic-users mailing list >> Bluemusic-users@... >> https://lists.sourceforge.net/lists/listinfo/bluemusic-users >> >> > > ------------------------------------------------------------------------------ > The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your > production scanning environment may not be a perfect world - but thanks to > Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 > Series Scanner you'll get full speed at 300 dpi even with all image > processing features enabled. http://p.sf.net/sfu/kodak-com > _______________________________________________ > Bluemusic-users mailing list > Bluemusic-users@... > https://lists.sourceforge.net/lists/listinfo/bluemusic-users > > > -- Mark _________________________________________ When you get lemons, you make lemonade. When you get hardware, you make software. ------------------------------------------------------------------------------ The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your production scanning environment may not be a perfect world - but thanks to Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 Series Scanner you'll get full speed at 300 dpi even with all image processing features enabled. http://p.sf.net/sfu/kodak-com _______________________________________________ Bluemusic-users mailing list Bluemusic-users@... https://lists.sourceforge.net/lists/listinfo/bluemusic-users |
| Free embeddable forum powered by Nabble | Forum Help |