kopia lustrzana https://github.com/backface/turtlestitch
1 wiersz
69 KiB
XML
1 wiersz
69 KiB
XML
<blocks app="Snap! 7, https://snap.berkeley.edu" version="2"><palette><category name="Music" color="195,0,204,1"/></palette><block-definition s="show var %'_name'" type="command" category="variables"><comment x="0" y="0" w="181" collapsed="false">This block turns on (show) the watcher view on stage (if it was not already activated) of the variable with the given name (slot input).

It can only access to the closest variable scope (if there different variables with the same name in different scopes) following the order 'script' -> 'sprite' -> 'global'.

No errors if that variable does not exist.</comment><header></header><code></code><translations>ca:mostra la variable _
es:mostrar variable _
pt:mostra a variável _
de:zeige var _
</translations><inputs><input type="%s"><options>§_getVarNamesDict</options></input></inputs><script><block s="doApplyExtension"><l>var_show(name)</l><list><block var="_name"/></list></block></script></block-definition><block-definition s="set var %'_name' to %'_value'" type="command" category="variables"><comment x="0" y="0" w="240.4931640625" collapsed="false">This block sets the given value (last input) to the variable named with the name givent (var input).

It looks for that variable following the scope order 'script' -> 'sprite' -> 'global' (the first match it finds).

If that variable does not exist (in any scope) an error happens, stopping their script. You can check it before using the "does var (name) exists?" block. </comment><header></header><code></code><translations>ca:assigna a _ el valor _
es:asignar a _ el valor _
pt:altera _ para _
de:setze var _ auf _
</translations><inputs><input type="%s"><options>§_getVarNamesDict</options></input><input type="%s"></input></inputs><script><block s="doApplyExtension"><l>var_set(name, val)</l><list><block var="_name"/><block var="_value"/></list></block></script></block-definition><block-definition s="create %'_scope' var %'_names'" type="command" category="variables"><comment x="0" y="0" w="146" collapsed="false">This block creates new variables on the selected scope: global (for all sprites), sprite (for this sprite only) or script (only for that blocks stack) with the names given (in 'names' list).

If there is already a variable with that name in that scope, it does nothing: no errors and no overwrites.</comment><header></header><code></code><translations>pt:cria as variáveis _ _
ca:crea les _ variables _
es:crear las _ variables _
de:erstellen _ var _
</translations><inputs><input type="%s" readonly="true">global<options>global
sprite
script</options></input><input type="%mult%txt"></input></inputs><script><block s="doWarp"><script><block s="doForEach"><l>_item</l><block var="_names"/><script><block s="doApplyExtension"><l>var_declare(scope, name)</l><list><block var="_scope"/><block var="_item"/></list></block></script></block></script></block></script></block-definition><block-definition s="Initialize TuneScope" type="command" category="Music"><header></header><code></code><translations></translations><inputs></inputs><script><block s="bubble"><l>TuneScope Initializing...</l></block><custom-block s="Load TuneScope Primitives"></custom-block><block s="bubble"><l></l></block></script></block-definition><block-definition s="Set Instrument To %'Instrument Name'" type="command" category="Music"><comment x="0" y="0" w="226.98116629464283" collapsed="false">Sets the global instrument used for playing notes.</comment><header></header><code></code><translations></translations><inputs><input type="%s" readonly="true">Piano<options>Piano
Brass={
French Horn
Trumpet
Tuba
}
Strings={
Banjo
Bass, Acoustic
Bass, Electric (Finger)
Cello
Guitar, Acoustic
Guitar, Electric
Harp
Koto
Sitar
Violin
}
Woodwinds={
Bassoon
Clarinet
Flute
Oboe
Saxophone
Shakuhachi
}
Drums={
Cabasa
Snare Drum
Bass Drum
Closed Hi-Hat
Open Hi-Hat
Mid Tom
High Tom
Crash Cymbal
}
Other={
Accordion
Marimba
Organ
Vibraphone
}</options></input></inputs><script><custom-block s="Load TuneScope Primitives"></custom-block><block s="doApplyExtension"><l>ts_setinst(name)</l><list><block var="Instrument Name"/></list></block></script></block-definition><block-definition s="Set Volume To %'Percent' %" type="command" category="Music"><comment x="0" y="0" w="236.57142857142847" collapsed="false">Sets the global volume to the selected percentage.</comment><header></header><code></code><translations></translations><inputs><input type="%n">50</input></inputs><script><custom-block s="Load TuneScope Primitives"></custom-block><block s="doApplyExtension"><l>ts_setvol(percent)</l><list><block var="Percent"/></list></block></script></block-definition><block-definition s="Set Instrument %'Instrument' Volume to %'VolumePercent' %" type="command" category="Music"><comment x="0" y="0" w="353.7142857142858" collapsed="false">Sets the default volume of the selected instrument to the specified percentage.</comment><header></header><code></code><translations></translations><inputs><input type="%txt" readonly="true">Piano<options>Piano
Brass={
French Horn
Trumpet
Tuba
}
Strings={
Banjo
Bass, Acoustic
Bass, Electric (Finger)
Cello
Guitar, Acoustic
Guitar, Electric
Harp
Koto
Sitar
Violin
}
Woodwinds={
Bassoon
Clarinet
Flute
Oboe
Saxophone
Shakuhachi
}
Drums={
Cabasa
Snare Drum
Bass Drum
Closed Hi-Hat
Open Hi-Hat
Mid Tom
High Tom
Crash Cymbal
}
Other={
Accordion
Marimba
Organ
Vibraphone
}</options></input><input type="%n">50</input></inputs><script><custom-block s="Load TuneScope Primitives"></custom-block><block s="doApplyExtension"><l>ts_setinstvol(name, percent)</l><list><block var="Instrument"/><block var="VolumePercent"/></list></block></script></block-definition><block-definition s="Play Note %'Note' for Duration %'Duration' and Wait" type="command" category="Music"><comment x="0" y="0" w="315.8571428571429" collapsed="false">Plays the selected note for the specified musical duration. This block waits for the selected note to finish playing before moving to the next block.

Notes may be entered as Scientific Pitch Notation (eg. C4) or as MIDI numbers.

Note durations may be entered as duration names (eg. half, quarter, etc...) or as numerical values (eg. .5, .25, etc...)</comment><header></header><code></code><translations></translations><inputs><input type="%txt"><options>C3
D3
E3
F3
G3
A3
B3
C4
D4
E4
F4
G4
A4
B4
Sharps={
C#3
D#3
E#3
F#3
G#3
A#3
B#3
C#4
D#4
E#4
F#4
G#4
A#4
B#4
}
Flats={
Cb3
Db3
Eb3
Fb3
Gb3
Ab3
Bb3
Cb4
Db4
Eb4
Fb4
Gb4
Ab4
Bb4
}</options></input><input type="%txt"><options>Whole
Half
Quarter
Eighth
Sixteenth
Thirtysecond
Dotted Notes={
Dotted Half
Dotted Quarter
Dotted Eighth
Dotted Sixteenth
}
Triplet Notes={
Half Triplet
Quarter Triplet
Eighth Triplet
Sixteenth Triplet
}</options></input></inputs><script><custom-block s="Play Note %s for Duration %s"><custom-block s="Convert Note %s to MIDI"><block var="Note"/></custom-block><block var="Duration"/></custom-block><custom-block s="Rest for Note Duration %s"><block var="Duration"/></custom-block></script></block-definition><block-definition s="Play Note %'Note' for Duration %'Duration'" type="command" category="Music"><comment x="0" y="0" w="333.3128348214286" collapsed="false">Plays the selected note for the specified musical duration. 

Notes may be entered as Scientific Pitch Notation (eg. C4) or as MIDI numbers.

