|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
|
|
|
Re: Fwd: [Bluemusic-devel] Some feature requests to help me write LilyPond aware instrumentsI have been looking at the idea of using a Python noteprocessor. I've had a quick look through the java code of blue and it looks to me as if Python noteprocessors, objects and instruments all use the same instance of a Python interpreter. Is this true? If it is true is there any way for them to communicate with each other? If so I could make things like the LilyPond name of an instrument known to the note processor.
Thanks, Bernard
|
|
|
Re: Fwd: [Bluemusic-devel] Some feature requests to help me write LilyPond aware instrumentsForget about whether the scripts can communicate - it looks as if I can get access to everything simply by putting
import blue blueData = blue.BlueSystem.getCurrentBlueData() in my note processor. This is going to work! One small gripe: To edit the noteprocessor I have to right click on "root", choose "Edit NoteProcessors", click on the noteprocessor in the list that appears and then click the edit button. I can then edit it in a window that appears. It would be nice I could test it at this point, but I can't - I have to shut down the window and the list of noteprocessors before I can run the project or generate CSD. Cheers, Bernard
|
|
|
Re: Fwd: [Bluemusic-devel] Some feature requests to help me write LilyPond aware instrumentsHi Bernard,
Regarding your previous email, yes, blue uses the same interpreter for processing all python objects. This is intentional as it allows defining functions in one object and then using them elsewhere, much like one would see the definition of performance methods (symbols) at the beginning of modern music scores, then see those symbols used throughout the score. The aspect using noteProcessors on root PolyObject isn't ideal, but I'm not sure a really good solution for that UI interaction. However, because of the processing order, you might be able to do: -create PythonObject on timeline -in this pythonObject, create a function that takes in a noteList and processes it -in a python noteProcessor, add to root timeline and call the function you created on the timeline Due to the processing order, the pythonObject on the timeline should get run before the the noteProcessor. So you could have you function definition on the timeline where it's easy to edit and do the calling of it up top. I did a quick test and this will work. One thing about using: blueData = blue.BlueSystem.getCurrentBlueData() I would be very carefula bout making edits to the current blueData as this is the active project and modifications may not be undoable. However, reading data from the current blueData is fine, though calling things like generateScore and other methods that contribute to CSD generation is not safe to call, as current blue assumes changes are allowed. What you could do is clone the blueData though and then do whatever you want, as that is safe and blue does itself when generated CSD's. Hope that helps! steven On Fri, Apr 4, 2008 at 2:03 AM, Bernard Hurley <bernard@...> wrote: > > Forget about whether the scripts can communicate - it looks as if I can get > access to everything simply by putting > > import blue > > blueData = blue.BlueSystem.getCurrentBlueData() > > in my note processor. This is going to work! > > One small gripe: To edit the noteprocessor I have to right click on "root", > choose "Edit NoteProcessors", click on the noteprocessor in the list that > appears and then click the edit button. I can then edit it in a window that > appears. It would be nice I could test it at this point, but I can't - I > have to shut down the window and the list of noteprocessors before I can run > the project or generate CSD. > > Cheers, > > Bernard > > > > Bernard Hurley wrote: > > > > I have been looking at the idea of using a Python noteprocessor. I've had > > a quick look through the java code of blue and it looks to me as if Python > > noteprocessors, objects and instruments all use the same instance of a > > Python interpreter. Is this true? If it is true is there any way for them > > to communicate with each other? If so I could make things like the > > LilyPond name of an instrument known to the note processor. > > > > -- > View this message in context: http://www.nabble.com/Fwd%3A--Bluemusic-devel--Some-feature-requests-to-help-me-write-LilyPond-aware-instruments-tp16467891p16489241.html > > > Sent from the Csound - Blue - User mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace > _______________________________________________ > Bluemusic-users mailing list > Bluemusic-users@... > https://lists.sourceforge.net/lists/listinfo/bluemusic-users > ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace _______________________________________________ Bluemusic-users mailing list Bluemusic-users@... https://lists.sourceforge.net/lists/listinfo/bluemusic-users |
| Free Forum Powered by Nabble | Forum Help |