Marching Band Metronome Placement

Marching Band Metronome Placement preview image

1 collaborator

Sara_bowden Sara Bowden (Author)

Tags

(This model has yet to be categorized with any tags)
Visible to everyone | Changeable by the author
Model was written in NetLogo 6.4.0 • Viewed 60 times • Downloaded 2 times • Run 0 times
Download the 'Marching Band Metronome Placement' modelDownload this modelEmbed this model

Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)


WHAT IS IT?

This is a model that allows users to create marching band drill formations and experiment with ensemble synchronization strategies through metronome placement in different areas of the field. The effect on performer synchronization and listening strategies are shown in the difference between the performer synchronization radius (e.g., listening to the met) and the performer play radius (e.g., playing directly along with the met).

HOW IT WORKS

Users will have to upload a .png file of a drill formation from PyWare charts, or use the blank .png provided.

To start with NetLogo-generated performers, begin by selecting "clear."

If you have an existing drill set saved as an image file (.jpg or .png), please save it to your desktop. Then, move to the "Code" tab at the top of NetLogo and change the file name to match your file using the following steps: 1) Locate "to clear" 2) Find "import-drawing" 3) Change the file name in quotation marks to the title of your drill image file. 4) Test by hitting enter. NetLogo will let you know if it cannot locate the local file, and it will provide you with the pathway it is attempting to use.

Use the slider to select the number of performers. If you have a drill chart ready, select 1 so that you can experiment with which performer to place the metronome behind.

To generate your selected number of performers, press "setup." To move performers around, click "move performers" and use your mouse or trackpad to drag them around the field.

Select your timing source and create a red box where the timing source will be located. When selecting "met-behind-performer," a metronome will be assigned to one of the performers. You can move this performer where your intended timing source will be, and the metronome will follow if you click "create timing source" a second time.

HOW TO USE IT

This model is scaled to a standard football field that is 300 feet by 160 feet. If you find that the scale is visually incorrect, check the Settings tab and make sure the dimensions are the following: max-pxcor 30 and max-pycor 16. Un-check "world wraps vertically" and "world wraps horizontally."

THINGS TO NOTICE

When selecting "met behind performer," NetLogo will arbitrarily assign the metronome to a turtle (performer). You can click and drag the turtle and select "met behind performer" a second time so that the metronome follows the turtle after selection.

The synchronizing with the met radius is 110 feet, or a delay of 100ms (Repp and Su 2013). The playing with the met radius is 22 feet, or a sound delay of 20ms (Sparks 2016).

Green performers can synchronize with the met (e.g., listen for the count-off or to prepare to play). Blue performers can play along with the met with a negligible effect on perceived delay as long as they remain within the radius. Orange performers are a significant distance from either the timing source or co-performers, and these performers may need individualized strategies for timing coordination.

THINGS TO TRY

First, try the steps in order as indicated with the text boxes. Then, experiment with metronome placement and the subsequent changes on the synchronization and playing in time radius.

EXTENDING THE MODEL

An extended model will consider sources of error like metronome cable quality, performer demand, and strength of metric line in the part of the performer who is standing in front of the metronome. Future models will also account for timing situations on the move as drill formations take shape.

NETLOGO FEATURES

This model uses the in-radius primitive as well as a series of primitives that allow users to click and drag performers into place.

RELATED MODELS

Mouse Drag Multiple Example Sound Machines

CREDITS AND REFERENCES

If you mention this model or the NetLogo software in a publication, include the following citations.

For the model itself: Bowden, Sara. 2024. NetLogo Marching Band Metronome model. https://modelingcommons.org/browse/onemodel/7354#modeltabsbrowseinfo. Center for Connected Learning and Computer-Based Modeling, Northwestern University, Evanston, IL.

Please cite the NetLogo software as: Wilensky, U. 1999. NetLogo. http://ccl.northwestern.edu/netlogo/. Center for Connected Learning and Computer-Based Modeling, Northwestern University, Evanston, IL.

Comments and Questions

