Skip to content

Rests as a noteEvent #139

@patricio1979

Description

@patricio1979

I don't know if I'm making a mistake:

Is there a way to write a restEvent or it is only as 'wait' attached to noteEvent?
How can I write a noteEvent without 'pitch'

In my code I need to write SILENCE with a random value in the power of two.
A final array holds the pitches and rests
if(final[i] !== 'SILENCE'){ note = new MidiWriter.NoteEvent({pitch: final[i], duration: '32'}); } else { note = new MidiWriter.NoteEvent({pitch: 'C-1', duration: Math.pow(2,Math.floor(random(4)))}); } track.addEvent(note);

With pitch series is very helpful to have a separate event for rest information.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions