standalone midi piano synthesizer

User projects written in or related to FreeBASIC.
chung
Posts: 648
Joined: Jan 16, 2010 20:52
Location: France
Contact:

standalone midi piano synthesizer

Post by chung »

midipiano_chung is a standalone midi piano synthesizer which plays piano samples based sounds as midi data income in the selected midi input port (if any) of your computer. easily customizable by modifying the sound files in the ./sounds/ folder.The program is written in freebasic and uses fbsound with max 128 notes polyphony / 15 channels.

=> http://chungswebsite.blogspot.com/searc ... iano_chung

Image
Last edited by chung on Oct 01, 2011 8:51, edited 1 time in total.
chung
Posts: 648
Joined: Jan 16, 2010 20:52
Location: France
Contact:

Post by chung »

(18/05/2011) fantastic enhanced piano5
chung
Posts: 648
Joined: Jan 16, 2010 20:52
Location: France
Contact:

Post by chung »

(19/05/2011) velocity curves and selection added [V] key
(22/05/2011) piano6 added
(23/05/2011) piano7 added
chung
Posts: 648
Joined: Jan 16, 2010 20:52
Location: France
Contact:

Post by chung »

(26/05/2011) [K] keyboard volume layout and edit added

Image
chung
Posts: 648
Joined: Jan 16, 2010 20:52
Location: France
Contact:

Post by chung »

(27/05/2011) some delay on noteoff added (to render short notes)
chung
Posts: 648
Joined: Jan 16, 2010 20:52
Location: France
Contact:

Post by chung »

i have added the -mt (multithreading) statement to the compile options
windows gui (fbc -s gui ) -> (fbc -s gui -mt )
to avoid compilation warning(21) from fbsoundwin , and random crashes ?
chung
Posts: 648
Joined: Jan 16, 2010 20:52
Location: France
Contact:

Post by chung »

in fact,it doesnt crash, but there is a message "no response" in the title bar
while the music keeps playing, with an attempt to draw the screen one row larger than expected.
it may be because i did "locate 0:cls" just after opening the window
i have replaced it by "cls:locate 1" as locate is 1 based, works better ?

bug found : an array index out of bounds ....
chung
Posts: 648
Joined: Jan 16, 2010 20:52
Location: France
Contact:

Post by chung »

(29/05/2011) some bugs fixes
(04/06/2011) delay on noteoff edit added (50...1000ms)
(05/06/2011) switchable autovol added (automatic volume control)
D.J.Peters
Posts: 8586
Joined: May 28, 2005 3:28
Contact:

Post by D.J.Peters »

Hello chung,
i won't teach you in audio DSP coding

but

you are using fbs_Sound_Speed() to play notes in different frequencies.

The most powerfull part of FBSound are the realtime pitchshifter
(you won't find it in any other free open source sound lib)

The result of changing only the playback speed
is more a kind of micky mouse voice.

You know what my bad english says ?

If you have 2 samples per octave and you are willing
to use the pitchshifter you can create perfect results
same as YAMAHA, KORG, ROLAND etc.

How ever i like your idea of an virtual piano.

Joshy

edit:
The math behind the pitchshifter needs some CPU power
for example if you will play 24 or more voices together on a slower/older PC and runs in to trouble
you have the choice to use the pitchshifter only once while you are load a new bank of samples.

one more hint
If you will play other sounds with your virtual sound generator
e.g. strings, flutes, organs, guitars ...
you should thing about a system of loop points and of course ADSR

http://en.wikipedia.org/wiki/ADSR_envel ... R_envelope
chung
Posts: 648
Joined: Jan 16, 2010 20:52
Location: France
Contact:

Post by chung »

hi !

pitch shifter is not documented in the doc folder.
speed +-30% is fast and dont modify the original sound.


i am interested in piano sounds only because its the only sound i use with my midi player (midi_chung).All i wanted is to enhance the default midi GS Wavetable grand piano sound of the computer, and add sounds i can modify or record with a sound editor like Audacity (1 per octave).

i have tested several free piano VSTi instruments with Cantabile_lite or VSThost ,but i think mine is better.
you can even record your own acoustic piano and add it to the piano8..piano12 free banks (see readme.txt file).

if you are interested, i can post a version with enveloppe editor (you can draw a gain curve with the mouse) but it doesnt sounds as well as the natural sounds.
chung
Posts: 648
Joined: Jan 16, 2010 20:52
Location: France
Contact:

Post by chung »

(06/06/2011) compressor added (autovolcomp ,autovolcomp2)
chung
Posts: 648
Joined: Jan 16, 2010 20:52
Location: France
Contact:

Post by chung »

(09/06/2011) reverb1,reverb2,reverb3(edit) added
chung
Posts: 648
Joined: Jan 16, 2010 20:52
Location: France
Contact:

Post by chung »

(10/06/2011) save, load reverb/keyvol added
(12/06/2011) equalizer added
chung
Posts: 648
Joined: Jan 16, 2010 20:52
Location: France
Contact:

Post by chung »

(19/06/2011) keytone (note dependant equalizer) added
modify the tone of the samples
maddogg6
Posts: 824
Joined: Dec 07, 2005 22:58
Contact:

Post by maddogg6 »

your work looks impressive... well done...

but...

I wonder if you forgot to include a module or something (compiled FBSound lib perhaps? - I thought FBSound would be linked statically by default - but I am probably mistaken)

But I get "No free playback driver" - it seems, it does not find my admittedly non-standard but otherwise functional sound card drivers in WinXP. I *have* ran FBSound demos before successfully, btw - so I have had FBsound work with my sound card drivers. edit: it may have been testing his ASIO .... ??) /edit

No big deal, it was more a curiosity on my part...so no need for jumping through hoops or anything :)


Cheers.
Post Reply