Please start the discussion about this model! (You'll first need to log in.)

Click to Run Model

breed [circles circle] ; the turtles being selected
breed [sides side]     ; the four sides of the selection rectangle

globals [
  current-state ; "not-started", "selecting", "waiting-to-drag", "dragging"
  select-x      ; coordinates for the start of the select box
  select-y
  drag-x        ; coordinates for the start of a drag operation
  drag-y
  selected      ; agentset of currently selected circles
]

turtles-own [ location
]

to clear
	clear-all ;clears the wold
  import-drawing "grid.png"
  set current-state "not-started"
    set-default-shape circles "person"
end 

to setup
  clear-all
  import-drawing "grid.png"
  set current-state "not-started"
  set-default-shape circles "person"
  set-default-shape turtles "box"
  set-default-shape sides "line"
  create-circles number-of-performers [
    set color black
    setxy random 10 random 10
  ]
  ask circles [
    if distance (patch 0 0) < 10 [forward 1.75 ]
  ]
  ; initially, no turtles are selected
  set selected no-turtles
  reset-ticks
end 

to go
  ; we use a different procedure depending on which state we're in
  ; the procedures will update the `current-state` to the next value as the user clicks
  (ifelse
    (current-state = "not-started")     [ start-selecting ]
    (current-state = "selecting")       [ handle-selecting ]
    (current-state = "waiting-to-drag") [ handle-waiting ]
    (current-state = "dragging")        [ handle-drag ]
  )
end 

to synch-radius-sideline
  ask circles at-points [[0 16] [0 15] [0 14] [0 13] [0 12] [0 11] [0 10] [0 9] [0 8] [0 7] [0 6] [0 5] [0 4] [0 3] [0 2] [0 1] [0 0] [0 -1] [0 -2] [0 -3] [0 -4] [1 16] [1 15] [1 14] [1 12] [1 11] [1 10] [1 9] [1 8] [1 7] [1 6] [1 5] [1 4] [1 3] [1 2] [1 1] [1 0] [1 -1] [1 -2] [1 -3] [1 -4] [-1 16] [-1 15] [-1 14] [-1 12] [-1 11] [-1 10] [-1 9] [-1 8] [-1 7] [-1 6] [-1 5] [-1 4] [-1 3] [-1 2] [-1 1] [-1 0] [-1 -1] [-1 -2] [-1 -3] [-1 -4] [2 16] [2 15] [2 14] [2 13] [2 12] [2 11] [2 10] [2 9] [2 8] [2 7] [2 6] [2 5] [2 4] [2 3] [2 2] [2 1] [2 0] [2 -1] [2 -2] [2 -3] [2 -4] [-2 16] [-2 15] [-2 14] [-2 13] [-2 12] [-2 11] [-2 10] [-2 9] [-2 8] [-2 7] [-2 6] [-2 5] [-2 4] [-2 3] [-2 2] [-2 1] [-2 0] [-2 -1] [-2 -2] [-2 -3] [-2 -4] [-3 16] [-3 15] [-3 14] [-3 13] [-3 12] [-3 11] [-3 10] [-3 9] [-3 8] [-3 7] [-3 6] [-3 5] [-3 4] [-3 3] [-3 2] [-3 1] [-3 0] [-3 -1] [-3 -2] [-3 -3] [-3 -4] [3 16] [3 15] [3 14] [3 13] [3 12] [3 11] [3 10] [3 9] [3 8] [3 7] [3 6] [3 5] [3 4] [3 3] [3 2] [3 1] [3 0] [3 -1] [3 -2] [3 -3] [3 -4] [4 16] [4 15] [4 14] [4 13] [4 12] [4 11] [4 10] [4 9] [4 8] [4 7] [4 6] [4 5] [4 4] [4 3] [4 2] [4 1] [4 0] [4 -1] [4 -2] [4 -3] [4 -4] [-4 16] [-4 15] [-4 14] [-4 13] [-4 12] [-4 11] [-4 10] [-4 9] [-4 8] [-4 7] [-4 6] [-4 5] [-4 4] [-4 3] [-4 2] [-4 1] [-4 0] [-4 -1] [-4 -2] [-4 -3] [-4 -4] [5 16] [5 15] [5 14] [5 13] [5 12] [5 11] [5 10] [5 9] [5 8] [5 7] [5 6] [5 5] [5 4] [5 3] [5 2] [5 1] [5 0] [5 -1] [5 -2] [5 -3] [5 -4] [-5 16] [-5 15] [-5 14] [-5 13] [-5 12] [-5 11] [-5 10] [-5 9] [-5 8] [-5 7] [-5 6] [-5 5] [-5 4] [-5 3] [-5 2] [-5 1] [-5 0] [-5 -1] [-5 -2] [-5 -3] [-5 -4] [6 16] [6 15] [6 14] [6 13] [6 12] [6 11] [6 10] [6 9] [6 8] [6 7] [6 6] [6 5] [6 4] [6 3] [6 2] [6 1] [6 0] [6 -1] [6 -2] [6 -3] [-6 16] [-6 15] [-6 14] [-6 13] [-6 12] [-6 11] [-6 10] [-6 9] [-6 8] [-6 7] [-6 6] [-6 5] [-6 4] [-6 3] [-6 2] [-6 1] [-6 0] [-6 -1] [-6 -2] [-6 -3] [7 16] [7 15] [7 14] [7 13] [7 12] [7 11] [7 10] [7 9] [7 8] [7 7] [7 6] [7 5] [7 4] [7 3] [7 2] [7 1] [7 0] [7 -1] [7 -2] [7 -3] [-7 16] [-7 15] [-7 14] [-7 13] [-7 12] [-7 11] [-7 10] [-7 9] [-7 8] [-7 7] [-7 6] [-7 5] [-7 4] [-7 3] [-7 2] [-7 1] [-7 0] [-7 -1] [-7 -2] [-7 -3] [8 16] [8 15] [8 14] [8 13] [8 12] [8 11] [8 10] [8 9] [8 8] [8 7] [8 6] [8 5] [8 4] [8 3] [8 2] [8 1] [8 0] [8 -1] [8 -2] [8 -3] [-8 16] [-8 15] [-8 14] [-8 13] [-8 12] [-8 11] [-8 10] [-8 9] [-8 8] [-8 7] [-8 6] [-8 5] [-8 4] [-8 3] [-8 2] [-8 1] [-8 0] [-8 -1] [-8 -2] [-8 -3] [9 16] [9 15] [9 14] [9 13] [9 12] [9 11] [9 10] [9 9] [9 8] [9 7] [9 6] [9 5] [9 4] [9 3] [9 2] [9 1] [9 0] [9 -1] [9 -2] [-9 16] [-9 15] [-9 14] [-9 13] [-9 12] [-9 11] [-9 10] [-9 9] [-9 8] [-9 7] [-9 6] [-9 5] [-9 4] [-9 3] [-9 2] [-9 1] [-9 0] [-9 -1] [-9 -2] [10 16] [10 15] [10 14] [10 13] [10 12] [10 11] [10 10] [10 9] [10 8] [10 7] [10 6] [10 5] [10 4] [10 3] [10 2] [10 1] [10 0] [10 -1] [10 -2] [-10 16] [-10 15] [-10 14] [-10 13] [-10 12] [-10 11] [-10 10] [-10 9] [-10 8] [-10 7] [-10 6] [-10 5] [-10 4] [-10 3] [-10 2] [-10 1] [-10 0] [-10 -1] [-10 -2] [11 16] [11 15] [11 14] [11 13] [11 12] [11 11] [11 10] [11 9] [11 8] [11 7] [11 6] [11 5] [11 4] [11 3] [11 2] [11 1] [11 0] [11 -1] [-11 16] [-11 15] [-11 14] [-11 13] [-11 12] [-11 11] [-11 10] [-11 9] [-11 8] [-11 7] [-11 6] [-11 5] [-11 4] [-11 3] [-11 2] [-11 1] [-11 0] [-11 -1] [12 16] [12 15] [12 14] [12 13] [12 12] [12 11] [12 10] [12 9] [12 8] [12 7] [12 6] [12 5] [12 4] [12 3] [12 2] [12 1] [12 0] [12 -1] [-12 16] [-12 15] [-12 14] [-12 13] [-12 12] [-12 11] [-12 10] [-12 9] [-12 8] [-12 7] [-12 6] [-12 5] [-12 4] [-12 3] [-12 2] [-12 1] [-12 0] [-12 -1] [13 16] [13 15] [13 14] [13 13] [13 12] [13 11] [13 10] [13 9] [13 8] [13 7] [13 6] [13 5] [13 4] [13 3] [13 2] [13 1] [13 0] [13 -1] [-13 16] [-13 15] [-13 14] [-13 13] [-13 12] [-13 11] [-13 10] [-13 9] [-13 8] [-13 7] [-13 6] [-13 5] [-13 4] [-13 3] [-13 2] [-13 1] [-13 0] [-13 -1] [14 16] [14 15] [14 14] [14 13] [14 12] [14 11] [14 10] [14 9] [14 8] [14 7] [14 6] [14 5] [14 4] [14 3] [14 2] [14 1] [14 0] [14 -1] [-14 16] [-14 15] [-14 14] [-14 13] [-14 12] [-14 11] [-14 10] [-14 9] [-14 8] [-14 7] [-14 6] [-14 5] [-14 4] [-14 3] [-14 2] [-14 1] [-14 0] [-14 -1] [15 16] [15 15] [15 14] [15 13] [15 12] [15 11] [15 10] [15 9] [15 8] [15 7] [15 6] [15 5] [15 4] [15 3] [15 2] [15 1] [15 0] [15 -1] [-15 16] [-15 15] [-15 14] [-15 13] [-15 12] [-15 11] [-15 10] [-15 9] [-15 8] [-15 7] [-15 6] [-15 5] [-15 4] [-15 3] [-15 2] [-15 1] [-15 0] [-15 -1] [16 16] [16 15] [16 14] [16 13] [16 12] [16 11] [16 10] [16 9] [16 8] [16 7] [16 6] [16 5] [16 4] [16 3] [16 2] [16 1] [16 0] [16 -1] [-16 16] [-16 15] [-16 14] [-16 13] [-16 12] [-16 11] [-16 10] [-16 9] [-16 8] [-16 7] [-16 6] [-16 5] [-16 4] [-16 3] [-16 2] [-16 1] [-16 0] [-16 -1] [17 16] [17 15] [17 14] [17 13] [17 12] [17 11] [17 10] [17 9] [17 8] [17 7] [17 6] [17 5] [17 4] [17 3] [17 2] [17 1] [17 0] [-17 16] [-17 15] [-17 14] [-17 13] [-17 12] [-17 11] [-17 10] [-17 9] [-17 8] [-17 7] [-17 6] [-17 5] [-17 4] [-17 3] [-17 2] [-17 1] [-17 0] [18 16] [18 15] [18 14] [18 13] [18 12] [18 11] [18 10] [18 9] [18 8] [18 7] [18 6] [18 5] [18 4] [18 3] [18 2] [18 1] [18 0] [-18 16] [-18 15] [-18 14] [-18 13] [-18 12] [-18 11] [-18 10] [-18 9] [-18 8] [-18 7] [-18 6] [-18 5] [-18 4] [-18 3] [-18 2] [-18 1] [-18 0] [19 16] [19 15] [19 14] [19 13] [19 12] [19 11] [19 10] [19 9] [19 8] [19 7] [19 6] [19 5] [-19 16] [-19 15] [-19 14] [-19 13] [-19 12] [-19 11] [-19 10] [-19 9] [-19 8] [-19 7] [-19 6] [-19 5] [20 16] [20 15] [20 14] [20 13] [20 12] [20 11] [20 10] [20 9] [20 8] [20 7] [20 6] [20 5] [-20 16] [-20 15] [-20 14] [-20 13] [-20 12] [-20 11] [-20 10] [-20 9] [-20 8] [-20 7] [-20 6] [-20 5] [21 16] [21 15] [21 14] [21 13] [21 12] [21 11] [21 10] [-21 16] [-21 15] [-21 14] [-21 13] [-21 12] [-21 11] [-21 10] [-22 16] [-22 15] [22 16] [22 15]] [
    set color green
    ]
end 

to synch-radius-back-hash
  ask circles at-points [[0 15] [0 14] [0 13] [0 12] [0 11] [0 10] [0 9] [0 8] [0 7] [0 6] [0 5] [0 4] [0 3] [0 2] [0 1] [0 0] [0 -1] [0 -2] [0 -3] [0 -4] [0 -5] [0 -6] [0 -7] [0 -8] [0 -9] [0 -10] [0 -11] [0 -12] [0 -13] [0 -14] [0 -15] [0 -16] [1 15] [1 14] [1 13] [1 12] [1 11] [1 10] [1 9] [1 8] [1 7] [1 6] [1 5] [1 4] [1 3] [1 2] [1 1] [1 0] [1 -1] [1 -2] [1 -3] [1 -4] [1 -5] [1 -6] [1 -7] [1 -8] [1 -9] [1 -11] [1 -10] [1 -12] [1 -13] [1 -14] [1 -15] [1 -16] [-1 15] [-1 14] [-1 13] [-1 12] [-1 11] [-1 10] [-1 9] [-1 8] [-1 7] [-1 6] [-1 5] [-1 4] [-1 3] [-1 2] [-1 1] [-1 0] [-1 -1] [-1 -2] [-1 -3] [-1 -4] [-1 -5] [-1 -6] [-1 -7] [-1 -8] [-1 -9] [-1 -10] [-1 -11] [-1 -12] [-1 -13] [-1 -14] [-1 -15] [-1 -16] [2 15] [2 14] [2 13] [2 12] [2 11] [2 10] [2 9] [2 8] [2 7] [2 6] [2 5] [2 4] [2 3] [2 2] [2 1] [2 0] [2 -1] [2 -2] [2 -3] [2 -4] [2 -5] [2 -6] [2 -7] [2 -8] [2 -9] [2 -10] [2 -11] [2 -12] [2 -13] [2 -14] [2 -15] [2 -16] [-2 15] [-2 14] [-2 13] [-2 12] [-2 11] [-2 10] [-2 9] [-2 8] [-2 7] [-2 6] [-2 5] [-2 4] [-2 3] [-2 2] [-2 1] [-2 0] [-2 -1] [-2 -2] [-2 -3] [-2 -4] [-2 -5] [-2 -6] [-2 -7] [-2 -8] [-2 -9] [-2 -10] [-2 -11] [-2 -12] [-2 -13] [-2 -14] [-2 -15] [-2 -16] [3 15] [3 14] [3 13] [3 12] [3 11] [3 10] [3 9] [3 8] [3 7] [3 6] [3 5] [3 4] [3 3] [3 2] [3 1] [3 0] [3 -1] [3 -2] [3 -3] [3 -4] [3 -5] [3 -6] [3 -7] [3 -8] [3 -9] [3 -10] [3 -11] [3 -12] [3 -13] [3 -14] [3 -15] [-3 15] [-3 14] [-3 13] [-3 12] [-3 11] [-3 10] [-3 9] [-3 8] [-3 7] [-3 6] [-3 5] [-3 4] [-3 3] [-3 2] [-3 1] [-3 0] [-3 -1] [-3 -2] [-3 -3] [-3 -4] [-3 -5] [-3 -6] [-3 -7] [-3 -8] [-3 -9] [-3 -10] [-3 -11] [-3 -12] [-3 -13] [-3 -14] [-3 -15] [4 15] [4 14] [4 13] [4 12] [4 11] [4 10] [4 9] [4 8] [4 7] [4 6] [4 5] [4 4] [4 3] [4 2] [4 1] [4 0] [4 -1] [4 -2] [4 -3] [4 -4] [4 -5] [4 -6] [4 -7] [4 -8] [4 -9] [4 -10] [4 -11] [4 -12] [4 -13] [4 -14] [4 -15] [-4 15] [-4 14] [-4 13] [-4 12] [-4 11] [-4 10] [-4 9] [-4 8] [-4 7] [-4 6] [-4 5] [-4 4] [-4 3] [-4 2] [-4 1] [-4 0] [-4 -1] [-4 -2] [-4 -3] [-4 -4] [-4 -5] [-4 -6] [-4 -7] [-4 -8] [-4 -9] [-4 -10] [-4 -11] [-4 -12] [-4 -13] [-4 -14] [-4 -15] [5 15] [5 14] [5 13] [5 12] [5 11] [5 10] [5 9] [5 8] [5 7] [5 6] [5 5] [5 4] [5 3] [5 2] [5 1] [5 0] [5 -1] [5 -2] [5 -3] [5 -4] [5 -5] [5 -6] [5 -7] [5 -8] [5 -9] [5 -10] [5 -11] [5 -12] [5 -13] [5 -14] [-5 15] [-5 14] [-5 13] [-5 12] [-5 11] [-5 10] [-5 9] [-5 8] [-5 7] [-5 6] [-5 5] [-5 4] [-5 3] [-5 2] [-5 1] [-5 0] [-5 -1] [-5 -2] [-5 -3] [-5 -4] [-5 -5] [-5 -6] [-5 -7] [-5 -8] [-5 -9] [-5 -10] [-5 -11] [-5 -12] [-5 -13] [-5 -14] [6 15] [6 14] [6 13] [6 12] [6 11] [6 10] [6 9] [6 8] [6 7] [6 6] [6 5] [6 4] [6 3] [6 2] [6 1] [6 0] [6 -1] [6 -2] [6 -3] [6 -4] [6 -5] [6 -6] [6 -7] [6 -8] [6 -9] [6 -10] [6 -11] [6 -12] [6 -13] [6 -14] [-6 15] [-6 14] [-6 13] [-6 12] [-6 11] [-6 10] [-6 9] [-6 8] [-6 7] [-6 6] [-6 5] [-6 4] [-6 3] [-6 2] [-6 1] [-6 0] [-6 -1] [-6 -2] [-6 -3] [-6 -4] [-6 -5] [-6 -6] [-6 -7] [-6 -8] [-6 -9] [-6 -10] [-6 -11] [-6 -12] [-6 -13] [-6 -14] [7 15] [7 14] [7 13] [7 12] [7 11] [7 10] [7 9] [7 8] [7 7] [7 6] [7 5] [7 4] [7 3] [7 2] [7 1] [7 0] [7 -1] [7 -2] [7 -3] [7 -4] [7 -5] [7 -6] [7 -7] [7 -8] [7 -9] [7 -10] [7 -11] [7 -12] [7 -13] [7 -14] [-7 15] [-7 14] [-7 13] [-7 12] [-7 11] [-7 10] [-7 9] [-7 8] [-7 7] [-7 6] [-7 5] [-7 4] [-7 3] [-7 2] [-7 1] [-7 0] [-7 -1] [-7 -2] [-7 -3] [-7 -4] [-7 -5] [-7 -6] [-7 -7] [-7 -8] [-7 -9] [-7 -10] [-7 -11] [-7 -12] [-7 -13] [-7 -14] [8 15] [8 14] [8 13] [8 12] [8 11] [8 10] [8 9] [8 8] [8 7] [8 6] [8 5] [8 4] [8 3] [8 2] [8 1] [8 0] [8 -1] [8 -2] [8 -3] [8 -4] [8 -5] [8 -6] [8 -7] [8 -8] [8 -9] [8 -10] [8 -11] [8 -12] [8 -13] [8 -14] [-8 15] [-8 14] [-8 13] [-8 12] [-8 11] [-8 10] [-8 9] [-8 8] [-8 7] [-8 6] [-8 5] [-8 4] [-8 3] [-8 2] [-8 1] [-8 0] [-8 -1] [-8 -2] [-8 -3] [-8 -4] [-8 -5] [-8 -6] [-8 -7] [-8 -8] [-8 -9] [-8 -10] [-8 -11] [-8 -12] [-8 -13] [-8 -14] [9 15] [9 14] [9 13] [9 12] [9 11] [9 10] [9 9] [9 8] [9 7] [9 6] [9 5] [9 4] [9 3] [9 2] [9 1] [9 0] [9 -1] [9 -2] [9 -3] [9 -4] [9 -5] [9 -6] [9 -7] [9 -8] [9 -9] [9 -10] [9 -11] [9 -12] [9 -13] [9 -14] [-9 15] [-9 14] [-9 13] [-9 12] [-9 11] [-9 10] [-9 9] [-9 8] [-9 7] [-9 6] [-9 5] [-9 4] [-9 3] [-9 2] [-9 1] [-9 0] [-9 -1] [-9 -2] [-9 -3] [-9 -4] [-9 -5] [-9 -6] [-9 -7] [-9 -8] [-9 -9] [-9 -10] [-9 -11] [-9 -12] [-9 -13] [-9 -14] [10 15] [10 14] [10 13] [10 12] [10 11] [10 10] [10 9] [10 8] [10 7] [10 6] [10 5] [10 4] [10 3] [10 2] [10 1] [10 0] [10 -1] [10 -2] [10 -3] [10 -4] [10 -5] [10 -6] [10 -7] [10 -8] [10 -9] [10 -10] [10 -11] [10 -12] [-10 15] [-10 14] [-10 13] [-10 12] [-10 11] [-10 10] [-10 9] [-10 8] [-10 7] [-10 6] [-10 5] [-10 4] [-10 3] [-10 2] [-10 1] [-10 0] [-10 -1] [-10 -2] [-10 -3] [-10 -4] [-10 -5] [-10 -6] [-10 -7] [-10 -8] [-10 -9] [-10 -10] [-10 -11] [-10 -12] [11 15] [11 14] [11 13] [11 12] [11 11] [11 10] [11 9] [11 8] [11 7] [11 6] [11 5] [11 4] [11 3] [11 2] [11 1] [11 0] [11 -1] [11 -2] [11 -3] [11 -4] [11 -5] [11 -6] [11 -7] [11 -8] [11 -9] [11 -10] [11 -11] [11 -12] [-11 15] [-11 14] [-11 13] [-11 12] [-11 11] [-11 10] [-11 9] [-11 8] [-11 7] [-11 6] [-11 5] [-11 4] [-11 3] [-11 2] [-11 1] [-11 0] [-11 -1] [-11 -2] [-11 -3] [-11 -4] [-11 -5] [-11 -6] [-11 -7] [-11 -8] [-11 -9] [-11 -10] [-11 -11] [-11 -12] [12 15] [12 14] [12 13] [12 12] [12 11] [12 10] [12 9] [12 8] [12 7] [12 6] [12 5] [12 4] [12 3] [12 2] [12 1] [12 0] [12 -1] [12 -2] [12 -3] [12 -4] [12 -5] [12 -6] [12 -7] [12 -8] [12 -9] [12 -10] [12 -11] [12 -12] [-12 15] [-12 14] [-12 13] [-12 12] [-12 11] [-12 10] [-12 9] [-12 8] [-12 7] [-12 6] [-12 5] [-12 4] [-12 3] [-12 2] [-12 1] [-12 0] [-12 -1] [-12 -2] [-12 -3] [-12 -4] [-12 -5] [-12 -6] [-12 -7] [-12 -8] [-12 -9] [-12 -10] [-12 -11] [-12 -12] [13 15] [13 14] [13 13] [13 12] [13 11] [13 10] [13 9] [13 8] [13 7] [13 6] [13 5] [13 4] [13 3] [13 2] [13 1] [13 0] [13 -1] [13 -2] [13 -3] [13 -4] [13 -5] [13 -6] [13 -7] [13 -8] [13 -9] [13 -10] [13 -11] [13 -12] [-13 15] [-13 14] [-13 13] [-13 12] [-13 11] [-13 10] [-13 9] [-13 8] [-13 7] [-13 6] [-13 5] [-13 4] [-13 3] [-13 2] [-13 1] [-13 0] [-13 -1] [-13 -2] [-13 -3] [-13 -4] [-13 -5] [-13 -6] [-13 -7] [-13 -8] [-13 -9] [-13 -10] [-13 -11] [-13 -12] [14 15] [14 14] [14 13] [14 12] [14 11] [14 10] [14 9] [14 8] [14 7] [14 6] [14 5] [14 4] [14 3] [14 2] [14 1] [14 0] [14 -1] [14 -2] [14 -3] [14 -4] [14 -5] [14 -6] [14 -7] [14 -8] [14 -9] [14 -10] [14 -11] [14 -12] [-14 15] [-14 14] [-14 13] [-14 12] [-14 11] [-14 10] [-14 9] [-14 8] [-14 7] [-14 6] [-14 5] [-14 4] [-14 3] [-14 2] [-14 1] [-14 0] [-14 -1] [-14 -2] [-14 -3] [-14 -4] [-14 -5] [-14 -6] [-14 -7] [-14 -8] [-14 -9] [-14 -10] [-14 -11] [-14 -12] [15 15] [15 14] [15 13] [15 12] [15 11] [15 10] [15 9] [15 8] [15 7] [15 6] [15 5] [15 4] [15 3] [15 2] [15 1] [15 0] [15 -1] [15 -2] [15 -3] [15 -4] [15 -5] [15 -6] [15 -7] [15 -8] [15 -9] [15 -10] [15 -11] [-15 15] [-15 14] [-15 13] [-15 12] [-15 11] [-15 10] [-15 9] [-15 8] [-15 7] [-15 6] [-15 5] [-15 4] [-15 3] [-15 2] [-15 1] [-15 0] [-15 -1] [-15 -2] [-15 -3] [-15 -4] [-15 -5] [-15 -6] [-15 -7] [-15 -8] [-15 -9] [-15 -10] [-15 -11] [16 15] [16 14] [16 13] [16 12] [16 11] [16 10] [16 9] [16 8] [16 7] [16 6] [16 5] [16 4] [16 3] [16 2] [16 1] [16 0] [16 -1] [16 -2] [16 -3] [16 -4] [16 -5] [16 -6] [16 -7] [16 -8] [16 -9] [16 -10] [-16 15] [-16 14] [-16 13] [-16 12] [-16 11] [-16 10] [-16 9] [-16 8] [-16 7] [-16 6] [-16 5] [-16 4] [-16 3] [-16 2] [-16 1] [-16 0] [-16 -1] [-16 -2] [-16 -3] [-16 -4] [-16 -5] [-16 -6] [-16 -7] [-16 -8] [-16 -9] [-16 -10] [17 15] [17 14] [17 13] [17 12] [17 11] [17 10] [17 9] [17 8] [17 7] [17 6] [17 5] [17 4] [17 3] [17 2] [17 1] [17 0] [17 -1] [17 -2] [17 -3] [17 -4] [17 -5] [17 -6] [17 -7] [17 -8] [-17 15] [-17 14] [-17 13] [-17 12] [-17 11] [-17 10] [-17 9] [-17 8] [-17 7] [-17 6] [-17 5] [-17 4] [-17 3] [-17 2] [-17 1] [-17 0] [-17 -1] [-17 -2] [-17 -3] [-17 -4] [-17 -5] [-17 -6] [-17 -7] [-17 -8] [18 15] [18 14] [18 13] [18 12] [18 11] [18 10] [18 9] [18 8] [18 7] [18 6] [18 5] [18 4] [18 3] [18 2] [18 1] [18 0] [18 -1] [18 -2] [18 -3] [18 -4] [18 -5] [18 -6] [18 -7] [-18 15] [-18 14] [-18 13] [-18 12] [-18 11] [-18 10] [-18 9] [-18 8] [-18 7] [-18 6] [-18 5] [-18 4] [-18 3] [-18 2] [-18 1] [-18 0] [-18 -1] [-18 -2] [-18 -3] [-18 -4] [-18 -5] [-18 -6] [-18 -7] [19 15] [19 14] [19 13] [19 12] [19 11] [19 10] [19 9] [19 8] [19 7] [19 6] [19 5] [19 4] [19 3] [19 2] [19 1] [19 0] [19 -1] [19 -2] [19 -3] [19 -4] [-19 15] [-19 14] [-19 13] [-19 12] [-19 11] [-19 10] [-19 9] [-19 8] [-19 7] [-19 6] [-19 5] [-19 4] [-19 3] [-19 2] [-19 1] [-19 0] [-19 -1] [-19 -2] [-19 -3] [-19 -4] [20 15] [20 14] [20 13] [20 12] [20 11] [20 10] [20 9] [20 8] [20 7] [20 6] [20 5] [20 4] [20 3] [20 2] [20 1] [20 0] [-20 15] [-20 14] [-20 13] [-20 12] [-20 11] [-20 10] [-20 9] [-20 8] [-20 7] [-20 6] [-20 5] [-20 4] [-20 3] [-20 2] [-20 1] [-20 0] [21 15] [21 14] [21 13] [21 12] [21 11] [21 10] [21 9] [21 8] [21 7] [21 6] [21 5] [21 4] [21 3] [-21 15] [-21 14] [-21 13] [-21 12] [-21 11] [-21 10] [-21 9] [-21 8] [-21 7] [-21 6] [-21 5] [-21 4] [-21 3] [22 15] [22 14] [22 13] [22 12] [22 11] [22 10] [22 9] [22 8] [22 7] [22 6] [-22 15] [-22 14] [-22 13] [-22 12] [-22 11] [-22 10] [-22 9] [-22 8] [-22 7] [-22 6]] [
    set color green
    ]
end 

to synch-radius-performer
  ask turtle 0 [
    ask other turtles in-radius 22 [
    set color green
    ]
]
end 

to play-radius-sideline
  ask circles at-points [[0 16] [0 15] [0 14] [0 13] [0 12] [1 16] [2 16] [3 16] [4 16] [-1 16] [-2 16] [-3 16] [-4 16]] [
    set color blue
  ]
end 

to play-radius-back-hash
  ask circles at-points [[0 6] [0 5] [0 4] [0 3] [0 2] [0 7] [0 8] [0 9] [0 10] [1 6] [2 6] [3 6] [4 6] [-1 6] [-2 6] [-3 6] [-4 6]] [
    set color blue
  ]
end 

to play-radius-performer
  ask turtle 0 [
    ask other turtles in-radius 5 [
      set color blue
    ]
  ]
end 

to timing-source
  if select-timing-source = "met-behind-performer" [
    create-turtles 1 [
      set color red
      set size .8
      move-to turtle 0
    ]
  ]
    if select-timing-source = "back-sideline-metronome" [
    create-turtles 1 [
      set color red
      set size .8
      setxy 0 16
    ]
  ]
    if select-timing-source = "back-hash-metronome" [
      create-turtles 1 [
      set color red
      set size .8
      setxy 0 6
    ]
  ]
end 

to distance-between
  ask turtles [
    if not any? turtles-on neighbors [
    set color orange
  ]
  ]
end 

to start-selecting
  if mouse-down? [
    ; on the first click we see, we record the mouse position as the start of selection
    set select-x mouse-xcor
    set select-y mouse-ycor
    set current-state "selecting"
  ]
end 

to handle-selecting
  ifelse mouse-down? [
    ; we keep updating the selection box as long as the mouse is down
    select select-x select-y mouse-xcor mouse-ycor
  ][
    ; user was selecting, but let off the mouse button
    ifelse not any? selected [
      ; if nothing was selected in the box, return to the not-started state
      deselect
      set current-state "not-started"
    ] [
      ; else we are ready to drag
      set current-state "waiting-to-drag"
    ]
  ]
  display
end 

to handle-waiting
  if mouse-down? [
    ; on the first click after the selection
    ; check if we're inside or outside the box
    ifelse selected? mouse-xcor mouse-ycor [
      ; inside the box, set the starting drag coordinates
      set drag-x mouse-xcor
      set drag-y mouse-ycor
      set current-state "dragging"
    ] [
      ; clicked outside the select box, return to the "selecting" state
      start-selecting
    ]
  ]
end 

to handle-drag
  ifelse mouse-down? [
    let new-x mouse-xcor
    let new-y mouse-ycor
    ; we need to move both the selected turtles and the sides
    ; of the selection rectangle by the same amount that the
    ; mouse has moved.  we do this by subtracting the current
    ; mouse coordinates from the previous mouse coordinates
    ; and adding the results to the coordinates of the turtles
    ; and sides.
    ask selected
    [
      setxy xcor + new-x - drag-x
      ycor + new-y - drag-y
    ]
    ask sides
    [
      setxy xcor + new-x - drag-x
      ycor + new-y - drag-y
    ]
    ; update the drag coordinates for the next time through
    ; if the user keeps the mouse button down
    set drag-x new-x
    set drag-y new-y
    display
  ] [
    ; user was dragging, but let off the mouse button
    ; wait for them to click again
    set current-state "waiting-to-drag"
  ]
end 

to deselect
  ask sides [ die ]
  ask selected [ set color black ]
  set selected no-turtles
end 

to select [x1 y1 x2 y2] ; x1 y1 is initial corner and x2 y2 is current corner
  deselect ; kill old selection rectangle
  make-side x1 y1 x2 y1
  make-side x1 y1 x1 y2
  make-side x1 y2 x2 y2
  make-side x2 y1 x2 y2
  set selected circles with [selected? xcor ycor]
  ask selected [ set color red ]
end 

to make-side [x1 y1 x2 y2]
  ; for each side, one thin line shape is created at the mid point of each segment
  ; of the bounding box and scaled to the proper length
  create-sides 1 [
    set color gray
    setxy (x1 + x2) / 2
          (y1 + y2) / 2
    facexy x1 y1
    set size 2 * distancexy x1 y1
  ]
end 

; helper procedure that determines whether a point is
; inside the selection rectangle

to-report selected? [x y]
  let y-max max [ycor] of sides  ; largest ycor is where the top is
  let y-min min [ycor] of sides  ; smallest ycor is where the bottom is
  let x-max max [xcor] of sides  ; largest xcor is where the right side is
  let x-min min [xcor] of sides  ; smallest xcor is where the left side is
  ; report whether the input coordinates are within the rectangle
  report x >= x-min and x <= x-max and
         y >= y-min and y <= y-max
end 



; Public Domain:
; To the extent possible under law, Uri Wilensky has waived all
; copyright and related or neighboring rights to this model.

There are 5 versions of this model.

Uploaded by When Description Download
Sara Bowden about 1 month ago layout change for step 5 Download this version
Sara Bowden about 1 month ago addition of furthest distance button (step 5) Download this version
Sara Bowden 3 months ago citation correction Download this version
Sara Bowden 3 months ago removal of no-wrap error Download this version
Sara Bowden 3 months ago Initial upload Download this version

Attached files

File Type Description Last updated
grid.png png Blank PyWare Gridded Field 3 months ago, by Sara Bowden Download
Marching Band Metronome Placement.png preview Preview for 'Marching Band Metronome Placement' 3 months ago, by Sara Bowden Download

This model does not have any ancestors.

This model does not have any descendants.