kopia lustrzana https://github.com/backface/turtlestitch
simplified “instrument” access
rodzic
64ad2948b9
commit
0e1dfc9298
|
@ -3575,6 +3575,7 @@ Fixes:
|
|||
* Blocks, Widgets: Added sound feedback to PianoKeyboard
|
||||
* New file: symbols.js (moved out of blocks.js)
|
||||
* Updated credits to reflect Michael’s piano keyboard design contribution
|
||||
* Threads: simplified “instrument” access
|
||||
|
||||
|
||||
Features:
|
||||
|
|
|
@ -61,7 +61,7 @@ StageMorph, SpriteMorph, StagePrompterMorph, Note, modules, isString, copy,
|
|||
isNil, WatcherMorph, List, ListWatcherMorph, alert, console, TableMorph,
|
||||
TableFrameMorph, ColorSlotMorph, isSnapObject*/
|
||||
|
||||
modules.threads = '2017-July-31';
|
||||
modules.threads = '2017-August-02';
|
||||
|
||||
var ThreadManager;
|
||||
var Process;
|
||||
|
@ -3461,7 +3461,7 @@ Process.prototype.doPlayNoteForSecs = function (pitch, secs) {
|
|||
if (!this.context.startTime) {
|
||||
this.context.startTime = Date.now();
|
||||
this.context.activeNote = new Note(pitch);
|
||||
this.context.activeNote.play(this.blockReceiver().instrument);
|
||||
this.context.activeNote.play(this.receiver.instrument);
|
||||
}
|
||||
if ((Date.now() - this.context.startTime) >= (secs * 1000)) {
|
||||
if (this.context.activeNote) {
|
||||
|
@ -3475,7 +3475,7 @@ Process.prototype.doPlayNoteForSecs = function (pitch, secs) {
|
|||
};
|
||||
|
||||
Process.prototype.doSetInstrument = function (num) {
|
||||
this.blockReceiver().instrument = +num;
|
||||
this.receiver.instrument = +num;
|
||||
};
|
||||
|
||||
// Process constant input options
|
||||
|
|
Ładowanie…
Reference in New Issue