Note durations may be entered as duration names (eg. half, quarter, etc...) or as numerical values (eg. .5, .25, etc...)</comment><header></header><code></code><translations></translations><inputs><input type="%s"><options>C3
D3
E3
F3
G3
A3
B3
C4
D4
E4
F4
G4
A4
B4
Sharps={
C#3
D#3
E#3
F#3
G#3
A#3
B#3
C#4
D#4
E#4
F#4
G#4
A#4
B#4
}
Flats={
Cb3
Db3
Eb3
Fb3
Gb3
Ab3
Bb3
Cb4
Db4
Eb4
Fb4
Gb4
Ab4
Bb4
}</options></input><input type="%s"><options>Whole
Half
Quarter
Eighth
Sixteenth
Thirtysecond
Dotted Notes={
Dotted Half
Dotted Quarter
Dotted Eighth
Dotted Sixteenth
}
Triplet Notes={
Half Triplet
Quarter Triplet
Eighth Triplet
Sixteenth Triplet
}</options></input></inputs><script><custom-block s="Load TuneScope Primitives"></custom-block><block s="doApplyExtension"><l>ts_playnote(note, duration)</l><list><block s="reportIfElse"><block s="reportIsA"><block var="Note"/><l><option>number</option></l></block><custom-block s="Convert MIDI %n to Note using %s"><block var="Note"/><l>Sharps</l></custom-block><block var="Note"/></block><block s="reportIfElse"><block s="reportIsA"><block var="Duration"/><l><option>number</option></l></block><block s="reportVariadicProduct"><list><block var="Duration"/><block s="reportVariadicProduct"><list><l>4</l><block s="reportQuotient"><l>60</l><block s="getTempo"></block></block></list></block></list></block><custom-block s="Note Duration %txt at Current Tempo"><block var="Duration"/></custom-block></block></list></block></script></block-definition><block-definition s="Play Chord %'Chord' for Duration %'Duration'" type="command" category="Music"><comment x="0" y="0" w="160" collapsed="false">Plays a list of notes simultaneously for the specified musical duration.

Chords must be entered as a list.

Durations may be entered as duration names (eg. half, quarter, etc...) or as numerical values (eg. .5, .25, etc...)</comment><header></header><code></code><translations></translations><inputs><input type="%l"></input><input type="%s"><options>Whole
Half
Quarter
Eighth
Sixteenth
Thirtysecond
Dotted Notes={
Dotted Half
Dotted Quarter
Dotted Eighth
Dotted Sixteenth
}
Triplet Notes={
Half Triplet
Quarter Triplet
Eighth Triplet
Sixteenth Triplet
}</options></input></inputs><script><block s="doForEach"><l>item</l><block var="Chord"/><script><custom-block s="Play Note %s for Duration %s"><block var="item"/><block var="Duration"/></custom-block></script></block></script></block-definition><block-definition s="Rest for Note Duration %'Duration'" type="command" category="Music"><comment x="0" y="0" w="90" collapsed="false">Waits for the selected musical duration.

Durations may be entered as duration names (eg. half, quarter, etc...) or as numerical values (eg. .5, .25, etc...)</comment><header></header><code></code><translations></translations><inputs><input type="%s"><options>Whole
Half
Quarter
Eighth
Sixteenth
Thirtysecond
Dotted Notes={
Dotted Half
Dotted Quarter
Dotted Eighth
Dotted Sixteenth
}
Triplet Notes={
Half Triplet
Quarter Triplet
Eighth Triplet
Sixteenth Triplet
}</options></input></inputs><script><custom-block s="Load TuneScope Primitives"></custom-block><block s="doWait"><block s="reportIfElse"><block s="reportIsA"><block var="Duration"/><l><option>number</option></l></block><block s="reportVariadicProduct"><list><block var="Duration"/><block s="reportVariadicProduct"><list><l>4</l><block s="reportQuotient"><l>60</l><block s="getTempo"></block></block></list></block></list></block><custom-block s="Note Duration %txt at Current Tempo"><block var="Duration"/></custom-block></block></block></script></block-definition><block-definition s="Note Duration %'Note Duration' at Current Tempo" type="reporter" category="Music" helper="true"><comment x="0" y="0" w="262.8571428571429" collapsed="false">Each note duration is assigned a numerical value, with a whole note equalling "1".

Dotted Notes are equal to the named note plus half of the named note's duration.

Triplet notes are equal in duration to two of the named notes divided by three.

Multiplying the numerical value of a note duration by 
4*(60 / tempo) adjusts the note durations to match the current tempo.</comment><header></header><code></code><translations></translations><inputs><input type="%txt">Quarter<options>Whole
Half
Quarter
Eighth
Sixteenth
Thirtysecond
Dotted Notes={
Dotted Half
Dotted Quarter
Dotted Eighth
Dotted Sixteenth
}
Triplet Notes={
Half Triplet
Quarter Triplet
Eighth Triplet
Sixteenth Triplet
}</options></input></inputs><script><block s="doReport"><block s="reportVariadicProduct"><list><block s="reportListItem"><l>2</l><custom-block s="$flash assoc %s %l"><block var="Note Duration"/><block s="reportNewList"><list><block s="reportNewList"><list><l>Whole</l><l>1</l></list></block><block s="reportNewList"><list><l>Half</l><l>.5</l></list></block><block s="reportNewList"><list><l>Quarter</l><l>.25</l></list></block><block s="reportNewList"><list><l>Eighth</l><l>.125</l></list></block><block s="reportNewList"><list><l>Sixteenth</l><l>.0625</l></list></block><block s="reportNewList"><list><l>Thirtysecond</l><l>.03125</l></list></block><block s="reportNewList"><list><l>Dotted Whole</l><l>1.5</l></list></block><block s="reportNewList"><list><l>Dotted Half</l><l>.75</l></list></block><block s="reportNewList"><list><l>Dotted Quarter</l><l>.375</l></list></block><block s="reportNewList"><list><l>Dotted Eighth</l><l>.1875</l></list></block><block s="reportNewList"><list><l>Dotted Sixteenth</l><l>.09375</l></list></block><block s="reportNewList"><list><l>Dotted Thirtysecond</l><l>.046876</l></list></block><block s="reportNewList"><list><l>Whole Triplet</l><block s="reportQuotient"><l>2</l><l>3</l></block></list></block><block s="reportNewList"><list><l>Half Triplet</l><block s="reportQuotient"><l>1</l><l>3</l></block></list></block><block s="reportNewList"><list><l>Quarter Triplet</l><block s="reportQuotient"><l>.5</l><l>3</l></block></list></block><block s="reportNewList"><list><l>Eighth Triplet</l><block s="reportQuotient"><block s="reportVariadicProduct"><list><l>.25</l><l>2</l></list></block><l>3</l></block></list></block><block s="reportNewList"><list><l>Sixteenth Triplet</l><block s="reportQuotient"><block s="reportVariadicProduct"><list><l>.125</l><l>2</l></list></block><l>3</l></block></list></block><block s="reportNewList"><list><l>Thirtysecond Triplet</l><block s="reportQuotient"><l>.0625</l><l>3</l></block></list></block></list></block></custom-block></block><l>4</l><block s="reportQuotient"><l>60</l><block s="getTempo"></block></block></list></block></block></script></block-definition><block-definition s="%'Scale Type' Scale: %'Note' Octave: %'Octave'" type="reporter" category="Music"><comment x="0" y="0" w="264.7690848214286" collapsed="false">Reports all notes in a specified scale using the provided note and octave number as the starting note of the scale.

To add additional scales to the "Types" script variable, create a list with the name of the scale as the first item and the steps between each note of the scale as the second item.</comment><header></header><code></code><translations></translations><inputs><input type="%s">Chromatic<options>Chromatic
Major
Minor</options></input><input type="%s">C</input><input type="%n">4<options>0
1
2
3
4
5
6
7</options></input></inputs><script><block s="doIfElse"><block s="reportAnd"><block s="reportListContainsItem"><custom-block s="Chromatic Notes"></custom-block><block var="Note"/></block><block s="reportIsA"><block var="Octave"/><l><option>number</option></l></block></block><script><block s="doWarp"><script><block s="doDeclareVariables"><list><l>Types</l><l>MIDI Number</l><l>Scale</l><l>Pattern</l><l>Converted Note</l></list></block><block s="doSetVar"><l>Converted Note</l><custom-block s="Convert False Sharps/Flats %s"><block var="Note"/></custom-block></block><block s="doSetVar"><l>Types</l><block s="reportNewList"><list><block s="reportNewList"><list><l>Chromatic</l><block s="reportTextSplit"><l>11111111111</l><l><option>letter</option></l></block></list></block><block s="reportNewList"><list><l>Major</l><block s="reportTextSplit"><l>221222</l><l><option>letter</option></l></block></list></block><block s="reportNewList"><list><l>Minor</l><block s="reportTextSplit"><l>212212</l><l><option>letter</option></l></block></list></block><block s="reportNewList"><list><l>Diminished</l><block s="reportTextSplit"><l>2121212</l><l><option>letter</option></l></block></list></block></list></block></block><block s="doSetVar"><l>MIDI Number</l><custom-block s="Convert Note %s to MIDI"><block s="reportJoinWords"><list><block var="Note"/><block var="Octave"/></list></block></custom-block></block><block s="doSetVar"><l>Scale</l><block s="reportNewList"><list><block var="MIDI Number"/></list></block></block><block s="doSetVar"><l>Pattern</l><block s="reportListItem"><l>2</l><custom-block s="$flash assoc %s %l"><block var="Scale Type"/><block var="Types"/></custom-block></block></block><block s="doForEach"><l>item</l><block var="Pattern"/><script><block s="doChangeVar"><l>MIDI Number</l><block var="item"/></block><block s="doAddToList"><block var="MIDI Number"/><block var="Scale"/></block></script></block></script></block><block s="doReport"><custom-block s="Convert MIDI %n to Note using %s"><block var="Scale"/><custom-block s="Check for Sharp/Flat %s"><block var="Converted Note"/></custom-block></custom-block></block></script><script><block s="doReport"><l></l></block></script></block></script></block-definition><block-definition s="Check for Sharp/Flat %'Note'" type="reporter" category="Music" helper="true"><comment x="0" y="0" w="90" collapsed="false">Reports "#" or "b" of the input scientific pitch notation contains either.</comment><header></header><code></code><translations></translations><inputs><input type="%s"></input></inputs><script><block s="doReport"><block s="reportIfElse"><block s="reportGreaterThan"><block s="reportStringSize"><block var="Note"/></block><l>1</l></block><block s="reportLetter"><l><option>last</option></l><block var="Note"/></block><l></l></block></block></script></block-definition><block-definition s="Note %'#' in %'Major/Minor' Scale: %'Note' Octave: %'Octave'" type="reporter" category="Music"><comment x="0" y="0" w="239.6751395089286" collapsed="false">Reports the note in a specific position within a major or minor musical scale. (e.g., The third note in a C Major scale starting in the fourth octave is E4.)</comment><header></header><code></code><translations></translations><inputs><input type="%n" readonly="true">1<options>1
2
3
4
5
6
7</options></input><input type="%s" readonly="true">Major<options>Major
Minor</options></input><input type="%s">C</input><input type="%n">4<options>0
1
2
3
4
5
6
7</options></input></inputs><script><block s="doReport"><block s="reportListItem"><block var="#"/><custom-block s="%s Scale: %s Octave: %n"><block var="Major/Minor"/><block var="Note"/><block var="Octave"/></custom-block></block></block></script></block-definition><block-definition s="Interval Between Note %'Note 1' to %'Note 2' in the %'Major/Minor' Scale %'Note'" type="reporter" category="Music"><comment w="245.00000000000003" collapsed="false">Reports the distance in steps between two notes in the selected scale. (e.g., In the C Major scale, there are two intervals between C4 and E4.)

If one or more of the selected notes is not in the selected scale, the block reports nothing.

