Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

stuff????

  • Loading branch information...
commit 44c4aebdcdce2527869cdd4750fb5da637cdc7d5 1 parent b0aebae
@zk authored
Showing with 97 additions and 118 deletions.
  1. BIN  .DS_Store
  2. +0 −1  .classpath
  3. 0  {src/main/resources → neuron_media_files}/10-PD-STN.wav
  4. 0  {src/main/resources → neuron_media_files}/15-PD-SNr.wav
  5. 0  {src/main/resources → neuron_media_files}/7-PD-gpi.wav
  6. +50 −64 neurons
  7. +1 −1  rundbssim.sh
  8. +0 −1  src/main/groovy/napplelabs/dbssim/NeuronPlayer.java
  9. +0 −3  src/main/groovy/napplelabs/dbssim/NeuronSignal.java
  10. +0 −2  src/main/groovy/napplelabs/dbssim/TracePanel.java
  11. +7 −4 src/main/groovy/napplelabs/dbssim/ui/CanvasPanel.java
  12. +37 −31 src/main/groovy/napplelabs/dbssim/ui/SimUI.groovy
  13. +2 −11 src/main/groovy/napplelabs/dbssim/ui/TabManager.groovy
  14. BIN  src/main/resources/1-ET-thalamus-tremor.wav
  15. BIN  src/main/resources/1-PD-gpe-pauser.wav
  16. BIN  src/main/resources/1-dystonia-gpe.wav
  17. BIN  src/main/resources/11-PD-STN-2unit.wav
  18. BIN  src/main/resources/12-PD-STN.wav
  19. BIN  src/main/resources/13-PD-STN.wav
  20. BIN  src/main/resources/14-PD-STN.wav
  21. BIN  src/main/resources/2-PD-GPe-burster.wav
  22. BIN  src/main/resources/2-dystonia-gpe.wav
  23. BIN  src/main/resources/3-dystonia-gpi.wav
  24. BIN  src/main/resources/4-PD-border.wav
  25. BIN  src/main/resources/4-dystonia-gpi.wav
  26. BIN  src/main/resources/5-PD-gpi.wav
  27. BIN  src/main/resources/5-dystonia-gpi.wav
  28. BIN  src/main/resources/6-PD-gpi.wav
  29. BIN  src/main/resources/8-PD-gpi-tremor.wav
  30. BIN  src/main/resources/9-PD-optictract-multipleaxons.wav
  31. BIN  src/main/resources/Rage Against The Machine - rage against the machine - 06 - Know Your Enemy.mp3
View
BIN  .DS_Store
Binary file not shown
View
1  .classpath
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java"/>
- <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/>
<classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
<classpathentry excluding="napplelabs/dbssim/ui/BirdsEyeViewExample.java" kind="src" path="src/main/groovy"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
View
0  src/main/resources/10-PD-STN.wav → neuron_media_files/10-PD-STN.wav
File renamed without changes
View
0  src/main/resources/15-PD-SNr.wav → neuron_media_files/15-PD-SNr.wav
File renamed without changes
View
0  src/main/resources/7-PD-gpi.wav → neuron_media_files/7-PD-gpi.wav
File renamed without changes
View
114 neurons
@@ -7,10 +7,10 @@
<blue>255</blue>
<alpha>255</alpha>
</color>
- <mediaFile>/Users/zkim/napplelabs/dbssim/src/main/resources/7-PD-gpi.wav</mediaFile>
+ <mediaFile>./neuron_media_files/7-PD-gpi.wav</mediaFile>
<location class="java.awt.geom.Point2D$Double">
- <x>149.156296559687</x>
- <y>-518.6706042430462</y>
+ <x>206.30288554458386</x>
+ <y>-863.7472844947131</y>
</location>
</napplelabs.dbssim.neuron.NeuronPathRep>
<napplelabs.dbssim.neuron.NeuronPathRep>
@@ -20,108 +20,94 @@
<blue>0</blue>
<alpha>255</alpha>
</color>
- <mediaFile>/Users/zkim/napplelabs/dbssim/src/main/resources/10-PD-STN.wav</mediaFile>
+ <mediaFile>./neuron_media_files/10-PD-STN.wav</mediaFile>
<location class="java.awt.geom.Point2D$Double">
- <x>48.440042696381255</x>
- <y>-274.1571471322358</y>
+ <x>129.95837579526884</x>
+ <y>-582.2385758007554</y>
</location>
</napplelabs.dbssim.neuron.NeuronPathRep>
<napplelabs.dbssim.neuron.NeuronPathRep>
<color>
<red>0</red>
- <green>255</green>
- <blue>0</blue>
+ <green>0</green>
+ <blue>255</blue>
<alpha>255</alpha>
</color>
- <mediaFile>/Users/zkim/napplelabs/dbssim/src/main/resources/15-PD-SNr.wav</mediaFile>
- <location class="java.awt.geom.Point2D$Double">
- <x>-44.27360294261013</x>
- <y>197.3131439735921</y>
- </location>
- </napplelabs.dbssim.neuron.NeuronPathRep>
- <napplelabs.dbssim.neuron.NeuronPathRep>
- <color reference="../../napplelabs.dbssim.neuron.NeuronPathRep/color"/>
- <mediaFile>/Users/zkim/napplelabs/dbssim/src/main/resources/7-PD-gpi.wav</mediaFile>
- <location class="java.awt.geom.Point2D$Double">
- <x>141.07125414265573</x>
- <y>-604.7039157066074</y>
- </location>
- </napplelabs.dbssim.neuron.NeuronPathRep>
- <napplelabs.dbssim.neuron.NeuronPathRep>
- <color reference="../../napplelabs.dbssim.neuron.NeuronPathRep/color"/>
- <mediaFile>/Users/zkim/napplelabs/dbssim/src/main/resources/7-PD-gpi.wav</mediaFile>
- <location class="java.awt.geom.Point2D$Double">
- <x>187.92401863138156</x>
- <y>-764.5665917980033</y>
- </location>
- </napplelabs.dbssim.neuron.NeuronPathRep>
- <napplelabs.dbssim.neuron.NeuronPathRep>
- <color reference="../../napplelabs.dbssim.neuron.NeuronPathRep[2]/color"/>
- <mediaFile>/Users/zkim/napplelabs/dbssim/src/main/resources/10-PD-STN.wav</mediaFile>
+ <mediaFile>./neuron_media_files/7-PD-gpi.wav</mediaFile>
<location class="java.awt.geom.Point2D$Double">
- <x>118.52850025973265</x>
- <y>-340.22120567130736</y>
+ <x>217.25986237762237</x>
+ <y>-753.4731707557885</y>
</location>
</napplelabs.dbssim.neuron.NeuronPathRep>
<napplelabs.dbssim.neuron.NeuronPathRep>
- <color reference="../../napplelabs.dbssim.neuron.NeuronPathRep[3]/color"/>
- <mediaFile>/Users/zkim/napplelabs/dbssim/src/main/resources/15-PD-SNr.wav</mediaFile>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>255</blue>
+ <alpha>255</alpha>
+ </color>
+ <mediaFile>./neuron_media_files/7-PD-gpi.wav</mediaFile>
<location class="java.awt.geom.Point2D$Double">
- <x>-50.51388565140224</x>
- <y>136.1367638786892</y>
+ <x>268.0409325555711</x>
+ <y>-930.9906918563773</y>
</location>
</napplelabs.dbssim.neuron.NeuronPathRep>
<napplelabs.dbssim.neuron.NeuronPathRep>
- <color reference="../../napplelabs.dbssim.neuron.NeuronPathRep/color"/>
- <mediaFile>/Users/zkim/napplelabs/dbssim/src/main/resources/7-PD-gpi.wav</mediaFile>
+ <color>
+ <red>255</red>
+ <green>0</green>
+ <blue>0</blue>
+ <alpha>255</alpha>
+ </color>
+ <mediaFile>./neuron_media_files/10-PD-STN.wav</mediaFile>
<location class="java.awt.geom.Point2D$Double">
- <x>201.99041954260412</x>
- <y>-668.9987893152154</y>
+ <x>107.63154075080985</x>
+ <y>-469.4799166039502</y>
</location>
</napplelabs.dbssim.neuron.NeuronPathRep>
<napplelabs.dbssim.neuron.NeuronPathRep>
- <color reference="../../napplelabs.dbssim.neuron.NeuronPathRep[2]/color"/>
- <mediaFile>/Users/zkim/napplelabs/dbssim/src/main/resources/10-PD-STN.wav</mediaFile>
+ <color reference="../../napplelabs.dbssim.neuron.NeuronPathRep[5]/color"/>
+ <mediaFile>./neuron_media_files/10-PD-STN.wav</mediaFile>
<location class="java.awt.geom.Point2D$Double">
- <x>94.75919774223057</x>
- <y>-407.13689587633286</y>
+ <x>73.63154075080985</x>
+ <y>-385.4799166039502</y>
</location>
</napplelabs.dbssim.neuron.NeuronPathRep>
<napplelabs.dbssim.neuron.NeuronPathRep>
<color>
- <red>255</red>
- <green>0</green>
+ <red>0</red>
+ <green>255</green>
<blue>0</blue>
<alpha>255</alpha>
</color>
- <mediaFile>/Users/zkim/napplelabs/dbssim/src/main/resources/10-PD-STN.wav</mediaFile>
+ <mediaFile>./neuron_media_files/15-PD-SNr.wav</mediaFile>
<location class="java.awt.geom.Point2D$Double">
- <x>31.024171333051314</x>
- <y>-58.087158560243125</y>
+ <x>-12.705142441915882</x>
+ <y>194.37776133769628</y>
</location>
</napplelabs.dbssim.neuron.NeuronPathRep>
<napplelabs.dbssim.neuron.NeuronPathRep>
- <color reference="../../napplelabs.dbssim.neuron.NeuronPathRep[10]/color"/>
- <mediaFile>/Users/zkim/napplelabs/dbssim/src/main/resources/10-PD-STN.wav</mediaFile>
+ <color reference="../../napplelabs.dbssim.neuron.NeuronPathRep[7]/color"/>
+ <mediaFile>./neuron_media_files/15-PD-SNr.wav</mediaFile>
<location class="java.awt.geom.Point2D$Double">
- <x>18.30271291016822</x>
- <y>-143.45691658991515</y>
+ <x>-97.13996122278309</x>
+ <y>252.76589892433753</y>
</location>
</napplelabs.dbssim.neuron.NeuronPathRep>
<napplelabs.dbssim.neuron.NeuronPathRep>
- <color reference="../../napplelabs.dbssim.neuron.NeuronPathRep[10]/color"/>
- <mediaFile>/Users/zkim/napplelabs/dbssim/src/main/resources/10-PD-STN.wav</mediaFile>
+ <color reference="../../napplelabs.dbssim.neuron.NeuronPathRep[5]/color"/>
+ <mediaFile>./neuron_media_files/10-PD-STN.wav</mediaFile>
<location class="java.awt.geom.Point2D$Double">
- <x>85.3331976183333</x>
- <y>-184.81615183537872</y>
+ <x>81.34011368929743</x>
+ <y>-217.92442083050923</y>
</location>
</napplelabs.dbssim.neuron.NeuronPathRep>
<napplelabs.dbssim.neuron.NeuronPathRep>
- <color reference="../../napplelabs.dbssim.neuron.NeuronPathRep[10]/color"/>
- <mediaFile>/Users/zkim/napplelabs/dbssim/src/main/resources/10-PD-STN.wav</mediaFile>
+ <color reference="../../napplelabs.dbssim.neuron.NeuronPathRep[5]/color"/>
+ <mediaFile>./neuron_media_files/10-PD-STN.wav</mediaFile>
<location class="java.awt.geom.Point2D$Double">
- <x>-27.94880723462001</x>
- <y>23.002194025688002</y>
+ <x>-21.200152466514282</x>
+ <y>-49.8414780938283</y>
</location>
</napplelabs.dbssim.neuron.NeuronPathRep>
</list>
View
2  rundbssim.sh
@@ -1,3 +1,3 @@
#!/bin/bash
-java -cp /Users/zkim/.m2/repository/com/explodingpixels/forms/1.2.1/forms-1.2.1.jar:/Users/zkim/.m2/repository/com/explodingpixels/macwidgets/1.0-SNAPSHOT/macwidgets-1.0-SNAPSHOT.jar:/Users/zkim/.m2/repository/com/google/code/guice/guice/1.0/guice-1.0.jar:/Users/zkim/.m2/repository/com/thoughtworks/qdox/qdox/1.6.3/qdox-1.6.3.jar:/Users/zkim/.m2/repository/com/thoughtworks/xstream/xstream/1.3.1/xstream-1.3.1.jar:/Users/zkim/.m2/repository/jline/jline/0.9.94/jline-0.9.94.jar:/Users/zkim/.m2/repository/junit/junit/4.5/junit-4.5.jar:/Users/zkim/.m2/repository/miglayout/miglayout/3.6.2/miglayout-3.6.2.jar:/Users/zkim/.m2/repository/minim/jl/1.0/jl-1.0.jar:/Users/zkim/.m2/repository/minim/jsminim/1.0/jsminim-1.0.jar:/Users/zkim/.m2/repository/minim/minim/1.0/minim-1.0.jar:/Users/zkim/.m2/repository/minim/minim-spi/1.0/minim-spi-1.0.jar:/Users/zkim/.m2/repository/minim/mp3spi/1.0/mp3spi-1.0.jar:/Users/zkim/.m2/repository/minim/tritonus_aos/1.0/tritonus_aos-1.0.jar:/Users/zkim/.m2/repository/minim/tritonus_share/1.0/tritonus_share-1.0.jar:/Users/zkim/.m2/repository/org/apache/ant/ant/1.7.1/ant-1.7.1.jar:/Users/zkim/.m2/repository/org/apache/ant/ant-launcher/1.7.1/ant-launcher-1.7.1.jar:/Users/zkim/.m2/repository/org/codehaus/groovy/groovy-all-minimal/1.5.6/groovy-all-minimal-1.5.6.jar:/Users/zkim/.m2/repository/org/codehaus/groovy/maven/gmaven-common/1.0-rc-3/gmaven-common-1.0-rc-3.jar:/Users/zkim/.m2/repository/org/codehaus/groovy/maven/feature/gmaven-feature-api/1.0-rc-3/gmaven-feature-api-1.0-rc-3.jar:/Users/zkim/.m2/repository/org/codehaus/groovy/maven/feature/gmaven-feature-support/1.0-rc-3/gmaven-feature-support-1.0-rc-3.jar:/Users/zkim/.m2/repository/org/codehaus/groovy/maven/runtime/gmaven-runtime-1.5/1.0-rc-3/gmaven-runtime-1.5-1.0-rc-3.jar:/Users/zkim/.m2/repository/org/codehaus/groovy/maven/runtime/gmaven-runtime-api/1.0-rc-3/gmaven-runtime-api-1.0-rc-3.jar:/Users/zkim/.m2/repository/org/codehaus/groovy/maven/runtime/gmaven-runtime-default/1.0-rc-3/gmaven-runtime-default-1.0-rc-3.jar:/Users/zkim/.m2/repository/org/codehaus/groovy/maven/runtime/gmaven-runtime-support/1.0-rc-3/gmaven-runtime-support-1.0-rc-3.jar:/Users/zkim/.m2/repository/org/codehaus/plexus/plexus-utils/1.5.5/plexus-utils-1.5.5.jar:/Users/zkim/.m2/repository/org/slf4j/slf4j-api/1.5.0/slf4j-api-1.5.0.jar:/Users/zkim/.m2/repository/piccolo/piccolo/1.2.1/piccolo-1.2.1.jar:/Users/zkim/.m2/repository/piccolo/piccolox/1.2.1/piccolox-1.2.1.jar:/Users/zkim/.m2/repository/processing/core/1.0/core-1.0.jar:/Users/zkim/.m2/repository/xpp3/xpp3_min/1.1.4c/xpp3_min-1.1.4c.jar:./target/dbssim-1.0-SNAPSHOT.jar napplelabs.dbssim.ui.SimUI
+java -Xmx256M -Xms256M -cp /Users/zkim/.m2/repository/com/explodingpixels/forms/1.2.1/forms-1.2.1.jar:/Users/zkim/.m2/repository/com/explodingpixels/macwidgets/1.0-SNAPSHOT/macwidgets-1.0-SNAPSHOT.jar:/Users/zkim/.m2/repository/com/google/code/guice/guice/1.0/guice-1.0.jar:/Users/zkim/.m2/repository/com/thoughtworks/qdox/qdox/1.6.3/qdox-1.6.3.jar:/Users/zkim/.m2/repository/com/thoughtworks/xstream/xstream/1.3.1/xstream-1.3.1.jar:/Users/zkim/.m2/repository/jline/jline/0.9.94/jline-0.9.94.jar:/Users/zkim/.m2/repository/junit/junit/4.5/junit-4.5.jar:/Users/zkim/.m2/repository/miglayout/miglayout/3.6.2/miglayout-3.6.2.jar:/Users/zkim/.m2/repository/minim/jl/1.0/jl-1.0.jar:/Users/zkim/.m2/repository/minim/jsminim/1.0/jsminim-1.0.jar:/Users/zkim/.m2/repository/minim/minim/1.0/minim-1.0.jar:/Users/zkim/.m2/repository/minim/minim-spi/1.0/minim-spi-1.0.jar:/Users/zkim/.m2/repository/minim/mp3spi/1.0/mp3spi-1.0.jar:/Users/zkim/.m2/repository/minim/tritonus_aos/1.0/tritonus_aos-1.0.jar:/Users/zkim/.m2/repository/minim/tritonus_share/1.0/tritonus_share-1.0.jar:/Users/zkim/.m2/repository/org/apache/ant/ant/1.7.1/ant-1.7.1.jar:/Users/zkim/.m2/repository/org/apache/ant/ant-launcher/1.7.1/ant-launcher-1.7.1.jar:/Users/zkim/.m2/repository/org/codehaus/groovy/groovy-all-minimal/1.5.6/groovy-all-minimal-1.5.6.jar:/Users/zkim/.m2/repository/org/codehaus/groovy/maven/gmaven-common/1.0-rc-3/gmaven-common-1.0-rc-3.jar:/Users/zkim/.m2/repository/org/codehaus/groovy/maven/feature/gmaven-feature-api/1.0-rc-3/gmaven-feature-api-1.0-rc-3.jar:/Users/zkim/.m2/repository/org/codehaus/groovy/maven/feature/gmaven-feature-support/1.0-rc-3/gmaven-feature-support-1.0-rc-3.jar:/Users/zkim/.m2/repository/org/codehaus/groovy/maven/runtime/gmaven-runtime-1.5/1.0-rc-3/gmaven-runtime-1.5-1.0-rc-3.jar:/Users/zkim/.m2/repository/org/codehaus/groovy/maven/runtime/gmaven-runtime-api/1.0-rc-3/gmaven-runtime-api-1.0-rc-3.jar:/Users/zkim/.m2/repository/org/codehaus/groovy/maven/runtime/gmaven-runtime-default/1.0-rc-3/gmaven-runtime-default-1.0-rc-3.jar:/Users/zkim/.m2/repository/org/codehaus/groovy/maven/runtime/gmaven-runtime-support/1.0-rc-3/gmaven-runtime-support-1.0-rc-3.jar:/Users/zkim/.m2/repository/org/codehaus/plexus/plexus-utils/1.5.5/plexus-utils-1.5.5.jar:/Users/zkim/.m2/repository/org/slf4j/slf4j-api/1.5.0/slf4j-api-1.5.0.jar:/Users/zkim/.m2/repository/piccolo/piccolo/1.2.1/piccolo-1.2.1.jar:/Users/zkim/.m2/repository/piccolo/piccolox/1.2.1/piccolox-1.2.1.jar:/Users/zkim/.m2/repository/processing/core/1.0/core-1.0.jar:/Users/zkim/.m2/repository/xpp3/xpp3_min/1.1.4c/xpp3_min-1.1.4c.jar:./target/dbssim-1.0-SNAPSHOT.jar napplelabs.dbssim.ui.SimUI
View
1  src/main/groovy/napplelabs/dbssim/NeuronPlayer.java
@@ -45,7 +45,6 @@ public NeuronPlayer() throws LineUnavailableException, InterruptedException {
File file = new File("/Users/zkim/Desktop/Rage Against The Machine - rage against the machine - 06 - Know Your Enemy.mp3");
- System.out.println("Exists: " + file.exists());
AudioPlayer player = minim.loadFile(file.getAbsolutePath());
player.play();
View
3  src/main/groovy/napplelabs/dbssim/NeuronSignal.java
@@ -67,11 +67,8 @@ public float getNextValue() {
if(counter >= spike.length + space_len) {
counter = 0;
float diff = maxRate - minRate;
- //System.out.println(diff);
float rnd = (float) (Math.random() * diff + minRate);
space_len = (int) (44100 / rnd);
- //System.out.println(space_len);
- //System.out.println();
}
return next;
}
View
2  src/main/groovy/napplelabs/dbssim/TracePanel.java
@@ -48,7 +48,6 @@ public void paint(Graphics _g) {
Graphics2D g = (Graphics2D) _g;
if(resizeFlag) {
- System.out.println("FILL BLACK");
g.setColor(Color.black);
g.fillRect(0, 0, getWidth(), getHeight());
resizeFlag = false;
@@ -71,7 +70,6 @@ public void paint(Graphics _g) {
counter++;
if(counter >= trace.length) {
- System.out.println("COUNTER = 0");
resizeFlag = true;
counter = 0;
}
View
11 src/main/groovy/napplelabs/dbssim/ui/CanvasPanel.java
@@ -15,6 +15,7 @@
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
+import java.net.URL;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.List;
@@ -104,7 +105,7 @@ private Component createFeaturePanel() {
JButton thal = new JButton("Thalamus");
thal.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
- addNeuron(new NeuronPath(Color.blue, "/Users/zkim/napplelabs/dbssim/src/main/resources/7-PD-gpi.wav", minim));
+ addNeuron(new NeuronPath(Color.blue, "./neuron_media_files/7-PD-gpi.wav", minim));
}
});
panel.add(thal);
@@ -112,16 +113,15 @@ public void actionPerformed(ActionEvent e) {
JButton stn = new JButton("STN");
stn.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
- addNeuron(new NeuronPath(Color.red, "/Users/zkim/napplelabs/dbssim/src/main/resources/10-PD-STN.wav", minim));
+ addNeuron(new NeuronPath(Color.red, "./neuron_media_files/10-PD-STN.wav", minim));
}
});
panel.add(stn);
JButton snr = new JButton("SNr");
snr.addActionListener(new ActionListener() {
-
public void actionPerformed(ActionEvent e) {
- addNeuron(new NeuronPath(Color.green, "/Users/zkim/napplelabs/dbssim/src/main/resources/15-PD-SNr.wav", minim));
+ addNeuron(new NeuronPath(Color.green, "./neuron_media_files/15-PD-SNr.wav", minim));
}
});
panel.add(snr);
@@ -216,6 +216,9 @@ public void load() {
XStream xs = new XStream();
//Write to a file in the file system
+
+ if(! new File("./neurons").exists()) return;
+
try {
ObjectInputStream is = xs.createObjectInputStream(new FileReader(new File("./neurons")));
List<NeuronPathRep> paths = (List<NeuronPathRep>) is.readObject();
View
68 src/main/groovy/napplelabs/dbssim/ui/SimUI.groovy
@@ -26,14 +26,20 @@ import processing.core.PApplet
import napplelabs.dbssim.SignalContainer
import java.awt.Component
import java.awt.Font
-class SimUI {
+import javax.swing.JCheckBox
import javax.swing.JSlider
import javax.swing.event.ChangeListener
import javax.swing.UIManager
class SimUI {
MacFrame mf
Component currentComponent = new JPanel()
+ Component tracePanel = new JPanel()
+
ControlHud controlHud
+
+ PinkNoise pink
+
+ public SimUI() {
UIManager.setLookAndFeel(
UIManager.getSystemLookAndFeelClassName());
@@ -47,30 +53,6 @@ class SimUI {
float[] sin = new float[sin_size];
for(int i=0; i < sin_size; i++) {
sin[i] = (float) Math.sin(one * i);
- container.addSignal("/Users/zkim/napplelabs/dbssim/src/main/resources/15-PD-SNr.wav")
- container.addSignal("/Users/zkim/napplelabs/dbssim/src/main/resources/10-PD-STN.wav")
- container.addSignal("/Users/zkim/napplelabs/dbssim/src/main/resources/11-PD-STN-2unit.wav")
- container.addSignal("/Users/zkim/napplelabs/dbssim/src/main/resources/12-PD-STN.wav")
- container.addSignal("/Users/zkim/napplelabs/dbssim/src/main/resources/13-PD-STN.wav")
- container.addSignal("/Users/zkim/napplelabs/dbssim/src/main/resources/14-PD-STN.wav")
- container.addSignal("/Users/zkim/napplelabs/dbssim/src/main/resources/15-PD-SNr.wav")
- container.addSignal("/Users/zkim/napplelabs/dbssim/src/main/resources/2-dystonia-gpe.wav")
- container.addSignal("/Users/zkim/napplelabs/dbssim/src/main/resources/2-PD-GPe-burster.wav")
- container.addSignal("/Users/zkim/napplelabs/dbssim/src/main/resources/3-dystonia-gpi.wav")
- container.addSignal("/Users/zkim/napplelabs/dbssim/src/main/resources/4-dystonia-gpi.wav")
- container.addSignal("/Users/zkim/napplelabs/dbssim/src/main/resources/4-PD-border.wav")
- container.addSignal("/Users/zkim/napplelabs/dbssim/src/main/resources/5-dystonia-gpi.wav")
- container.addSignal("/Users/zkim/napplelabs/dbssim/src/main/resources/5-PD-gpi.wav")
- container.addSignal("/Users/zkim/napplelabs/dbssim/src/main/resources/6-PD-gpi.wav")
- container.addSignal("/Users/zkim/napplelabs/dbssim/src/main/resources/7-PD-gpi.wav")
- container.addSignal("/Users/zkim/napplelabs/dbssim/src/main/resources/8-PD-gpi-tremor.wav")
- container.addSignal("/Users/zkim/napplelabs/dbssim/src/main/resources/9-PD-optictract-multipleaxons.wav")
-
-
-
-
-
-
}
SignalContainer container = new SignalContainer()
@@ -80,8 +62,7 @@ class SimUI {
//mf.content.add(panel, BorderLayout.CENTER)
- new JButton("Control", new ImageIcon(SimUI.class.getResource(
- "/napplelabs/resources/dotmac.png"))));
+
//Set up control button
AbstractButton playButton =
MacButtonFactory.makeUnifiedToolBarButton(
@@ -110,19 +91,44 @@ class SimUI {
TabManager tabManager = new TabManager(mf.content)
tabManager.add("Canvas", canvasPanel)
tabManager.add("Trace", tracePanel)
- mf.addToolbarComponentCenter(tabManager.build().component)
- mf.addToolbarComponentRight(playButton)
+
+
+
+ mf.addBottombarComponentCenter(depthLabel)
+ //mf.addToolbarComponentCenter(tabManager.build().component)
+ //mf.addToolbarComponentRight(playButton)
+
+ JPanel noisePanel = new JPanel();
+ JSlider noiseSlider = new JSlider();
+ noiseSlider.minimum = 0
+ noiseSlider.maximum = 100
+ noiseSlider.value = 0
+
+ noisePanel.layout = new BorderLayout()
+ noisePanel.add(noiseSlider, BorderLayout.CENTER)
+ noisePanel.add(new JLabel("Noise"), BorderLayout.WEST)
+
+ noiseSlider.addChangeListener({
+ float val = noiseSlider.value as float
+ val /= 100
+ pink.amp = val
+ } as ChangeListener)
+
+ AudioOutput out = minim.getLineOut(Minim.MONO);
+ pink = new PinkNoise(0.0f);
out.addSignal(pink)
- container.play()
+ mf.addToolbarComponentRight(noisePanel)
- tabManager.currentComponent = canvasPanel
+ mf.frame.visible = true
//container.play()
+ controlHud = new ControlHud(container)
+ //controlHud.visible = true
//panel.start()
tabManager.setCurrentComponent(canvasPanel)
View
13 src/main/groovy/napplelabs/dbssim/ui/TabManager.groovy
@@ -12,14 +12,6 @@ import javax.swing.JPanel
import javax.swing.SwingUtilities
import java.awt.BorderLayout
-/**
- * Created by IntelliJ IDEA.
- * User: zkim
- * Date: Jan 31, 2009
- * Time: 6:37:14 PM
- * To change this template use File | Settings | File Templates.
- */
-
public class TabManager {
List<String> tabNames = []
@@ -79,11 +71,10 @@ public class TabManager {
}
public void setCurrentComponent(Component component) {
-
-
parent.remove(currentComponent)
currentComponent = component
- parent.add currentComponent, BorderLayout.CENTER
+ parent.add(currentComponent, BorderLayout.CENTER)
+ parent.revalidate()
}
public Component getCurrentComponent() {
View
BIN  src/main/resources/1-ET-thalamus-tremor.wav
Binary file not shown
View
BIN  src/main/resources/1-PD-gpe-pauser.wav
Binary file not shown
View
BIN  src/main/resources/1-dystonia-gpe.wav
Binary file not shown
View
BIN  src/main/resources/11-PD-STN-2unit.wav
Binary file not shown
View
BIN  src/main/resources/12-PD-STN.wav
Binary file not shown
View
BIN  src/main/resources/13-PD-STN.wav
Binary file not shown
View
BIN  src/main/resources/14-PD-STN.wav
Binary file not shown
View
BIN  src/main/resources/2-PD-GPe-burster.wav
Binary file not shown
View
BIN  src/main/resources/2-dystonia-gpe.wav
Binary file not shown
View
BIN  src/main/resources/3-dystonia-gpi.wav
Binary file not shown
View
BIN  src/main/resources/4-PD-border.wav
Binary file not shown
View
BIN  src/main/resources/4-dystonia-gpi.wav
Binary file not shown
View
BIN  src/main/resources/5-PD-gpi.wav
Binary file not shown
View
BIN  src/main/resources/5-dystonia-gpi.wav
Binary file not shown
View
BIN  src/main/resources/6-PD-gpi.wav
Binary file not shown
View
BIN  src/main/resources/8-PD-gpi-tremor.wav
Binary file not shown
View
BIN  src/main/resources/9-PD-optictract-multipleaxons.wav
Binary file not shown
View
BIN  src/main/resources/Rage Against The Machine - rage against the machine - 06 - Know Your Enemy.mp3
Binary file not shown
Please sign in to comment.
Something went wrong with that request. Please try again.