Notifications

I’ve finally found a little free time to get back to work on Pyxis/Netby and I was wondering if anyone who’s better at sounds than me wouldn’t mind making a few notification sounds for the piezo. So far I’ve managed a little chirp.

It’d be nice to have 3 sounds:
Error
Peripheral Plugged In
Peripheral Unplugged

Any takers?

Have you thought about just making a driver for PCM audio, then putting in some “real” sounds?

No point since GHI is releasing one in the next update. This is just a in the mean time sort of thing.

Plus the built-in Piezo doesn’t seem to be on a PWM pin so this would be a backfall for when there isn’t an audio out. I’ve already connected a jack to the AnalogOut pin for when GHI’s code is out. :smiley:

That’s what I meant but at any rate, I think our only option for the piezo is to buzz it at a few select freqs. Maybe chain them together or something.

Hi I have a table that was created on the pic16f84 with pitch and envelope with a lookup to all available notes (It was a simple doorbell project) this used the good old simple peizo and produced a pretty good sound, I eventually made a simle organ from it…

It’s in assembler but all you need is the table (and adjust the frequency)
If you want it ill dig it out

Ian

Dig away. It could be extremely helpful in this case.

Thanks Ian!

This is what I use for the cobra project:

Utility.Piezo(1000, 10);  //open sound
Utility.Piezo(1000, 100); //close sound

//changes made sound
Utility.Piezo(1000, 10);
Utility.Piezo(2000, 10);
Utility.Piezo(3000, 10);

Feel free to tweak. It’s cool to generate sounds, lol :smiley:

I suppose we could make a class to auto sequence frequencies instead of just making the calls yourself. We could have that as a base for netby then also have a driver for the PCM audio and MP3 extension.

I’ll get the full code tonight

But in the meantime I have all the frequencies for the “Utilities.Peizo(pitch,duration)” class

You can make any ditto you want by throwing the right frequency at it

       NOTE          FREQ

LOW A 440
A# 466
B 494
C 523
C# 554
D 587
D# 622
E 659
F 698
F# 740
G 784
G# 831

MID A 880
A# 932
B 989
C 1046
C# 1109
D 1175
D# 1244
E 1318
F 1397
F# 1480
G 1568
G# 1661

HIGH A 1760
A# 1865
B 1975
C 2093
C# 2217
D 2349
D# 2489
E 2637

Why not play midi file on pwm?

You mean with the GHI PCM driver?

Nop! MIDI on PWM and WAV on AnalogOut simultaneously :smiley:

[url]NET Micro Framework Stepper Motor Midi Player - YouTube

^^^ My cousin was one of the devs on that project.

Owww what cool that video is amazing .

Aww that is really cool.

The table is the same as the one I already posted
but using the peizo I create a cool ditty


case ID_CLICK:
                    {
                       Utility.Piezo(523, 50);    // C
                       Utility.Piezo(659, 50);    // D
                       Utility.Piezo(784, 50);    // E
                       Utility.Piezo(1046, 100); // C
                       break;
                    }

To go to lower an octave the frequency is halved and doubld to go up
with 4/4 time a semiquaver eqautes to 333ms
It does produce better sounds though as gus said through the analog out.

I think we could probably simplify it a bit, just have it take in an array of structs. Each struct would hold the note data.