Notes must be entered as scientific pitch notation (eg. C4).</comment><header></header><code></code><translations></translations><inputs><input type="%s">C4</input><input type="%s">G4</input><input type="%s" readonly="true">Major<options>Major
Minor</options></input><input type="%s">C</input></inputs><script><block s="doDeclareVariables"><list><l>Note Position 1</l><l>Note Position 2</l></list></block><block s="doSetVar"><l>Note Position 1</l><block s="reportListIndex"><custom-block s="Convert Note %s to MIDI"><block var="Note 1"/></custom-block><custom-block s="Create Full %s MIDI Scale %s"><block var="Major/Minor"/><block var="Note"/></custom-block></block></block><block s="doSetVar"><l>Note Position 2</l><block s="reportListIndex"><custom-block s="Convert Note %s to MIDI"><block var="Note 2"/></custom-block><custom-block s="Create Full %s MIDI Scale %s"><block var="Major/Minor"/><block var="Note"/></custom-block></block></block><block s="doIfElse"><block s="reportAnd"><block s="reportListContainsItem"><custom-block s="Create Full %s MIDI Scale %s"><block var="Major/Minor"/><block var="Note"/></custom-block><custom-block s="Convert Note %s to MIDI"><block var="Note 1"/></custom-block></block><block s="reportListContainsItem"><custom-block s="Create Full %s MIDI Scale %s"><block var="Major/Minor"/><block var="Note"/></custom-block><custom-block s="Convert Note %s to MIDI"><block var="Note 2"/></custom-block></block></block><script><block s="doReport"><block s="reportDifference"><block var="Note Position 2"/><block var="Note Position 1"/></block></block></script><script><block s="doReport"><l></l></block></script></block></script></block-definition><block-definition s="Create Full %'Type' MIDI Scale %'Note'" type="reporter" category="Music" helper="true"><header></header><code></code><translations></translations><inputs><input type="%s"><options>Chromatic
Major
Minor</options></input><input type="%s"></input></inputs><script><block s="doWarp"><script><block s="doDeclareVariables"><list><l>Scale Types</l><l>Scale</l><l>Pattern</l><l>MIDI Number</l></list></block><block s="doSetVar"><l>Scale Types</l><block s="reportNewList"><list><block s="reportNewList"><list><l>Chromatic</l><block s="reportTextSplit"><l>111111111111</l><l><option>letter</option></l></block></list></block><block s="reportNewList"><list><l>Major</l><block s="reportTextSplit"><l>2212221</l><l><option>letter</option></l></block></list></block><block s="reportNewList"><list><l>Minor</l><block s="reportTextSplit"><l>2122122</l><l><option>letter</option></l></block></list></block></list></block></block><block s="doSetVar"><l>MIDI Number</l><custom-block s="Convert Note %s to MIDI"><block s="reportJoinWords"><list><custom-block s="Get Note %s"><block var="Note"/></custom-block><l>0</l></list></block></custom-block></block><block s="doSetVar"><l>Scale</l><block s="reportNewList"><list><block var="MIDI Number"/></list></block></block><block s="doSetVar"><l>Pattern</l><block s="reportListItem"><l>2</l><custom-block s="$flash assoc %s %l"><block var="Type"/><block var="Scale Types"/></custom-block></block></block><block s="doRepeat"><l>8</l><script><block s="doForEach"><l>item</l><block var="Pattern"/><script><block s="doChangeVar"><l>MIDI Number</l><block var="item"/></block><block s="doAddToList"><block var="MIDI Number"/><block var="Scale"/></block></script></block></script></block><block s="doReport"><block var="Scale"/></block></script></block></script></block-definition><block-definition s="%'Major/Minor' Chord: %'Note' Octave: %'Octave'" type="reporter" category="Music"><comment x="0" y="0" w="163.5714285714284" collapsed="false">Reports the notes comprising a major or minor chord, using the specified note and octave as the root note of the chord.</comment><header></header><code></code><translations></translations><inputs><input type="%s" readonly="true">Major<options>Major
Minor</options></input><input type="%s">C</input><input type="%s">4</input></inputs><script><block s="doReport"><block s="reportIfElse"><block s="reportAnd"><block s="reportListContainsItem"><custom-block s="Chromatic Notes"></custom-block><block var="Note"/></block><block s="reportIsA"><block var="Octave"/><l><option>number</option></l></block></block><block s="reportListItem"><block s="reportNewList"><list><l>1</l><l>3</l><l>5</l></list></block><custom-block s="%s Scale: %s Octave: %n"><block var="Major/Minor"/><block var="Note"/><block var="Octave"/></custom-block></block><l></l></block></block></script></block-definition><block-definition s="%'Type' Chord: %'Note' Octave: %'Octave' Chord Position: %'Position'" type="reporter" category="Music"><comment x="0" y="0" w="337.8571428571429" collapsed="false">This block finds the notes in a specified chord along the selected scale. Roman numerals differentiate chord positions from octave numbers (e.g., the Roman numeral “I” reports the notes of the first chord in the sequence). Upper case Roman numerals represent major chords within the scale. Lower case Roman numerals represent minor chords within the scale.</comment><header></header><code></code><translations></translations><inputs><input type="%s" readonly="true">Major<options>Major
Minor</options></input><input type="%s">C</input><input type="%n">4<options>0
1
2
3
4
5
6
7</options></input><input type="%s" readonly="true">I<options>I
ii
iii
IV
V
vi
vii°</options></input></inputs><script><block s="doWarp"><script><block s="doDeclareVariables"><list><l>Converted Numeral</l></list></block><block s="doSetVar"><l>Converted Numeral</l><custom-block s="Converted Roman Numeral %s"><block var="Position"/></custom-block></block><block s="doIfElse"><block s="reportEquals"><block var="Type"/><l>Major</l></block><script><block s="doSetBlockAttribute"><l><option>menus</option></l><block s="reifyReporter"><autolambda><custom-block s="%s Chord: %s Octave: %n Chord Position: %s"><l>Major</l><l></l><l></l><l></l></custom-block></autolambda><list></list></block><block s="reportNewList"><list><l></l><l></l><l></l><block s="reportNewList"><list><l>I</l><l>ii</l><l>iii</l><l>IV</l><l>V</l><l>vi</l><l>vii°</l></list></block></list></block></block></script><script><block s="doSetBlockAttribute"><l><option>menus</option></l><block s="reifyReporter"><autolambda><custom-block s="%s Chord: %s Octave: %n Chord Position: %s"><l>Major</l><l></l><l></l><l></l></custom-block></autolambda><list></list></block><block s="reportNewList"><list><l></l><l></l><l></l><block s="reportNewList"><list><l>i</l><l>ii°</l><l>III</l><l>iv</l><l>V</l><l>VI</l><l>VII</l></list></block></list></block></block></script></block><block s="doIf"><block s="reportListContainsItem"><block s="reportIfElse"><block s="reportEquals"><block var="Type"/><l>Major</l></block><block s="reportNewList"><list><l>1</l><l>4</l><l>5</l></list></block><block s="reportNewList"><list><l>3</l><l>6</l><l>7</l></list></block></block><block var="Converted Numeral"/></block><script><block s="doReport"><custom-block s="%s Chord: %s Octave: %s"><l>Major</l><custom-block s="Get Note %s"><block s="reportListItem"><block var="Converted Numeral"/><custom-block s="%s Scale: %s Octave: %n"><block var="Type"/><block var="Note"/><block var="Octave"/></custom-block></block></custom-block><block var="Octave"/></custom-block></block></script></block><block s="doIf"><block s="reportListContainsItem"><block s="reportIfElse"><block s="reportEquals"><block var="Type"/><l>Major</l></block><block s="reportNewList"><list><l>2</l><l>3</l><l>6</l></list></block><block s="reportNewList"><list><l>1</l><l>4</l><l>5</l></list></block></block><block var="Converted Numeral"/></block><script><block s="doReport"><custom-block s="%s Chord: %s Octave: %s"><l>Minor</l><custom-block s="Get Note %s"><block s="reportListItem"><block var="Converted Numeral"/><custom-block s="%s Scale: %s Octave: %n"><block var="Type"/><block var="Note"/><block var="Octave"/></custom-block></block></custom-block><block var="Octave"/></custom-block></block></script></block><block s="doIf"><block s="reportEquals"><block var="Converted Numeral"/><block s="reportIfElse"><block s="reportEquals"><block var="Type"/><l>Major</l></block><l>7</l><l>2</l></block></block><script><block s="doReport"><custom-block s="%s Diminished Chord %s Octave"><custom-block s="Get Note %s"><block s="reportListItem"><l>8</l><custom-block s="%s Scale: %s Octave: %n"><l>Diminished</l><block var="Note"/><block var="Octave"/></custom-block></block></custom-block><block var="Octave"/></custom-block></block></script></block></script></block></script></block-definition><block-definition s="Converted Roman Numeral %'Roman Numeral'" type="reporter" category="Music" helper="true"><comment x="0" y="0" w="90" collapsed="false">Converts roman numerals to arabic numerals using an association table.</comment><header></header><code></code><translations></translations><inputs><input type="%s"></input></inputs><script><block s="doReport"><block s="reportListItem"><l>2</l><custom-block s="$flash assoc %s %l"><block var="Roman Numeral"/><block s="reportNewList"><list><block s="reportNewList"><list><l>I</l><l>1</l></list></block><block s="reportNewList"><list><l>II</l><l>2</l></list></block><block s="reportNewList"><list><l>II°</l><l>2</l></list></block><block s="reportNewList"><list><l>III</l><l>3</l></list></block><block s="reportNewList"><list><l>IV</l><l>4</l></list></block><block s="reportNewList"><list><l>V</l><l>5</l></list></block><block s="reportNewList"><list><l>VI</l><l>6</l></list></block><block s="reportNewList"><list><l>VII</l><l>7</l></list></block><block s="reportNewList"><list><l>VII°</l><l>7</l></list></block></list></block></custom-block></block></block></script></block-definition><block-definition s="%'Note' Diminished Chord %'Octave' Octave" type="reporter" category="Music" helper="true"><comment x="0" y="0" w="90" collapsed="false">Reports the notes of a diminished chord, given the starting note and octave of the chord.</comment><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%s"></input></inputs><script><block s="doReport"><block s="reportListItem"><block s="reportNewList"><list><l>1</l><l>3</l><l>5</l></list></block><custom-block s="%s Scale: %s Octave: %n"><l>Diminished</l><block var="Note"/><block var="Octave"/></custom-block></block></block></script></block-definition><block-definition s="Add Note %'Note' to Chord %'Chord'" type="reporter" category="Music"><comment x="0" y="0" w="280" collapsed="false">This block reports a chord and appends an additional note.</comment><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%l"></input></inputs><script><block s="doReport"><block s="reportConcatenatedLists"><list><block var="Chord"/><block s="reportNewList"><list><block s="reportIfElse"><block s="reportIsA"><block var="Note"/><l><option>number</option></l></block><custom-block s="Convert MIDI %n to Note using %s"><block var="Note"/><l></l></custom-block><custom-block s="Convert False Sharps/Flats %s"><block var="Note"/></custom-block></block></list></block></list></block></block></script></block-definition><block-definition s="Chord Rest" type="reporter" category="Music"><comment x="0" y="0" w="189.2857142857143" collapsed="false">May be paired with a musical duration to insert a rest into a sequence of chords.</comment><header></header><code></code><translations></translations><inputs></inputs><script><block s="doReport"><block s="reportNewList"><list><l>R</l><l>R</l><l>R</l></list></block></block></script></block-definition><block-definition s="Drum Pattern %'Step'" type="reporter" category="Music"><comment x="0" y="0" w="245.9644252232142" collapsed="false">This block reports a series of beats that tell the drum when to play. Beats are represented as an “X,” which can be typed into the block. Beats can be added or subtracted using the arrows on the right of the block.</comment><header></header><code></code><translations></translations><inputs><input type="%mult%s"></input></inputs><script><block s="doReport"><block var="Step"/></block></script></block-definition><block-definition s="Drum %'Instrument' %'Pattern' Beat %'Beat' Times %'Times'" type="reporter" category="Music"><comment x="0" y="0" w="288.5714285714286" collapsed="false">This block reports a drum pattern, assigns a drum to it, and sets the duration value of each item in the pattern. Different drums can be selected from the drop-down menu. Beat durations can be selected from the drop-down menu or entered directly.</comment><header></header><code></code><translations></translations><inputs><input type="%s" readonly="true">Snare Drum<options>Bass Drum
Snare Drum
Crash Cymbal
Cabasa
Toms={
High Tom
Mid Tom
}
Hi-Hats={
Closed Hi-hat
Open Hi-hat
}</options></input><input type="%l"></input><input type="%s">Eighth<options>Quarter
Eighth
Sixteenth</options></input><input type="%s">1<options>1
2
3
4
8
12
16
24
Loop</options></input></inputs><script><block s="doDeclareVariables"><list><l>notes and durations</l><l>pitch</l></list></block><block s="doIfElse"><block s="reportEquals"><block var="Instrument"/><l>Bass Drum</l></block><script><block s="doSetVar"><l>pitch</l><l>C2</l></block></script><script><block s="doSetVar"><l>pitch</l><l>C4</l></block></script></block><block s="doIfElse"><block s="reportEquals"><block var="Times"/><l>Loop</l></block><script><block s="doSetVar"><l>notes and durations</l><block s="reportNewList"><list><block s="reportNewList"><list><l>Loop-Melody</l><block var="Instrument"/></list></block></list></block></block><block s="doForEach"><l>item</l><block var="Pattern"/><script><block s="doIfElse"><block s="reportOr"><block s="reportEquals"><block var="item"/><l>x</l></block><block s="reportEquals"><block var="item"/><l>X</l></block></block><script><block s="doAddToList"><block s="reportNewList"><list><block var="pitch"/><block var="Beat"/></list></block><block var="notes and durations"/></block></script><script><block s="doAddToList"><block s="reportNewList"><list><l>R</l><block var="Beat"/></list></block><block var="notes and durations"/></block></script></block></script></block></script><script><block s="doSetVar"><l>notes and durations</l><block s="reportNewList"><list><block s="reportNewList"><list><l>Melody</l><block var="Instrument"/></list></block></list></block></block><block s="doRepeat"><block var="Times"/><script><block s="doForEach"><l>item</l><block var="Pattern"/><script><block s="doIfElse"><block s="reportOr"><block s="reportEquals"><block var="item"/><l>x</l></block><block s="reportEquals"><block var="item"/><l>X</l></block></block><script><block s="doAddToList"><block s="reportNewList"><list><block var="pitch"/><block var="Beat"/></list></block><block var="notes and durations"/></block></script><script><block s="doAddToList"><block s="reportNewList"><list><l>R</l><block var="Beat"/></list></block><block var="notes and durations"/></block></script></block></script></block></script></block></script></block><block s="doReport"><block var="notes and durations"/></block></script></block-definition><block-definition s="Chromatic Notes" type="reporter" category="Music" helper="true"><header></header><code></code><translations></translations><inputs></inputs><script><block s="doReport"><block s="reportListItem"><l>1</l><block s="reportListAttribute"><l><option>columns</option></l><block s="reportNewList"><list><block s="reportNewList"><list><l>Cb</l><l>23</l></list></block><block s="reportNewList"><list><l>C</l><l>24</l></list></block><block s="reportNewList"><list><l>C#</l><l>25</l></list></block><block s="reportNewList"><list><l>Db</l><l>25</l></list></block><block s="reportNewList"><list><l>D</l><l>26</l></list></block><block s="reportNewList"><list><l>D#</l><l>27</l></list></block><block s="reportNewList"><list><l>Eb</l><l>27</l></list></block><block s="reportNewList"><list><l>E</l><l>28</l></list></block><block s="reportNewList"><list><l>E#</l><l>29</l></list></block><block s="reportNewList"><list><l>Fb</l><l>28</l></list></block><block s="reportNewList"><list><l>F</l><l>29</l></list></block><block s="reportNewList"><list><l>F#</l><l>30</l></list></block><block s="reportNewList"><list><l>Gb</l><l>30</l></list></block><block s="reportNewList"><list><l>G</l><l>31</l></list></block><block s="reportNewList"><list><l>G#</l><l>32</l></list></block><block s="reportNewList"><list><l>Ab</l><l>32</l></list></block><block s="reportNewList"><list><l>A</l><l>33</l></list></block><block s="reportNewList"><list><l>A#</l><l>34</l></list></block><block s="reportNewList"><list><l>Bb</l><l>34</l></list></block><block s="reportNewList"><list><l>B</l><l>35</l></list></block><block s="reportNewList"><list><l>B#</l><l>36</l></list></block></list></block></block></block></block></script></block-definition><block-definition s="Convert False Sharps/Flats %'Note'" type="reporter" category="Music" helper="true"><header></header><code></code><translations></translations><inputs><input type="%s"></input></inputs><script><block s="doDeclareVariables"><list><l>converted note</l></list></block><block s="doIfElse"><block s="reportListContainsItem"><block s="reportNewList"><list><l>E#</l><l>Fb</l><l>B#</l><l>Cb</l></list></block><block var="Note"/></block><script><block s="doSetVar"><l>converted note</l><block s="reportListItem"><l>2</l><custom-block s="$flash assoc %s %l"><block var="Note"/><block s="reportNewList"><list><block s="reportNewList"><list><l>E#</l><l>F</l></list></block><block s="reportNewList"><list><l>Fb</l><l>E</l></list></block><block s="reportNewList"><list><l>B#</l><l>C</l></list></block><block s="reportNewList"><list><l>Cb</l><l>B</l></list></block></list></block></custom-block></block></block></script><script><block s="doSetVar"><l>converted note</l><block var="Note"/></block></script></block><block s="doReport"><block var="converted note"/></block></script></block-definition><block-definition s="Measure %'Pairs'" type="reporter" category="Music"><comment x="0" y="0" w="286.4285714285714" collapsed="false">This block is used to group sequences of notes and chords into measures. Each note or chord in the measure is paired with a note duration. The pairs are entered into the block using a list. </comment><header></header><code></code><translations></translations><inputs><input type="%mult%l"></input></inputs><script><block s="doReport"><block var="Pairs"/></block></script></block-definition><block-definition s="Section %'Measures'" type="reporter" category="Music"><comment x="0" y="0" w="428.2220145089286" collapsed="false">This code block groups measures together. This can be helpful for separating groups of measures that repeat in various places throughout a song, like verses and choruses. This block works with both notes and chords. To add measures to a section, put the measures into a list.</comment><header></header><code></code><translations></translations><inputs><input type="%mult%l"></input></inputs><script><block s="doDeclareVariables"><list><l>Section</l></list></block><block s="doSetVar"><l>Section</l><block s="reportNewList"><list></list></block></block><block s="doForEach"><l>item</l><block var="Measures"/><script><block s="doSetVar"><l>Section</l><block s="reportConcatenatedLists"><list><block var="Section"/><block var="item"/></list></block></block></script></block><block s="doReport"><block var="Section"/></block></script></block-definition><block-definition s="Track: %'Type' Instrument: %'Instrument' $nl Musical Notation (Notes or Chords): %'Notation'" type="reporter" category="Music"><comment x="0" y="0" w="272.8571428571429" collapsed="false">This code block specifies the type of track to be played and assigns it an instrument. Both the track type and instrument are set using drop-down menus. This block accepts notes or chords paired with corresponding durations. This block also allows for the creation of note or chord loops that will repeat for the whole duration of the song. Both types of loops may be selected from the track drop-down menu. For a loop to play, it must have an accompanying track that is not a loop.</comment><header></header><code></code><translations></translations><inputs><input type="%s" readonly="true">Melody<options>Melody
Chords
Loops={
Loop-Melody
Loop-Chords
}</options></input><input type="%s" readonly="true">Piano<options>Piano
Brass={
French Horn
Trumpet
Tuba
}
Strings={
Banjo
Bass, Acoustic
Bass, Electric (Finger)
Cello
Guitar, Acoustic
Guitar, Electric
Guitar, Overdrive
Harp
Koto
Sitar
Violin
}
Woodwinds={
Bassoon
Clarinet
Flute
Oboe
Saxophone
Shakuhachi
}
Drums={
Cabasa
Snare Drum
Bass Drum
Closed Hi-Hat
Open Hi-Hat
Mid Tom
High Tom
Crash Cymbal
}
Other={
Accordion
Marimba
Music Box
Organ
Vibraphone
}</options></input><input type="%mult%s"></input></inputs><script><block s="doDeclareVariables"><list><l>Track</l></list></block><block s="doWarp"><script><block s="doSetVar"><l>Track</l><block s="reportNewList"><list><block s="reportNewList"><list><block var="Type"/><block var="Instrument"/></list></block></list></block></block><block s="doForEach"><l>item</l><block var="Notation"/><script><block s="doSetVar"><l>Track</l><block s="reportConcatenatedLists"><list><block var="Track"/><block var="item"/></list></block></block></script></block><block s="doReport"><block var="Track"/></block></script></block></script></block-definition><block-definition s="Play Tracks %'tracks' Time Signature: %'timeSignature'" type="command" category="Music"><comment x="0" y="0" w="198.57142857142858" collapsed="false">This block is used to play multiple music tracks. In most cases, several tracks with musical instruments are played in parallel. </comment><header></header><code></code><translations></translations><inputs><input type="%mult%l"></input><input type="%s" readonly="true">4/4<options>4/4
3/4
5/4
7/4
6/8
9/8
12/8</options></input></inputs><script><custom-block s="Load TuneScope Primitives"></custom-block><block s="doApplyExtension"><l>ts_playtracks(tracklist, timesignature)</l><list><block var="tracks"/><block var="timeSignature"/><block s="getTempo"></block></list></block></script></block-definition><block-definition s="Beats in Measure %'Measure' $nl Time Signature %'Time'" type="reporter" category="Music"><comment x="0" y="0" w="297.14285714285717" collapsed="false">This block determines if the combined durations of notes or chords within a measure are correct. The combined duration of notes within a measure must equal the number of beats specified by the time signature. 

