Examples of Note


Examples of info.textgrid.lab.noteeditor.mei2013.Note

  /**
   * Create a note with default values
   */
  private void createDefaultNote() {
    Note note = new Note();
    note.setPname(GraphicalConstants.DEFAULT_NOTE_PITCHNAME);
    note.setDur(GraphicalConstants.DEFAULT_NOTE_DURATION);
    note.setOct(GraphicalConstants.DEFAULT_NOTE_OCTAVE);
    setMeiNode(note);
  }
View Full Code Here

Examples of instantbach.data.chord.Note

     * Adds the given voice of the givne note numeric value to this template
     * @param position NotePosition
     * @param numeric int
     */
    public void addVoice(NotePosition position, int numeric) {
        Voice voice = new Voice(position, new Note(numeric));
        list.add(voice);
    }
View Full Code Here

Examples of iryrwarosh.Note

          break;
        case KeyEvent.VK_G:
        case KeyEvent.VK_COMMA:
          Item item = world.item(player.position.x, player.position.y);
            if (item == null || !item.canBePickedUp()) {
                MessageBus.publish(new Note(world, player, "Nothing to pick up here"));
                return this; //Don't spend an action when nothing to pick up
            } else {
                return new PickupItemScreen(this, world, player);
            }
    case KeyEvent.VK_M: return new WorldMapScreen(this, world.map(), player.position);
View Full Code Here

