kopia lustrzana https://github.com/jameshball/osci-render
rodzic
30317b8d33
commit
db87bc94c7
2
pom.xml
2
pom.xml
|
@ -6,7 +6,7 @@
|
|||
|
||||
<groupId>sh.ball</groupId>
|
||||
<artifactId>osci-render</artifactId>
|
||||
<version>1.18.4</version>
|
||||
<version>1.18.5</version>
|
||||
|
||||
<name>osci-render</name>
|
||||
|
||||
|
|
|
@ -55,7 +55,6 @@ import static sh.ball.gui.Gui.defaultDevice;
|
|||
|
||||
public class MainController implements Initializable, FrequencyListener, MidiListener, AudioInputListener {
|
||||
|
||||
private static final double SCROLL_SPEED = 0.003;
|
||||
public static final double MIN_MIC_VOLUME = 0.025;
|
||||
|
||||
private String openProjectPath;
|
||||
|
@ -86,8 +85,6 @@ public class MainController implements Initializable, FrequencyListener, MidiLis
|
|||
private final FileChooser osciFileChooser = new FileChooser();
|
||||
private Stage stage;
|
||||
|
||||
@FXML
|
||||
private ScrollPane scrollPane;
|
||||
@FXML
|
||||
private EffectsController effectsController;
|
||||
@FXML
|
||||
|
@ -162,11 +159,6 @@ public class MainController implements Initializable, FrequencyListener, MidiLis
|
|||
}
|
||||
}
|
||||
|
||||
scrollPane.getContent().setOnScroll(scrollEvent -> {
|
||||
double deltaY = scrollEvent.getDeltaY() * SCROLL_SPEED;
|
||||
scrollPane.setVvalue(scrollPane.getVvalue() - deltaY);
|
||||
});
|
||||
|
||||
objController.setAudioProducer(producer);
|
||||
generalController.setMainController(this);
|
||||
|
||||
|
|
|
@ -9,24 +9,24 @@
|
|||
<?import javafx.scene.layout.AnchorPane?>
|
||||
<?import javafx.scene.shape.SVGPath?>
|
||||
|
||||
<AnchorPane id="control-pane" prefHeight="352.0" prefWidth="511.0" xmlns="http://javafx.com/javafx/17" xmlns:fx="http://javafx.com/fxml/1" fx:controller="sh.ball.gui.controller.GeneralController">
|
||||
<AnchorPane id="control-pane" prefHeight="352.0" prefWidth="402.0" xmlns="http://javafx.com/javafx/17" xmlns:fx="http://javafx.com/fxml/1" fx:controller="sh.ball.gui.controller.GeneralController">
|
||||
<children>
|
||||
<Button fx:id="chooseFileButton" layoutX="14.0" layoutY="53.0" mnemonicParsing="false" prefHeight="26.0" prefWidth="114.0" text="Choose File" />
|
||||
<Label fx:id="fileLabel" layoutX="143.0" layoutY="57.0" maxWidth="270.0" prefHeight="18.0" prefWidth="246.0" text="cube.obj" />
|
||||
<Button fx:id="recordButton" layoutX="13.0" layoutY="142.0" mnemonicParsing="false" prefHeight="26.0" prefWidth="114.0" text="Record" />
|
||||
<Label fx:id="recordLabel" layoutX="13.0" layoutY="184.0" maxWidth="451.0" prefHeight="18.0" prefWidth="451.0" />
|
||||
<Label fx:id="recordLabel" layoutX="13.0" layoutY="184.0" maxWidth="451.0" prefHeight="18.0" prefWidth="376.0" />
|
||||
<Label id="frequency" fx:id="frequencyLabel" layoutX="13.0" layoutY="206.0" prefHeight="58.0" prefWidth="376.0" text="L/R Frequency: " />
|
||||
<ComboBox fx:id="deviceComboBox" layoutX="14.0" layoutY="11.0" prefHeight="26.0" prefWidth="470.0" />
|
||||
<ComboBox fx:id="deviceComboBox" layoutX="14.0" layoutY="11.0" prefHeight="26.0" prefWidth="376.0" />
|
||||
<Button fx:id="chooseFolderButton" layoutX="14.0" layoutY="91.0" mnemonicParsing="false" prefHeight="26.0" prefWidth="114.0" text="Choose Folder" />
|
||||
<Label fx:id="jkLabel" layoutX="143.0" layoutY="84.0" maxWidth="270.0" prefHeight="43.0" prefWidth="246.0" text="Use j and k (or MIDI Program Change) to cycle between files, or i to start playback" visible="false" wrapText="true" />
|
||||
<TextField fx:id="recordTextField" disable="true" layoutX="370.0" layoutY="154.0" prefHeight="26.0" prefWidth="70.0" text="2.0" />
|
||||
<Label fx:id="recordLengthLabel" disable="true" layoutX="360.0" layoutY="128.0" text="Record length (s)" />
|
||||
<TextField fx:id="recordTextField" disable="true" layoutX="296.0" layoutY="155.0" prefHeight="26.0" prefWidth="70.0" text="2.0" />
|
||||
<Label fx:id="recordLengthLabel" disable="true" layoutX="286.0" layoutY="129.0" text="Record length (s)" />
|
||||
<CheckBox fx:id="recordCheckBox" layoutX="154.0" layoutY="146.0" mnemonicParsing="false" text="Timed record" />
|
||||
<Slider fx:id="octaveSlider" blockIncrement="1.0" layoutX="81.0" layoutY="271.0" majorTickUnit="1.0" max="5.0" min="-5.0" minorTickCount="0" prefHeight="42.0" prefWidth="342.0" showTickLabels="true" showTickMarks="true" snapToTicks="true" />
|
||||
<SVGPath fx:id="octaveMidi" content="M20.15 8.26H22V15.74H20.15M13 8.26H18.43C19 8.26 19.3 8.74 19.3 9.3V14.81C19.3 15.5 19 15.74 18.38 15.74H13V11H14.87V13.91H17.5V9.95H13M10.32 8.26H12.14V15.74H10.32M2 8.26H8.55C9.1 8.26 9.41 8.74 9.41 9.3V15.74H7.59V10.15H6.5V15.74H4.87V10.15H3.83V15.74H2Z" fill="WHITE" layoutX="433.0" layoutY="267.0" pickOnBounds="true" />
|
||||
<Slider fx:id="octaveSlider" blockIncrement="1.0" layoutX="81.0" layoutY="271.0" majorTickUnit="1.0" max="5.0" min="-5.0" minorTickCount="0" prefHeight="42.0" prefWidth="280.0" showTickLabels="true" showTickMarks="true" snapToTicks="true" />
|
||||
<SVGPath fx:id="octaveMidi" content="M20.15 8.26H22V15.74H20.15M13 8.26H18.43C19 8.26 19.3 8.74 19.3 9.3V14.81C19.3 15.5 19 15.74 18.38 15.74H13V11H14.87V13.91H17.5V9.95H13M10.32 8.26H12.14V15.74H10.32M2 8.26H8.55C9.1 8.26 9.41 8.74 9.41 9.3V15.74H7.59V10.15H6.5V15.74H4.87V10.15H3.83V15.74H2Z" fill="WHITE" layoutX="365.0" layoutY="267.0" pickOnBounds="true" />
|
||||
<Label layoutX="12.0" layoutY="270.0" text="Octave" />
|
||||
<Slider fx:id="micVolumeSlider" blockIncrement="1.0" layoutX="81.0" layoutY="310.0" majorTickUnit="1.0" max="10.0" prefHeight="42.0" prefWidth="342.0" showTickLabels="true" showTickMarks="true" value="1.0" />
|
||||
<SVGPath fx:id="micVolumeMidi" content="M20.15 8.26H22V15.74H20.15M13 8.26H18.43C19 8.26 19.3 8.74 19.3 9.3V14.81C19.3 15.5 19 15.74 18.38 15.74H13V11H14.87V13.91H17.5V9.95H13M10.32 8.26H12.14V15.74H10.32M2 8.26H8.55C9.1 8.26 9.41 8.74 9.41 9.3V15.74H7.59V10.15H6.5V15.74H4.87V10.15H3.83V15.74H2Z" fill="WHITE" layoutX="433.0" layoutY="306.0" pickOnBounds="true" />
|
||||
<Slider fx:id="micVolumeSlider" blockIncrement="1.0" layoutX="81.0" layoutY="310.0" majorTickUnit="1.0" max="10.0" prefHeight="42.0" prefWidth="280.0" showTickLabels="true" showTickMarks="true" value="1.0" />
|
||||
<SVGPath fx:id="micVolumeMidi" content="M20.15 8.26H22V15.74H20.15M13 8.26H18.43C19 8.26 19.3 8.74 19.3 9.3V14.81C19.3 15.5 19 15.74 18.38 15.74H13V11H14.87V13.91H17.5V9.95H13M10.32 8.26H12.14V15.74H10.32M2 8.26H8.55C9.1 8.26 9.41 8.74 9.41 9.3V15.74H7.59V10.15H6.5V15.74H4.87V10.15H3.83V15.74H2Z" fill="WHITE" layoutX="365.0" layoutY="306.0" pickOnBounds="true" />
|
||||
<Label layoutX="12.0" layoutY="309.0" text="Mic Volume" />
|
||||
</children>
|
||||
</AnchorPane>
|
||||
|
|
|
@ -1,20 +1,17 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import javafx.geometry.Insets?>
|
||||
<?import javafx.scene.control.CustomMenuItem?>
|
||||
<?import javafx.scene.control.Label?>
|
||||
<?import javafx.scene.control.Menu?>
|
||||
<?import javafx.scene.control.MenuBar?>
|
||||
<?import javafx.scene.control.MenuItem?>
|
||||
<?import javafx.scene.control.ScrollPane?>
|
||||
<?import javafx.scene.control.Spinner?>
|
||||
<?import javafx.scene.control.TitledPane?>
|
||||
<?import javafx.scene.input.KeyCodeCombination?>
|
||||
<?import javafx.scene.layout.AnchorPane?>
|
||||
<?import javafx.scene.layout.VBox?>
|
||||
|
||||
<AnchorPane prefHeight="692.0" prefWidth="546.0" stylesheets="@../css/main.css" xmlns="http://javafx.com/javafx/17" xmlns:fx="http://javafx.com/fxml/1" fx:controller="sh.ball.gui.controller.MainController">
|
||||
<MenuBar prefHeight="27.0" prefWidth="612.0">
|
||||
<AnchorPane prefHeight="788.0" prefWidth="1008.0" stylesheets="@../css/main.css" xmlns="http://javafx.com/javafx/17" xmlns:fx="http://javafx.com/fxml/1" fx:controller="sh.ball.gui.controller.MainController">
|
||||
<MenuBar prefHeight="27.0" prefWidth="1008.0">
|
||||
<menus>
|
||||
<Menu mnemonicParsing="false" text="File">
|
||||
<items>
|
||||
|
@ -58,27 +55,16 @@
|
|||
</Menu>
|
||||
</menus>
|
||||
</MenuBar>
|
||||
<ScrollPane fx:id="scrollPane" fitToWidth="true" layoutY="27.0" prefHeight="662.0" prefWidth="612.0">
|
||||
<content>
|
||||
<VBox prefWidth="524.0" spacing="10.0">
|
||||
<children>
|
||||
<TitledPane text="Main settings">
|
||||
<fx:include fx:id="general" source="general.fxml" />
|
||||
</TitledPane>
|
||||
<TitledPane text="Image settings">
|
||||
<fx:include fx:id="image" source="image.fxml" />
|
||||
</TitledPane>
|
||||
<TitledPane text="Audio Effects">
|
||||
<fx:include fx:id="effects" source="effects.fxml" />
|
||||
</TitledPane>
|
||||
<TitledPane fx:id="objTitledPane" text="3D .obj file settings">
|
||||
<fx:include fx:id="obj" source="obj.fxml" />
|
||||
</TitledPane>
|
||||
</children>
|
||||
<padding>
|
||||
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
|
||||
</padding>
|
||||
</VBox>
|
||||
</content>
|
||||
</ScrollPane>
|
||||
<TitledPane animated="false" collapsible="false" layoutX="7.0" layoutY="33.0" prefHeight="401.0" prefWidth="390.0" text="Main settings">
|
||||
<fx:include fx:id="general" source="general.fxml" />
|
||||
</TitledPane>
|
||||
<TitledPane animated="false" collapsible="false" layoutX="425.0" layoutY="424.0" text="Image settings">
|
||||
<fx:include fx:id="image" source="image.fxml" />
|
||||
</TitledPane>
|
||||
<TitledPane animated="false" collapsible="false" layoutX="425.0" layoutY="33.0" text="Audio Effects">
|
||||
<fx:include fx:id="effects" source="effects.fxml" />
|
||||
</TitledPane>
|
||||
<TitledPane fx:id="objTitledPane" animated="false" collapsible="false" layoutX="7.0" layoutY="444.0" prefHeight="207.0" prefWidth="411.0" text="3D .obj file settings">
|
||||
<fx:include fx:id="obj" source="obj.fxml" />
|
||||
</TitledPane>
|
||||
</AnchorPane>
|
||||
|
|
|
@ -6,13 +6,13 @@
|
|||
<?import javafx.scene.layout.AnchorPane?>
|
||||
<?import javafx.scene.shape.SVGPath?>
|
||||
|
||||
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="576.0" xmlns="http://javafx.com/javafx/17" xmlns:fx="http://javafx.com/fxml/1" fx:controller="sh.ball.gui.controller.ObjController">
|
||||
<Slider fx:id="focalLengthSlider" blockIncrement="0.01" layoutX="116.0" layoutY="22.0" majorTickUnit="0.2" max="2.0" min="1.0E-5" prefHeight="42.0" prefWidth="258.0" showTickLabels="true" showTickMarks="true" value="1.0" />
|
||||
<Label layoutX="34.0" layoutY="21.0" text="Focal length" />
|
||||
<Slider fx:id="objectRotateSpeedSlider" blockIncrement="0.005" layoutX="116.0" layoutY="81.0" majorTickUnit="0.1" max="1.0" prefHeight="42.0" prefWidth="258.0" showTickLabels="true" showTickMarks="true" />
|
||||
<Label layoutX="9.0" layoutY="80.0" text="3D Rotate speed" />
|
||||
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="408.0" xmlns="http://javafx.com/javafx/17" xmlns:fx="http://javafx.com/fxml/1" fx:controller="sh.ball.gui.controller.ObjController">
|
||||
<Slider fx:id="focalLengthSlider" blockIncrement="0.01" layoutX="106.0" layoutY="22.0" majorTickUnit="0.2" max="2.0" min="1.0E-5" prefHeight="42.0" prefWidth="205.0" showTickLabels="true" showTickMarks="true" value="1.0" />
|
||||
<Label layoutX="32.0" layoutY="21.0" text="Focal length" />
|
||||
<Slider fx:id="objectRotateSpeedSlider" blockIncrement="0.005" layoutX="106.0" layoutY="81.0" majorTickUnit="0.1" max="1.0" prefHeight="42.0" prefWidth="205.0" showTickLabels="true" showTickMarks="true" />
|
||||
<Label layoutX="7.0" layoutY="80.0" text="3D Rotate speed" />
|
||||
<CheckBox fx:id="rotateCheckBox" layoutX="90.0" layoutY="143.0" mnemonicParsing="false" text="Rotate with Mouse (Esc to disable)" />
|
||||
<SVGPath fx:id="focalLengthMidi" content="M20.15 8.26H22V15.74H20.15M13 8.26H18.43C19 8.26 19.3 8.74 19.3 9.3V14.81C19.3 15.5 19 15.74 18.38 15.74H13V11H14.87V13.91H17.5V9.95H13M10.32 8.26H12.14V15.74H10.32M2 8.26H8.55C9.1 8.26 9.41 8.74 9.41 9.3V15.74H7.59V10.15H6.5V15.74H4.87V10.15H3.83V15.74H2Z" fill="WHITE" layoutX="374.0" layoutY="19.0" pickOnBounds="true" />
|
||||
<SVGPath fx:id="objectRotateSpeedMidi" content="M20.15 8.26H22V15.74H20.15M13 8.26H18.43C19 8.26 19.3 8.74 19.3 9.3V14.81C19.3 15.5 19 15.74 18.38 15.74H13V11H14.87V13.91H17.5V9.95H13M10.32 8.26H12.14V15.74H10.32M2 8.26H8.55C9.1 8.26 9.41 8.74 9.41 9.3V15.74H7.59V10.15H6.5V15.74H4.87V10.15H3.83V15.74H2Z" fill="WHITE" layoutX="374.0" layoutY="78.0" pickOnBounds="true" />
|
||||
<CheckBox fx:id="objectRotateSpeedMic" layoutX="411.0" layoutY="81.0" mnemonicParsing="false" text="Mic" />
|
||||
<SVGPath fx:id="focalLengthMidi" content="M20.15 8.26H22V15.74H20.15M13 8.26H18.43C19 8.26 19.3 8.74 19.3 9.3V14.81C19.3 15.5 19 15.74 18.38 15.74H13V11H14.87V13.91H17.5V9.95H13M10.32 8.26H12.14V15.74H10.32M2 8.26H8.55C9.1 8.26 9.41 8.74 9.41 9.3V15.74H7.59V10.15H6.5V15.74H4.87V10.15H3.83V15.74H2Z" fill="WHITE" layoutX="316.0" layoutY="19.0" pickOnBounds="true" />
|
||||
<SVGPath fx:id="objectRotateSpeedMidi" content="M20.15 8.26H22V15.74H20.15M13 8.26H18.43C19 8.26 19.3 8.74 19.3 9.3V14.81C19.3 15.5 19 15.74 18.38 15.74H13V11H14.87V13.91H17.5V9.95H13M10.32 8.26H12.14V15.74H10.32M2 8.26H8.55C9.1 8.26 9.41 8.74 9.41 9.3V15.74H7.59V10.15H6.5V15.74H4.87V10.15H3.83V15.74H2Z" fill="WHITE" layoutX="316.0" layoutY="78.0" pickOnBounds="true" />
|
||||
<CheckBox fx:id="objectRotateSpeedMic" layoutX="353.0" layoutY="81.0" mnemonicParsing="false" text="Mic" />
|
||||
</AnchorPane>
|
||||
|
|
Ładowanie…
Reference in New Issue