@huffduff/midi-writer-ts 3.2.0 → 3.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/README.md +27 -28
  2. package/build/index.cjs +24 -26
  3. package/build/index.mjs +1 -26
  4. package/build/types/main.d.ts +2 -35
  5. package/package.json +9 -2
  6. package/src/abstract-event.ts +8 -0
  7. package/src/chunks/chunk.ts +6 -0
  8. package/src/chunks/header.ts +29 -0
  9. package/src/chunks/track.ts +345 -0
  10. package/src/constants.ts +18 -0
  11. package/src/main.ts +48 -0
  12. package/src/meta-events/copyright-event.ts +35 -0
  13. package/src/meta-events/cue-point-event.ts +35 -0
  14. package/src/meta-events/end-track-event.ts +29 -0
  15. package/src/meta-events/instrument-name-event.ts +35 -0
  16. package/src/meta-events/key-signature-event.ts +73 -0
  17. package/src/meta-events/lyric-event.ts +35 -0
  18. package/src/meta-events/marker-event.ts +35 -0
  19. package/src/meta-events/meta-event.ts +7 -0
  20. package/src/meta-events/tempo-event.ts +37 -0
  21. package/src/meta-events/text-event.ts +35 -0
  22. package/src/meta-events/time-signature-event.ts +32 -0
  23. package/src/meta-events/track-name-event.ts +35 -0
  24. package/src/midi-events/controller-change-event.ts +30 -0
  25. package/src/midi-events/midi-event.ts +11 -0
  26. package/src/midi-events/note-event.ts +164 -0
  27. package/src/midi-events/note-off-event.ts +55 -0
  28. package/src/midi-events/note-on-event.ts +69 -0
  29. package/src/midi-events/pitch-bend-event.ts +40 -0
  30. package/src/midi-events/program-change-event.ts +28 -0
  31. package/src/utils.ts +263 -0
  32. package/src/vexflow.ts +96 -0
  33. package/src/writer.ts +99 -0
  34. package/.editorconfig +0 -24
  35. package/.eslintignore +0 -3
  36. package/.eslintrc.js +0 -18
  37. package/.nvmrc +0 -1
  38. package/.travis.yml +0 -3
  39. package/browser/midiwriter.js +0 -1367
  40. package/jsdoc.json +0 -5
  41. package/postinstall.js +0 -1
  42. package/rollup.config.js +0 -22
  43. package/runkit.js +0 -18
  44. package/tsconfig.json +0 -13
  45. package/typedoc.json +0 -5
package/jsdoc.json DELETED
@@ -1,5 +0,0 @@
1
- {
2
- "opts": {
3
- "template": "node_modules/minami"
4
- }
5
- }
package/postinstall.js DELETED
@@ -1 +0,0 @@
1
- console.log('\x1b[36m%s\x1b[0m', "Please give MidiWriterJS a ⭐ on GitHub if you found useful, thx!");
package/rollup.config.js DELETED
@@ -1,22 +0,0 @@
1
- import typescript from '@rollup/plugin-typescript';
2
- import {nodeResolve} from '@rollup/plugin-node-resolve';
3
-
4
- export default {
5
- input: 'src/main.ts',
6
- output: [
7
- {
8
- file: 'build/index.cjs',
9
- format: 'cjs',
10
- exports: 'default',
11
- },
12
- {
13
- file: 'build/index.mjs',
14
- format: 'es',
15
- }
16
- ],
17
- external: ['tonal-midi', 'fs', '@tonaljs/midi'],
18
- plugins: [
19
- typescript(),
20
- nodeResolve()
21
- ]
22
- };
package/runkit.js DELETED
@@ -1,18 +0,0 @@
1
- const rkmidi = require('runkit-midi');
2
- const MidiWriter = require('midi-writer-js');
3
- const track = new MidiWriter.Track();
4
- track.addEvent([
5
- new MidiWriter.NoteEvent({pitch: ['E4','D4'], duration: '4'}),
6
- new MidiWriter.NoteEvent({pitch: ['C4'], duration: '2'}),
7
- new MidiWriter.NoteEvent({pitch: ['E4','D4'], duration: '4'}),
8
- new MidiWriter.NoteEvent({pitch: ['C4'], duration: '2'}),
9
- new MidiWriter.NoteEvent({pitch: ['C4', 'C4', 'C4', 'C4', 'D4', 'D4', 'D4', 'D4'], duration: '8'}),
10
- new MidiWriter.NoteEvent({pitch: ['E4','D4'], duration: '4'}),
11
- new MidiWriter.NoteEvent({pitch: ['C4'], duration: '2'})
12
- ], function(event, index) {
13
- return {sequential: true};
14
- }
15
- );
16
-
17
- const write = new MidiWriter.Writer(track);
18
- rkmidi(write.buildFile());
package/tsconfig.json DELETED
@@ -1,13 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES2018",
4
- "module": "ESNext",
5
- "moduleResolution": "node",
6
- "lib": [
7
- "esnext",
8
- "dom"
9
- ],
10
- "declaration": true,
11
- "declarationDir": "./types"
12
- }
13
- }
package/typedoc.json DELETED
@@ -1,5 +0,0 @@
1
- {
2
- "$schema": "https://typedoc.org/schema.json",
3
- "entryPoints": ["./src/main.ts"],
4
- "out": "docs"
5
- }