Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

midiInstrument: support #883

Closed
wants to merge 2 commits into from
Closed

Conversation

apple502j
Copy link
Contributor

Resolves

#861
Projects with old 1.4 "midiInstrument:" block fail to open

Proposed Changes

Supporting midiInstrument: as Scratch 2.0 supporting.
src/serialization/sb2_specmap.js added

'midiInstrument:':{
+        opcode: 'music.setInstrument',
+        argMap: [
+            {
+                type: 'input',
+                inputOp: 'math_number',
+                inputName: 'INSTRUMENT'
+            }
+        ]
+    },

Reason for Changes

Old one cannot read 1.4 projects with this block.

Test Coverage

Read 2.0 project uses it and was uploaded by 1.4 like
https://llk.github.io/scratch-gui/develop/#138256836

@towerofnix
Copy link
Contributor

This definitely fixes #861 in the sense that those projects will now actually load, but I don't think it matches compatibility with 2.0, which uses a mapping of 1.4 MIDI instrument IDs to 2.0+ "Scratch instrument" IDs. (See discussion in scratchfoundation/scratch-audio#13.)

@thisandagain thisandagain added this to the January milestone Jan 5, 2018
@thisandagain
Copy link
Contributor

@ericrosenbaum Can you please review / provide feedback?

@thisandagain
Copy link
Contributor

@ericrosenbaum Bump

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants