|
|
|||||||
| Computers & Information Technologies « Everything related to computers and internet. » |
![]() |
|
|
Share | Thread Tools | Search this Thread |
|
|
#1 |
|
Last Online: 05-30-2013
Join Date: Jan 2008
Posts: 1,788
Thanks: 10,018
Thanked 1,100 Times in 651 Posts
Groans: 1
Groaned at 6 Times in 6 Posts
|
I need someone who's good in enough in music to help me generate the Lebanese anthem ring-tone.
The C code below is a header file containing an array called Tones of type TonesStruct. This array contains the notes of "barney the dinosaur" song. I need to get the notes of the Lebanese anthem instead. It doesn't matter if you don't know C. At least I need the music notes. Thank you. Code:
#define a 141 // 440 Hz, a
#define ah 70 // 880 Hz, ah
#define b 126 // 492 Hz, b
#define bh 62 // 992 Hz, bh
#define c 119 // 521 Hz, c
#define ch 60 // 1042 Hz, ch
#define d 105 // 590 Hz, d
#define dh 52 // 1179 Hz, dh
#define e 94 // 658 Hz, e
#define eh 46 // 1330 Hz, eh
#define f 89 // 694 Hz, f
#define fh 44 // 1389 Hz, fh
#define g 158 // 393 Hz, g
#define gh 79 // 781 Hz, gh
#define SF 125 // scale factor
#define NumOfNotes 16 // number of notes
// structure of tones and delays
typedef struct
{
unsigned int TimeDelay;
unsigned char Frequency[15];
} TonesStruct;
rom near TonesStruct Tones[] = {{250*SF, {c, c, d, e, c, e, d, g, c, c, d, e, 0}},
{500*SF, {c, b, 0}},
{250*SF, {c, c, d, e, f, e, d, c, b, dh, a, b, 0}},
{500*SF, {c, c, 0}},
{375*SF, {ah, 0}},
{150*SF, {bh, 0}},
{250*SF, {ah, gh, ah, bh, 0}},
{500*SF, {ch, 0}},
{375*SF, {gh, 0}},
{150*SF, {ah, 0}},
{250*SF, {gh, f, 0}},
{500*SF, {e, gh, 0}},
{375*SF, {ah, 0}},
{150*SF, {bh, 0}},
{250*SF, {ah, gh, ah, bh, ch, ah, gh, ch, bh, dh, 0}},
{500*SF, {ch, ch, 0}}};
PS: I found this on the internet, but I'm not sure how to translate it 100% correct.
__________________
|
|
|
|
|
|
#2 |
|
Registered Member
Last Online: 10-09-2012
Join Date: Mar 2010
Posts: 464
Thanks: 443
Thanked 764 Times in 389 Posts
Groans: 0
Groaned at 1 Time in 1 Post
|
Do u need the music notes of the Lebanese anthem? I can write the notes, but i have no idea about: {500*SF,{375*SF ...
|
|
|
|
|
|
#3 | |
|
Last Online: 05-30-2013
Join Date: Jan 2008
Posts: 1,788
Thanks: 10,018
Thanked 1,100 Times in 651 Posts
Groans: 1
Groaned at 6 Times in 6 Posts
|
Quote:
All I need is the tones and the delay of each. Please, try what you're thinking of. It might be useful.
__________________
|
|
|
|
|
|
|
#4 |
|
Registered Member
Last Online: 10-09-2012
Join Date: Mar 2010
Posts: 464
Thanks: 443
Thanked 764 Times in 389 Posts
Groans: 0
Groaned at 1 Time in 1 Post
|
I can write the notes, but i don't know how to translate the croche, double croche, croche pointer ... like the language above ...
In G major: G , D, D, B, D, G, A, B, C, B, D, B, C, A, D, B, G, B, A, A, G, F#, D, D, D, D, B, D, D, B, D, G, A, G, G, A, D, C, B, B, B, A, D, E, F#, G, G, G. D, D, G, A, A, B, D, D, E, F#, F#, G, D, D, G, A, A, B, D, C, B, A, A, G, B, C, D, D, D, D, C, B, C, D, D, D, D, C, B, A, A, A, A, G, F#, G, A, A, A, A, D, D, B, B, B, B, G, E, E, E, E, G, A, D, F#, F#, G I usually play it in the C major: C, G, G, E, G, C, D, D, E, E, F, G, E, F, D, G, E, C, E, D, C, G, G, E, G, C, D, D, E, E, F, G, F, E, E, E, D, G, G, C, C, C, C, G, G, C, D, D, E, G, G, A, B, B, C, G, G, G, C G, G, C, D, D, E, G, F, E, D, D, C, G, G, C E, F, G, G, G, G, F, E, F, G, G, G, G, F, E, D, D, D, D, C, B, C, D, D, D, D, G, G, E, E, E, E, C, B, A, A, A, A, F, D, G, B, B, C, C, C, C |
|
|
|
| The Following User Says Thank You to Bella For This Useful Post: | Google (05-28-2010) |
|
|
#5 | |
|
Last Online: 05-30-2013
Join Date: Jan 2008
Posts: 1,788
Thanks: 10,018
Thanked 1,100 Times in 651 Posts
Groans: 1
Groaned at 6 Times in 6 Posts
|
Quote:
That's what I want but I still need the timing. Like how much time each notes take. In my above example 250, 375, 500.. are used. I'm not restricted to those numbers but I need to have numbers that are proportional. For example, suppose you have G, E and the first note last for 1 second but the second one last for half a second, it would be good if you can tell me that G is 1000 and E is 500 for example. And about the G major and C major, I don't know exactly what do you mean and what's the difference between them. I just need this ring-tone to be simple so it would be played by a buzzer of a machine.
__________________
|
|
|
|
|
|
|
#6 |
|
Registered Member
Last Online: 10-09-2012
Join Date: Mar 2010
Posts: 464
Thanks: 443
Thanked 764 Times in 389 Posts
Groans: 0
Groaned at 1 Time in 1 Post
|
Hope that this is what u need.
In seconds: G: 0.5 D: 0.25 D: 0.25 B: 0.5 D: 0.5 G: 1 A: 1 B: 1 C: 0.75 B: 0.25 D: 1.75 B: 0.25 C: 1 A: 0.75 D: 0.25 B: 1 G: 0.75 B: 0.25 A: 1 A: 0.75 G: 0.25 F#: 0.5 D: 0.25 D: 0.25 D: 0.5 D: 0.5 B: 1 D: 0.25 D: 0.25 B: 0.5 D: 0.5 G: 1 A: 1 B: 1 B: 0.75 B: 0.25 A: 1 D- E- F#: 1 G: 1 G: 0.75 G: 0.25 G: 1 D: 0.75 D: 0.25 G:3 A: 0.75 A: 0.25 B: 1 D: 0.75 D: 0.25 E: 1 F# : 0.75 F#: 0.25 G: 3 D: 0.75 D: 0.25 G: 3 A: 0.75 A: 0.25 B: 1 D: 0.75 C: 0.25 B: 1 A: 0.75 A: 0.25 G: 3 B: 0.75 C: 0.25 D: 1 D: 0.75 D: 0.25 D: 0.5 C: 0.5 B: 0.75 C: 0.25 D: 1 D: 0.75 D: 0.25 D: 1 C: 0.75 B: 0.25 A: 1 A: 0.75 A: 0.25 A: 0.5 G: 0.5 F#: 0.75 G: 0.25 A: 1 A: 0.75 A: 0.25 A: 1 D: 0.75 D: 0.25 B: 1 B: 0.75 B: 0.25 B: 1 G: 0.75 D: 0.25 E: 1 E: 0.75 E: 0.25 E: 1 C: 0.75 A: 0.25 D: 3 F: 0.75 F: 0.25 G: 4 And if you want them in numbers as u told me 1 sec => 1000: G: 500 D: 250 D: 250 B: 500 D: 500 G: 1000 A: 1000 B: 1000 C: 750 B: 250 D: 750 B: 250 C: 1000 A: 750 D: 250 B: 1000 G: 750 B: 250 A: 1000 A: 750 G: 250 F#: 500 D: 250 D: 250 D: 500 D: 500 B: 1000 D: 250 D: 250 B: 500 D: 500 G: 1000 A: 1000 B: 1000 B: 750 B: 250 A: 1000 D- E- F#: 1000 G: 1000 G: 750 G: 250 G: 1000 D: 750 D: 250 G: 3000 A: 750 A: 250 B: 1000 D: 750 D: 250 E: 1000 F#: 750 F#: 250 G: 3000 D: 750 D: 250 G: 3000 A: 750 A: 250 B: 1000 D: 750 C: 250 B: 1000 A: 750 A: 250 G: 3000 B: 750 C: 250 D: 1000 D: 750 D: 250 D: 500 C: 500 B: 750 C: 250 D: 1000 D: 750 D: 250 D: 1000 C: 750 B: 250 A: 1000 A: 750 A: 250 A: 500 G: 500 F#: 750 G: 250 A: 1000 A: 750 A: 250 A: 1000 D: 750 D: 250 B: 1000 B: 750 B: 250 B: 1000 G: 750 D: 250 E: 1000 E: 750 E: 250 E: 1000 C: 750 A: 250 D: 3000 F: 750 F: 250 G: 4000 |
|
|
|
| The Following User Says Thank You to Bella For This Useful Post: | Google (05-29-2010) |
|
|
#7 |
|
Last Online: 05-30-2013
Join Date: Jan 2008
Posts: 1,788
Thanks: 10,018
Thanked 1,100 Times in 651 Posts
Groans: 1
Groaned at 6 Times in 6 Posts
|
Thank you very much. This is exactly what I want.
I'll integrate this in the code, generate the sound and post it here. I hope it works well.
__________________
|
|
|
|
|
|
#8 |
|
Last Online: 05-30-2013
Join Date: Jan 2008
Posts: 1,788
Thanks: 10,018
Thanked 1,100 Times in 651 Posts
Groans: 1
Groaned at 6 Times in 6 Posts
|
I just have a question. Can you tell me these notes are which ones in this table?
=> http://www.intmath.com/Trigonometric-graphs/music.php Cause I need to know what frequencies to use.
__________________
|
|
|
|
|
|
#9 |
|
Last Online: 05-30-2013
Join Date: Jan 2008
Posts: 1,788
Thanks: 10,018
Thanked 1,100 Times in 651 Posts
Groans: 1
Groaned at 6 Times in 6 Posts
|
Well, I already tried the above notes with the follwoing frequencies:
Code:
A => 440 Hz, a B => 492 Hz, b C => 521 Hz, c D => 590 Hz, d E => 658 Hz, e F => 694 Hz, f G => 393 Hz, g FH => 369.99 Hz Code:
rom near TonesStruct Tones[] = {{500*SF, {G}},
{250*SF, {D,D}},
{500*SF, {B,D}},
{1000*SF, {G,A,B}},
{750*SF, {C}},
{250*SF, {B}},
{750*SF, {D}},
{250*SF, {B}},
{1000*SF, {C}},
{750*SF, {A}},
{250*SF, {D}},
{1000*SF, {B}},
{750*SF, {G}},
{250*SF, {B}},
{1000*SF, {B}},
{750*SF, {G}},
{250*SF, {B}},
{1000*SF, {A}},
{750*SF, {A}},
{250*SF, {G}},
{500*SF, {FH}},
{250*SF, {D,D}},
{500*SF, {D,D}},
{1000*SF, {B}},
{250*SF, {D,D}},
{500*SF, {B,D}},
{1000*SF, {G,A}},
{1000*SF, {B}},
{750*SF, {B}},
{250*SF, {B}},
{1000*SF, {A,D,E,FH}},
{1000*SF, {G}},
{750*SF, {G}},
{250*SF, {G}},
{1000*SF, {G}},
{750*SF, {D}},
{250*SF, {D}},
{3000*SF, {G}},
{750*SF, {A}},
{250*SF, {A}},
{1000*SF, {B}},
{750*SF, {D}},
{250*SF, {D}},
{1000*SF, {E}},
{750*SF, {FH}},
{250*SF, {FH}},
{3000*SF, {G}},
{750*SF, {D}},
{250*SF, {D}},
{3000*SF, {G}},
{750*SF, {A}},
{250*SF, {A}},
{1000*SF, {B}},
{750*SF, {D}},
{250*SF, {C}},
{1000*SF, {B}},
{750*SF, {A}},
{250*SF, {A}},
{3000*SF, {G}},
{750*SF, {B}},
{250*SF, {C}},
{1000*SF, {D}},
{750*SF, {D}},
{250*SF, {D}},
{500*SF, {D,C}},
{750*SF, {B}},
{250*SF, {C}},
{1000*SF, {D}},
{750*SF, {D}},
{250*SF, {D}},
{1000*SF, {D}},
{750*SF, {C}},
{250*SF, {B}},
{1000*SF, {A}},
{750*SF, {A}},
{250*SF, {A}},
{500*SF, {A,G}},
{750*SF, {FH}},
{250*SF, {G}},
{1000*SF, {A}},
{750*SF, {A}},
{250*SF, {A}},
{1000*SF, {A}},
{750*SF, {D}},
{250*SF, {D}},
{1000*SF, {B}},
{750*SF, {B}},
{250*SF, {B}},
{1000*SF, {B}},
{750*SF, {G}},
{250*SF, {D}},
{1000*SF, {E}},
{750*SF, {E}},
{250*SF, {E}},
{1000*SF, {E}},
{750*SF, {C}},
{250*SF, {A}},
{3000*SF, {D}},
{750*SF, {F}},
{250*SF, {F}},
{4000*SF, {G}}};
This is what I got => http://securepp.net/sound/sound.wma It seems good at the end. Is there any modification I can do on it to make it better?
__________________
|
|
|
|
|
|
#10 |
|
Registered Member
Last Online: 10-09-2012
Join Date: Mar 2010
Posts: 464
Thanks: 443
Thanked 764 Times in 389 Posts
Groans: 0
Groaned at 1 Time in 1 Post
|
While I was doing the frequencies I noticed that I missed a set of notes after the first 5 sets, I'll put it in red with the seconds and then I'll put the frequencies of all the notes:
G: 0.5 D: 0.25 D: 0.25 B: 0.5 D: 0.5 G: 1 A: 1 B: 1 C: 0.75 B: 0.25 D: 1.75 B: 0.25 C: 1 A: 0.75 D: 0.25 B: 1 G: 0.75 B: 0.25 A: 1 A: 0.75 G: 0.25 F#: 0.5 D: 0.25 D: 0.25 D: 0.5 D: 0.5 B: 1 D: 0.25 D: 0.25 B: 0.5 D: 0.5 G: 1 A: 1 B: 1 - 1000 B: 0.75 - 750 C: 0.25 - 250 D: 1 - 1000 C: 1 - 1000 The frequencies are: C: 523.25 D: 587.33 C: 523.25 B: 493.88 B: 493.88 B: 493.88 A: 440 D- E- F#: 293.66-329.63-369.99 G: 392 G: 392 G: 392 G: 392 D: 293.66 D: 293.66 G: 392 A: 440 A: 440 B: 493.88 D: 293.66 D: 293.66 E: 329.63 F# : 369.99 F#: 369.99 G: 392 D: 293.66 D: 293.66 G: 392 A: 440 A: 440 B: 493.88 D: 587.33 C: 523.25 B: 493.88 A: 440 A: 440 G: 392 B: 493.88 C: 523.25 D: 587.33 D: 587.33 D: 587.33 D: 587.33 C: 523.25 B: 493.88 C: 523.25 D: 587.33 D: 587.33 D: 587.33 D: 587.33 C: 523.25 B: 493.88 A: 440 A: 440 A: 440 A: 440 G: 392 F#: 369.99 G: 392 A: 440 A: 440 A: 440 A: 440 D: 293.66 D: 293.66 B: 493.88 B: 493.88 B: 493.88 B: 493.88 G: 392 D: 293.66 E: 329.63 E: 329.63 E: 329.63 E: 329.63 C: 523.25 A: 440 D: 587.33 F: 349.23 F: 349.23 G: 783.99 Last edited by Bella; 05-30-2010 at 08:08 AM. |
|
|
|
| The Following User Says Thank You to Bella For This Useful Post: | Google (05-30-2010) |
![]() |
|
| Tags |
| music, notes |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|