[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 574: sizeof(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 630: sizeof(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 113: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
Plum Geek Forum • Imperial March
Page 1 of 1

Imperial March

Posted: Mon Sep 07, 2015 4:29 pm
by trent
My seven year old daughter and I have been going through the Ringo guide book, and when we got to the chirp chapter, she really wanted to get Ringo to play the Star Wars Imperial March. This is what we came up with. It's not complete or perfect, but we wanted to share.

Re: Imperial March

Posted: Thu Sep 24, 2015 3:20 am
by JimSVMI83
Great Job I'm impressed

Jim

Re: Imperial March

Posted: Fri Oct 30, 2015 4:58 pm
by jedward
Especially given that I have absolutely NO musical ability, I really appreciate your sketch.
However, my old and much abused ears can barely hear the tones emitted by my Ringo.
Is there a way to increase the volume of the output when using the "PlayChirp(NOTE…, …)" function?
Given that the PlayChirp function processes only tone and time variables — if I knew how, could I set a louder global volume level somehow?

void loop(){
PlayChirp(NOTE_E5, 30);
delay(333);
OffChirp();
delay(333);

Re: Imperial March

Posted: Sat Feb 06, 2016 10:30 am
by sil
Trent & daughter,

Great job guys, works and is very recognisable. Did you use any tools to help with the notes? I'd love to find a simple tool that takesvan audio file and gives me the notes and delays as i'm useless at music. Itd be great to make some happy, sad, bored, angry sounds to help give ringo character. Maybe some semblence of a voice? Glad to see somecode being shared, hope others don't stay shy forever, i'm really loving the fun at programming ringo even if i'm a poor programmer i'm learning heaps from my mistakes and enjoying it all.

Jedward,

Load the code into the arduino software, press ctrl F to bring up the find and replace dialog box. You can then find ", 30);" and replace with ", 100);" to increase the volume. Defining a volume variable and using that instead of the value of 30 in the code should work too to provide an easier volume control. At least in this case the amplitde value is constant for all notes so a variable should work nicely here but find and replace is quicker.

Double checking the code as downloaded you only need to find the value of 30 and replace it with a larger number as 30, is only used in the amplitude so nothing else will break in this instance.

Re: Imperial March

Posted: Sun Feb 07, 2016 3:27 am
by sil

Re: Imperial March

Posted: Fri Feb 12, 2016 6:32 pm
by jedward
sil
Thanks for the post. I obviously did not read the Manual well enough. I 'thought' that the second value after freq was duration, but in fact it is amplitude. You are right, and now I can hear better.
Thanks.
jedward