My year teaching Sonic Pi - Week 8 & 9

This post is a combination of two weeks in which the students were working on the form project I rolled out in the previous post (week 7). I had originally planned on giving them one class to work on it, but since the actual roll out took most of one period and as the first full day of working on it went by, I realized that I needed to give them more time. This is fine as it is something that happens a lot, that being students taking longer to complete a project then your initially allotted them. Sometimes this happens because they know they have a certain number of days to complete it so they will drag their feet until the last day it is due and then really buckle down and get to work. However, since I had originally told them they only had this period to work on it, I was fairly confident that they genuinely needed more time which I was happy to provide. Since I didn’t do any formal instruction for these periods I am just going to share some thoughts and observations I had during the two days.

First off, it seemed that a lot of the students had not retained much in regards to the concept of conditional statements from the last class. We only meet once a week and after discussing the concept the students only really had 10 solid minutes to get started. After that, they had a whole week go by before getting back to it and by then any grasp they had had of the material was far removed. It was frustrating at first to feel like we had spent so much time going over it only to have them come back and ask me to explain it to them again, but I got some good feedback by a member of the forum here who reminded me that this is all relatively new to them so it will take a while before the concepts actually solidify, so it isn’t that they forgot what I taught them, it’s that they didn’t have a strong grasp of it in the first place so any recollection of it is actually a win. I did have to re-explain the concepts of conditional statements to a lot of groups, but I kept using the method of having them walk through the code and talk out what was going to happen.

I also felt that there was a good amount of students who also weren’t so clear on the musical concept of form and having different parts to their song eg: A, B, C. For example, I had more than one group create a variable named “a’ and when I asked them where was the A section of their piece, they would refer to that variable. Looking back, I definitely glossed over the concept, assuming that it is something they are already familiar with in a pop music sense of verse, chorus. This might be true, but I don’t think some of them sufficiently understood it well enough to embark on this project alone. It is something we probably could have spent more time on using non-contextual examples just to get them used to the idea.

On the topic of variables, another thing I saw quite a bit was students making variables that would be used in their conditional statements eg: n = 1 but then also using that variable as a value for sleep or play eg: sleep n. I had to explain to them that this would be problematic since we are adding form to the piece by changing the value of the variable in order to play or skip a certain block of code. However, if you change n to 7 so it will skip the conditional block of if n == 1, all the sleep commands that have n as their value will also change and that section will not sound the same as it did when n equaled 1. I had to direct them to create two variables, one for the conditional statement and another for sleep or play values. I have a feeling some of them might not have known that they could have two variables since I hadn’t given any examples where that had happened.

One of the most common mistakes I saw was not using two equal signs in their if or else if statements. They would ask why the code didn’t work the way they thought it should and that was often the case. I had made a reference sheet were that point was made, but walking around the room, it didn’t seem like too many groups were actually using it.

Another mistake I saw quite a few times was not putting the entire code inside a 2.times or 3.times block in order for the form to work correctly. Almost everyone had these repetition blocks in their code, but some would have a 2.times block and then end before they had the conditional statement. I had to explain that it was fine for them to have a repetition block for their A section, but the entire code needed to be put inside a 2.times or 3.times block depending on if they were going for an ABA or Rondo form. I would have them walk through the code and explain how it would iterate through all the repetition and when they would get to the end they would notice that there was no command to have it repeat back to the top.

I also came across a few students who had everything in a loop function of which I had to explain that this would go on forever which wasn’t the point of this project. These were only a few and these students didn’t seem to have a clear grasp of the project at all. There are some students no matter how much you feel you’ve explained just will not retain what you say or quite possibility weren’t listening to you in the first place and for some reason assume that all this class time is just a free for all to do whatever you want. :roll_eyes:

If I had to do this again, I would probably have just had everyone do a ABA form first with just an if statement to make sure they all understood the basic concept. I may also have had them write the A and B section in two different buffers as some seemed to want to not have to sit through their A section while they worked on the B. I had shown a few of them how to comment out certain parts of the code but that wasn’t something I wanted to add to the list of things to show them for this project. I was already seeing that what I had thought was a reasonable amount of material to cover was proving too much for some, so commenting was something I reserved only for those who I felt could handle it.

