-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Playpen #165
Comments
Investigate:
|
I think the playpen is quite doable using Python GTK from a decent code editor. The editor should have custom commands for:
This is all doable with a naming pattern (piece.py goes with piece.glade) and with standardized command line options for the piece, as I already have for Python pieces, but internalized in the piece itself. Then there can be a template for the piece that loads the Glade file, interprets the command options, and has standard menus and windows in the piece. It seems better to just write a playpen application using Python GTK. |
… of concept and a start on my next piece (#165).
Changed the design to be a Python GTK3 application, as that looks like it might well be cross-platform and everything I have tried has worked pretty well so far. I'm impressed by the cleanness of GTK. Outstanding tasks:
|
User-specific settings should include:
In reality, the use of a naming convention to derive the output soundfile name means that none of the Csound settings are actually required, although I will keep the audio output device as a convenience. The audio input and MIDI settings I will not implement. |
Post-processing tasks, which if any can be done with GStreamer? A glance shows GStreamer harder to implement than adapting my existing script.
|
For triggers, it may suffice to send 1 for the It may be cleaner to have different handlers for different signals, or for different widget classes. |
GtkSourceView looks usable but also tricky. See https://stackoverflow.com/questions/10524196/load-gui-from-a-glade-with-gtksourceview-in-pygobject. I have to make Glade aware of SourceView like this https://cjenkins.wordpress.com/2012/05/08/use-gtksourceview-widget-in-glade/, but that didn't work. But adding the old directory for the catalog did work. API is here: https://developer.gnome.org/gtksourceview/stable/. Looks like I have to create the editor programmatically and swap it in for the current GtkTextView. No, I got Glade to use the GtkSource.View by adding its catalog directory. Search and replace is now working but you always have to press enter in the search entry field to get stated, even if you are then going to replace that text. This is not quite standard. |
My question is, considering that ctcsound.py comes with Csound, is there any way to get it into the WebKit JavaScript context without the C compiler? |
My problem right now is that I don't really want to re-implement csound.node for WebKit2. My choices seem to be:
|
Cleanup:
|
Examples:
|
The XML parser will read the .glade file into memory and listen for value changes on control widgets, updating the XML in response. When saving, the .glade file will be written from the DOM and not from the .glade file previous read. This will work only if:
|
The hard part is looking up elements from widgets. Some kind of extra metadata might simplify this. I can't arbitrarily add properties to the ui xml. But I could create a dictionary when I connect the signals. |
The widget classes that I will save and restore, how their values can be accessed, and the xpath to the ui element that stores the value. This xpath begins at the element with the same id as the control channel name. "gk_channel" here stands for all channel names. For every get there is a corresponding set. Some of these are subclasses of others, but I need the specific class names in order to handle setting the values properly.
There are three categories: the |
There is a fairly serious problem with the UI XML. Default widget values are not saved from ElementTree. I may be able to work around this, or I may use another method of storing the control channel values, e.g. with JSON for the map of channel names and values. There are no Glade settings to control this, so ElementTree and GTK Builder are almost certainly not the problem. I could work around this by constructing the elements for widget values in the XML, but I think I will go with a separate file, that should be less fragile. |
I have a simple Python dict holding elementary type values for string channel names. This is saved and restored using JSON from |
I'm closing this now. I'm going to start using it. No doubt there will be bugs. They will become separate issues. |
This is the old computer music playpen idea springing right back into life after my favorable experience with Python GTK used by python-abx.
The computer music playpen is an integrated development environment (IDE) for computer music that maximizes functionality and minimizes development time. The idea is to have the shortest, easiest "edit, render in real time and listen., edit..." cycle that is possible. Objectives:
Current approaches that implement some of this:
The text was updated successfully, but these errors were encountered: