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