I am feeling more that I need to really keep to small, digestible parts or concepts and make sure there is ample time in that same period for them to experiment. I might try to implement a half and half rule where I have to limit myself to only teaching half the period maximum and letting them explore that concept the other half. In theory, it sounds great, however, there are always unforeseen issues that come up and factoring in setup and breakdown at the beginning and end of class is always a wild card and a concept you thought would take 10 minutes winds up taking twice as long. But in general, I still think limiting the amount of information will pay off in the long run.

I had discussed this on the forum in that it is such a delicate balance of, on one hand, trying to make sure there is enough time to spend on a concept so that the students can really explore it and understand how it works without feeling rushed through it, and on the other hand, not spending weeks on one topic to make sure the students have it but they ultimately become bored in the process and wind up checking out and just not caring anymore because, even if they don’t understand it, the fact that they have been doing it for 4-5 weeks makes them feel like they don’t need to spend more time on it. I tend to lean towards covering more material because I want them to get a more well-rounded perspective of the platform they are using. If they are really interested they can always pursue it on their own. To me, the percentage of those who will do that goes up by exposing them to more concepts and giving them more tools to create. Someone might not be interested until they find a concept that works well for them which might not get covered until much later in the year, so you are playing the odds by showing them a lot of stuff. As I have said, I am not teaching them to be programmers, I want to show them ways they can express themselves through music. I would much rather them create something they like in a way that works for them then be able to successfully run a program with conditional statements. The only hang up is having to work within the confines of a class that requires a grade which is the factor that is constantly upsetting that delicate balance I am talking about.

With that said, the students do seem to be enjoying themselves. Quite a few were eager to hand me their headphones and ask me to listen. I also caught some finding code online and pasting it to their own buffer. Not necessarily to cheat, but just to see what was possible. I didn’t really mind this, but I told them that if this is how they are going to spend their class time, I will not be sympathetic when the deadline rolls around and they are complaining that they aren’t finished.

One very positive interaction I had with a student occurred when a student called me over and told me about a problem he was having (I don’t recall at this point exactly what it was). He was able to explain what he wanted to happen but that when he ran his code he wasn’t getting that result. So I told him to look at his code and walk through what each line was doing. In doing that, he was able to focus in on where the disconnect was and was able to fix the problem. This was a great moment for me to see a student go through that process. Bear in mind, this was a student who was clearly engaged in what we are doing and would often have his hand up when we were going over examples in class, sometimes to the point where I would tell him to hold off and give other students a chance. But knowing that he was able to visualize what he wanted to happen and figure out why it wasn’t happening was a good feeling in the midst of a project where it seemed like a lot of students were struggling.

I will say when the projects were submitted, I was pleasantly surprised at the number that showed some level of understanding of the concept. It was more than I anticipated based on what I saw while they were working. I know I had spoken to several groups one on one to help them through some of their problems, but that was fine by me. There was a percentage of students who had mistakes in their code like not changing the value of the variable the second time through or not using two equal signs but the basic structure was there. I am also not sure how many of them really knew what their code sounded like in regards to the form of their piece. I’d be very curious to see how many of them could listen to their code and clearly state when each section started.

The other requirement of the project beyond the conditional statement was to include use_synth and use_bpm to give each section its own feel and there was a variety on how this was executed. My thought was that they would begin each section with those two commands so each section would have its own unique synth sound and tempo. But there were several other approaches to that which didn’t always serve that purpose, for example, changing the synth in the middle of a B section, only to repeat back to the A section which would inherit that synth sound which is different from the sound it had the first time it played.

While listening to the projects, I sometimes found it hard to know when a new section had started just by trying to follow along with the code. To really make sure I knew when it had changed, I began adding “puts ‘A’” or “puts ‘B’” at the beginning of what I deemed to be each section. This way I could see in the console when a new section had started and also go back and see how the form had iterated throughout the piece thereby knowing for sure if it was in fact an ABACA form. I found this method very helpful and would consider having students do that as well if I were to do this project again. It seems like a great practical example of how to use the console to get information as to whether your code is running correctly or not. I could also maybe start them off with a template that include a ‘puts’ for each section and they could use that to know where to start each section of their piece.

At this point, my writing has finally caught to where we are in class. With Thanksgiving coming, there will not be any class that week. I think what I will do in lieu of this is post some student examples for this project along with my feedback. Some of the projects came out really cool, even if they didn’t quite meet the requirements of the project. I also feel like it is long overdue to show some results of what I have been doing instead of just anecdotes.

Until then, Happy Turkey Day for those of you who celebrate it and happy Thursday for those who don’t.