Page 2 of 2

Re: click a area of Tpanel control

PostPosted: Wed Dec 31, 2014 4:10 pm
by Silvio.Falconi
Rao,

Image

We Initiated from 3 octave because a C with 130,8 is a good listen --- I'll like Know How make instrument path ( piano, guitar, drum)

Static aTone := { 130.8, 138.6, 146.8, 155.6, 164.8, 174.6, 185.0, 196.0, 207.7, 220.0, 233.1, 246.9,; // 3 octave
261.7, 277.2, 293.7, 311.1, 329.6, 349.2, 370.0, 392.0, 415.3, 440.0, 466.2, 493.9,; // 4 octave
523.3, 554.4, 587.3, 622.3, 659.3, 698.5, 740.0, 784.0, 830.6, 880.0, 932.3, 987.8,; // 5 octave
1047 , 1109, 1175, 1245, 1319, 1397, 1480, 1568, 1661, 1760, 1865, 1976 ,; // 6 octave
2093 , 2217, 2349, 2489, 2637, 2794, 2960, 3136, 3322, 3520, 3729, 3951 } // 7 octave

I arrive on 4 octave ( 48 keys) .. I insert your modifies and the post the new sources
I add also the possibility to save the music on a file and load music from this file

Re: click a area of Tpanel control

PostPosted: Wed Dec 31, 2014 4:37 pm
by nageswaragunupudi
After finalizing the frequencies for all octaves, please share the final values with me.

How can we make the duration controlled by the user? That is the tone should start playing when the user presses the key and stop when he releases the key.( ofcourse that is not piano). I like to have this variation also.

Re: click a area of Tpanel control ( Creating a Piano)

PostPosted: Wed Dec 31, 2014 11:49 pm
by Silvio.Falconi
Mr. Rao,

on tone function of Andy try to wrote

#define SAMPLING_RATE 126100

instead of

#define SAMPLING_RATE 44100

it change the duration of note
Perhaps we can found a function to control it !!!



See it please I add :

now the Piano have 60 keys !!!!! ( use with METHOD1 active)
Border and Background
Save music on ini file
Load music from inifile ( it play the music but the keys not are light)

From menu you can create a new song file or load one saved!!!!!

Re: click a area of Tpanel control ( Creating a Piano)

PostPosted: Thu Jan 01, 2015 12:05 am
by Silvio.Falconi
a Demo song to try with new sources

Save with : Birthday.ini

Code: Select all  Expand view

[Music]
Note=42
1=G2T1/4
2=G2T1/8
3=A2T1/4
4=PT1/8
5=G2T1/4
6=PT1/8
7=C3T1/4
8=PT1/8
9=H2T1/4
10=PT1/2
11=G2T1/4
12=G2T1/8
13=A2T1/4
14=PT1/8
15=G2T1/4
16=PT1/8
17=D3T1/4
18=PT1/8
19=C3T1/4
20=PT1/2
21=G2T1/4
22=G2T1/8
23=G3T1/4  
24=PT1/8
25=E3T1/4  
26=PT1/8
27=C3T1/4  
28=C3T1/8    
29=H2T1/4
30=PT1/8
31=A2T1/4
32=PT1/8
33=F3T1/4  
34=F3T1/8  
35=E3T1/4  
36=PT1/8
37=C3T1/4  
38=PT1/8
39=D3T1/4  
40=PT1/8
41=C3T1/4  
42=PT1/2