Questions on HW3-Fall2005
Having problems with creating music with JMusic?
We're here to help!
(Feel free to chime in with your own answers, if you have some for others' questions!)
Does the song have to be original or can we translate something like sheet music?
|Translation is perfectly fine! (I can't compose at all, I certainly wouldn't expect you to.) But if you want to do your own music, feel free! Mark Guzdial|
I am getting an error '.' expected when i have
at the top of my code. it's highlighting that part where I am importing. When i type it into the interactions pane it says "invalid import declaration" I think i have problems with installation?Kyle DuPont
oh....thanks. 'a forceful smack to the forehead'
Perry and I have been trying to get the Amazing Grace method to work before we start on the homework and we're having trouble. We copied the code for AmazingGraceSong2.java and tried to run it. However after I type this:
> AmazingGraceSong song1 = new AmazingGraceSong();
I get this error: "Error: Bad types in assignment"
We're not sure what we're doing wrong, but we're sure we'll run into a similar, if not the same, problem if we try our own code. Any help would be greatly appreciated.
|If the name of the class is "AmazingGraceSong2," then (as lousy a classname as that IS), you have to say "AmazingGraceSong2 song1 = new AmazingGraceSong2();" Mark Guzdial|
Figured it out. Perry had actually set up a PracticeSong that was the AmazingGraceSong2, so the reason it said bad types is because there were really two of them in the java-source folder. Cookie to Perry for figuring it out (though it was his fault to begin with). Student159
|I've had several people ask me about creating "rest" notes. JMC.REST will work as a "pitch" so new Note(JMC.REST,JMC.HN) will create a half note rest. Mark Guzdial|
Ok, I know this is going to make it obvious that I have just recently started working on my HW, but I am going to blame the fact that I had a test today and then the Coweb was down all afternoon...
Anyway, when I try to compile AmazingGraceSong.java (just for the fun of it), I get approx. 86 errors.
Am I missing something important here? I followed all the set-up directions, so I thought it would be ok.
Also, can you have more than one note play at one time, like in one phrase is it possible to have JMC.G4.C5.E5, JMC.QN or something along those lines?
So, I got the 86 errors figured out, apparently I accidentally hit "Apply" for preferences...but anyway, I'm still curious about playing more than one note at a time, and holding notes, does that make sense? I've been trying to investigate some jmusic javadoc, so we'll see what I can come up with!
|To play more than one note at a time in JMusic, I think that you have to use multiple parts. Each part plays one note, and when all play together, you get your chords. Mark Guzdial|
When adding a part – "Part aPart4 = new Part("Part 4", JMC.PIANO, 1" what is that last number in the parenthesis for? It's the MIDI channel I think, but what does that mean? Would that have anything to do with my having trouble creating separate parts in myScore?
|Could be. If you want parts to play simultaneously, in parallel, each has to have its own MIDI channel. They start at 1 and increase, I think up to 32 or 64. Mark Guzdial|
What exactly does the last part of the extra credit mean? REMOVEDke how would that sound?
Last Part: If your notes are actually sonorous (not dischordant) with the rest of the piece and you have a mix of note durations (but still doesn't go longer)...
When I ask this question I just want to know an idea of what that kinda of music would sound like, not an example of code or anything.
|If you just play random notes, the odds of the sound being "good" (nice chords, not sounding totally random) is pretty slim. If, as Kyle was asking about yesterday, you only play octaves of "C" – or better yet, octaves of C, E, and G, you'll get a nice chord. It may not be interesting, but it won't make you cringe. Mark Guzdial|
|On the "starting later" part – you have to EXCPLICITLY set a non-0.0 start time for some phrase or part. Just putting in some rests at the beginning doesn't count. I want you to explore the methods a bit more. Thanks! Mark Guzdial|
Link to this Page