When reading time signatures, the bottom number determines which note gets counted as a beat, and the top number determines how many beats are in a measure. For example, in 4/4 time, quarter notes are counted as beats and there are four quarter notes in a measure. In 6/8 time, the eighth note counted as the beat, and there are six eighth notes in a measure.

The Beats in Measure reports the discrepancy between the number of actual beats in a measure versus the required number of beats.

If name durations are not entered correctly, the block reports nothing.</comment><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%s" readonly="true">4/4<options>4/4
3/4
2/4
6/8
5/4
7/4
9/8
12/8</options></input></inputs><script><block s="doDeclareVariables"><list><l>Beats Necessary</l><l>Beat Value</l><l>Actual</l></list></block><block s="doSetVar"><l>Beats Necessary</l><block s="reportListItem"><l>1</l><block s="reportTextSplit"><block var="Time"/><l>/</l></block></block></block><block s="doSetVar"><l>Beat Value</l><block s="reportQuotient"><l>1</l><block s="reportListItem"><l>2</l><block s="reportTextSplit"><block var="Time"/><l>/</l></block></block></block></block><block s="doForEach"><l>item</l><block s="reportListItem"><l>2</l><block s="reportListAttribute"><l><option>columns</option></l><block var="Measure"/></block></block><script><block s="doIf"><block s="reportEquals"><block s="reportListContainsItem"><custom-block s="List of Note Durations"></custom-block><block var="item"/></block><block s="reportBoolean"><l><bool>false</bool></l></block></block><script><block s="doReport"><l></l></block></script></block></script></block><block s="doSetVar"><l>Actual</l><block s="reportVariadicSum"><custom-block s="Note Duration Value %s"><block s="reportListItem"><l>2</l><block s="reportListAttribute"><l><option>columns</option></l><block var="Measure"/></block></block></custom-block></block></block><block s="doReport"><block s="reportJoinWords"><list><block s="reportQuotient"><block var="Actual"/><block var="Beat Value"/></block><l> of </l><block var="Beats Necessary"/><l> beats</l></list></block></block></script></block-definition><block-definition s="Note Duration Value %'Duration'" type="reporter" category="Music"><comment x="0" y="0" w="311.42857142857144" collapsed="false">The Note Duration Value block reports the numerical value of the input duration name.

