Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 sound
Index -> Programming, Turing -> Turing Tutorials
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
MihaiG




PostPosted: Thu Jul 21, 2005 9:34 am   Post subject: sound

well.. i know there is a soudn tutorial already made by hacker dan...but he didnt cover on how to use the frequencies... Shocked

well as you know the sound in turing is based on the frequency and duration lets look at the basics

for most pianos*especialy digital* are tuned to the frequency "440" this is the note "A" below middle C.....well thats usefull enough but how do u gte lets say "middle C"well..theres this simple formula you have to rember:-)
x-is the note we want to get
y-the note we know
z-semi tones between them

x= y*2^(z/12)

so lets try for c

x=440*2^(3/12)
x=440*2^(0.25)
x = 523*rounded*
now lets try this formula ot make a chromatic scale

code:

var x := 220
loop
sound (x,500)
x := round(x*2**(1/12))
end loop

as you see everytime the loop is intiated the frequency goes up by one semitone...this cna be usefull to make keyboard type programs like the none in "turing sourcecode"...i made that one based on this formula

well i hope this helps


*ps*this is my first tutorial* show mercy and give advice
Sponsor
Sponsor
Sponsor
sponsor
[Gandalf]




PostPosted: Thu Jul 21, 2005 7:35 pm   Post subject: (No subject)

Well, pretty good (except that you stole my idea Mad). Try using more punctuation, capitalization in specific.
Delos




PostPosted: Thu Jul 21, 2005 8:12 pm   Post subject: (No subject)

Not bad, but please try to explain yourself better. Also, add some Titles and other such guides to ease the flow of your tutorial.
And yes, punctuation is a must, spelling not so much for obvious reasons..

Pending these reviews, bits to be awarded.
jamonathin




PostPosted: Fri Jul 22, 2005 12:40 am   Post subject: (No subject)

Delos wrote:
bits to be awarded.

Lol, is that why he's sitting at -3 Razz
MihaiG




PostPosted: Fri Jul 22, 2005 8:37 am   Post subject: (No subject)

[Gandalf] wrote:
Well, pretty good (except that you stole my idea Mad). Try using more punctuation, capitalization in specific.

stole... i looked through out the tutorial section for something like my idea i didnt see anything...*and if there ios im sorry*...


how did i get to "-1" bits*i just posted Razz*
[Gandalf]




PostPosted: Fri Jul 22, 2005 12:17 pm   Post subject: (No subject)

Heh, 0 bits, nice and even Razz.

Well, no you didn't steal my idea, but I was going to make a tutorial on making good sound too, it doesn't matter anyways it got done...
Delos




PostPosted: Fri Jul 22, 2005 1:52 pm   Post subject: (No subject)

El Comandante wrote:
how did i get to "-1" bits*i just posted Razz*


Bits are deducted when you delete a post/have a post deleted. Or perhaps you pissed a Mod off and they removed them for you.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Tutorials
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 7 Posts ]
Jump to:   


Style:  
Search: