Package com.softsynth.jmsl.jsyn2
Class SampleInstrumentKeyMapPanel
java.lang.Object
com.softsynth.jmsl.view.PVPanelAdapter
com.softsynth.jmsl.jsyn2.SampleInstrumentKeyMapPanel
- All Implemented Interfaces:
PVComponent
,PVPanel
,java.awt.event.ActionListener
,java.util.EventListener
public class SampleInstrumentKeyMapPanel extends PVPanelAdapter implements java.awt.event.ActionListener
Panel that provides a sample browser button, and tone generator mapped to a pitch and a tuning,
and a button to sound the sample
revised for JSyn2 Sept 30, 2018
- Author:
- Nick Didkovsky, email: nick@didkovsky.com, (c) 2003 Nick Didkovsky, all rights reserved.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
currentDirectory
-
Constructor Summary
Constructors Constructor Description SampleInstrumentKeyMapPanel(SampleInstrumentMapperPanel mapperPanel, SamplePlayingInstrument ins, com.jsyn.unitgen.SineOscillator osc, com.jsyn.unitgen.VariableRateDataReader dataReader, int index, PitchMappedSamplesModel model)
-
Method Summary
Modifier and Type Method Description void
actionPerformed(java.awt.event.ActionEvent e)
int
getPitchIndex()
java.lang.String
getSampleName()
void
setSampleName(java.lang.String sampleName)
Methods inherited from class com.softsynth.jmsl.view.PVPanelAdapter
add, add, addKeyListener, equals, getBackground, getBounds, getComponent, getFont, getLocation, getParent, hashCode, isEnabled, remove, removeAll, removeKeyListener, setBackground, setEnabled, setFont, setLayout, setLocation, setVisible, toString, validate
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
-
Field Details
-
currentDirectory
public static java.lang.String currentDirectory
-
-
Constructor Details
-
SampleInstrumentKeyMapPanel
public SampleInstrumentKeyMapPanel(SampleInstrumentMapperPanel mapperPanel, SamplePlayingInstrument ins, com.jsyn.unitgen.SineOscillator osc, com.jsyn.unitgen.VariableRateDataReader dataReader, int index, PitchMappedSamplesModel model)
-
-
Method Details
-
getPitchIndex
public int getPitchIndex() -
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)- Specified by:
actionPerformed
in interfacejava.awt.event.ActionListener
-
getSampleName
public java.lang.String getSampleName()- Returns:
- subdirectory and filename of soundfile relative to ins.getDirectory()
-
setSampleName
public void setSampleName(java.lang.String sampleName) throws java.io.IOException, javax.sound.sampled.UnsupportedAudioFileException- Throws:
java.io.IOException
javax.sound.sampled.UnsupportedAudioFileException
-