Class FeldmanProjections
java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
eu.bandm.music.applications.feldproj.FeldmanProjections
- All Implemented Interfaces:
ImageObserver
,MenuContainer
,Serializable
,Accessible
,RootPaneContainer
,WindowConstants
@ResourceDependency({"data-dir/FeldmanProjection1.tscore","data-dir/FeldmanProjection2.tscore","data-dir/FeldmanProjection3.tscore","data-dir/FeldmanProjection3.tscore","data-dir/FeldmanProjection5.tscore","data-dir/ML_studie_1.tscore","data-dir/ML_studie_1_meta.tscore","data-dir/ML_studie_2.tscore"})
public class FeldmanProjections
extends JFrame
Interactive application to visual and acoustic realization of "Projections 1-5" by Morton Feldman, and
small own studies.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JFrame
JFrame.AccessibleJFrame
Nested classes/interfaces inherited from class java.awt.Frame
Frame.AccessibleAWTFrame
Nested classes/interfaces inherited from class java.awt.Window
Window.AccessibleAWTWindow, Window.Type
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
-
Field Summary
Modifier and TypeFieldDescription(package private) SwingTools.IntMapComboBox
GUI input element of the time distance for to turn the page before it starts.(package private) final PcSet.MicroClavCombo
GUI input element to select the allowed pitch classes.(package private) boolean[]
Which of the five Feldman pieces have been accepted by the user.(package private) final JTextPane
Text pane shown in a pop-up (=dialog) window.(package private) final JButton
GUI button to start the translation into midi data.(package private) final JPanel
Top panel for all input controls(package private) final JLabel
Only needed to initiate the very first "paint()" / "render(w,nh)" process.(package private) final MessageCounter
Counter used to abort processing.protected SwingMessageField<SimpleMessage<eu.bandm.tools.util.xml.XMLDocumentIdentifier>>
One-line text field for error messages.(package private) final SwingTools.EnumComboBox<MidiInterpretation2.Method>
GUI input element to select from the four different pitch selection methods.(package private) MidiInterpretation2
The most recently generated midi realization(package private) Sequencer
static final int
For the top-level container.static final int
For the top-level container.(package private) final MessageReceiver<SimpleMessage<eu.bandm.tools.util.xml.XMLDocumentIdentifier>>
General message receiver.(package private) final Receiver
Midi receiver which switches to a page in the socre.(package private) int
Currently selected distance for page turning: -1 no automated turning, 0-4 distance in 1/4 notes.static final String[]
List of all offered scores.protected int
Currently selected index into the selection box of scoresGUI input element to select from the pieces.static final int
For the top-level container.static final int
For the top-level container.(package private) int
The last height value for which a rendering has been executed.(package private) int
The last piece selection for which a rendering has been executed.(package private) int
The last width value for which a rendering has been executed.protected FeldmanProjection_n
Currently selected scorestatic final String
Evidentprotected RandomStructs.TextFields
GUI input element to determine the start point of the random generator by some text input.(package private) JSequencerPanel
GUI button to control the playing of the midi.(package private) final JTextArea
Displays the source text.(package private) Synthesizer
System default synthesizer for playing the midi data(package private) final JTabbedPane
Central tab pane for source text and all graphic rendering pages(package private) String[]
The number words for the five Feldman pieces(package private) final JCheckBox
GUI input element to select between piano registers in the outer regions, or aligned with the other instruments.Fields inherited from class javax.swing.JFrame
accessibleContext, rootPane, rootPaneCheckingEnabled
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
acceptCopyright
(int number) Shows pop-up window with English and German text and lets the user set a chekmark for "copyright accepted".(package private) String
The name of the currently selected piece (by Feldman or ML).protected void
Generate a new midi realization, usingMidiInterpretation2
.protected void
loadVoice
(Vox v, MidiInstrument mi, @Opt MidiInstrument mi_harm, boolean samePlace) protected void
loadVoice
(String name, MidiInstrument mi, @Opt MidiInstrument mi_harm, boolean samePlace) Load a voice for the sound generation process.protected void
Realize the heuristics of the voice names as appropriate to the currently existing scores.static void
Only calls the only constructor and "setVisible()".(package private) String
pieceNameOf
(int index) The name of the piece at the given position of the GUI input selector.protected void
selectPiece
(int index) Listener when selecting a piecename bypieceSelection
.Methods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
Methods inherited from class java.awt.Frame
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setBackground, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setOpacity, setResizable, setShape, setState, setTitle, setUndecorated
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, setVisible, show, toBack, toFront
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setMixingCutoutShape, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
-
Field Details
-
piecenames
List of all offered scores. -
score
Currently selected score -
pieceNumber
protected int pieceNumberCurrently selected index into the selection box of scores -
pieceSelection
GUI input element to select from the pieces. -
clavier
GUI input element to select the allowed pitch classes. -
method
GUI input element to select from the four different pitch selection methods. -
widePiano
GUI input element to select between piano registers in the outer regions, or aligned with the other instruments. -
SEED_START_TEXT
Evident- See Also:
-
seedInput
GUI input element to determine the start point of the random generator by some text input.- See Also:
-
generate
GUI button to start the translation into midi data. Is active when no translation has happened since the last change to the input parameters, AND the pc set is not empty. -
sequencerPanel
JSequencerPanel sequencerPanelGUI button to control the playing of the midi. Is active if valid midi data exists, w.r.t. the input parameters. -
midiSequencer
Sequencer midiSequencer -
synthesizer
Synthesizer synthesizerSystem default synthesizer for playing the midi data -
c_pageOffset
SwingTools.IntMapComboBox c_pageOffsetGUI input element of the time distance for to turn the page before it starts. -
pageTurnOffset
int pageTurnOffsetCurrently selected distance for page turning: -1 no automated turning, 0-4 distance in 1/4 notes. -
inputControls
Top panel for all input controls -
tabs
Central tab pane for source text and all graphic rendering pages -
sourceText
Displays the source text. -
messageField
protected SwingMessageField<SimpleMessage<eu.bandm.tools.util.xml.XMLDocumentIdentifier>> messageFieldOne-line text field for error messages. -
messageCounter
Counter used to abort processing. -
msgr
General message receiver. Currently only the last is visible inmessageField
. All are printed to console output. -
copyrightAccepted
boolean[] copyrightAcceptedWhich of the five Feldman pieces have been accepted by the user. -
titles
String[] titlesThe number words for the five Feldman pieces -
copyrightText
Text pane shown in a pop-up (=dialog) window. -
renderedWidth
int renderedWidthThe last width value for which a rendering has been executed. -
renderedHeight
int renderedHeightThe last height value for which a rendering has been executed. -
renderedPieceNumber
int renderedPieceNumberThe last piece selection for which a rendering has been executed. -
label1
Only needed to initiate the very first "paint()" / "render(w,nh)" process. This cannot be done before all layount size info has been calculated, and thus is bound to the "paint()" call from the Swing kernel. This object is put into the tab nr one oftabs
. After the very first invokation ofdoRender()
it is dicarded. Form thereon, the invocation of "paint()" of any page of the rendered score will initiate the same process. -
midiInterpretation
MidiInterpretation2 midiInterpretationThe most recently generated midi realization -
pageTurner
Midi receiver which switches to a page in the socre. See the generation of the "SONG_POSITION_POINTER" events inMidiInterpretation2.addTimeCodes()
. -
preferredWidth
public static final int preferredWidthFor the top-level container.- See Also:
-
preferredHeight
public static final int preferredHeightFor the top-level container.- See Also:
-
minWidth
public static final int minWidthFor the top-level container.- See Also:
-
minHeight
public static final int minHeightFor the top-level container.- See Also:
-
-
Constructor Details
-
FeldmanProjections
public FeldmanProjections()Only constructor.
-
-
Method Details
-
acceptCopyright
protected boolean acceptCopyright(int number) Shows pop-up window with English and German text and lets the user set a chekmark for "copyright accepted".- Parameters:
number
- =0 for "Projection One", etc.
-
pieceNameOf
The name of the piece at the given position of the GUI input selector. -
currentPieceName
String currentPieceName()The name of the currently selected piece (by Feldman or ML). -
selectPiece
protected void selectPiece(int index) Listener when selecting a piecename bypieceSelection
. Parses the tscore source file (from a resource), creates theFeldmanProjection_n
score object, and starts the rendering. -
generateSound
protected void generateSound()Generate a new midi realization, usingMidiInterpretation2
. Contains heuristics which maps the voices by their names tp instances ofMidiInstrument
. -
loadVoice
protected void loadVoice(String name, MidiInstrument mi, @Opt @Opt MidiInstrument mi_harm, boolean samePlace) Load a voice for the sound generation process.- Parameters:
samePlace
- whether this voice shall sound at the same panorama position, e.g. because it is the second voice of a two-part instrument.- See Also:
-
loadVoiceByName
Realize the heuristics of the voice names as appropriate to the currently existing scores. -
loadVoice
protected void loadVoice(Vox v, MidiInstrument mi, @Opt @Opt MidiInstrument mi_harm, boolean samePlace) -
main
Only calls the only constructor and "setVisible()".- Throws:
Exception
-