Examples of Note


Examples of ru.mail.teodorgig.mididermi.base.Note

        Melody melody = new Melody();
        melody.setId(result.getLong("system_id"));
        String sequence = result.getString("sequence");
        StringTokenizer tokenizer = new StringTokenizer(sequence, " ", false);
        while (tokenizer.hasMoreElements()) {
          Note note = new Note();
          try {
            note.setNote((new Integer((String) tokenizer.nextElement())).intValue());
            note.setOffset((new Integer((String) tokenizer.nextElement())).intValue());
            note.setDuration((new Integer((String) tokenizer.nextElement())).intValue());
            note.setVelocity((new Integer((String) tokenizer.nextElement())).intValue());
          } catch (Exception ex) {
            ex.printStackTrace();
          }
          melody.addNote(note);
        }
View Full Code Here

Examples of ru.mail.teodorgig.mididermi.base.Note

   */
  public static Melody provide(int length) {
    Melody melody = new Melody();

    // TODO Better fractal formula can be implemented.
    Note next = null;
    Note previous = null;
    for (int i = 0; i < length; i++) {
      next = Note.provideRandom();

      if (i > 0 && previous.getNote() > next.getNote()) {
        next.setNote(next.getNote() + 1);
      } else if (i > 0 && previous.getNote() < next.getNote()) {
        next.setNote(next.getNote() - 1);
      }

      melody.addNote(next);
      previous = next;
View Full Code Here

Examples of ru.mail.teodorgig.mididermi.base.Note

    } catch (NumberFormatException ex) {
      throw (new NotValidDescriptorFileException("Note duration is not correct number [" + token + "]!"));
    }

    // TODO Better way to select note velocity is needed.
    return (new Note(note, 0, duration, 64));
  }
View Full Code Here

Examples of ru.mail.teodorgig.mididermi.base.Note

    /*
     * All notes are fowling after timber.
     */
    while (tokenizer.hasMoreTokens() == true) {
      Note note = parseNote(tokenizer.nextToken());

      // TODO It is not clear how much time is between two notes.
      note.setOffset(timeCounter);

      melody.addNote(note);

      timeCounter += note.getDuration();
    }

    return (melody);
  }
View Full Code Here

Examples of teamnotepad.entities.Note

      if(e.getButton() == 3){
        view.handleRightClickOnNotesTree(e.getX(), e.getY());
      }else if(e.getButton() == 1 && e.getClickCount() == 2){
        Object nodeUserObject = view.getNotebookTreeLastSelectedNode();
        if(nodeUserObject.getClass() == Note.class){
          Note note = (Note)nodeUserObject;
          openNote(note);
        }else if(nodeUserObject.getClass() == SerializedNote.class){
          SerializedNote serializedNote = (SerializedNote) nodeUserObject;
          openSerializedNote(serializedNote);
        }
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.