Examples of jm.music.data.Note

            int[] blackNotes = {1, 3, 6, 8, 10};
            boolean white = true;
            for (int k = 0; k < blackNotes.length; k++) {
                if (newPitch % 12 == blackNotes[k]) newPitch--;
            }
            Note n = new Note(newPitch, 1.0);
            Phrase phr = theApp.getPhrase();
            phr.addNote(n);
            theApp.repaint();
            // set cursor
            theApp.setCursor(new Cursor(Cursor.HAND_CURSOR));
            // get ready to drag it
            selectedNote = phr.size() - 1;
            //theApp.playCurrentNote(selectedNote);
            clickedPosY = e.getY() + theApp.staveDelta;
            clickedPosX = e.getX();
        } else {
            // check for a click on a note  - head?
            for (int i = 0; i < theApp.notePositions.size(); i += 2) {
                Integer tempX = (Integer) theApp.notePositions.elementAt(i);
                Integer tempY = (Integer) theApp.notePositions.elementAt(i + 1);
                if (e.getX() > tempX.intValue() && e.getX() < tempX.intValue() + 15 && e.getY() +
                        theApp.staveDelta > tempY.intValue() + 22 && e.getY() +
                        theApp.staveDelta < tempY.intValue() + 35) {
                    // set cursor
                    theApp.setCursor(new Cursor(Cursor.MOVE_CURSOR));
                    selectedNote = i / 2;
                    clickedPosY = e.getY() + theApp.staveDelta;
                    clickedPosX = e.getX();
                    //System.out.println("Hit note "+ selectedNote);
                    // get out of loop ASAP
                    i = theApp.notePositions.size();
                }
            }
        }
        if (selectedNote < 0) { // no note clicked on or yet made
            // check which note to insert
            for (int j = 0; j < theApp.notePositions.size() - 2; j += 2) {
                Integer tempX = (Integer) theApp.notePositions.elementAt(j);
                Integer nextTempX = (Integer) theApp.notePositions.elementAt(j + 2);
                if (e.getX() > tempX.intValue() + 15 && e.getX() < nextTempX.intValue()) {
                    // change cursor
                    theApp.setCursor(new Cursor(Cursor.HAND_CURSOR));
                    // add new note close to mouse clicked pitch
                    int newPitch = 85 - (e.getY() + theApp.staveDelta - theApp.bPos) / 2;
                    // make sure it is not an accidental
                    int[] blackNotes = {1, 3, 6, 8, 10};
                    boolean white = true;
                    for (int k = 0; k < blackNotes.length; k++) {
                        if (newPitch % 12 == blackNotes[k]) newPitch--;
                    }
                    Note n = new Note(newPitch, 1.0);
                    Phrase phr = theApp.getPhrase();
                    phr.getNoteList().insertElementAt(n, j / 2 + 1);
                    theApp.repaint();
                    // play and update variables for dragging it
                    selectedNote = j / 2 + 1;
View Full Code Here

Examples of jonkoshare.staff.Note

              getActiveMidiChannel(),
              sm.getData1(), sm.getData2());
        } catch (Exception ex) {
        }
        if (message.getStatus()==ShortMessage.NOTE_ON) {
          Note n=new Note(sm.getData1());
          NoteDispatcher.getInstance().notePlayed(n);
        }
      }
      MidiThread.getInstance().enqueueEvent(message);
    } catch (Exception ex) {
View Full Code Here

Examples of jpianotrain.staff.Note

              ApplicationContext.getInstance().getActiveMidiChannel(),
              sm.getData1(), sm.getData2());
        } catch (Exception ex) {
        }
        if (message.getStatus()==ShortMessage.NOTE_ON) {
          Note n=new Note(sm.getData1());
          NoteDispatcher.getInstance().notePlayed(n);
        }
      }
      MidiThread.getInstance().enqueueEvent(message);
    } catch (Exception ex) {
View Full Code Here

Examples of music.ui.lib.Note

    if (musicScore == null)
      return;
   
    int notes = musicScore.getTotalNotes();
    MusicScoreNote scoreNote;
    Note note;
    JoinedNotes topJoinedNotes = null;
    JoinedNotes bottomJoinedNotes = null;
    Bar bar = null;
    int channel;
    int midiNote;
    int measure;
   
    for (int i = 0;i < notes;i ++)
    {
      scoreNote = musicScore.getNote(i);
     
      if (scoreNote.isBar())
      {
        if (bar != null)
          musicCanvas.addBar(bar);
        bar = new Bar();
        topJoinedNotes = bottomJoinedNotes = null;
      }
      else if (bar != null)
      {
        channel = scoreNote.getChannel();
        midiNote = scoreNote.getMidiNote();
        measure = scoreNote.getMeasure();
       
        note = null;
        if ((midiNote > 0) && (midiNote < 127) &&
          ((measure == 1) || (measure == 2) || (measure == 4) || (measure == 8) || (measure == 16)))
        {
          if (channel == 0)
          {
            note = new Note(0);
           
            if (scoreNote.getBeamToNextNote() != 0)
            {
              if (bottomJoinedNotes == null)
              {
                bottomJoinedNotes = new JoinedNotes();
                musicCanvas.addJoinedNotes(bottomJoinedNotes, true);
              }
             
              bottomJoinedNotes.addNote(note);
            }
            else if (bottomJoinedNotes != null)
            {
              bottomJoinedNotes.addNote(note);
              bottomJoinedNotes = null;
            }
            else
              musicCanvas.addNote(note, true);
          }
          else if (channel == 1)
          {
            note = new Note(1);
            if (scoreNote.getBeamToNextNote() != 0)
            {
              if (topJoinedNotes == null)
              {
                topJoinedNotes = new JoinedNotes();
                musicCanvas.addJoinedNotes(topJoinedNotes, false);
              }
             
              topJoinedNotes.addNote(note);
            }
            else if (topJoinedNotes != null)
            {
              topJoinedNotes.addNote(note);
              topJoinedNotes = null;
            }
            else
              musicCanvas.addNote(note, false);
          }
          note.setMidiNote(midiNote, measure, 0);
        }
      }
    }
    if (bar != null)
      musicCanvas.addBar(bar);
View Full Code Here

Examples of net.caprazzi.minima.model.Note

  @Test
  public void upgradeFrom0to1_should_upgrade_each_story() throws Exception {
    minimaDb = spy(new DbHelper(db));
   
    Entry[] entries = new Entry[] {
      new Entry("story1", 1, new Note("desc1","todo", 65536, false).toJson()),
      new Entry("story2", 2, new Note("desc2","todo", 65536, false).toJson())
    };
   
    doAnswer(listFound(entries)).when(db).list(any(List.class));
   
    minimaDb.upgradeFrom0to1();
View Full Code Here

Examples of org.apache.sling.extensions.gwt.sample.service.Note

        inputNoteText.setText("");
    }

    private void createNote(String title, String text) {

        final Note note = new Note();
        note.setTitle(title);
        note.setText(text);

        service.createNote(note, new AsyncCallback<String>() {

            public void onFailure(Throwable throwable) {
                Window.alert("Failed to created note: " + throwable.getMessage());
View Full Code Here

Examples of org.apache.sling.extensions.gwt.sample.service.Note

                Window.alert("Could not retrieve notes: " + throwable.getMessage());
            }

            public void onSuccess(ArrayList<Note> notesList) {
                for (int i = 0; i < notesList.size(); i++) {
                    final Note note = (Note) notesList.get(i);

                    final HorizontalPanel noteEntry = new HorizontalPanel();
                    noteEntry.setStyleName("noteEntry");

                    final HTML noteTitle = new HTML(note.getTitle());
                    noteTitle.setStyleName("noteTitle");

                    final HTML noteText = new HTML(note.getText());
                    noteText.setStyleName("noteText");

                    final Button delButton = new Button("Delete");
                    delButton.setStyleName("noteControls");
                    delButton.addClickHandler(new ClickHandler() {

                        public void onClick(ClickEvent event) {
                            deleteNote(note.getPath());
                        }
                    });
                    noteEntry.add(noteTitle);
                    noteEntry.add(noteText);
                    noteEntry.add(delButton);
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.