search.noResults

search.searching

note.createNoteMessage

search.noResults

search.searching

orderForm.title

orderForm.productCode
orderForm.description
orderForm.quantity
orderForm.itemPrice
orderForm.price
orderForm.totalPrice
orderForm.deliveryDetails.billingAddress
orderForm.deliveryDetails.deliveryAddress
orderForm.noItems
It has a GUI (graphical user interface), and it comes with several educational programming tools installed to promote student exploration in all types of media, including music, graphics, and mathematical equations using Wolfram’s Mathematica. If that isn’t incentive enough for the young inventor, a version of MinecraſtTM


is included that allows children to program inside of the virtual world.


Is it possible that composing music and programming computers can be learned together to make music and soſt- ware at the same time? Tis is already occurring publicly in dance clubs of Europe in a new musical style called Algorave (https://algorave.com/about/), which uses algorithms to create music in real-time while the composer/programmer is typing code. While the best practitioners of this craſt have spent much time developing their skills and experience, the process of learning to code music is simple to learn. Consid- er the following line of code reproducing the famous theme from Dvorak’s Symphony, No. 9.


use_synth :sine use_bpm 60 play :E4, amp: 0.4, slide: 0.5 sleep 0.75 play :G4, amp: 0.4 sleep 0.25 play :G4, amp: 0.5 sleep 1 play :E4, amp: 0.3, slide: 0.5 sleep 0.75 play :D4, amp: 0.2, slide: 0.25 sleep 0.25 play :c4, amp: 0.2, slide: 0.25 sleep 1


Tis example illustrates how the programmer needs to make decisions about the expression and articulation of the music, as well as the pitch, durations, and tempo of the sounds. Te command, use_synth :sine allows the coder to choose a timbre for the melody (in this case the pure tone sine wave). Te line of code, play :E4, amp: 0.4, slide: 0.5, demonstrates how the coder can experiment with the pitch to be played, the loudness of the note, and the use of portamento to slide between the notes. Te sleep commands establish the rhythms. For musicians, this requires us to think about how rhythm is composed of the temporal rela- tionships from the beginning of one note to the next (oſten called the inter-onset interval, IOI, in technical writings). Tus, in the process of learning to code, students analyze the sounds they are creating. Tey are learning to organize pitches, durations, amplitude, articulation, and timbre. At the same time, they are learning about sequencing, data structures, and debugging, which are integral skills for com- puter programming.


In another example, we can see that computer coding can be used to teach about repetition and the formal structure of music while at the same time teaching about the coding concepts of repetition, variables, looping, and data struc- tures. In Table 1, notice the array variable of notes and rests used to represent the first two phrases of the Largo theme. Each element of the notes ring array represents a 16th note subdivision of the beat and is played every 0.25 ticks of the beat, which is set at 60 bpm. To make things clearer, the ring array is organized to show the one measure motives that make up the first phrase of the melody. Te live_loop code block is enclosed by do and end. As the term loop suggests, this block of code is continually repeated playing the first four measures of the theme. In the play command, the release value (0.3) sets the duration in beats of the notes being played. So you can see, the programmer needs to an- alyze the formal structure of the music, while deciding what coding objects best represent the data.


Table 1: Largo Teme in Sonic Pi


notes = (ring :E4, :r, :r, :G4, :G4, :r, :r, :r, :E4, :r, :r, :D4, :C4, :r, :r, :r, :D4, :r, :r, :E4, :G4, :r, :r, :E4, :D4, :r, :r, :r, :G3, :r, :r, :r, :E4, :r, :r, :G4, :G4, :r, :r, :r, :E4, :r, :r, :D4, :C4, :r, :r, :r, :D4, :r, :r, :E4, :D4, :r, :r, :C4, :C4, :r, :r, :r, :r, :r, :r, :r)


live_loop :largo do use_bpm 60 play notes.tick, release: 0.3, note_slide: 0.25 sleep 0.25


end


Another common process in programming is the condi- tional statement (if... then). As we can see from Table 2, Sonic Pi is calling two different samples, or recorded audio clips. One_in(2), means just what it sounds like. Tere is a 1:2 chance that the sample, “table_dhec” will be played. Else, the sample, “loop_tabla” will be played in its place. Random selection doesn’t have to be used. Sonic Pi lets the coder set variables so that certain musical events can be played if spe- cific conditions are met. Tink of first and second endings in a musical score. Te first n time(s) through, one set of notes is played, alternatively the last time through another set of notes is played.


12


Page 1  |  Page 2  |  Page 3  |  Page 4  |  Page 5  |  Page 6  |  Page 7  |  Page 8  |  Page 9  |  Page 10  |  Page 11  |  Page 12  |  Page 13  |  Page 14  |  Page 15  |  Page 16  |  Page 17  |  Page 18  |  Page 19  |  Page 20  |  Page 21  |  Page 22  |  Page 23  |  Page 24  |  Page 25  |  Page 26  |  Page 27  |  Page 28  |  Page 29  |  Page 30  |  Page 31  |  Page 32  |  Page 33  |  Page 34  |  Page 35  |  Page 36  |  Page 37  |  Page 38  |  Page 39  |  Page 40  |  Page 41  |  Page 42  |  Page 43  |  Page 44  |  Page 45  |  Page 46  |  Page 47  |  Page 48