[Lazarus] Update sound shop my next tutoring project

silvioprog silvioprog at gmail.com
Wed May 15 20:57:28 CEST 2019


On Wed, May 15, 2019 at 2:45 PM Anthony Walter via lazarus <
lazarus at lists.lazarus-ide.org> wrote:

> I have summer camp with several successive week long classes coming up and
> am trying to put together some fun programming materials to engage the kids
> and hopefully encourage them to explore more.
>
> Yesterday I created the start of my next project for teaching kids on the
> subject of computer programming using Lazarus and Free Pascal as the
> teaching tools. Here is a brief video demonstrating what I have so far
> along with a github page containing the sources.
>
> https://cache.getlazarus.org/videos/sound-shop-example.mp4
> https://github.com/sysrpl/SoundShop/
>
> What the Sound Shop program does:
>
> Sound Shop let's kids write functions and hear the results of those
> functions. Right now it's dead simple to write wave form functions, but I
> am going to enhance the program to allow for effect pipelines which map
> unto keys. These pipelines will be a lot like the node in my Image Shop
> program but will map to piano keys instead of the display.
>
> I need to take a break from these example projects for a few days and work
> on helping the school with schedules, but I thought I'd ask anyone who find
> this interesting for some help.
>
> Here are some of the things anyone can do to help:
>
> Write a routine to load a music or song that will play on the keyboard
> using the currently assigned piano keys. You can turn a key on or off by
> simply typing Piano.Key[Index] := True/False. This will light up or dim the
> key and play the corresponding mapped audio channel. Users can play already
> along with with music or songs, so there's that feature. Obviously this
> feature will also need a few demo music or song files. You can choose
> however you want to store and read a music or song file.
>
> Write an MP3 streamer that will convert in memory portions of an MP3 file
> to audio samples. This will allow piano key channels to be mapped to sounds
> other than computer generated waves. Also, I will eventually hook effects
> up to both wave and MP3 samples. Please no third part libraries to convert
> MP3 data to samples, only Pascal code. I will do this if no one takes up
> the task.
>
> Fix the issues with 32 bpp PNG images on Linux.
>
> Some of the things I am going to do:
>
> I am going to add a sound pipeline to the program to allow for effects and
> other things to modify sounds before they are routed from the piano keys to
> the underlying audio system. Each piano key will have its own pipeline.
>
> I am going to add an oscilloscope to visualize the all the collectively
> playing samples as they form waves. The scope will have a few controls to
> adjust the phase, stretch, and amplitude.
>
> I might add a bar staff allowing rectangular notes to be places on it and
> stretched. Moving notes up or down on the staff changes the mapped piano
> key, and stretching alters the note duration.
>
> If anyone want to contribute it would be much appreciated.
>
> Thanks
>
> Anthony
>

Hi Anthony,

thanks for sharing this incredible work.

Could you attach some license to this stuff? The question is just because
you wrote nice classes like TPianoKeyboard which could be used in a final
application. (for example, I could use it to produce alarm songs in my
Raspberry board dynamically instead of playing them from files)

best,

--
Silvio Clécio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20190515/f19ab89a/attachment.html>


More information about the lazarus mailing list