Examples of Instrument


Examples of com.compomics.util.pride.prideobjects.Instrument

     * @param evt
     */
    private void editInstrumentJButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_editInstrumentJButtonActionPerformed
        // get the selected instrument details
        String selectedInstrument = (String) instrumentJComboBox.getSelectedItem();
        Instrument tempInstrument = prideObjectsFactory.getInstruments().get(selectedInstrument);
        if (tempInstrument == null) {
            tempInstrument = new Instrument("New instrument", null, null, null);
        }

        new NewInstrumentDialog(this, true, tempInstrument);
    }//GEN-LAST:event_editInstrumentJButtonActionPerformed
View Full Code Here

Examples of com.music.web.websocket.dto.Instrument

        PossibleAnswers answers = new PossibleAnswers();

        // first select the instrument distractors
        int instrument = piece.getMainInstrument();
        List<Instrument> instruments = new ArrayList<>(ANSWERS_PER_QUESTION);
        instruments.add(new Instrument(instrument, InstrumentNameExtractor.getInstrumentName(instrument)));
        while (instruments.size() < ANSWERS_PER_QUESTION) {
            int[] set = random.nextBoolean() ? InstrumentGroups.MAIN_PART_INSTRUMENTS : InstrumentGroups.MAIN_PART_ONLY_INSTRUMENTS;
            int selectedId = set[random.nextInt(set.length)];
            Instrument newInstrument = new Instrument(selectedId, InstrumentNameExtractor.getInstrumentName(selectedId));
            if (selectedId != instrument && !instruments.contains(newInstrument)) {
                instruments.add(newInstrument);
            }
        }
        Collections.shuffle(instruments, random);
View Full Code Here

Examples of de.olivergierke.whoops.core.Instrument

   * @see de.olivergierke.whoops.core.TransactionFeeProvider#getTransactionFee(de.olivergierke.whoops.core.Instrument)
   */
  public BigDecimal getTransactionFee(Instrument instrument) {

    Option option = (Option) instrument;
    Instrument underlying = option.getUnderlying();

    TransactionFeeProvider provider = feeProviders.getPluginFor(underlying);
    BigDecimal fee = provider.getTransactionFee(underlying);

    return fee.multiply(multiplier);
View Full Code Here

Examples of edu.harvard.fas.zfeledy.fiximulator.core.Instrument

    public int getRowCount() {
        return instruments.getCount();
    }

    public Object getValueAt(int row, int column) {
        Instrument instrument = instruments.getInstrument(row);
        if (column == 0) return instrument.getTicker();
        if (column == 1) return instrument.getName();
        if (column == 2) return instrument.getSedol();
        if (column == 3) return instrument.getRIC();
        if (column == 4) return instrument.getCusip();
        if (column == 5) return Double.valueOf(instrument.getPrice());
        return new Object();
    }
View Full Code Here

Examples of instruments.modele.Instrument

                        counterInstrument += 1;
                        String instrumental[] = thisLine.split(";");
                        String instrument = instrumental[0];
                        int difficulte = Integer.parseInt(instrumental[1]);
                        String piste = instrumental[2];
                        Instrument i = getInstrument(instrument);
                        Piste p = new Piste(piste,i,difficulte);
                        em.persist(p);
                        m.addPiste(p);
                    }
                }
View Full Code Here

Examples of instruments.modele.Instrument

    private Instrument getInstrument(String instrument) {
        Query q = em.createQuery("select i from Instrument i where i.nom='" + instrument + "'");
        List results = q.getResultList();
        if (!results.isEmpty()) {
            Iterator stIterator = results.iterator();
            Instrument a = (Instrument) stIterator.next();
            return a;
        } else {
            Instrument i = new Instrument(instrument);
            em.persist(i);
            return i;
        }
    }
View Full Code Here

Examples of javax.sound.midi.Instrument

            synthesizer.open();
            synthesizer.loadAllInstruments(synthesizer.getDefaultSoundbank());
        } catch (MidiUnavailableException ex) {
            ex.printStackTrace();
        }
        Instrument in[] = synthesizer.getLoadedInstruments();
        String ret[] = new String[in.length];
        for (int x = 0; x < in.length; x++) {
            ret[x] = in[x].getName();
        }
        return ret;
View Full Code Here

Examples of javax.sound.midi.Instrument

            // events directly to the Synthesizer instead.
            Synthesizer synthesizer = MidiSystem.getSynthesizer();
            synthesizer.open();

            synthesizer.loadAllInstruments(synthesizer.getDefaultSoundbank());
            Instrument in[] = synthesizer.getLoadedInstruments();

            synthesizer.loadInstrument(in[70]);
            channel = synthesizer.getChannels()[0];
        } catch (MidiUnavailableException ex) {
            ex.printStackTrace();
View Full Code Here

Examples of javax.sound.midi.Instrument

    public String getDescription() {
        return getName();
    }

    public Instrument getInstrument(Patch patch) {
        Instrument ins = getInstrument();
        Patch p = ins.getPatch();
        if (p.getBank() != patch.getBank())
            return null;
        if (p.getProgram() != patch.getProgram())
            return null;
        if (p instanceof ModelPatch && patch instanceof ModelPatch) {
View Full Code Here

Examples of javax.sound.midi.Instrument

    if (midiChooser==null) {
      log.error("unable to perform test on null midi chooser, NPE will follow");
    }
    try {
      MidiDevice.Info info=midiChooser.getSelectedOutputDevice();
      Instrument instrument=midiChooser.getSelectedInstrument();
      if (info==null && instrument==null) {
        ErrorHandler.handleMessage(MESSAGE_CHOOSE_OUTPUT_FIRST);
        return;
      }
      if (info==null) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.