Inputing a list of duration names outputs a list of values.</comment><header></header><code></code><translations></translations><inputs><input type="%s">Quarter<options>Whole
Half
Quarter
Eighth
Sixteenth
Thirtysecond
Dotted Notes={
Dotted Half
Dotted Quarter
Dotted Eighth
Dotted Sixteenth
}
Triplet Notes={
Half Triplet
Quarter Triplet
Eighth Triplet
Sixteenth Triplet
}</options></input></inputs><script><block s="doWarp"><script><block s="doDeclareVariables"><list><l>Note Duration</l></list></block><block s="doIfElse"><block s="reportIsA"><block var="Duration"/><l><option>list</option></l></block><script><block s="doSetVar"><l>Note Duration</l><block s="reportNewList"><list></list></block></block><block s="doForEach"><l>item</l><block var="Duration"/><script><block s="doAddToList"><custom-block s="Note Duration Value %s"><block var="item"/></custom-block><block var="Note Duration"/></block></script></block><block s="doReport"><block var="Note Duration"/></block></script><script><block s="doReport"><block s="reportListItem"><l>2</l><custom-block s="$flash assoc %s %l"><block var="Duration"/><block s="reportNewList"><list><block s="reportNewList"><list><l>Whole</l><l>1</l></list></block><block s="reportNewList"><list><l>Half</l><l>.5</l></list></block><block s="reportNewList"><list><l>Quarter</l><l>.25</l></list></block><block s="reportNewList"><list><l>Eighth</l><l>.125</l></list></block><block s="reportNewList"><list><l>Sixteenth</l><l>.0625</l></list></block><block s="reportNewList"><list><l>Thirtysecond</l><l>.03125</l></list></block><block s="reportNewList"><list><l>Dotted Whole</l><l>1.5</l></list></block><block s="reportNewList"><list><l>Dotted Half</l><l>.75</l></list></block><block s="reportNewList"><list><l>Dotted Quarter</l><l>.375</l></list></block><block s="reportNewList"><list><l>Dotted Eighth</l><l>.1875</l></list></block><block s="reportNewList"><list><l>Dotted Sixteenth</l><l>.09375</l></list></block><block s="reportNewList"><list><l>Dotted Thirtysecond</l><l>.046876</l></list></block><block s="reportNewList"><list><l>Whole Triplet</l><block s="reportQuotient"><l>2</l><l>3</l></block></list></block><block s="reportNewList"><list><l>Half Triplet</l><block s="reportQuotient"><l>1</l><l>3</l></block></list></block><block s="reportNewList"><list><l>Quarter Triplet</l><block s="reportQuotient"><l>.5</l><l>3</l></block></list></block><block s="reportNewList"><list><l>Eighth Triplet</l><block s="reportQuotient"><block s="reportVariadicProduct"><list><l>.25</l><l>2</l></list></block><l>3</l></block></list></block><block s="reportNewList"><list><l>Sixteenth Triplet</l><block s="reportQuotient"><block s="reportVariadicProduct"><list><l>.125</l><l>2</l></list></block><l>3</l></block></list></block><block s="reportNewList"><list><l>Thirtysecond Triplet</l><block s="reportQuotient"><l>.0625</l><l>3</l></block></list></block></list></block></custom-block></block></block></script></block></script></block></script></block-definition><block-definition s="List of Note Durations" type="reporter" category="Music" helper="true"><header></header><code></code><translations></translations><inputs></inputs><script><block s="doReport"><block s="reportNewList"><list><l>Whole</l><l>Half</l><l>Quarter</l><l>Eighth</l><l>Sixteenth</l><l>Thirtysecond</l><l>Dotted Whole</l><l>Dotted Half</l><l>Dotted Quarter</l><l>Dotted Eighth</l><l>Dotted Sixteenth</l><l>Dotted Thirtysecond</l><l>Whole Triplet</l><l>Half Triplet</l><l>Quarter Triplet</l><l>Eighth Triplet</l><l>Sixteenth Triplet</l><l>Thirty Second Triplet</l></list></block></block></script></block-definition><block-definition s="Note [ Pitch: %'pitch' Duration: %'duration' ]" type="reporter" category="Music"><header></header><code></code><translations></translations><inputs><input type="%s">C4<options>C3
D3
E3
F3
G3
A3
B3
C4
D4
E4
F4
G4
A4
B4
Sharps={
C#3
D#3
E#3
F#3
G#3
A#3
B#3
C#4
D#4
E#4
F#4
G#4
A#4
B#4
}
Flats={
Cb3
Db3
Eb3
Fb3
Gb3
Ab3
Bb3
Cb4
Db4
Eb4
Fb4
Gb4
Ab4
Bb4
}</options></input><input type="%s">Quarter<options>Whole
Half
Quarter
Eighth
Sixteenth
Thirtysecond
Dotted Whole
Dotted Half
Dotted Quarter
Dotted Eighth
Dotted Sixteenth
Dotted Thirtysecond
Whole Triplet
Half Triplet
Quarter Triplet
Eighth Triplet
Sixteenth Triplet
Thirty Second Triplet</options></input></inputs><script><block s="doReport"><block s="reportNewList"><list><block var="pitch"/><block var="duration"/></list></block></block></script></block-definition><block-definition s="Tone Number: %'number' Frequency: %'frequency' Amplitude: %'amplitude'" type="command" category="Music"><comment x="0" y="0" w="292.14285714285717" collapsed="false">This block assigns a number, frequency, and amplitude to a tone.</comment><header></header><code></code><translations></translations><inputs><input type="%n">1<options>1
2
3
4
5</options></input><input type="%n"></input><input type="%n">0.5<options>.1
.2
.3
.4
.5
.6
.7
.8
.9</options></input></inputs><script><custom-block s="Load TuneScope Primitives"></custom-block><block s="doApplyExtension"><l>ts_settone(id, frequency, amplitude, balance)</l><list><block var="number"/><block var="frequency"/><block var="amplitude"/><block s="getPan"></block></list></block></script></block-definition><block-definition s="Tone Number: %'Number' %'newOn' On/Off" type="command" category="Music"><comment x="0" y="0" w="371.424916294643" collapsed="false">This block turns the specified tone on or off. This block will play a sine wave. </comment><header></header><code></code><translations></translations><inputs><input type="%n">1<options>1
2
3
4
5</options></input><input type="%b"></input></inputs><script><custom-block s="Load TuneScope Primitives"></custom-block><block s="doApplyExtension"><l>ts_turntoneon(id, bool)</l><list><block var="Number"/><block var="newOn"/></list></block></script></block-definition><block-definition s="Tone Off" type="command" category="Music"><comment x="0" y="0" w="234.87792968750003" collapsed="false">This block turns off all the tones currently playing. </comment><header></header><code></code><translations></translations><inputs></inputs><script><custom-block s="Load TuneScope Primitives"></custom-block><block s="doApplyExtension"><l>ts_stoptones()</l><list></list></block></script></block-definition><block-definition s="Play MIDI Controller: %'controller_name' Instrument: %'instrument'" type="command" category="Music"><comment x="0" y="0" w="285.7142857142857" collapsed="false">Passes through the signal from a MIDI controller, allowing the user to play the controller using the assigned instrument. The name of the MIDI controller must be input exactly as it appears on the user's computer.</comment><header></header><code></code><translations></translations><inputs><input type="%s">MPK mini 3<options>MPK mini 3
MPK mini play
MPK Mini Mk II
M-audio Keystation 49es</options></input><input type="%s" readonly="true">Piano<options>Piano
Brass={
French Horn
Trumpet
Tuba
}
Strings={
Banjo
Bass, Acoustic
Bass, Electric (Finger)
Cello
Guitar, Acoustic
Guitar, Electric
Guitar, Overdrive
Harp
Koto
Sitar
Violin
}
Woodwinds={
Bassoon
Clarinet
Flute
Oboe
Saxophone
Shakuhachi
}
Drums={
Cabasa
Snare Drum
Bass Drum
Closed Hi-Hat
Open Hi-Hat
Mid Tom
High Tom
Crash Cymbal
}
Other={
Accordion
Marimba
Music Box
Organ
Vibraphone
}</options></input></inputs><script><custom-block s="Load TuneScope Primitives"></custom-block><block s="doApplyExtension"><l>ts_playMIDI(controller, instrument)</l><list><block var="controller_name"/><block var="instrument"/></list></block></script></block-definition><block-definition s="Stop MIDI Controller" type="command" category="Music"><header></header><code></code><translations></translations><inputs></inputs><script><custom-block s="Load TuneScope Primitives"></custom-block><block s="doApplyExtension"><l>ts_stopMIDI()</l><list></list></block></script></block-definition><block-definition s="Convert MIDI %'midinumber' to Note" type="reporter" category="Music"><header></header><code></code><translations></translations><inputs><input type="%s"></input></inputs><script><block s="doReport"><custom-block s="Convert MIDI %n to Note using %s"><block var="midinumber"/><l>Sharps</l></custom-block></block></script></block-definition><block-definition s="Convert MIDI %'#' to Note using %'Sharps/Flats'" type="reporter" category="Music" helper="true"><comment x="0" y="0" w="217.80831473214303" collapsed="false">Reports the corresponding note (in scientific pitch notation) for the specified MIDI number, matching the use of sharps and flats to the input scientific pitch notation.</comment><header></header><code></code><translations></translations><inputs><input type="%n">60<options>§_pianoKeyboardMenu</options></input><input type="%s" readonly="true">Sharps<options>Sharps
Flats</options></input></inputs><script><block s="doIfElse"><block s="reportIsA"><block var="#"/><l><option>list</option></l></block><script><block s="doReport"><block s="reportMap"><block s="reifyReporter"><autolambda><custom-block s="Convert MIDI %n to Note using %s"><l></l><block var="Sharps/Flats"/></custom-block></autolambda><list></list></block><block var="#"/></block></block></script><script><block s="doDeclareVariables"><list><l>Octave</l><l>Note</l></list></block><block s="doSetVar"><l>Octave</l><block s="reportLetter"><l>1</l><block s="reportDifference"><block s="reportQuotient"><block var="#"/><l>12</l></block><l>1</l></block></block></block><block s="doSetVar"><l>Note</l><block s="reportListItem"><block s="reportVariadicSum"><list><block s="reportModulus"><block var="#"/><l>12</l></block><l>1</l></list></block><block s="reportIfElse"><block s="reportListContainsItem"><block s="reportNewList"><list><l>♭</l><l>b</l></list></block><block var="Sharps/Flats"/></block><block s="reportNewList"><list><l>C</l><l>Db</l><l>D</l><l>Eb</l><l>E</l><l>F</l><l>Gb</l><l>G</l><l>Ab</l><l>A</l><l>Bb</l><l>B</l></list></block><block s="reportNewList"><list><l>C</l><l>C#</l><l>D</l><l>D#</l><l>E</l><l>F</l><l>F#</l><l>G</l><l>G#</l><l>A</l><l>A#</l><l>B</l></list></block></block></block></block><block s="doReport"><block s="reportJoinWords"><list><block var="Note"/><block var="Octave"/></list></block></block></script></block></script></block-definition><block-definition s="Convert Note %'Note' to MIDI" type="reporter" category="Music"><comment w="273.5714285714286" collapsed="false">Reports the midi number of the specified note. The note should be entered using scientific pitch notation (e.g., "C4").</comment><header></header><code></code><translations></translations><inputs><input type="%s"></input></inputs><script><block s="doReport"><block s="reportVariadicSum"><list><custom-block s="MIDI %s Note"><custom-block s="Get Note %s"><block var="Note"/></custom-block></custom-block><block s="reportVariadicProduct"><list><l>12</l><block s="reportDifference"><custom-block s="Get Octave %s"><block var="Note"/></custom-block><l>1</l></block></list></block></list></block></block></script></block-definition><block-definition s="Get Note %'Note + Octave'" type="reporter" category="Music" helper="true"><comment w="90" collapsed="false">Extracts the note name from the provided scientific pitch notation. (e.g., An input of "C4" produces an output of "C".)</comment><header></header><code></code><translations></translations><inputs><input type="%s"></input></inputs><script><block s="doReport"><block s="reportIfElse"><block s="reportEquals"><block s="reportStringSize"><block var="Note + Octave"/></block><l>2</l></block><block s="reportLetter"><l>1</l><block var="Note + Octave"/></block><block s="reportJoinWords"><list><block s="reportLetter"><l>1</l><block var="Note + Octave"/></block><block s="reportLetter"><l>2</l><block var="Note + Octave"/></block></list></block></block></block></script></block-definition><block-definition s="MIDI %'Note' Note" type="reporter" category="Music" helper="true"><comment x="0" y="0" w="90" collapsed="false">Association list for note names and their corresponding MIDI numbers in the first octave. Used to convert note names to MIDI. </comment><header></header><code></code><translations></translations><inputs><input type="%s"></input></inputs><script><block s="doReport"><block s="reportListItem"><l>2</l><custom-block s="$flash assoc %s %l"><block var="Note"/><block s="reportNewList"><list><block s="reportNewList"><list><l>Cb</l><l>23</l></list></block><block s="reportNewList"><list><l>C</l><l>24</l></list></block><block s="reportNewList"><list><l>C#</l><l>25</l></list></block><block s="reportNewList"><list><l>Db</l><l>25</l></list></block><block s="reportNewList"><list><l>D</l><l>26</l></list></block><block s="reportNewList"><list><l>D#</l><l>27</l></list></block><block s="reportNewList"><list><l>Eb</l><l>27</l></list></block><block s="reportNewList"><list><l>E</l><l>28</l></list></block><block s="reportNewList"><list><l>E#</l><l>29</l></list></block><block s="reportNewList"><list><l>Fb</l><l>28</l></list></block><block s="reportNewList"><list><l>F</l><l>29</l></list></block><block s="reportNewList"><list><l>F#</l><l>30</l></list></block><block s="reportNewList"><list><l>Gb</l><l>30</l></list></block><block s="reportNewList"><list><l>G</l><l>31</l></list></block><block s="reportNewList"><list><l>G#</l><l>32</l></list></block><block s="reportNewList"><list><l>Ab</l><l>32</l></list></block><block s="reportNewList"><list><l>A</l><l>33</l></list></block><block s="reportNewList"><list><l>A#</l><l>34</l></list></block><block s="reportNewList"><list><l>Bb</l><l>34</l></list></block><block s="reportNewList"><list><l>B</l><l>35</l></list></block><block s="reportNewList"><list><l>B#</l><l>36</l></list></block></list></block></custom-block></block></block></script></block-definition><block-definition s="$flash assoc %'key' %'a-list'" type="reporter" category="lists"><comment w="289.3333333333333" collapsed="false">The second input is an "association list," a list of two-item lists. Each of those smaller lists has a "key" as its first item and a "value" as its second. ASSOC reports the first key-value pair in the association list whose key matches the first input.</comment><header></header><code></code><translations>ca:associació _ _
</translations><inputs><input type="%s"></input><input type="%l"></input></inputs><script><block s="doReport"><block s="reportAtomicFindFirst"><block s="reifyPredicate"><autolambda><block s="reportEquals"><block var="key"/><block s="reportListItem"><l>1</l><l/></block></block></autolambda><list></list></block><block var="a-list"/></block></block></script></block-definition><block-definition s="Get Octave %'Note'" type="reporter" category="Music" helper="true"><comment w="90" collapsed="false">Extracts the octave number from the provided scientific pitch notation. (e.g., An input of "C4" produces an output of "4".)</comment><header></header><code></code><translations></translations><inputs><input type="%s"></input></inputs><script><block s="doIf"><block s="reportEquals"><block s="reportStringSize"><block var="Note"/></block><l>2</l></block><script><block s="doReport"><block s="reportLetter"><l>2</l><block var="Note"/></block></block></script></block><block s="doReport"><block s="reportLetter"><l>3</l><block var="Note"/></block></block></script></block-definition><block-definition s="Import MIDI File" type="reporter" category="Music"><header></header><code></code><translations></translations><inputs></inputs><script><custom-block s="Load TuneScope Primitives"></custom-block><block s="doApplyExtension"><l>ts_parsemidifile()</l><list></list></block><block s="doWaitUntil"><block s="reportEquals"><block s="getLastMessage"></block><l>ts_file_input_received</l></block></block><block s="doReport"><block s="reportApplyExtension"><l>ts_getparsed()</l><list></list></block></block></script></block-definition><block-definition s="Convert MIDI File %'File' to TuneScope" type="reporter" category="Music"><header></header><code></code><translations></translations><inputs><input type="%s"></input></inputs><script><block s="doDeclareVariables"><list><l>Note</l><l>Duration</l><l>List</l><l>Length of List</l></list></block><block s="doSetVar"><l>List</l><block s="reportNewList"><list></list></block></block><block s="doSetVar"><l>Length of List</l><block s="reportListAttribute"><l><option>length</option></l><block s="reportListItem"><l>2</l><block s="reportListItem"><l>6</l><block s="reportListItem"><l>2</l><block s="reportListItem"><l>1</l><block s="reportListItem"><l>2</l><block s="reportListItem"><l>2</l><block var="File"/></block></block></block></block></block></block></block></block><block s="doWarp"><script><block s="doFor"><l>i</l><l>1</l><block var="Length of List"/><script><block s="doSetVar"><l>Note</l><block s="reportListItem"><l>2</l><block s="reportListItem"><l>4</l><block s="reportListItem"><l>2</l><block s="reportListItem"><block var="i"/><block s="reportListItem"><l>2</l><block s="reportListItem"><l>6</l><block s="reportListItem"><l>2</l><block s="reportListItem"><l>1</l><block s="reportListItem"><l>2</l><block s="reportListItem"><l>2</l><block var="File"/></block></block></block></block></block></block></block></block></block></block></block><block s="doSetVar"><l>Duration</l><block s="reportListItem"><l>2</l><block s="reportListItem"><l>1</l><block s="reportListItem"><l>2</l><block s="reportListItem"><block var="i"/><block s="reportListItem"><l>2</l><block s="reportListItem"><l>6</l><block s="reportListItem"><l>2</l><block s="reportListItem"><l>1</l><block s="reportListItem"><l>2</l><block s="reportListItem"><l>2</l><block var="File"/></block></block></block></block></block></block></block></block></block></block></block><block s="doSetVar"><l>List</l><block s="reportConcatenatedLists"><list><block var="List"/><block s="reportNewList"><list><block s="reportNewList"><list><block var="Note"/><block var="Duration"/></list></block></list></block></list></block></block></script></block></script></block><block s="doReport"><block var="List"/></block></script></block-definition><block-definition s="Current Note" type="reporter" category="Music"><header></header><code></code><translations></translations><inputs></inputs><script><custom-block s="Load TuneScope Primitives"></custom-block><block s="doReport"><block s="reportApplyExtension"><l>ts_getcurrentnote()</l><list></list></block></block></script></block-definition><block-definition s="Load TuneScope Primitives" type="command" category="Music" helper="true"><header></header><code></code><translations></translations><inputs></inputs><script><block s="doApplyExtension"><l>src_load(url)</l><list><l>libraries/TuneScope/WebAudioFontPlayer.js</l></list></block><block s="doApplyExtension"><l>src_load(url)</l><list><l>libraries/TuneScope/webmidi.iife.js</l></list></block><block s="doApplyExtension"><l>src_load(url)</l><list><l>libraries/TuneScope/0100_SBLive_sf2.js</l></list></block><block s="doApplyExtension"><l>src_load(url)</l><list><l>libraries/TuneScope/0291_LesPaul_sf2_file.js</l></list></block><block s="doApplyExtension"><l>src_load(url)</l><list><l>libraries/TuneScope/0020_JCLive_sf2_file.js</l></list></block><block s="doApplyExtension"><l>src_load(url)</l><list><l>libraries/TuneScope/0121_FluidR3_GM_sf2_file.js</l></list></block><block s="doApplyExtension"><l>src_load(url)</l><list><l>libraries/TuneScope/0180_Chaos_sf2_file.js</l></list></block><block s="doApplyExtension"><l>src_load(url)</l><list><l>libraries/TuneScope/0230_Aspirin_sf2_file.js</l></list></block><block s="doApplyExtension"><l>src_load(url)</l><list><l>libraries/TuneScope/0241_JCLive_sf2_file.js</l></list></block><block s="doApplyExtension"><l>src_load(url)</l><list><l>libraries/TuneScope/0260_JCLive_sf2_file.js</l></list></block><block s="doApplyExtension"><l>src_load(url)</l><list><l>libraries/TuneScope/0320_GeneralUserGS_sf2_file.js</l></list></block><block s="doApplyExtension"><l>src_load(url)</l><list><l>libraries/TuneScope/0350_JCLive_sf2_file.js</l></list></block><block s="doApplyExtension"><l>src_load(url)</l><list><l>libraries/TuneScope/0400_JCLive_sf2_file.js</l></list></block><block s="doApplyExtension"><l>src_load(url)</l><list><l>libraries/TuneScope/0420_JCLive_sf2_file.js</l></list></block><block s="doApplyExtension"><l>src_load(url)</l><list><l>libraries/TuneScope/0460_GeneralUserGS_sf2_file.js</l></list></block><block s="doApplyExtension"><l>src_load(url)</l><list><l>libraries/TuneScope/0110_GeneralUserGS_sf2_file.js</l></list></block><block s="doApplyExtension"><l>src_load(url)</l><list><l>libraries/TuneScope/0560_GeneralUserGS_sf2_file.js</l></list></block><block s="doApplyExtension"><l>src_load(url)</l><list><l>libraries/TuneScope/0580_GeneralUserGS_sf2_file.js</l></list></block><block s="doApplyExtension"><l>src_load(url)</l><list><l>libraries/TuneScope/0600_GeneralUserGS_sf2_file.js</l></list></block><block s="doApplyExtension"><l>src_load(url)</l><list><l>libraries/TuneScope/0650_FluidR3_GM_sf2_file.js</l></list></block><block s="doApplyExtension"><l>src_load(url)</l><list><l>libraries/TuneScope/0680_JCLive_sf2_file.js</l></list></block><block s="doApplyExtension"><l>src_load(url)</l><list><l>libraries/TuneScope/0700_FluidR3_GM_sf2_file.js</l></list></block><block s="doApplyExtension"><l>src_load(url)</l><list><l>libraries/TuneScope/0710_Chaos_sf2_file.js</l></list></block><block s="doApplyExtension"><l>src_load(url)</l><list><l>libraries/TuneScope/0730_JCLive_sf2_file.js</l></list></block><block s="doApplyExtension"><l>src_load(url)</l><list><l>libraries/TuneScope/0770_SBLive_sf2.js</l></list></block><block s="doApplyExtension"><l>src_load(url)</l><list><l>libraries/TuneScope/1040_Aspirin_sf2_file.js</l></list></block><block s="doApplyExtension"><l>src_load(url)</l><list><l>libraries/TuneScope/1050_FluidR3_GM_sf2_file.js</l></list></block><block s="doApplyExtension"><l>src_load(url)</l><list><l>libraries/TuneScope/1070_FluidR3_GM_sf2_file.js</l></list></block><block s="doApplyExtension"><l>src_load(url)</l><list><l>libraries/TuneScope/12835_21_FluidR3_GM_sf2_file.js</l></list></block><block s="doApplyExtension"><l>src_load(url)</l><list><l>libraries/TuneScope/12840_6_JCLive_sf2_file.js</l></list></block><block s="doApplyExtension"><l>src_load(url)</l><list><l>libraries/TuneScope/12842_0_FluidR3_GM_sf2_file.js</l></list></block><block s="doApplyExtension"><l>src_load(url)</l><list><l>libraries/TuneScope/12846_0_FluidR3_GM_sf2_file.js</l></list></block><block s="doApplyExtension"><l>src_load(url)</l><list><l>libraries/TuneScope/12847_21_FluidR3_GM_sf2_file.js</l></list></block><block s="doApplyExtension"><l>src_load(url)</l><list><l>libraries/TuneScope/12848_21_FluidR3_GM_sf2_file.js</l></list></block><block s="doApplyExtension"><l>src_load(url)</l><list><l>libraries/TuneScope/12849_21_FluidR3_GM_sf2_file.js</l></list></block><block s="doApplyExtension"><l>src_load(url)</l><list><l>libraries/TuneScope/12869_6_JCLive_sf2_file.js</l></list></block><block s="doApplyExtension"><l>src_load(url)</l><list><l>libraries/TuneScope/tonejs/package/build/Midi.js</l></list></block><block s="doApplyExtension"><l>src_load(url)</l><list><l>libraries/TuneScope/TS_init.js</l></list></block><block s="doApplyExtension"><l>src_load(url)</l><list><l>libraries/TuneScope/TuneScope.js</l></list></block><block s="doWaitUntil"><block s="reportApplyExtension"><l>ts_loaded()</l><list></list></block></block></script></block-definition></blocks> |