Summer 2006 Homework 3 Questions
Post Questions here:
retard here accidently put her collage PICTURE up on the site, is there anyway i can get that taken off. and im sure i did this post wrong too!
the instructions tell us to use 4 sounds at one point and as many sounds as we want at another. which is it?
is there going to be any extra credit?
| Yes, it'll be posted as soon as Albert thinks of something. - Bobby Mathew |
Ok, I can't get past the first part. Here is what my notes from recitiation had for the main function:
def soundCollage():
canvas=makeEmptySound(5)
sound1=makeSound(getMediaPath("gettysburg.wav"))
sound2=makeSound(getMediaPath("gettysburg.wav"))
sound3=makeSound(getMediaPath("premable.wav"))
sound4=makeSound(getMediaPath("premable.wav"))
Then I go on to def changes, and then copy....but I keep getting the error message that I am trying to pass an argument to a function starting at my first "sound1=makeSound". I must have copied something down wrong. Suggestions?
| Make sure you do setMediaPath() before you run the function and make sure the folder has those wav files with the exact names. Other than that, I don't see anything wrong with it. If you already did setMediaPath, then the error is somewhere else in the code, even though it highlights that line. - Bobby Mathew |
atleast four sounds... different sounds? or can we choose the same sound, use it four times, and just manipulate it different ways each time?
| You can use the same sound four times as long as the effects applied on them are noticeable. I mean, it would be nice if you had two different sounds which you could add together but I guess you can use the same one for everything. - Bobby Mathew |
is there going to be any extra credit, or should I go ahead and post?
I keep getting the message that my input is not a sound ,error attempting to pass an argument to a function. The message shows up in my copy command:
for source in range(1,getLength(sound1)+1):
v=getSampleValueAt(sound1,source)
setSampleValueAt(target,targetIndex,v)
targetIndex=targetIndex+1
Each of my changes to the sounds are taking in "sound" as a input as directed in recitation as opposed to the setting of source and target as shown in class. Any clue what is going on? I am soooooo frustrated!!!!!
Nevermind...I figured it out.
the homework is due tomorrow night and there is no extra credit posted...should we just go ahead and turn it in or what?
| Yeah, go ahead and turn it in. Sorry about the confusion. There'll definitely be extra-credit for almost all of the remaining assignments. - Bobby Mathew |
I am getting error message in line 2 & 3. I already set the media path, also I checked the wav file names. need help.
def soundCollage():
canvas= makeEmptySound(5)
sound1= makeSound(getMediaPath("gettysburg.wav"))
sound2= makeSound(getMediaPath("gettysburg.wav"))
sound3= makeSound(getMediaPath("preamble.wav"))
sound4= makeSound(getMediaPath("preamble.wav")
nevermind, got that part
stupid question: can we use one sound four times, or four different sounds?
| It's not a stupid question at all! The assignment indicates that you have to use atleast 4 sounds where 1 sound must be used twice. Either case would work: 1)If you choose to use one sound 4 times, then you fit the requirement to repeat one of the sounds. Just make sure to have different modifications so you can tell the difference. 2)If you choose to use 4 different sounds, then you will have to repeat one of them (to follow the criteria) - so then you would be copying a total of 5 sounds onto a particular sound canvas. You could also use 3 sounds and repeat one of them (total 4 then). Your creativity can decide that! :) Hope that helps! - Swati Vishnubhakat |
how do you make a break in the sound, do you just change the index?? Can you change it to .1 or some other decimal???
Yes, just stop copying samples onto your background for however long you need a silence. Samples are small enough to give you the granularity you need. You wouldn't be able to hear the difference between 1 and .1 samples. - Blake O'Hare |
OK. Everytime I try to load my function, it highlights my "def soundCollage()" and says that it isn't legal Jython. I know that there is absolutely nothing wrong with it. This stupid program has done this to me before, but after I've deleted and retyped it a few times it usually accepts it. I've tried at least twenty times...and I don't know what to do. I can't even test my function to see if it's working. What should I do?
Nevermind, after retyping again it just started working.
inside my homework this is one of my functions and it says there is an error in the "source = makeSound(sound)" line. I need help figuring this one out.
def backwards(sound):
source = makeSound(sound)
dest = makeSound(sound)
srcIndex= getLength(source)
for destIndex in range(1,getLength(dest)+1):
srcSample= getSampleValueAt(source,srcIndex)
setSampleValueAt(dest,destIndex,srcSample)
srcIndex=srcIndex-1
Because makeSound takes in a filename, not a sound object. - Blake O'Hare |
im caught up on how to call another function, say all the modifications that were done, to then show up in the overall def soundCollage(): copied onto the blank canvas made?
I'm not entirely sure what you are asking, but I think your question is too vague and the answer you're probably looking for is long. Please visit a TA's office hours so they can work with your code, specifically. - Blake O'Hare |
Here's my copy function:
def copy(bg, sound, offset):
for i in range(1, getLength(sound) + 1):
v = getSampleValueAt(sound, i)
setSampleValueAt(bg, i + offset, v)
Here's the error I get for it- JavaSoundException: That index 132301, does not exist. There are only 132300 frames in the entire sound.
Can you tell me what's wrong?
OK, I tried to make my canvas bigger, and everytime I increase the length by any number of seconds, it always says I'm overshooting by 1 frame (for example, 10 seconds says-That index 220501, does not exist. There are only 220500 frames in the entire sound). I'm not really sure why this thing is freaking out like this...
nevermind..you were right, it's pretty freaking long now. Thanks!
general question... I've been checking my IncreaseDecrease function with the media tools and comparing the sample values at certain points to make sure that function worked. For one sample in the original file and the altered file, the numbers are (sorig,0) and (s2,-566).
If the function is multiplying the original sample value(0) by 0.2, why should the result be -566?
Tis a mystery! Either it's a bug in JES (quite plausible) or you're not checking the same sample. - Blake O'Hare |
hey i wrote my code and everything works except when it plays the sound
backwards it doesn't seem like its playing all of it backwards, its playing it
a little and then it says the last two words normal, just wondering whats
wrong with it.Its like its reverse mirroring.... heres the code.
def reverse(sound4):
source = sound4
dest = sound4
sourceIndex = getLength(source)
for destIndex in range (1, getLength(dest)+1):
sourceSample = getSampleValueAt(source, sourceIndex)
setSampleValueAt(dest, destIndex, sourceSample)
sourceIndex = sourceIndex - 1
return dest
destIndex = 1
for source in range(1, getLength(mindgap)+1):
sV = getSampleValueAt(mindgap, source)
setSampleValueAt(canvas, destIndex, sV)
destIndex = destIndex + 1
it runs through but does not play back a sound when i try to use the canvas?
what if my finished product sounds like the chipmunks?
Link to this Page