ya all of thos slider bars are temporary....
I just needed to see if i could get the setup working.
I see now that it works good so i will even have a popup window with all the instruments to choose from.
Nice tune...
did you like my little tune...lol
I want to set the key board up so you can hit record and just start hammering notes in. This would be a cool feature.
Ive been doing some reading on the midi file format. You have provided some good information however it doesnt explain multi track too well. How the order of writting the tracks is.
Can you write a midi exporter already?
maby i should just get you to code that section.
this is a code snippet on the main playback loop.
updateplay:
temp=val(getgadgettext(ed3))
temp=250-temp
temp=temp*2
if timer()-tmdelay<=temp then return
left_over=timer()-tmdelay+temp
tmdelay=timer()+leftover:
if timer()-tmdelay>=temp then tmdelay=timer()
`temp
qrepeat=getchecked(rept)
size=val(getgadgettext(ed5))
if playbar>size then playing=0:
if playing=0 and qrepeat=1 then playing=1:playbar=0:`if getchecked(rep2)=1 then setscrollbarposition sbar,0
if playing=0 then gosub offnotes:return
for x=1 to 120
for t=1 to 10
if playin(x,t,0)=1 then playin(x,t,1)=playin(x,t,1)-1:if playin(x,t,1)=<0 then midi note off midi,x,t:playin(x,t,0)=0:playin(x,t,1)=0:
next t
next x
for x=1 to 10
vol=vol(x)
vol=vol+vol
set channel volume midi,x,vol
modu=modual1(x)
modu=modu+modu
set modwheel midi,x,modu
set midi instrument midi,x,instrument(x)
panboy=pan1(x)
if panboy=3 then set channel pan midi,x,64
if panboy=6 then set channel pan midi,x,128
if panboy=0 then set channel pan midi,x,0
if panboy=1 then set channel pan midi,x,25
if panboy=2 then set channel pan midi,x,50
if panboy=4 then set channel pan midi,x,85
if panboy=5 then set channel pan midi,x,110
for y=0 to 27
if music(playbar,x,y,0)=1 then midi note off midi,music(playbar,x,y,2),x:midi note on midi,music(playbar,x,y,2),x,100:playin(music(playbar,x,y,2),x,1)=16:playin(music(playbar,x,y,2),x,0)=1
if music(playbar,x,y,0)=2 then midi note off midi,music(playbar,x,y,2),x:midi note on midi,music(playbar,x,y,2),x,100:playin(music(playbar,x,y,2),x,1)=8:playin(music(playbar,x,y,2),x,0)=1
if music(playbar,x,y,0)=3 then midi note off midi,music(playbar,x,y,2),x:midi note on midi,music(playbar,x,y,2),x,100:playin(music(playbar,x,y,2),x,1)=4:playin(music(playbar,x,y,2),x,0)=1
if music(playbar,x,y,0)=4 then midi note off midi,music(playbar,x,y,2),x:midi note on midi,music(playbar,x,y,2),x,100:playin(music(playbar,x,y,2),x,1)=2:playin(music(playbar,x,y,2),x,0)=1
if music(playbar,x,y,0)=5 then midi note off midi,music(playbar,x,y,2),x:midi note on midi,music(playbar,x,y,2),x,100:playin(music(playbar,x,y,2),x,1)=1:playin(music(playbar,x,y,2),x,0)=1
next y
next x
playbar=playbar+1
return
offnotes:
for x=1 to 10
for y=1 to 120
midi note off midi,y,x
next y
next x
return
That chunk is the guts of this whole thing.
so i have the 2 arrays
music(nextnote,track,note,0)=1 `note on that lasts 16 note spaces
music(nextnote,track,note,0)=2 `note on that lasts 8 note spaces
music(nextnote,track,note,0)=3 `note on that lasts 4 note spaces
music(nextnote,track,note,0)=4 `note on that lasts 2 note spaces
music(nextnote,track,note,0)=5 `note on that lasts 1 note spaces
then in my other array keeps track if a note is playing and when to shut it off
playin(note,track,0)=1 on 0=off
playin(note,track,1)=# a number count down until shutting the note off
thats it if you could help me with the midi section that would be great
anyother suggestions or thoughts?
This program sounds like its gunna be a good choice for free bees when it comes to making music for your games and projects when it will have at least 3-4 formats available for saving..2 of em being standard and 2 exclusive to dbpro with include files
the catch with the include file however is that they will need to install the midi plugin dll